![]() |
[Release/OpenNos] Prestige System
Hey folks,
today i wanna release a very simple prestige System. Informations: Spoiler:
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. Spoiler:
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. Spoiler:
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 |
Thanks for Release @[Only registered and activated users can see links. Click Here To Register...] Good Job
|
Thx m8 I appreciate that, but are you sure about the first two requirements? Thats basically copy and paste.
|
Quote:
And thanks! Quote:
|
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 |
Quote:
- 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 |
Code:
public void Prestige(Prestige PrestigePacket) |
Quote:
|
Use RagePoint for identify prestige!!!
|
Quote:
|
Quote:
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; } } } |
Quote:
= + + ? wtf is this :confused::confused::lul: |
Quote:
|
Quote:
|
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.
|
I may have failed on two things, it's true that I see it now
|
Quote:
[IMG=expandable: 1]https://image.ibb.co/kDQazJ/useless.png[/IMG] |
so the first one is not useless having to test it is functional
So tell me how I can add more defenses |
Quote:
|
I tried to make this code as complete as possible. I would like to ensure that the worn equipment is removed automatically
|
Quote:
Although u could use options as a checker Code:
if (option == 0) |
Do you Read All message in this Thread ? :notsureif:
Spoiler:
|
[IMG=expandable: 1]https://cdn.discordapp.com/attachments/468527749510725632/470268762080280576/Screenshot_2.png[/IMG] when I make the command it makes the server crash
|
public short RespawnMapTypeId @[Only registered and activated users can see links. Click Here To Register...]
|
Quote:
again I use different codes of your zanou your codes give me an error |
Code:
if (session.Character.Inventory.All(i => i.Value.Type == InventoryType.Wear)) |
Quote:
|
[IMG=expandable: 1]https://cdn.discordapp.com/attachments/468395839673597953/470969417346449408/Screenshot_3.png[/IMG]
your code does not work I become an adventurer even having the stuff worn |
Quote:
|
Quote:
|
He just don’t understand what he is doing... he put random code in a random place if this compile he just complain that it doesn’t do what he want...seriously you should better learn development it will take you less than 2 hours to understand how a if statement work...
Moreover the code will work if you fix those little mistake like All=> Any But you don’t even understand how the sendpacket work... |
Quote:
|
Quote:
|
Quote:
=> Operator is used in C# for lambdas. Linq support predicates, as C# support lambdas and lambdas can be used as predicates, you can simply create a lambda within the linq query. Within a lambda, captured parameters are given, splitted by a coma, before the => operator After that => operator it's simply the "functional part" of a lambda [Only registered and activated users can see links. Click Here To Register...] You can also use => Operator for expression body members on : C# 7 : Constructor Finalizer Property Set Indexer C# 6 : Method Property Get Btw, a little "=> operator C#" to google would have answer to your question. |
Quote:
|
Quote:
actual captured element for each value within the Enumerable Lambda predicate that returns a boolean In most case, predicates are evaluating the captured element to define if the element fits our "expectations" or not. In this case, the captured element needs to be an item (i.Value) of type Wear (i.Value.Type == InventoryType.Wear) Last thing, lambdas are just "functions" without an explicit symbol (oftenly called anonymous functions), it's not only in C# ;) C++ supports lambdas, Javascript too, Java too, Rust... PS : I don't get how google can confuse you since it's just linking you the official documentation which is DESIGNED to be READ |
Quote:
|
I've just seen it, but I would recommend to add a new row in the database and have a prestige system well implemented like each prestige you get things bonus, like hp and etc.
Anyways, good job, I don't find why people in EPvP just comes to threads that are at least a bit helpful, or theads that are just asking, this is a forum not a place to throw trash to ppl. also here you have some of my things. feel free to ask something if you want [IMG=expandable: 1]https://i.gyazo.com/e5ba6b3db88b8ead9ba511bdeb850bd0.png[/IMG] |
Quote:
|
Well, that's a fact, but everyone can learn :D
|
| All times are GMT +2. The time now is 17:18. |
Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.