
12-05-2008, 01:13 PM
|
 |
Noob
|
|
Join Date: Sep 2008
Location: in thedark
Posts: 21
Thanks: 2
Thanked 7 Times in 2 Posts
|
|
Re: I Need Code For Jail
u must edit your npc
search for
Quote:
|
if (CurrentNPC == 104800)
|
replace all on it with
Quote:
if (CurrentNPC == 104800)
{
SendPacket(General.MyPackets.NPCSay("I can take you to visit the jail, but due to the risk of your health, I have to charge you to enter. The fee will be 1,000 silvers. Do you accept?"));
SendPacket(General.MyPackets.NPCLink("Yes", 1));
SendPacket(General.MyPackets.NPCLink("No", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
|
search for one more time
Quote:
|
if (CurrentNPC == 104800)
|
replace all on it for
Quote:
if (CurrentNPC == 104800)
{
if (Control == 1)
{
if (MyChar.Silvers >= 1000)
{
MyChar.Silvers -= 1000;
MyChar.Teleport(6000, 027, 073);
SendPacket(General.MyPackets.Vital(MyChar.UID, 4, MyChar.Silvers));
SendPacket(General.MyPackets.Vital(MyChar.UID, 30, MyChar.CPs));
}
else
{
SendPacket(General.MyPackets.NPCSay("Sorry, you do not have enough money"));
SendPacket(General.MyPackets.NPCLink("I see.", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
}
}
|
it will work or if u wana go only i have the command for it
Quote:
if (Splitter[0] == "/jail")
{
MyChar.Teleport(6000, 32, 73);
}
|
|