Data inscrierii: 01/Mai/2007 Mesaje: 68 Localitate: Northen Ireland
Trimis: 06/05/2007 14:14 Titlul subiectului: [Release] Shop Boy [NPC Script]
Citat:
if (CLNPC == 10063)//Shopboy NPC
{
if (_NPCcontrol == 0)
{
_client.SendData(PacketBuilder.NPCsay("Hello, would you like to change the colour of your armor?"));
_client.SendData(PacketBuilder.NPCsay("It will cost you a Meteor."));
_client.SendData(PacketBuilder.NPCanswer("Yes Please.", Convert.ToInt32(1)));
_client.SendData(PacketBuilder.NPCanswer("I'll stay here.", Convert.ToInt32(255)));
NPC.Final(_client);
}
if (_NPCcontrol == 1)
{
int oop2 = 0;
foreach (int[] test3 in _client.Char.Inv_items)
{
if (test3[0] == Convert.ToInt32(1088001))
{
oop2++;
if (oop2 >= 1)
{
_client.SendData(PacketBuilder.NPCsay("You will now be able to go colour your armor."));
_client.SendData(PacketBuilder.NPCanswer("Thank You.", Convert.ToInt32(2)));
NPC.Final(_client);
}
}
else if (oop2 == 0)
{
_client.SendData(PacketBuilder.NPCsay("You don't have a Meteor, so i wont change your armor."));
_client.SendData(PacketBuilder.NPCanswer("Oh, ok......", Convert.ToInt32(255)));
NPC.Final(_client);
}
}
int tesst = 0;
foreach (int[] test3 in _client.Char.Inv_items)
{
if (test3[0] == Convert.ToInt32(1088001))
{
if (tesst < Convert.ToInt32(1))
{
test3[0] = 0;
_client.SendData(PacketBuilder.RemoveItem(Convert.ToString(test3[9])));
tesst++;
}
}
}
}
if (_NPCcontrol == 2)
{
_client.SendData(PacketBuilder.CharacterInfo(_client.Char));
Character Char = _client.Char;
byte[] SpawnData = PacketBuilder.SpawnEntity(Char);
int x = 25; int y = 25;
Char.CurrentLoc = new Location(x, y);
Char.Map = World.Maps.ArmorColour;
World.SpawnCharacter(_client);
}
}
If anyone has the source with the selector fixed add alianapes@gmail.com to msn please.
Nu puteti crea un subiect nou in acest forum Nu puteti raspunde in subiectele acestui forum Nu puteti modifica mesajele proprii din acest forum Nu puteti sterge mesajele proprii din acest forum Nu puteti vota in chestionarele din acest forum