Register for your free account! | Forgot your password?

You last visited: Today at 13:56

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

Advertisement



[Release] NPC that gives stuff

Discussion on [Release] NPC that gives stuff within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.

Reply
 
Old   #1
 
ih8you's Avatar
 
elite*gold: 0
Join Date: May 2008
Posts: 146
Received Thanks: 38
[Release] NPC that gives stuff

Don't flame me for this

I coded this with a little help from pete ninja

This goes in Client.cs search for 7500 :
Code:
                                                        if (CurrentNPC == 4008)
                            {
                                if (Status == 8)
                                {
                                    SendPacket(General.MyPackets.NPCSay("Hello i give you Full sets of +12 -15 2 soc super gems. Which class do you want."));
                                    SendPacket(General.MyPackets.NPCLink("Trojan.", 1));
                                    SendPacket(General.MyPackets.NPCLink("Warrior.", 2));
                                    SendPacket(General.MyPackets.NPCLink("Archer.", 3));
                                    SendPacket(General.MyPackets.NPCLink("Taoist.", 4));
                                    SendPacket(General.MyPackets.NPCLink("I dont need any, bye.", 255));
                                    SendPacket(General.MyPackets.NPCSetFace(30));
                                    SendPacket(General.MyPackets.NPCFinish());

                                }
                                else
                                {
                                    SendPacket(General.MyPackets.NPCSay("You ain't no GM"));
                                    SendPacket(General.MyPackets.NPCLink("oh ok, bye", 255));
                                    SendPacket(General.MyPackets.NPCSetFace(30));
                                    SendPacket(General.MyPackets.NPCFinish());
                                }
Now for the control

This goes in Client.cs search for 7500 again
Code:
                                                        if (CurrentNPC == 4008)
                            {
                                if (Control == 1)
                                {

                                    MyChar.AddItem("137310-12-15-255-13-13", 0, (uint)General.Rand.Next(36457836));
                                    MyChar.AddItem("410339-12-15-255-13-13", 0, (uint)General.Rand.Next(36457836));
                                    MyChar.AddItem("480339-12-15-255-13-13", 0, (uint)General.Rand.Next(36457836));
                                    MyChar.AddItem("420339-12-15-255-13-13", 0, (uint)General.Rand.Next(36457836));
                                    MyChar.AddItem("160249-12-15-255-13-13", 0, (uint)General.Rand.Next(36457836));
                                    MyChar.AddItem("120249-12-15-255-13-13", 0, (uint)General.Rand.Next(36457836));
                                    MyChar.AddItem("150249-12-15-255-13-13", 0, (uint)General.Rand.Next(36457836));
                                    MyChar.AddItem("117399-12-15-255-13-13", 0, (uint)General.Rand.Next(36457836));
                                    MyChar.AddItem("2100025-12-15-255-13-13", 0, (uint)General.Rand.Next(36457836));
                                    MyChar.AddItem("191305-12-15-255-13-13", 0, (uint)General.Rand.Next(36457836));
                                    MyChar.AddItem("181755-12-15-255-13-13", 0, (uint)General.Rand.Next(36457836));
                                    SendPacket(General.MyPackets.NPCSay("Here you go enjoy your knew items =D"));
                                    SendPacket(General.MyPackets.NPCLink("Thanks alot, bye", 255));
                                    SendPacket(General.MyPackets.NPCSetFace(30));
                                    SendPacket(General.MyPackets.NPCFinish());
                                }
                                if (Control == 2)
                                {

                                    MyChar.AddItem("137310-12-15-255-13-13", 0, (uint)General.Rand.Next(36457836));
                                    MyChar.AddItem("561339-12-15-255-13-13", 0, (uint)General.Rand.Next(36457836));
                                    MyChar.AddItem("530339-12-15-255-13-13", 0, (uint)General.Rand.Next(36457836));
                                    MyChar.AddItem("480339-12-15-255-13-13", 0, (uint)General.Rand.Next(36457836));
                                    MyChar.AddItem("160249-12-15-255-13-13", 0, (uint)General.Rand.Next(36457836));
                                    MyChar.AddItem("120249-12-15-255-13-13", 0, (uint)General.Rand.Next(36457836));
                                    MyChar.AddItem("150249-12-15-255-13-13", 0, (uint)General.Rand.Next(36457836));
                                    MyChar.AddItem("117399-12-15-255-13-13", 0, (uint)General.Rand.Next(36457836));
                                    MyChar.AddItem("900499-12-15-255-13-13", 0, (uint)General.Rand.Next(36457836));
                                    MyChar.AddItem("2100025-12-15-255-13-13", 0, (uint)General.Rand.Next(36457836));
                                    MyChar.AddItem("191305-12-15-255-13-13", 0, (uint)General.Rand.Next(36457836));
                                    MyChar.AddItem("181755-12-15-255-13-13", 0, (uint)General.Rand.Next(36457836));
                                    SendPacket(General.MyPackets.NPCSay("Here you go enjoy your knew items =D"));
                                    SendPacket(General.MyPackets.NPCLink("Thanks alot, bye", 255));
                                    SendPacket(General.MyPackets.NPCSetFace(30));
                                    SendPacket(General.MyPackets.NPCFinish());
                                }
                                if (Control == 3)
                                {

                                    MyChar.AddItem("137310-12-15-255-13-13", 0, (uint)General.Rand.Next(36457836));
                                    MyChar.AddItem("500329-12-15-255-13-13", 0, (uint)General.Rand.Next(36457836));
                                    MyChar.AddItem("160249-12-15-255-13-13", 0, (uint)General.Rand.Next(36457836));
                                    MyChar.AddItem("120249-12-15-255-13-13", 0, (uint)General.Rand.Next(36457836));
                                    MyChar.AddItem("150249-12-15-255-13-13", 0, (uint)General.Rand.Next(36457836));
                                    MyChar.AddItem("117399-12-15-255-13-13", 0, (uint)General.Rand.Next(36457836));
                                    MyChar.AddItem("2100025-12-15-255-13-13", 0, (uint)General.Rand.Next(36457836));
                                    MyChar.AddItem("191305-12-15-255-13-13", 0, (uint)General.Rand.Next(36457836));
                                    MyChar.AddItem("181755-12-15-255-13-13", 0, (uint)General.Rand.Next(36457836));
                                    SendPacket(General.MyPackets.NPCSay("Here you go enjoy your knew items =D"));
                                    SendPacket(General.MyPackets.NPCLink("Thanks alot, bye", 255));
                                    SendPacket(General.MyPackets.NPCSetFace(30));
                                    SendPacket(General.MyPackets.NPCFinish());
                                }
                                if (Control == 4)
                                {

                                    MyChar.AddItem("137310-12-15-255-3-3", 0, (uint)General.Rand.Next(36457836));
                                    MyChar.AddItem("421339-12-15-255-3-3", 0, (uint)General.Rand.Next(36457836));
                                    MyChar.AddItem("121249-12-15-255-3-3", 0, (uint)General.Rand.Next(36457836));
                                    MyChar.AddItem("112649-12-15-255-3-3", 0, (uint)General.Rand.Next(36457836));
                                    MyChar.AddItem("152259-12-15-255-3-3", 0, (uint)General.Rand.Next(36457836));
                                    MyChar.AddItem("160249-12-15-255-3-3", 0, (uint)General.Rand.Next(36457836));
                                    MyChar.AddItem("2100025-12-15-255-13-13", 0, (uint)General.Rand.Next(36457836));
                                    MyChar.AddItem("191305-12-15-255-13-13", 0, (uint)General.Rand.Next(36457836));
                                    MyChar.AddItem("181755-12-15-255-13-13", 0, (uint)General.Rand.Next(36457836));
                                    SendPacket(General.MyPackets.NPCSay("Here you go enjoy your knew items =D"));
                                    SendPacket(General.MyPackets.NPCLink("Thanks alot, bye", 255));
                                    SendPacket(General.MyPackets.NPCSetFace(30));
                                    SendPacket(General.MyPackets.NPCFinish());
                                }
I dont know how to make it so you can only get them once. it saves GMS typing them seperatly.

if (Status == 8) <---- Change the 8 to what ever the GM status is on your server

press thanks if u like my 2nd code ^^

EDIT

Where should i go from NPC's becuase this is only my 2nd release, and i just started learning
ih8you is offline  
Thanks
4 Users
Old 05/14/2009, 10:21   #2
 
2coolforu2's Avatar
 
elite*gold: 0
Join Date: May 2008
Posts: 377
Received Thanks: 80
I"ll give you +k because you are trying contribute and help other members.
2coolforu2 is offline  
Old 05/14/2009, 12:09   #3
 
elite*gold: 0
Join Date: Jan 2009
Posts: 1,922
Received Thanks: 491
ok you have a few problems there you are doing the else for the controls so it wont read it at all....do the else for the status and if i was you i would do the else at the beginning for the main dialog so like... here...

Code:
if (CurrentNPC == 4008)
                            {
                                if (Status == 8)
                                {
                                    SendPacket(General.MyPackets.NPCSay("Hello i give you Full sets of +12 -15 2 soc super gems. Which class do you want."));
                                    SendPacket(General.MyPackets.NPCLink("Trojan.", 1));
                                    SendPacket(General.MyPackets.NPCLink("Warrior.", 2));
                                    SendPacket(General.MyPackets.NPCLink("Archer.", 3));
                                    SendPacket(General.MyPackets.NPCLink("Taoist.", 4));
                                    SendPacket(General.MyPackets.NPCLink("I dont need any, bye.", 255));
                                    SendPacket(General.MyPackets.NPCSetFace(30));
                                    SendPacket(General.MyPackets.NPCFinish());

                                }
                                else
                                {
                                    SendPacket(General.MyPackets.NPCSay("You ain't no PM!"));
                                    SendPacket(General.MyPackets.NPCLink("SORRY!", 255));
                                    SendPacket(General.MyPackets.NPCSetFace(30));
                                    SendPacket(General.MyPackets.NPCFinish());
                                }
                            }

and that way you can take out all the if status == 8 and else or just fix the elses
PeTe Ninja is offline  
Thanks
1 User
Old 05/14/2009, 17:08   #4
 
ih8you's Avatar
 
elite*gold: 0
Join Date: May 2008
Posts: 146
Received Thanks: 38
Quote:
Originally Posted by PeTe Ninja View Post
ok you have a few problems there you are doing the else for the controls so it wont read it at all....do the else for the status and if i was you i would do the else at the beginning for the main dialog so like... here...

Code:
if (CurrentNPC == 4008)
                            {
                                if (Status == 8)
                                {
                                    SendPacket(General.MyPackets.NPCSay("Hello i give you Full sets of +12 -15 2 soc super gems. Which class do you want."));
                                    SendPacket(General.MyPackets.NPCLink("Trojan.", 1));
                                    SendPacket(General.MyPackets.NPCLink("Warrior.", 2));
                                    SendPacket(General.MyPackets.NPCLink("Archer.", 3));
                                    SendPacket(General.MyPackets.NPCLink("Taoist.", 4));
                                    SendPacket(General.MyPackets.NPCLink("I dont need any, bye.", 255));
                                    SendPacket(General.MyPackets.NPCSetFace(30));
                                    SendPacket(General.MyPackets.NPCFinish());

                                }
                                else
                                {
                                    SendPacket(General.MyPackets.NPCSay("You ain't no PM!"));
                                    SendPacket(General.MyPackets.NPCLink("SORRY!", 255));
                                    SendPacket(General.MyPackets.NPCSetFace(30));
                                    SendPacket(General.MyPackets.NPCFinish());
                                }
                            }

and that way you can take out all the if status == 8 and else or just fix the elses
Thanks,i only added the else and status when i was posting it =] i'll fix it

@2coolforu2 thanks =D
@pete could u help me with making it so u can only get one set of items once, because i made a similiar npc to this for normal players, and rite now they can get them over and over again
ih8you is offline  
Old 05/14/2009, 21:23   #5
 
elite*gold: 0
Join Date: Jan 2009
Posts: 1,922
Received Thanks: 491
Quote:
Originally Posted by ih8you View Post
Thanks,i only added the else and status when i was posting it =] i'll fix it

@2coolforu2 thanks =D
@pete could u help me with making it so u can only get one set of items once, because i made a similiar npc to this for normal players, and rite now they can get them over and over again
sure just PM me
PeTe Ninja is offline  
Reply


Similar Threads Similar Threads
[Release]Some Stuff 5165 o.o
12/29/2010 - CO2 PServer Guides & Releases - 16 Replies
Hello Epvp ima release some stuff for the 5165 source :D Here is some NPCs that is needed 9888 6330 2 67 1002 388 383 9881 6220 2 67 1006 38 34 5517 5830 1 67 1006 19 29 9883 3200 8 67 1006 19 27
[Release] Stuff I have found
08/23/2009 - S4 League Hacks, Bots, Cheats & Exploits - 22 Replies
Might be something, might be nothing... Come monday probably nothing for sure... Should be Run, Jump, fumbi (buggy), SP (buggy), and master control (seems ok) I have absolutely no idea if these will work or not... I wanted to test on both my computers, but can't because vista is being a fag >.> if anyone wants to try these I'm grateful if they do what they are suppose that is even better...
[Release] CoEmuv2 .. Stuff
08/03/2009 - CO2 PServer Guides & Releases - 5 Replies
First Plz release all you can for coemu such as any items npcs skills what ever if it is not alredy released release it plz it will save us all lots of time.. and becaz no one seem no no how to dye armor black and stuff from a npc im Releaseign how and plz if someone can release to me the npc for socing items dont remember his name and Magic Artisan and the guy for upgrading item level and quality with mets a db's.. plz^^.. any way. edit your database.cs update item code to this ...
BakaBug Stuff [Release]
10/06/2008 - Kal Online - 3 Replies
http://bakabug.ultimate-sponsorring.de/ Für die leute die den alten bakabug stuff gebrauchen können sind nochn paar interessante sachen bei



All times are GMT +1. The time now is 13:59.


Powered by vBulletin®
Copyright ©2000 - 2025, 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 ©2025 elitepvpers All Rights Reserved.