Quote:
Originally Posted by Vortex.
Ok I was wondering, could someone please show, or guide me with the codes for making an ncp that teach rb (pray, rb guards) skills.
|
Here if you need more help just post on the same thread and I'll be glad to code it for you.. I'm guessing this is for LOTF so i coded it for LOTF.
Here is the Main Dialog for the NPC
Code:
if (CurrentNPC == 1200) // Skill Learner NPC
{
SendPacket(General.MyPackets.NPCSay("Would you like to learn some skills?")); // NPC Dialog
SendPacket(General.MyPackets.NPCLink("Umm Sure... What skills though?", 1)); // Player Controls Destiny
SendPacket(General.MyPackets.NPCLink("Nah, Just passing by.", 255)); // Player Controls Destiny
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
Now here is the Control Dialog for the NPC
Code:
if (CurrentNPC == 1200) // Skill Learner NPC
{
if (Control == 1)
{
SendPacket(General.MyPackets.NPCSay("For now we just have these two skills."));
SendPacket(General.MyPackets.NPCLink("Pray", 2));
SendPacket(General.MyPackets.NPCLink("Guard", 3));
SendPacket(General.MyPackets.NPCLink("No Thanks.", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
if (Control == 2)
{
if (MyChar.Job > 132 && MyChar.Job < 136)
{
MyChar.LearnSkill(1100, 0);
SendPacket(General.MyPackets.NPCSay("Congratz, You now learned the water tao skill Pray!"));
SendPacket(General.MyPackets.NPCLink("Thanks!", 255));
}
else
{
SendPacket(General.MyPackets.NPCSay("I'm sorry you are not a water tao Or you are still too low level to learn the skill!"));
SendPacket(General.MyPackets.NPCLink("Oh Darn!", 255));
}
}
if (Control == 3)
{
if (MyChar.RBCount >= 1)
{
MyChar.LearnSkill(4000, 0);
SendPacket(General.MyPackets.NPCSay("Congratz, You now learned the reborn skill Guard!"));
SendPacket(General.MyPackets.NPCLink("Thanks!", 255));
}
else
{
SendPacket(General.MyPackets.NPCSay("You are not reborn yet!"));
SendPacket(General.MyPackets.NPCLink("Oh Darn!", 255));
}
}
}
If I accidentally coded it wrong or you get some bugs, Please tell me so i may fix it.