Quote:
Originally Posted by emildayan1
And I dont know any of you,I just know im the best=D
Also,tao,you got an competer. I love haydz more than you ever can,so get the fuck away from my whore.
|
:eek:wow... this thread got off topic... but in other news, never do ANYTHING the nooby way. If you don't know how to do something, ask for help to do that task, and wait til you get an intelligent answer. Don't take a short cut because its easier... this will kill your server. Always do things the right way first... so you won't have to fix things later. The code emme provided will do what you need perfectly. Emme, I hope you don't mind me expanding a bit on your code =). The best way to do this is like so:
Search for:
Scroll to the first:
Quote:
This is the first part of the NPC coding, which is the dialog. Add something like this:
Code:
if (CurrentNPC == ###)
{
SendPacket(General.MyPackets.NPCSay("Do you want to learn a really neat archer skill called 'NOOBXOR'?"));
SendPacket(General.MyPackets.NPCLink("I'd love to learn NOOBXOR.", 1);
SendPacket(General.MyPackets.NPCLink("Just passing by.", 255));
SendPacket(General.MyPackets.NPCSetFace(0));
SendPacket(General.MyPackets.NPCFinish());
}
That is the main dialog for the skill adding NPC, just change the NOOBXOR part to what ever the skill is.
Then search for:
Scroll to the first:
Quote:
and add this:
Code:
if (CurrentNPC == ###)
{
if (Control == 1)
{
if (MyChar.Level >= xx)
if (MyChar.Job < xx && MyChar.Job > xx)
{
MyChar.LearnSkill(SKILLID, SKILLLEVEL);
}
else
{
SendPacket(General.MyPackets.NPCSay("Your not a xx. Come back when your done lying!"));
SendPacket(General.MyPackets.NPCLink("Course.", 255));
SendPacket(General.MyPackets.NPCSetFace(0));
SendPacket(General.MyPackets.NPCFinish());
}
}
}
Change the xxx to the same number as the xxx in the first NPC Dialog area. So if your npc number was 104 on the first part of the code, the npc number will be 104 on this one as well. Change the xx's to the correct values, and viola, you have a working NPC to check job, level, and add skills if they are the right class.