[REQUEST NPCS/COMMANDS THREAD]

02/17/2009 17:53 _Emme_#16
Quote:
Originally Posted by Beta Limit View Post
but for LOTF users this is good
And this was what my post was all about, we need to get out of the evil LOTF curse!
02/17/2009 18:33 Beta Limit#17
Quote:
Originally Posted by EmmeTheCoder View Post
And this was what my post was all about, we need to get out of the evil LOTF curse!
and i agree with that but the truth is...what else are the noobs gunna use? Hybrids is too advanced for some so they will just leech the revisions of it.
02/19/2009 20:38 BALTA00#18
Hi, i would like NPC for make MeteorScroll, can help me?
I need too a NPC that give you 1 Meteor for 100k...

Thanks for reading this
02/19/2009 20:56 PeTe Ninja#19
Quote:
Originally Posted by BALTA00 View Post
Hi, i would like NPC for make MeteorScroll, can help me?
I need too a NPC that give you 1 Meteor for 100k...

Thanks for reading this
lol even those this topic is done because too much flame here ill give you it :D

.. i got the metscroll for mets npc from my source, and i made the 100k for met
__________________________________________________ _______

Code:
                            if (CurrentNPC == 9812)
                            {
                                SendPacket(General.MyPackets.NPCSay("Hunting meteors and dragonballs is an exciting thing. However, they also pile up in your inventories."));
                                SendPacket(General.MyPackets.NPCLink("Agreed. How do you deal with it?", 1));
                                SendPacket(General.MyPackets.NPCLink("I am poor and do not have the problem.", 255));
                                SendPacket(General.MyPackets.NPCSetFace(30));
                                SendPacket(General.MyPackets.NPCFinish());
                            }
& for the DO

Code:
if (CurrentNPC == 9812)
                            {
                                if (Control == 1)
                                {
                                    SendPacket(General.MyPackets.NPCSay("I can pack dragonballs and meteors for you. Give me 10 meteors or 10 dragonballs, I will make them into a MeteorScroll or a DBScroll that occupies only one slot. Just right click on it, it will return into 10 meteors or 10 dragonballs again."));
                                    SendPacket(General.MyPackets.NPCSay("As a special offer i can give you 4 meteor scrolls for one of your dragon balls and if you will give me 6 meteor scrolls."));
                                    SendPacket(General.MyPackets.NPCLink("Cool. Please pack my meteors.", 2));
                                    SendPacket(General.MyPackets.NPCLink("Cool. Please pack my dragonballs.", 3));
                                    SendPacket(General.MyPackets.NPCLink("Ok. I'll take 4 meteor scrolls for my dragon ball.", 4));
                                    SendPacket(General.MyPackets.NPCLink("Ok. I'll give you 6 meteor scrolls and you give me a dragon ball.", 5));
                                    SendPacket(General.MyPackets.NPCLink("Cool. Please pack my MetScrolls.", 6));
                                    SendPacket(General.MyPackets.NPCLink("Cool. Please pack my DBScrolls.", 7));
                                    SendPacket(General.MyPackets.NPCSetFace(30));
                                    SendPacket(General.MyPackets.NPCFinish());
                                }
                                if (Control == 2)
                                {
                                    if (MyChar.InventoryContains(1088001,10))
                                    {
                                        MyChar.RemoveItem(MyChar.ItemNext(1088001));
                                        MyChar.RemoveItem(MyChar.ItemNext(1088001));
                                        MyChar.RemoveItem(MyChar.ItemNext(1088001));
                                        MyChar.RemoveItem(MyChar.ItemNext(1088001));
                                        MyChar.RemoveItem(MyChar.ItemNext(1088001));
                                        MyChar.RemoveItem(MyChar.ItemNext(1088001));
                                        MyChar.RemoveItem(MyChar.ItemNext(1088001));
                                        MyChar.RemoveItem(MyChar.ItemNext(1088001));
                                        MyChar.RemoveItem(MyChar.ItemNext(1088001));
                                        MyChar.RemoveItem(MyChar.ItemNext(1088001));
                                        MyChar.AddItem("720027-0-0-0-0-0", 0, (uint)General.Rand.Next(36457836));
                                    }
                                }
                                if (Control == 3)
                                {
                                    if (MyChar.InventoryContains(1088000, 10))
                                    {
                                        MyChar.RemoveItem(MyChar.ItemNext(1088000));
                                        MyChar.RemoveItem(MyChar.ItemNext(1088000));
                                        MyChar.RemoveItem(MyChar.ItemNext(1088000));
                                        MyChar.RemoveItem(MyChar.ItemNext(1088000));
                                        MyChar.RemoveItem(MyChar.ItemNext(1088000));
                                        MyChar.RemoveItem(MyChar.ItemNext(1088000));
                                        MyChar.RemoveItem(MyChar.ItemNext(1088000));
                                        MyChar.RemoveItem(MyChar.ItemNext(1088000));
                                        MyChar.RemoveItem(MyChar.ItemNext(1088000));
                                        MyChar.RemoveItem(MyChar.ItemNext(1088000));
                                        MyChar.AddItem("720028-0-0-0-0-0", 0, (uint)General.Rand.Next(36457836));
                                    }
                                }
                                if (Control == 4)
                                {
                                    if (MyChar.InventoryContains(1088000, 1) && MyChar.ItemsInInventory < 37)
                                    {
                                        MyChar.RemoveItem(MyChar.ItemNext(1088000));
                                        MyChar.AddItem("720027-0-0-0-0-0", 0, (uint)General.Rand.Next(36457836));
                                        MyChar.AddItem("720027-0-0-0-0-0", 0, (uint)General.Rand.Next(36457836));
                                        MyChar.AddItem("720027-0-0-0-0-0", 0, (uint)General.Rand.Next(36457836));
                                        MyChar.AddItem("720027-0-0-0-0-0", 0, (uint)General.Rand.Next(36457836));
                                    }
                                }
                                if (Control == 5)
                                {
                                    if (MyChar.InventoryContains(720027, 6))
                                    {
                                        MyChar.RemoveItem(MyChar.ItemNext(720027));
                                        MyChar.RemoveItem(MyChar.ItemNext(720027));
                                        MyChar.RemoveItem(MyChar.ItemNext(720027));
                                        MyChar.RemoveItem(MyChar.ItemNext(720027));
                                        MyChar.RemoveItem(MyChar.ItemNext(720027));
                                        MyChar.RemoveItem(MyChar.ItemNext(720027));
                                        MyChar.AddItem("1088000-0-0-0-0-0", 0, (uint)General.Rand.Next(36457836));
                                    }
                                }
                                if (Control == 6)
                                {
                                    if (MyChar.InventoryContains(720027, 10))
                                    {
                                        MyChar.RemoveItem(MyChar.ItemNext(720027));
                                        MyChar.RemoveItem(MyChar.ItemNext(720027));
                                        MyChar.RemoveItem(MyChar.ItemNext(720027));
                                        MyChar.RemoveItem(MyChar.ItemNext(720027));
                                        MyChar.RemoveItem(MyChar.ItemNext(720027));
                                        MyChar.RemoveItem(MyChar.ItemNext(720027));
                                        MyChar.RemoveItem(MyChar.ItemNext(720027));
                                        MyChar.RemoveItem(MyChar.ItemNext(720027));
                                        MyChar.RemoveItem(MyChar.ItemNext(720027));
                                        MyChar.RemoveItem(MyChar.ItemNext(720027));
                                        MyChar.AddItem("721510-0-0-0-0-0", 0, (uint)General.Rand.Next(36457836));
                                    }
                                }
                                if (Control == 7)
                                {
                                    if (MyChar.InventoryContains(720028, 10))
                                    {
                                        MyChar.RemoveItem(MyChar.ItemNext(720028));
                                        MyChar.RemoveItem(MyChar.ItemNext(720028));
                                        MyChar.RemoveItem(MyChar.ItemNext(720028));
                                        MyChar.RemoveItem(MyChar.ItemNext(720028));
                                        MyChar.RemoveItem(MyChar.ItemNext(720028));
                                        MyChar.RemoveItem(MyChar.ItemNext(720028));
                                        MyChar.RemoveItem(MyChar.ItemNext(720028));
                                        MyChar.RemoveItem(MyChar.ItemNext(720028));
                                        MyChar.RemoveItem(MyChar.ItemNext(720028));
                                        MyChar.RemoveItem(MyChar.ItemNext(720028));
                                        MyChar.AddItem("721511-0-0-0-0-0", 0, (uint)General.Rand.Next(36457836));
                                    }
                                }
                            }
now for the trade mets and stuff i dont know how to make it so its any amount >< i dont remember but i did for 1,5 , 10 mets

Code:
                            if (CurrentNPC == 1999) // Easily Coded By PeTe Ninja
                            {
                                SendPacket(General.MyPackets.NPCSay("I'm guessing you are here because you have no meteors..."));
                                SendPacket(General.MyPackets.NPCLink("Yeah", 2));
                                SendPacket(General.MyPackets.NPCLink("Nah, Just wanted to know what you do", 255));
                                SendPacket(General.MyPackets.NPCSetFace(30));
                                SendPacket(General.MyPackets.NPCFinish());
                            }
and the do

Code:
                            if (CurrentNPC == 1999) // Easily Coded By PeTe Ninja
                            {
                                if (Control == 1) // Control 1 From the First Part of the NPC
                                {
                                     SendPacket(General.MyPackets.NPCSay("How many meteors would you like? The more you buy the cheaper they are"));
                                     SendPacket(General.MyPackets.NPCSay("1 Meteor = 100k , 5 Meteors = 450k , 10 Meteors = 900k"));
                                     SendPacket(General.MyPackets.NPCLink("1 Meteor Please.", 2));
                                     SendPacket(General.MyPackets.NPCLink("5 Meteors Please.", 3));
                                     SendPacket(General.MyPackets.NPCLink("10 Meteors Please.", 4));
                                     SendPacket(General.MyPackets.NPCLink("Oh, Too Expensive", 255));
                                     SendPacket(General.MyPackets.NPCSetFace(30));
                                     SendPacket(General.MyPackets.NPCFinish());
                                }
                                if (Control == 2) // Control 2 from Control 1
                                { // 1 Meteor
                                    MyChar.AddItem("1088001-0-0-0-0-0", 0, (uint)General.Rand.Next(36457836));
                                }
                                if (Control == 3) // Control 3 from Control 1
                                { // 5 Meteors
                                    MyChar.AddItem("1088001-0-0-0-0-0", 0, (uint)General.Rand.Next(36457836));
                                    MyChar.AddItem("1088001-0-0-0-0-0", 0, (uint)General.Rand.Next(36457836));
                                    MyChar.AddItem("1088001-0-0-0-0-0", 0, (uint)General.Rand.Next(36457836));
                                    MyChar.AddItem("1088001-0-0-0-0-0", 0, (uint)General.Rand.Next(36457836));
                                    MyChar.AddItem("1088001-0-0-0-0-0", 0, (uint)General.Rand.Next(36457836));
                                }
                                if (Control == 4) // Control 4 from Control 1
                                { // 1 MeteorScroll ( 10 Meteors)
                                    MyChar.AddItem("720027-0-0-0-0-0", 0, (uint)General.Rand.Next(36457836));
                                }

                            }
press thanks if this helped
02/19/2009 21:14 _Emme_#20
Code:
case Met/DBTrader:
{
if (Type == 0)
{
NpcSay("Hunting meteors and dragonballs is an exciting thing. However, they also pile up in your inventories.");
NpcOption("Agreed. How do you deal with it?", 1));
NpcOption("I am poor and do not have the problem.",255);                                
}
if (Type == 1)
{
NpcSay("I can pack dragonballs and meteors for you. Give me 10 meteors or 10 dragonballs, I will make them into a MeteorScroll or a DBScroll that occupies only one slot. Just right click on it, it will return into 10 meteors or 10 dragonballs again.");
NpcOption("Please pack my meteors",1088001);
NpcOption("Please pack my DB's",1088000);
}
if (Type == 1088000 || Type == 1088001)
{
if (MyChar.InvContains(Type,10))
{
MyChar.RemoveFromInv(Type,10);
if (Type == 1088000)
  MyChar.AddItemToInv(720028,1);
else
  MyChar.AddItemToInv(720027,1);

break;
}
}
}
Wrote it directly here on e*pvp, pretty sure something is missen, although im sure of that that code will work if I copy+paste it into ma source=P
02/19/2009 21:21 PeTe Ninja#21
there you go

lotf and other source code =]]
02/19/2009 21:48 μZane#22
@Emme 1088000 and 1088001 are way over the value byte can handle (FFh, OptionID is saved on one byte). So your code wouldn't work.
02/19/2009 22:59 Beta Limit#23
Quote:
Originally Posted by μZane View Post
@Emme 1088000 and 1088001 are way over the value byte can handle (FFh, OptionID is saved on one byte). So your code wouldn't work.
He wrote the code for his source (non-lotf) so type for him could be a uint or summit
02/20/2009 11:42 μZane#24
It COULD be uint but what's the point since the packet can only take byte? So you can't pass value over 255 onto the packet thus you can't have a option over that. For example this is from the base infamous released:

Code:
public byte OptionID
{
      get { return Packet[10]; }
      set { Packet[10] = value; }
}
public byte InteractType
{
      get { return Packet[11]; }
      set { Packet[11] = value; }
}
As you can see the OptionID is saved in one byte and the next byte is already reserved for InteractType. If you were to pass 1088001 as uint you'd have to AND it with 255 first, lol. (1088001 & 0xFF == 1, which is not what we're wanting.)

So for example something like this: (The spacing might be a little of, wrote it on notepad)
Code:
case ###: {
	if(Type == 0) {
		NpcSay("Hunting meteors and dragonballs is an exciting thing. However they also pile up in your inventory.");
		NpcOption("Agreed. How do you deal with it?", 1);
		NpcOption("I'm poor and do not have the problem.", 255);
	}
	else if (Type == 1) {
		NpcSay("I can pack dragonballs and meteors for you. Give me 10 meteors or 10 dragonballs, I will make them into a MeteorScroll or a DBScroll that occupies only one slot. Just right click on it, it will return into 10 meteors or 10 dragonballs again."); 
		NpcOption("Please pack my meteors", 3);
		NpcOption("Please packet my dragonballs", 2);
	}
	else if (Type == 2 || Type == 3) {
		int ItemID = 1087998 + Type;
		if(MyChar.InvContains(ItemID, 10)) {
			MyChar.RemoveFromInv(ItemID, 10);
			if(Type == 2) 
				MyChar.AddItemToInv(720028, 1);
			else
				MyChar.AddItemToInv(720027, 1);
		}
	}
}