well I kno it's pretty simple...but like I say In all my posts...I'm a newb :)...I don't know if this has been released yet(post if it has) so I'll share it with you guys here...I intended this for the "newbies" to learn how to get a simple NPC to give a skill through the payment of 1k cps once they reach the 2nd rb state(available "ONCE" only)...
HERES THE CODE! ENJOY!
let's define our variables, etc...
in character.cs find
+thanks if this helped you anyhow and if any ideas were given...
~Enjoy!
HERES THE CODE! ENJOY!
let's define our variables, etc...
in character.cs find
and under it addQuote:
public byte RebornSkill = 0;
now for the NPC...Quote:
public byte ClaimRBSkill = 0;
Code:
#region Bless(Luckytime)
case 6861:
{
if (Control == 0)
{
GC.AddSend(Packets.NPCSay("Welcome stranger! I have been noticing some young adventurers reborning all the time and not getting the LuckyTime they desire,"));
GC.AddSend(Packets.NPCSay(" I am here to help all those troubled conquerors with their LuckyTime problems!What do you say?"));
GC.AddSend(Packets.NPCLink("I want LuckyTime.", 1));
GC.AddSend(Packets.NPCLink("Maybe later.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
if (Control == 1)
{
GC.AddSend(Packets.NPCSay("The LuckyTime ability helps those who have passed through such hard times by releasing their stress and allowing them to level up quicker than normal.You sure you want it?"));
GC.AddSend(Packets.NPCLink("Yes, Please.", 2));
GC.AddSend(Packets.NPCLink("No, I changed my mind.", 255));
GC.AddSend(Packets.NPCSetFace(15));
GC.AddSend(Packets.NPCFinish());
}
else if (GC.MyChar.Reborns < 2)
{
GC.AddSend(Packets.NPCSay("I'm sorry but you have not yet reached the 2nd reborn state. Please train harder."));
GC.AddSend(Packets.NPCLink("Sure will.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
if (Control == 2)
{
if (GC.MyChar.CPs >= 1000)
if (GC.MyChar.ClaimRBSkill == 0)
{
GC.MyChar.CPs -= 1000;
GC.MyChar.RWSkill(new Game.Skill() { ID = 9876, Lvl = 0, Exp = 0 });
GC.AddSend(Packets.NPCSay("You have learned the skill LuckyTime! Congratulations!"));
GC.AddSend(Packets.NPCLink("Just what I needed!", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
else
{
GC.AddSend(Packets.NPCSay("You don't have a sufficent amount of CPs OR you have already learned this skill, Sorry!"));
GC.AddSend(Packets.NPCLink("I'll try harder.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
}
break;
}
#endregion
~Enjoy!