[QUESTION]Level reset

01/16/2018 09:49 TheRaimenLP#1
Hi all,:D

Will somebody help me with one idea?
I want to have 1 item that will reset level:
1. Player have to be level 99.
2. Use item and it will reset his level to 1 and give him +1 Hero level + some golds...


Is it possible?
How to do it on my P-server please?

Thanks for every help! :handsdown::handsdown::handsdown:
Raimen.
01/16/2018 12:27 McDetLeF#2
Maybe get own ideas. It's stolen from Elitenos. But it's very simple and if u can't do this alone you should stop thinking about hosting a server
01/16/2018 12:52 *Kyosha*#3
I can only say:
Opennos.GameObject -> Item -> SpecialItem
then simple edit in database.

if you don't know how to do this...just stop creating server
01/16/2018 13:04 TheRaimenLP#4
Thank you for your help! :-)
01/16/2018 13:05 Goblousek#5
Quote:
Originally Posted by McDetLeF View Post
Maybe get own ideas. It's stolen from Elitenos. But it's very simple and if u can't do this alone you should stop thinking about hosting a server
Hmm How long this idea on Elitenos? :) I have this idea 4 month back. When did I start actively doing on my server.
01/16/2018 13:14 TheRaimenLP#6
Ok i find it in SpecialItem.cs but i dont know if i can do it because maybe i dont know how to write code
that when somebody get level 99 and click on some item
it will change his level to 1 and add +1 level to Hero Lvl

Can somebody help me with code please?
01/16/2018 14:17 *Kyosha*#7
Quote:
Originally Posted by TheRaimenLP View Post
Ok i find it in SpecialItem.cs but i dont know if i can do it because maybe i dont know how to write code
that when somebody get level 99 and click on some item
it will change his level to 1 and add +1 level to Hero Lvl

Can somebody help me with code please?
If you don't know how to write really simple function just leave your project. Is it simple?

I would recommend c# in the nutshell. It will learn you how to code
01/16/2018 14:30 RualFX#8
OpenNos.GameObject - SpecialItem.cs

Create a new case

example

case 9000:

insert the code in the case

case 9000:
session.Character.Level = 1;
session.Character.HeroLevel = 1;

add a break comment

case 9000:
session.Character.Level = 1;
session.Character.HeroLevel = 1;
break;


You can also add a Notice, to know what u just did

//Reset Item
case 9000:
session.Character.Level = 1;
session.Character.HeroLevel = 1;
break;

You can maybe add a message, that {player_name} used the item etc.

//Reset Item
case 9000:
session.Character.Level = 1;
session.Character.HeroLevel = 1;
session.SendPacket(UserInterfaceHelper.Instance.Ge nerateModal($"{session.Character.Name}, INSERT_MESSAGE_HERE", 1));
break;

then you need a item, wich u wanna use. For example a key (this will erase SpecialItem.cs and you need to add it at NoFunctionItem)

OpenNos.GameObject.NoFunctionItem.cs

parse the code

search for the item in the Database

and use the case id at Effect in the Database

ITEMID - EFFECT - EFFECT VALUE
1 9000 - You dont need that ^^

done. ^^