This System is just a simple one.
By using it, you will be able to reset your Level, Hero Level, Joblevel and also gift Items to other players.
Step 1: Add a CommandPacket!
- For this action, you need to visit /OpenNos.GameObjects/Packets/CommandPackets. You need to create a class, which is called "PrestigePacket.cs".
After doing this, you need to implement a code.
using OpenNos.Core;
using OpenNos.Domain;
namespace OpenNos.GameObject.CommandPackets
{
[PacketHeader("$Prestige", PassNonParseablePacket = true, Authority = AuthorityType.User)]
public class PrestigePacket : PacketDefinition
{
//You can add a Helper, but this isnt usefull at all.
}
}
Thats the command Packet
Step 2: Creating a Handler!
- Visit /OpenNos.Handler/CommandPacketHandler.cs
After you opened it up, you can create a new Code.
/// <summary>
/// $Prestige
/// </summary>
/// <param name="prestigePacket"></param>
public void Prestige(PrestigePacket prestigePacket)
{
if (Session.Character.Level == 99)
{
//-------------------------------------------------------------
//Now add you actions
//For example
//Session.Character.Level = 1;
//Session.Character.JobLevel = 1;
//Session.Character.HeroLevel = 0;
//Now add your Benefits
//For example: Compliment, Reputation, Gold
//For this, you have to add Session.Character.and here you can
//add your wished benefit like Session.Character.Compliment = 50;
//-------------------------------------------------------------
Session.Character.Level = 1; //Makes Character Lvl 1
Session.Character.JobLevel = 1; //Makes Character JLvl 1
Session.Character.HeroLevel = 0; //Makes Character HLvl 0
Session.Character.Compliment = 50; //Adds 50 Compliment
Session.Character.GiftAdd(1, 1); //Adds your gift to the player
}
else
{
Session.SendPacket("msg 5 Your Level is not high enough!");
//Add the message, which will pop up, when Player has
//not the requirements.
}
}
Requirements
To add the Code: Knowledge 4/10
To edit it the way you want: 5/10
To add more benefits, or recode it: 7/10
This is not a prestige system, this is a single if statement (and yet you managed to hardcode it, and make it wrong)
- Don't hardcode lvl 99, on Ciapa's source you have a configuration manager & on ON.NW source you have everything stored in ServerManager, which is a bit better.
- Hardcoded packet strings is not a viable or maintainable solution
- Your else condition is useless
- You don't add 50 compliment, you set the compliment of the character to 50, no matter the prestige
If anyone want's to make a prestige system, this is definately not a good way (I'm talking for developers of course, not copy & paste leechers)
Anyways, that was just my opinion, thanks for contributing to this community
This is not a prestige system, this is a single if statement (and yet you managed to hardcode it, and make it wrong)
- Don't hardcode lvl 99, on Ciapa's source you have a configuration manager & on ON.NW source you have everything stored in ServerManager, which is a bit better.
- Hardcoded packet strings is not a viable or maintainable solution
- Your else condition is useless
- You don't add 50 compliment, you set the compliment of the character to 50, no matter the prestige
If anyone want's to make a prestige system, this is definately not a good way (I'm talking for developers of course, not copy & paste leechers)
Anyways, that was just my opinion, thanks for contributing to this community
Of course it is not the right way but, i like how it works and the else statement is just a checker. It works if u know how. And ye, it just set the Compliments to 50 cuz u forgot to add "+" which was a typo. It is a Prestige System, just simple made.
- Sets Level, Joblevel and Hero Level to 1
- Able to Gift Items to Player
- Can check if Player has the requirements. (Even if its hardcoded its not possible to use it without the requirements)
This System is just a simple one.
By using it, you will be able to reset your Level, Hero Level, Joblevel and also gift Items to other players.
Step 1: Add a CommandPacket!
- For this action, you need to visit /OpenNos.GameObjects/Packets/CommandPackets. You need to create a class, which is called "PrestigePacket.cs".
After doing this, you need to implement a code.
using OpenNos.Core;
using OpenNos.Domain;
namespace OpenNos.GameObject.CommandPackets
{
[PacketHeader("$Prestige", PassNonParseablePacket = true, Authority = AuthorityType.User)]
public class PrestigePacket : PacketDefinition
{
//You can add a Helper, but this isnt usefull at all.
}
}
Thats the command Packet
Step 2: Creating a Handler!
- Visit /OpenNos.Handler/CommandPacketHandler.cs
After you opened it up, you can create a new Code.
/// <summary>
/// $Prestige
/// </summary>
/// <param name="prestigePacket"></param>
public void Prestige(PrestigePacket prestigePacket)
{
if (Session.Character.Level == 99)
{
//-------------------------------------------------------------
//Now add you actions
//For example
//Session.Character.Level = 1;
//Session.Character.JobLevel = 1;
//Session.Character.HeroLevel = 0;
//Now add your Benefits
//For example: Compliment, Reputation, Gold
//For this, you have to add Session.Character.and here you can
//add your wished benefit like Session.Character.Compliment = 50;
//-------------------------------------------------------------
Session.Character.Level = 1; //Makes Character Lvl 1
Session.Character.JobLevel = 1; //Makes Character JLvl 1
Session.Character.HeroLevel = 0; //Makes Character HLvl 0
Session.Character.Compliment = 50; //Adds 50 Compliment
Session.Character.GiftAdd(1, 1); //Adds your gift to the player
}
else
{
Session.SendPacket("msg 5 Your Level is not high enough!");
//Add the message, which will pop up, when Player has
//not the requirements.
}
}
Requirements
To add the Code: Knowledge 4/10
To edit it the way you want: 5/10
To add more benefits, or recode it: 7/10
Hope it helped ya guys out!
Greetings,
Brix - Gardia Systems Owner
I changed the code you had forget Session.Character.ChangeClass (ClassType.Adventurer);
and I set for the hero level
/// <summary>
/// $Prestige
/// </summary>
/// <param name="prestigePacket"></param>
public void Prestige(PrestigePacket prestigePacket)
{
if (Session.Character.Level == 250)
{
if (Session.Character.HeroLevel == 100)
{
The proof he doesn’t know what he is doing... this will set to 500. This still compile because of the space but he could even do + + + + + (((((500))))) this would still compile.
OpenNos "The project 'OpenNos.Login' failed to build." 06/19/2019 - Nostale - 11 Replies Hello! When I put in update-database in Visual Studio I get the 'The project 'OpenNos.Login' failed to build.' error. I already did what was on the troubleshoot before I put it in. I've been at this for hours and I can't figure it out. Can someone help me please?
[OpenNos] Prestige level not saving 02/13/2019 - Nostale - 0 Replies Hey Community.
after a lot of try and do i dont get the prestigeLevel safe....
i looked a lot of Threads but it still dont safe .. could someone help me ?
btw. i use the Cracked Ciapa Source.
its done i just Set AutomaticMigrationsEnabled = true;
[OpenNos] ¿How to select the project OpenNos.DAL.EF? 05/04/2018 - Nostale - 4 Replies Hello, I have a problem with my visual studio 2017, it turns out that to be able to give the update-database command I must have the project OpenNos.DAL.EF But the thing is that in my visual studio there is no option to select the project ... I need help!:D:D
[opennos]The project 'OpenNos.Login' failed to build. 08/03/2017 - Nostale - 9 Replies Hello I have a problem with the package manager console to run the update- database command to opennos soon as I executes the command, he said: The project ' opennos.login ' failed to build
What to do? I made the updates to Microsoft Visual Studio thank you ..