Register for your free account! | Forgot your password?

You last visited: Today at 11:53

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

Advertisement



[Release]2 Npcs

Discussion on [Release]2 Npcs within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Sep 2007
Posts: 36
Received Thanks: 6
[Release]2 Npcs

These are my first 2 ever npcs. I coded them with the help of several other codes.
This code will Trade in the amulet for the gear.
Code:
case 10062: //Magic Artisan
                    {
                        if (LinkBack == 0)
                        {
                            Text("Hi. Gear here.", CSocket);
                            Link("Trojan", 1, CSocket);
                            Link("Warrior", 2, CSocket);
                            Link("Ninja", 3, CSocket);
                            Link("Water", 4, CSocket);
                            Link("Fire", 5, CSocket);
                            Link("Archer", 6, CSocket);
                            Link("Nevermind", 255, CSocket);
                            End(CSocket);
                        }
                        else if (LinkBack == 1)
                        {
                            int AMUID = 0;
                            int AMcount = 0;

                            foreach (Struct.ItemInfo Item in CSocket.Client.Inventory.Values)
                            {
                                if (Item.ItemID == 710012)
                                {
                                    AMUID = Item.UID;
                                    AMcount++;
                                }
                            }


                            if (AMcount >= 1)
                            {
                                AddItem(130009, 0, 0, 0, 0, 0, 0, 0, 0, 0, CSocket);//LeatherArmor
                                AddItem(410019, 0, 0, 0, 0, 0, 0, 0, 0, 0, CSocket);//LeafBlade
                                AddItem(480019, 0, 0, 0, 0, 0, 0, 0, 0, 0, CSocket);//RattanClub
                                AddItem(160019, 0, 0, 0, 0, 0, 0, 0, 0, 0, CSocket);//OxhideBoots
                                AddItem(150019, 0, 0, 0, 0, 0, 0, 0, 0, 0, CSocket);//CopperRing
                                AddItem(120009, 0, 0, 0, 0, 0, 0, 0, 0, 0, CSocket);//LightNecklace
                                AddItem(118009, 0, 0, 0, 0, 0, 0, 0, 0, 0, CSocket);//GuardCoronet
                                CSocket.Client.Inventory.Remove(AMUID);
                                CSocket.Send(ConquerPacket.ItemUsage(AMUID, 255, Struct.ItemUsage.RemoveItem));
                                Database.Database.DeleteItem(AMUID);
                                Text("Theres Your gear", CSocket);
                                Link("Bye", 255, CSocket);
                                End(CSocket);
                            }
                            else
                            {
                                Text("You don't have a Amulet", CSocket);
                                Link("Bye", 255, CSocket);
                                End(CSocket);
                            }
                        }
                        else if (LinkBack == 2)
                        {
                            int AMUID = 0;
                            int AMcount = 0;

                            foreach (Struct.ItemInfo Item in CSocket.Client.Inventory.Values)
                            {
                                if (Item.ItemID == 710011)
                                {
                                    AMUID = Item.UID;
                                    AMcount++;
                                }
                            }


                            if (AMcount >= 1)
                            {
                                AddItem(131009, 0, 0, 0, 0, 0, 0, 0, 0, 0, CSocket);//OxhideArmor
                                AddItem(480019, 0, 0, 0, 0, 0, 0, 0, 0, 0, CSocket);//RattanClub
                                AddItem(900009, 0, 0, 0, 0, 0, 0, 0, 0, 0, CSocket);//SoftSheild
                                AddItem(160019, 0, 0, 0, 0, 0, 0, 0, 0, 0, CSocket);//OxhideBoots
                                AddItem(150019, 0, 0, 0, 0, 0, 0, 0, 0, 0, CSocket);//CopperRing
                                AddItem(120009, 0, 0, 0, 0, 0, 0, 0, 0, 0, CSocket);//LightNecklace
                                AddItem(111009, 0, 0, 0, 0, 0, 0, 0, 0, 0, CSocket);//IronHelment
                                CSocket.Client.Inventory.Remove(AMUID);
                                CSocket.Send(ConquerPacket.ItemUsage(AMUID, 255, Struct.ItemUsage.RemoveItem));
                                Database.Database.DeleteItem(AMUID);
                                Text("Theres Your gear", CSocket);
                                Link("Bye", 255, CSocket);
                                End(CSocket);
                            }
                            else
                            {
                                Text("You don't have a Amulet", CSocket);
                                Link("Bye", 255, CSocket);
                                End(CSocket);
                            }
                        }
                        else if (LinkBack == 3)
                        {
                            int AMUID = 0;
                            int AMcount = 0;

                            foreach (Struct.ItemInfo Item in CSocket.Client.Inventory.Values)
                            {
                                if (Item.ItemID == 723583)
                                {
                                    AMUID = Item.UID;
                                    AMcount++;
                                }
                            }


                            if (AMcount >= 1)
                            {
                                AddItem(135009, 0, 0, 0, 0, 0, 0, 0, 0, 0, CSocket);//LowerNinjaVest
                                AddItem(601019, 0, 0, 0, 0, 0, 0, 0, 0, 0, CSocket);//IronKatana
                                AddItem(601019, 0, 0, 0, 0, 0, 0, 0, 0, 0, CSocket);//IronKatana
                                AddItem(160019, 0, 0, 0, 0, 0, 0, 0, 0, 0, CSocket);//OxhideBoots
                                AddItem(150019, 0, 0, 0, 0, 0, 0, 0, 0, 0, CSocket);//CopperRing
                                AddItem(120009, 0, 0, 0, 0, 0, 0, 0, 0, 0, CSocket);//LightNecklace
                                AddItem(112009, 0, 0, 0, 0, 0, 0, 0, 0, 0, CSocket);//FortitudeVeil
                                CSocket.Client.Inventory.Remove(AMUID);
                                CSocket.Send(ConquerPacket.ItemUsage(AMUID, 255, Struct.ItemUsage.RemoveItem));
                                Database.Database.DeleteItem(AMUID);
                                Text("Theres Your gear", CSocket);
                                Link("Bye", 255, CSocket);
                                End(CSocket);
                            }
                            else
                            {
                                Text("You don't have a Amulet", CSocket);
                                Link("Bye", 255, CSocket);
                                End(CSocket);
                            }
                        }
                        else if (LinkBack == 4)
                        {
                            int AMUID = 0;
                            int AMcount = 0;

                            foreach (Struct.ItemInfo Item in CSocket.Client.Inventory.Values)
                            {
                                if (Item.ItemID == 710014)
                                {
                                    AMUID = Item.UID;
                                    AMcount++;
                                }
                            }


                            if (AMcount >= 1)
                            {
                                AddItem(134009, 0, 0, 0, 0, 0, 0, 0, 0, 0, CSocket);//TaoRobe
                                AddItem(421019, 0, 0, 0, 0, 0, 0, 0, 0, 0, CSocket);//SpellBacksword
                                AddItem(160019, 0, 0, 0, 0, 0, 0, 0, 0, 0, CSocket);//OxhideBoots
                                AddItem(152019, 0, 0, 0, 0, 0, 0, 0, 0, 0, CSocket);//PeachBraclet
                                AddItem(121009, 0, 0, 0, 0, 0, 0, 0, 0, 0, CSocket);//PerfumeBag
                                AddItem(114009, 0, 0, 0, 0, 0, 0, 0, 0, 0, CSocket);//DestinyCap
                                CSocket.Client.Inventory.Remove(AMUID);
                                CSocket.Send(ConquerPacket.ItemUsage(AMUID, 255, Struct.ItemUsage.RemoveItem));
                                Database.Database.DeleteItem(AMUID);
                                Text("Theres Your gear", CSocket);
                                Link("Bye", 255, CSocket);
                                End(CSocket);
                            }
                            else
                            {
                                Text("You don't have a Amulet", CSocket);
                                Link("Bye", 255, CSocket);
                                End(CSocket);
                            }
                        }
                        else if (LinkBack == 5)
                        {
                            int AMUID = 0;
                            int AMcount = 0;

                            foreach (Struct.ItemInfo Item in CSocket.Client.Inventory.Values)
                            {
                                if (Item.ItemID == 710013)
                                {
                                    AMUID = Item.UID;
                                    AMcount++;
                                }
                            }


                            if (AMcount >= 1)
                            {
                                AddItem(134009, 0, 0, 0, 0, 0, 0, 0, 0, 0, CSocket);//TaoRobe
                                AddItem(421019, 0, 0, 0, 0, 0, 0, 0, 0, 0, CSocket);//SpellBacksword
                                AddItem(160019, 0, 0, 0, 0, 0, 0, 0, 0, 0, CSocket);//OxhideBoots
                                AddItem(152019, 0, 0, 0, 0, 0, 0, 0, 0, 0, CSocket);//PeachBraclet
                                AddItem(121009, 0, 0, 0, 0, 0, 0, 0, 0, 0, CSocket);//PerfumeBag
                                AddItem(114009, 0, 0, 0, 0, 0, 0, 0, 0, 0, CSocket);//DestinyCap
                                CSocket.Client.Inventory.Remove(AMUID);
                                CSocket.Send(ConquerPacket.ItemUsage(AMUID, 255, Struct.ItemUsage.RemoveItem));
                                Database.Database.DeleteItem(AMUID);
                                Text("Theres Your gear", CSocket);
                                Link("Bye", 255, CSocket);
                                End(CSocket);
                            }
                            else
                            {
                                Text("You don't have a Amulet", CSocket);
                                Link("Bye", 255, CSocket);
                                End(CSocket);
                            }
                        }
                        else if (LinkBack == 6)
                        {
                            int AMUID = 0;
                            int AMcount = 0;

                            foreach (Struct.ItemInfo Item in CSocket.Client.Inventory.Values)
                            {
                                if (Item.ItemID == 710015)
                                {
                                    AMUID = Item.UID;
                                    AMcount++;
                                }
                            }


                            if (AMcount >= 1)
                            {
                                AddItem(133009, 0, 0, 0, 0, 0, 0, 0, 0, 0, CSocket);//DeerskinCoat
                                AddItem(500019, 0, 0, 0, 0, 0, 0, 0, 0, 0, CSocket);//HuntingBow
                                AddItem(160019, 0, 0, 0, 0, 0, 0, 0, 0, 0, CSocket);//OxhideBoots
                                AddItem(150019, 0, 0, 0, 0, 0, 0, 0, 0, 0, CSocket);//CopperRing
                                AddItem(120009, 0, 0, 0, 0, 0, 0, 0, 0, 0, CSocket);//LightNecklace
                                AddItem(113009, 0, 0, 0, 0, 0, 0, 0, 0, 0, CSocket);//BadgerHat
                                CSocket.Client.Inventory.Remove(AMUID);
                                CSocket.Send(ConquerPacket.ItemUsage(AMUID, 255, Struct.ItemUsage.RemoveItem));
                                Database.Database.DeleteItem(AMUID);
                                Text("Theres Your gear", CSocket);
                                Link("Bye", 255, CSocket);
                                End(CSocket);
                            }
                            else
                            {
                                Text("You don't have a Amulet", CSocket);
                                Link("Bye", 255, CSocket);
                                End(CSocket);
                            }
                        }
                        break;
                    }
And this one will Sell you the Amulets.
Code:
case 390: //Love Stone
                    {
                        if (LinkBack == 0)
                        {
                            Text("Hiya There!  Would you like to buy an Amulet? It will Cost you $100,000", CSocket);
                            Link("Yes I sure would!", 1, CSocket);
                            Link("No Not today.", 255, CSocket);
                            End(CSocket);
                        }
                        else if (LinkBack == 1)
                        {
                            Text("What Class are you?", CSocket);
                            Link("Trojan", 2, CSocket);
                            Link("Warrior", 3, CSocket);
                            Link("Ninja", 4, CSocket);
                            Link("Archer", 5, CSocket);
                            Link("Fire Taoist", 6, CSocket);
                            Link("Water Taoist", 7, CSocket);
                            Link("Nevermind", 255, CSocket);
                            End(CSocket);
                        }
                        else if (LinkBack == 2)
                        {
                            if (CSocket.Client.Money >= 100000)
                            {
                                AddItem(710012, 0, 0, 0, 0, 0, 0, 0, 0, 0, CSocket);
                                Money(-100000, CSocket);
                            }
                        }
                        else if (LinkBack == 3)
                        {
                            if (CSocket.Client.Money >= 100000)
                            {
                                AddItem(710011, 0, 0, 0, 0, 0, 0, 0, 0, 0, CSocket);
                                Money(-100000, CSocket);
                            }
                        }
                        else if (LinkBack == 4)
                        {
                            if (CSocket.Client.Money >= 100000)
                            {
                                AddItem(723583, 0, 0, 0, 0, 0, 0, 0, 0, 0, CSocket);
                                Money(-100000, CSocket);
                            }
                        }
                        else if (LinkBack == 5)
                        {
                            if (CSocket.Client.Money >= 100000)
                            {
                                AddItem(710015, 0, 0, 0, 0, 0, 0, 0, 0, 0, CSocket);
                                Money(-100000, CSocket);
                            }
                        }
                        else if (LinkBack == 6)
                        {
                            if (CSocket.Client.Money >= 100000)
                            {
                                AddItem(710013, 0, 0, 0, 0, 0, 0, 0, 0, 0, CSocket);
                                Money(-100000, CSocket);
                            }

                        }
                        else if (LinkBack == 7)
                        {
                            if (CSocket.Client.Money >= 100000)
                            {
                                AddItem(710014, 0, 0, 0, 0, 0, 0, 0, 0, 0, CSocket);
                                Money(-100000, CSocket);
                            }
                        }
                        break;
                    }
I have a question tho, How do you make it so an Archer Cant Buy the Amulet or Trade the amulet for say Trojan gears.
duddz is offline  
Thanks
2 Users
Old 06/26/2009, 04:00   #2
 
CIRASH's Avatar
 
elite*gold: 0
Join Date: Jul 2008
Posts: 259
Received Thanks: 73
tell it if job doesnt equal an archer id then it cancels and the npc says sorry you are not a archer.
CIRASH is offline  
Old 06/26/2009, 08:47   #3
 
mejo33's Avatar
 
elite*gold: 0
Join Date: Sep 2007
Posts: 370
Received Thanks: 117
Quote:
Originally Posted by duddz View Post
These are my first 2 ever npcs. I coded them with the help of several other codes.
This code will Trade in the amulet for the gear.
And this one will Sell you the Amulets.
Code:
case 390: //Love Stone
                    {
                        if (LinkBack == 0)
                        {
                            Text("Hiya There!  Would you like to buy an Amulet? It will Cost you $100,000", CSocket);
                            Link("Yes I sure would!", 1, CSocket);
                            Link("No Not today.", 255, CSocket);
                            End(CSocket);
                        }
                        else if (LinkBack == 1)
                        {
                            Text("What Class are you?", CSocket);
                            Link("Trojan", 2, CSocket);
                            Link("Warrior", 3, CSocket);
                            Link("Ninja", 4, CSocket);
                            Link("Archer", 5, CSocket);
                            Link("Fire Taoist", 6, CSocket);
                            Link("Water Taoist", 7, CSocket);
                            Link("Nevermind", 255, CSocket);
                            End(CSocket);
                        }
                        else if (LinkBack == 2)
                        {
                            if (CSocket.Client.Money >= 100000)
                            {
                                AddItem(710012, 0, 0, 0, 0, 0, 0, 0, 0, 0, CSocket);
                                Money(-100000, CSocket);
                            }
                        }
                        else if (LinkBack == 3)
                        {
                            if (CSocket.Client.Money >= 100000)
                            {
                                AddItem(710011, 0, 0, 0, 0, 0, 0, 0, 0, 0, CSocket);
                                Money(-100000, CSocket);
                            }
                        }
                        else if (LinkBack == 4)
                        {
                            if (CSocket.Client.Money >= 100000)
                            {
                                AddItem(723583, 0, 0, 0, 0, 0, 0, 0, 0, 0, CSocket);
                                Money(-100000, CSocket);
                            }
                        }
                        else if (LinkBack == 5)
                        {
                            if (CSocket.Client.Money >= 100000)
                            {
                                AddItem(710015, 0, 0, 0, 0, 0, 0, 0, 0, 0, CSocket);
                                Money(-100000, CSocket);
                            }
                        }
                        else if (LinkBack == 6)
                        {
                            if (CSocket.Client.Money >= 100000)
                            {
                                AddItem(710013, 0, 0, 0, 0, 0, 0, 0, 0, 0, CSocket);
                                Money(-100000, CSocket);
                            }

                        }
                        else if (LinkBack == 7)
                        {
                            if (CSocket.Client.Money >= 100000)
                            {
                                AddItem(710014, 0, 0, 0, 0, 0, 0, 0, 0, 0, CSocket);
                                Money(-100000, CSocket);
                            }
                        }
                        break;
                    }
I have a question tho, How do you make it so an Archer Cant Buy the Amulet or Trade the amulet for say Trojan gears.
Well, its easy
Quote:
else if (LinkBack == 2)
{
if (CSocket.Client.Money >= 100000)
{
AddItem(710012, 0, 0, 0, 0, 0, 0, 0, 0, 0, CSocket);
Money(-100000, CSocket);
}
}
replace
Quote:
if (CSocket.Client.Money >= 100000)
to
Quote:
if (CSocket.Client.Money >= 100000)
if (CSocket.Client.Profession >= 15)
and
Quote:
{
AddItem(710012, 0, 0, 0, 0, 0, 0, 0, 0, 0, CSocket);
Money(-100000, CSocket);
}
add
Quote:
{
AddItem(710012, 0, 0, 0, 0, 0, 0, 0, 0, 0, CSocket);
Money(-100000, CSocket);
}
else if
{
Text("You dont have money or please chose your profession.", CSocket);
Link("Aww, bye.", 255, CSocket);
End(CSocket);
}
I DONT TEST IT
mejo33 is offline  
Thanks
1 User
Old 06/26/2009, 09:30   #4
 
elite*gold: 0
Join Date: Sep 2007
Posts: 36
Received Thanks: 6
Quote:
Originally Posted by mejo33 View Post
Well, its easy

replace

to

and

add


I DONT TEST IT
It didnt work, Profession gave me the error.
duddz is offline  
Old 06/26/2009, 17:05   #5
 
elite*gold: 0
Join Date: Mar 2008
Posts: 83
Received Thanks: 10
I have error with ADDitem does not accept 11 itens Help!!
dextercsar is offline  
Old 06/26/2009, 18:10   #6
 
elite*gold: 0
Join Date: Jan 2009
Posts: 1,922
Received Thanks: 491
well if you rewrote part of it you can make it so it will be first by professions like

if (Client.Profssion = 15)
{
stuff in here ( i think u want tro only rihgt? so itsl ike 10-15
}
else
{
your not a tro fool
}

if you tell me which jobs you want i can try and code this for you like the way i mean it if you want ... i dont use coemvu2 but i can help
PeTe Ninja is offline  
Old 06/26/2009, 20:29   #7
 
elite*gold: 0
Join Date: Sep 2007
Posts: 36
Received Thanks: 6
Quote:
Originally Posted by dextercsar View Post
I have error with ADDitem does not accept 11 itens Help!!
Find The Wuxing Oven guide and do that first.

Quote:
Originally Posted by PeTe Ninja View Post
well if you rewrote part of it you can make it so it will be first by professions like

if (Client.Profssion = 15)
{
stuff in here ( i think u want tro only rihgt? so itsl ike 10-15
}
else
{
your not a tro fool
}

if you tell me which jobs you want i can try and code this for you like the way i mean it if you want ... i dont use coemvu2 but i can help
Well Trojan, Warrior, Archer, Ninja, Water and Fire lol.
I think i know what your mean but lets see what you come up with, you only need to come up with one so that job 10 through 15 can get it and i can figure it out.
duddz is offline  
Old 06/27/2009, 03:10   #8
 
elite*gold: 0
Join Date: May 2008
Posts: 103
Received Thanks: 3
I HAVE THIS ERROR

HELP
m7med is offline  
Old 06/27/2009, 03:45   #9
 
elite*gold: 0
Join Date: Sep 2007
Posts: 36
Received Thanks: 6
Quote:
Originally Posted by m7med View Post
I HAVE THIS ERROR

HELP
take out 1 zero from each thing
or follow wuxing oven guide
duddz is offline  
Thanks
1 User
Old 07/08/2009, 12:37   #10
 
elite*gold: 0
Join Date: Jun 2009
Posts: 140
Received Thanks: 12
How can i make new item like ones That Look like the Amulet but name like "TrojanGear" or "WaterGear"...
JustChillin is offline  
Reply


Similar Threads Similar Threads
[Release]Basevendor+Mangos 3.3.3a Npcs
07/27/2012 - WoW Private Server - 10 Replies
Ich habe kürzlich im Internet ein nettes Tool gefunden und möchte es gerne mit euch teilen da ich auf viele Threads gestoßen bin in denen nach Lvl Mobs,Vendoren usw gefragt wurde.Ich weis nicht ob ihrs schon kennt,aber wenn nicht ist es auf jeden Fall was ganz nettes;).Also meine neuste Entdeckung nennt sich Basevendor: Was ist BaseVendor? BaseVendor bietet Dir die Funktion Deine individuell angepassen, eigenen Händler für Deinen Server zu erstellen. In wenigen Minuten hast Du Deine...
[Release]DisCity NPCs (5165)
09/17/2010 - CO2 PServer Guides & Releases - 43 Replies
first lets define our variables in Character.cs search for: public Nobility Nobility; then add these under it: public bool DisCityON = false; public int DisCityMobs = 0; now on to the npc's
[Release] Birth Village NPCs
08/10/2010 - CO2 PServer Guides & Releases - 9 Replies
-Deleted- People are so ungrateful of someones hard work and cba to contribute their own tiny piece. Might release these on a later dat with all the grammer correct for every class. But don't know yet. #Request Close
[Release] Xml Npcs
04/04/2010 - CO2 PServer Guides & Releases - 6 Replies
Honestly, was just bored so I thought I'd take a look at C# since I haven't for a few months. Hard-coded Npc's suck balls, so here's the starting code for Xml Npc's. Pretty sure it was done within CoEmu v2, but can easily be converted into any source. I haven't tested it, since I don't have a Conquer client. Instructions:
[Release]2 NPCS
05/26/2009 - CO2 PServer Guides & Releases - 18 Replies
Hi its me again Flame will be Reported I Coded these 100% Myself The NPCS are, CP admin and A Npc that trades gold for cps and cps for gold. Both tested on a LOTF source 100% work First CP Admin



All times are GMT +1. The time now is 11:53.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.