- Joined
- Mar 16, 2007
- Messages
- 7
- Reaction score
- 0
Does anyone have a guide to setting NPC's to do certain things like compose items and teleport you to the training ground ect ect?
if (CLNPC == 10050) //Conductress 435,440
{
if (_NPCcontrol == 0)
{
CmdNPC.Face(01);
CmdNPC.Say("Where are you heading for? I can teleport you for a price");
CmdNPC.Say("of 100 silver.");
CmdNPC.Link("Market", 1);
CmdNPC.Link("Just passing by.", 255);
CmdNPC.Finish();
}
if (_NPCcontrol == 1)
{
if (_client.Char.Money > Convert.ToInt32(99))
{
int Teleport_Gold = Convert.ToInt32(_client.Char.Money - 100);
_client.Char.Money = Teleport_Gold;
_client.SendData(PacketBuilder.CharacterInfo(_clie nt.Char));
byte[] SpawnData = PacketBuilder.SpawnEntity(_char);
int x = 211; int y = 196; // Cordinates x & y
_char.CurrentLoc = new Location(x, y);
uint Teleport_Map = 1036; // Map
_char.Map = (World.Maps)Teleport_Map;
World.SpawnCharacter(_client);
}
else if (_client.Char.Money < Convert.ToInt32(100))
{
CmdNPC.Say("Sorry, you do not have 100 silver.");
CmdNPC.Link("I see.", 255);
CmdNPC.Finish();
}
}
}
u should put it in ur NPCdialog.cs and then compile that file i believethanks men =D
were i save the codes ? .. on c3/npc ?
Maybe English Version?
Edit: lol i found it already![]()
if (CLNPC == 104797) //Boxer 351,334
{ //TrainingGround Map meeds to be added to World.cs, 1039
if (_NPCcontrol == 0)
{
CmdNPC.Say("If you are level 20 or above, you may train in the training");
CmdNPC.Say("ground. Would you like me to teleport you there for 1000");
CmdNPC.Say("silver.");
CmdNPC.Link("Yes, please.", 1);
CmdNPC.Link("No, thanks.", 255);
CmdNPC.Finish();
}
if (_NPCcontrol == 1)
{
CmdNPC.Say("In the training ground, you will not lose any HP or MP. And");
CmdNPC.Say("no items nor durability will be consumed.");
CmdNPC.Link("Please teleport me there.", 2);
CmdNPC.Link("No, I changed my mind", 255);
CmdNPC.Finish();
}
if (_NPCcontrol == 2)
{
if (_client.Char.Money > Convert.ToInt32(999))
{
int Teleport_Gold = Convert.ToInt32(_client.Char.Money - 1000);
_client.Char.Money = Teleport_Gold;
_client.SendData(PacketBuilder.CharacterInfo(_client.Char));
byte[] SpawnData = PacketBuilder.SpawnEntity(_char);
int x = 217; int y = 215; // Cordinates x & y
_char.CurrentLoc = new Location(x, y);
uint Teleport_Map = 1039; // Map
_char.Map = (World.Maps)Teleport_Map;
World.SpawnCharacter(_client);
CmdNPC.Say("The stake or scarecrow is level 20 or above. If its level");
CmdNPC.Say("is higher than yours, you cannot attack it.");
CmdNPC.Link("I see.", 255);
CmdNPC.Finish();
}
else if (_client.Char.Money < Convert.ToInt32(1000))
{
CmdNPC.Say("Sorry, you do not have 1000 silver.");
CmdNPC.Link("I see.", 255);
CmdNPC.Finish();
}
}
}
else if (CLNPC == 10050)
{
if (_NPCcontrol == 0)
{
CmdNPC.Face(12);
CmdNPC.Say("Where are you heading for? I can teleport you for a price");
CmdNPC.Say("of 100 silver.");
CmdNPC.Link("Phoenix Castle", 1);
CmdNPC.Link("Desert City", 2);
CmdNPC.Link("Ape Mountain", 3);
CmdNPC.Link("Bird Island", 4);
CmdNPC.Link("Mine Cave", 5);
CmdNPC.Link("Market", 6);
CmdNPC.Finish();
}
if (_NPCcontrol == 1)
{
if (_client.Char.Money > Convert.ToInt32(99))
{
int Teleport_Gold = Convert.ToInt32(_client.Char.Money - 100);
_client.Char.Money = Teleport_Gold;
_client.SendData(PacketBuilder.CharacterInfo(_client.Char));
byte[] SpawnData = PacketBuilder.SpawnEntity(_char);
int x = 958; int y = 555; // Cordinates x & y
_char.CurrentLoc = new Location(x, y);
uint Teleport_Map = 1002; // Map
_char.Map = (World.Maps)Teleport_Map;
World.SpawnCharacter(_client);
}
else if (_client.Char.Money < Convert.ToInt32(100))
{
CmdNPC.Say("Sorry, you do not have 100 silver.");
CmdNPC.Link("I see.", 255);
CmdNPC.Finish();
}
}
if (_NPCcontrol == 2)
{
if (_client.Char.Money > Convert.ToInt32(99))
{
int Teleport_Gold = Convert.ToInt32(_client.Char.Money - 100);
_client.Char.Money = Teleport_Gold;
_client.SendData(PacketBuilder.CharacterInfo(_client.Char));
byte[] SpawnData = PacketBuilder.SpawnEntity(_char);
int x = 069; int y = 473; // Cordinates x & y
_char.CurrentLoc = new Location(x, y);
uint Teleport_Map = 1002; // Map
_char.Map = (World.Maps)Teleport_Map;
World.SpawnCharacter(_client);
}
else if (_client.Char.Money < Convert.ToInt32(100))
{
CmdNPC.Say("Sorry, you do not have 100 silver.");
CmdNPC.Link("I see.", 255);
CmdNPC.Finish();
}
}
if (_NPCcontrol == 3)
{
if (_client.Char.Money > Convert.ToInt32(99))
{
int Teleport_Gold = Convert.ToInt32(_client.Char.Money - 100);
_client.Char.Money = Teleport_Gold;
_client.SendData(PacketBuilder.CharacterInfo(_client.Char));
byte[] SpawnData = PacketBuilder.SpawnEntity(_char);
int x = 555; int y = 957; // Cordinates x & y
_char.CurrentLoc = new Location(x, y);
uint Teleport_Map = 1002; // Map
_char.Map = (World.Maps)Teleport_Map;
World.SpawnCharacter(_client);
}
else if (_client.Char.Money < Convert.ToInt32(100))
{
CmdNPC.Say("Sorry, you do not have 100 silver.");
CmdNPC.Link("I see.", 255);
CmdNPC.Finish();
}
}
if (_NPCcontrol == 4)
{
if (_client.Char.Money > Convert.ToInt32(99))
{
int Teleport_Gold = Convert.ToInt32(_client.Char.Money - 100);
_client.Char.Money = Teleport_Gold;
_client.SendData(PacketBuilder.CharacterInfo(_client.Char));
byte[] SpawnData = PacketBuilder.SpawnEntity(_char);
int x = 232; int y = 190; // Cordinates x & y
_char.CurrentLoc = new Location(x, y);
uint Teleport_Map = 1002; // Map
_char.Map = (World.Maps)Teleport_Map;
World.SpawnCharacter(_client);
}
else if (_client.Char.Money < Convert.ToInt32(100))
{
CmdNPC.Say("Sorry, you do not have 100 silver.");
CmdNPC.Link("I see.", 255);
CmdNPC.Finish();
}
}
if (_NPCcontrol == 5)
{
if (_client.Char.Money > Convert.ToInt32(99))
{
int Teleport_Gold = Convert.ToInt32(_client.Char.Money - 100);
_client.Char.Money = Teleport_Gold;
_client.SendData(PacketBuilder.CharacterInfo(_client.Char));
byte[] SpawnData = PacketBuilder.SpawnEntity(_char);
int x = 053; int y = 399; // Cordinates x & y
_char.CurrentLoc = new Location(x, y);
uint Teleport_Map = 1002; // Map
_char.Map = (World.Maps)Teleport_Map;
World.SpawnCharacter(_client);
}
else if (_client.Char.Money < Convert.ToInt32(100))
{
CmdNPC.Say("Sorry, you do not have 100 silver.");
CmdNPC.Link("I see.", 255);
CmdNPC.Finish();
}
}
if (_NPCcontrol == 6)
{
if (_client.Char.Money > Convert.ToInt32(99))
{
int Teleport_Gold = Convert.ToInt32(_client.Char.Money - 100);
_client.Char.Money = Teleport_Gold;
_client.SendData(PacketBuilder.CharacterInfo(_client.Char));
byte[] SpawnData = PacketBuilder.SpawnEntity(_char);
int x = 211; int y = 196; // Cordinates x & y
_char.CurrentLoc = new Location(x, y);
uint Teleport_Map = 1036; // Map
_char.Map = (World.Maps)Teleport_Map;
World.SpawnCharacter(_client);
}
else if (_client.Char.Money < Convert.ToInt32(100))
{
CmdNPC.Say("Sorry, you do not have 100 silver.");
CmdNPC.Link("I see.", 255);
CmdNPC.Finish();
}
}
}