How would this work?

11/05/2008 04:30 Valkmax#1
I want to make a npc to restart my points if they have first reborn or second reborn. Not sure how if this is even close to right >< i know I need to set how many points you get per a level just don't know how or were?
I just want a hint or nudge as to were to look to find a way to make this possible.

############################################

Make npc Then teach it to speak
Code:
if (CurrentNPC == 9000)
{
SendPacket(General.MyPackets.NPCSay("Hello, would you like to restart your stats for the price of a dragonball?"));
SendPacket(General.MyPackets.NPCLink("Yes please", 1));
SendPacket(General.MyPackets.NPCLink("No thanks,not yet.", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
This is were I get lost at ><

Code:
if (CurrentNPC == 9000)
{
if (Control == 1)
if (MyChar.InventoryContains(dbcode, 1))
{
if (MyChar.RBCount > 1)
{
MyChar.RemoveItem(MyChar.ItemNext(dbcode));
}
MyClient.SendPacket(General.MyPackets.Vital((long)UID, 135, Level));
MyClient.SendPacket(General.MyPackets.Vital((long)UID, 0, Str));
MyClient.SendPacket(General.MyPackets.Vital((long)UID, 0, Agi)); 
MyClient.SendPacket(General.MyPackets.Vital((long)UID, 0, Vit));  
MyClient.SendPacket(General.MyPackets.Vital((long)UID, 0, Spi)); 
MyClient.SendPacket(General.MyPackets.Vital((long)UID, 1, CurHP));

}
}
11/05/2008 06:36 kinshi88#2
Make a variable, say StatPointsRB;
StatPointsRB = MyChar.Str + MyChar.Agi + MyChar.Spi + MyChar.Vit; (etc)

Then, make StatPoints = StatPointsRB, send the packets and yeah.
11/05/2008 15:33 Valkmax#3
Thanks for the help
11/05/2008 19:41 ~jochemke~#4
goodluck with it
i hope it works for ya

to kinshi tnx for ur help it helped me to xD
11/05/2008 21:12 Valkmax#5
I have no coding experience at all but I am trying =)