Register for your free account! | Forgot your password?

You last visited: Today at 01:58

  • Please register to post and access all features, it's quick, easy and FREE!


[REQUEST NPCS/COMMANDS THREAD]

Reply
 
Old 02/17/2009, 17:53   #16
 
elite*gold: 1142
Join Date: Aug 2006
Posts: 2,464
Received Thanks: 1,159
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!



_Emme_ is offline  
Old 02/17/2009, 18:33   #17
 
elite*gold: 0
Join Date: Dec 2008
Posts: 493
Received Thanks: 71
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.


Beta Limit is offline  
Old 02/19/2009, 20:38   #18
 
elite*gold: 0
Join Date: Jul 2007
Posts: 380
Received Thanks: 405
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
BALTA00 is offline  
Old 02/19/2009, 20:56   #19
 
elite*gold: 0
Join Date: Jan 2009
Posts: 1,922
Received Thanks: 490
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

.. 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


PeTe Ninja is offline  
Thanks
1 User
Old 02/19/2009, 21:14   #20
 
elite*gold: 1142
Join Date: Aug 2006
Posts: 2,464
Received Thanks: 1,159
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
_Emme_ is offline  
Thanks
1 User
Old 02/19/2009, 21:21   #21
 
elite*gold: 0
Join Date: Jan 2009
Posts: 1,922
Received Thanks: 490
there you go

lotf and other source code =]]
PeTe Ninja is offline  
Old 02/19/2009, 21:48   #22
 
elite*gold: 0
Join Date: Feb 2009
Posts: 30
Received Thanks: 16
@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.
μZane is offline  
Old 02/19/2009, 22:59   #23
 
elite*gold: 0
Join Date: Dec 2008
Posts: 493
Received Thanks: 71
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
Beta Limit is offline  
Old 02/20/2009, 11:42   #24
 
elite*gold: 0
Join Date: Feb 2009
Posts: 30
Received Thanks: 16
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);
		}
	}
}


μZane is offline  
Reply



« [Help]Binaries problem | WILL SOMONE PLEASE HELP ME! »

Similar Threads
The CoEmu V2 NPC Thread - Post your ready made NPCs
Post your NPCS.
50 Replies - CO2 PServer - Discussions / Questions
[SUCHE] Thread zum erstellen von eigenen NPCs o..!!
Hallo liebe Elitepvpers Community, ich hab eigeses Projekt mit ein par freunden ins leben gerufen und wir wollen einen eigenen NPC erstelln der...
2 Replies - Metin2 PServer - Discussions / Questions
[Request]GUIDE about NPCs
Can someone release a guide how to do and set a NPC step by step please? Source 5165 Thx
9 Replies - CO2 PServer - Discussions / Questions
[REQUEST]Some NPCs for 5165
Hi guys. Does anyone mind making me 3 NPCs? 1. An NPC that makes your prof for any weapon 12. Free or not, doesn't matter. But I better free. ...
16 Replies - CO2 PServer - Discussions / Questions
[REQUEST] Promo NPCs
hey i need the promotion npcs for lotf, im going to edit them just need to take a look on what they look like if you can post them here i dont care...
13 Replies - CO2 PServer - Discussions / Questions



All times are GMT +2. The time now is 01:58.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Abuse
Copyright ©2018 elitepvpers All Rights Reserved.