Elĩţέ Găмέrś™
March 28, 2024, 04:42:05 am
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Welcome to Elite Gamers Community have fun and contribute to the community and be Rewarded.
 
  Home Help Search Arcade Gallery Links Staff List Login Register  

Shopboy ( C# )

Pages: [1]
  Print  
Author Topic: Shopboy ( C# )  (Read 39 times)
Unidentical
Administrator
Known Member
*

Karma: +105/-0
Posts: 69


I have the cape! I am an admin, dont double post!


View Profile WWW
« on: December 03, 2007, 09:29:09 pm »

Here:

Code:
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);
}
}

Credits:IcedEarth from Uni Pvpers Thnx
Report Spam   Logged


Share on Facebook Share on Twitter



Pages: [1]
  Print  
 
Jump to:  

Bookmark this site! | Upgrade This Forum
SMF For Free - Create your own Forum

Powered by SMF | SMF © 2016, Simple Machines
Privacy Policy