Grant NOOB!
Posts : 19 Join date : 2009-05-07 Age : 29 Location : Encinitas California
| Subject: How To Code a Lotf NPC And the Parts Thu May 07, 2009 4:08 pm | |
| This document was sent to me by PeTeNinja who ill get active in forums and ive sent it to many people, its VERY helpful and i hope it gets put to good use! - Code:
-
if (CurrentNPC == 1000076) // Our First NPC { SendPacket(General.MyPackets.NPCSay("You want your nooby crap?")); SendPacket(General.MyPackets.NPCLink("Heck yeah!", 1)); SendPacket(General.MyPackets.NPCLink("whats in it?", 2)); SendPacket(General.MyPackets.NPCLink("NO ill do it myself.", 255)); SendPacket(General.MyPackets.NPCSetFace(30)); SendPacket(General.MyPackets.NPCFinish()); }
if (CurrentNPC == 1000076) // Our First NPC Do ( now you want to have the same UID there you see? ) { if (Control == 1 && MyChar.ItemsInInventory <= 33) { MyChar.AddItem("480339-9-7-255-13-13", 0, (uint)General.Rand.Next(36457836)); MyChar.AddItem("723700-0-0-0-0-0", 5, (uint)General.Rand.Next(36457836)); MyChar.AddItem("723017-0-0-0-0-0", 0, (uint)General.Rand.Next(36457836)); MyChar.LearnSkill(7020, 9); } if (Control == 2) { SendPacket(General.MyPackets.NPCSay("Well... you get a maxed out level 130 club and also 5 expballs and 1 exppot, oh and did i forget to mention, FIXED RAGE!!!")); SendPacket(General.MyPackets.NPCLink("I changed my mind, i do want to get it", 3)); SendPacket(General.MyPackets.NPCLink("NO! THATS STUPID!!!!!", 255)); SendPacket(General.MyPackets.NPCSetFace(30)); SendPacket(General.MyPackets.NPCFinish()); } else if (MyChar.ItemsInInventory > 33) { SendPacket(General.MyPackets.NPCSay("Make sure you have 7 spots left in your inventory =]")); SendPacket(General.MyPackets.NPCLink("Oh, My Bad", 255)); SendPacket(General.MyPackets.NPCSetFace(30)); SendPacket(General.MyPackets.NPCFinish()); } }
_______________Actual Info________________
UID = 1000076
Type = 1170
Name = StarterPackNPC
Flags = 2
Direction = 0
X = 527
Y = 543
Map = 1002
________________What they mean?__or________What are they for?______________
UID = THIS IS The part that YOU CAN NOT MIX WITH OTHERS!!! this is where you get your coding thing, so if you want to code something with this npc
Type = the real name ofyour npc but it will be put in numbers, one sec
Name = the name that you want to search for , this too
Flags = Shop = 1 ( not sure i forget ) , Reg Npc = 2 ( regular )
Direction = the direction of the npc, basically looking everywhere :D
X = the x-cordinate that the npc will be on ,, will beweird to mix on these
Y = the y-cordinate that the npc will be on
Map = the map the npc is in
CurrentNPC == ( UID HERE )
1 = the first control
2 = the second control
255 = exit
| |
|