[Release/OpenNos] Prestige System

06/30/2018 17:22 ImTheReal#1
Hey folks,
today i wanna release a very simple prestige System.

Informations:

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.

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.

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
06/30/2018 17:50 Voria#2
Thanks for Release @[Only registered and activated users can see links. Click Here To Register...] Good Job
06/30/2018 17:57 Saber none#3
Thx m8 I appreciate that, but are you sure about the first two requirements? Thats basically copy and paste.
06/30/2018 18:01 ImTheReal#4
Quote:
Originally Posted by mix0067@ View Post
Thx m8 I appreciate that, but are you sure about the first two requirements? Thats basically copy and paste.
I said that, to show how easy it is to add these. :)
And thanks!

Quote:
Originally Posted by Voria View Post
Thanks for Release @[Only registered and activated users can see links. Click Here To Register...] Good Job
Thanks!! :)
07/01/2018 17:58 erixor#5
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
07/01/2018 23:53 ImTheReal#6
Quote:
Originally Posted by erixor View Post
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)


But thanks for your Opinion
07/02/2018 06:03 Zanouu#7
Code:
        public void Prestige(Prestige PrestigePacket)
        {
			if (Session.CurrentMapInstance.MapInstanceType == MapInstanceType.BaseMapInstance)
			{
				if (Session.Character.Level == ServerManager.Instance.Configuration.MaxLevel
					&& Session.Character.JobLevel == ServerManager.Instance.Configuration.MaxJobLevel
					&& Session.Character.HeroLevel == ServerManager.Instance.Configuration.MaxHeroLevel)
				{
					if (Session.Character.Inventory.All(i => i.Type != InventoryType.Wear))
					{
						Session.Character.ChangeClassPrestige(ClassType.Adventurer);
						Session.Character.Prestige += 1;
						ServerManager.Instance.ChangeMap(Session.Character.CharacterId);
						//  RewardsHelper.Instance.GetLevelUpRewards(Session);
						LogHelper.Instance.InsertCommandLog(Session.Character.Name, Session.Character.CharacterId, PrestigePacket, Session.IpAddress);
					}
					else
					{
						Session.SendPacket(UserInterfaceHelper.GenerateMsg(Language.Instance.GetMessageFromKey("EQ_NOT_EMPTY"), 0));
					}
				}
				else
				{
					Session.SendPacket(UserInterfaceHelper.GenerateMsg(Language.Instance.GetMessageFromKey("NOT_LEVEL_PRESTIGE"), 0));
				}
			}
        }
07/02/2018 10:16 Blowa#8
Quote:
Originally Posted by Zanouu View Post
As I've already told you, invert your conditions and checks "errors" before your processing to reduce code's nesting (like i modified)
07/10/2018 18:22 [NH]Pyro#9
Use RagePoint for identify prestige!!!
07/11/2018 23:04 ImTheReal#10
Quote:
Originally Posted by [NH]Pyro View Post
Use RagePoint for identify prestige!!!
Sounds cool, i personally used Compliments but RagePoint is also cool to use.
07/18/2018 21:13 redbull2905#11
Quote:
Originally Posted by ImTheReal View Post
Hey folks,
today i wanna release a very simple prestige System.

Informations:

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.

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.

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)
{

Session.Character.ChangeClass(ClassType.Adventurer );
Session.Character.MapId = 1;
Session.Character.Level = 15;
Session.Character.Prestige +=1;
Session.Character.JobLevel = 20;
Session.Character.HeroLevel = 0;
Session.Character.DefenceRate =+500;
Session.Character.GiftAdd(1286, 10);
Session.Character.DistanceDefence =+500;
Session.Character.MagicalDefence =+500;
Session.Character.GiftAdd(9074, 10);
Session.Character.GiftAdd(1249, 10);

{
return;
}

}

}
07/18/2018 22:12 Zanouu#12
Quote:
Originally Posted by redbull2905 View Post
Session.Character.DefenceRate = + +500;
Session.Character.DistanceDefence = + +500;
Session.Character.MagicalDefence = + +500;

= + + ? wtf is this :confused::confused::lul:
07/18/2018 22:21 0Lucifer0#13
Quote:
Originally Posted by Zanouu View Post
= + + ? wtf is this :confused::confused::lul:
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.
07/18/2018 22:50 ImTheReal#14
Quote:
Originally Posted by redbull2905 View Post
I changed the code you had forget Session.Character.ChangeClass (ClassType.Adventurer);
and I set for the hero level

/// <summary>
/// $ Prestige
/// </ summary>
/// <nom de paramètre = "prestigePacket"> </ param>
public void Prestige (PrestigePacket paquet de prestige)
{
if ( Session.Character.Level == 250)
{
if (Session.Character.HeroLevel == 100)
{

Session.Character.ChangeClass (ClassType.Adventurer);
Session.Character.Level = 15;
Session.Character.JobLevel = 20;
Session.Character.HeroLevel = 0;
Session.Character.DefenceRate = + +500;
Session.Character.GiftAdd (1286, 10);
Session.Character.DistanceDefence = + +500;
Session.Character.MagicalDefence = + +500;
Session.Character.GiftAdd (1289, 10);
Session.Character.GiftAdd (1249, 10);

{
return;
}

}

}
else
{
Session.SendPacket ("msg 5 Votre niveau n'est pas assez élevé!");
}
}
Why would u use 2 If Statements?
07/18/2018 22:52 erixor#15
Even if it had worked for some reason, the stats would not have been saved. The defense & the added stats would be back to normal after a relog.