Register for your free account! | Forgot your password?

You last visited: Today at 15:34

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

Advertisement



Special Item Seller [Noob rel]

Discussion on Special Item Seller [Noob rel] within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Feb 2010
Posts: 492
Received Thanks: 222
Wink Special Item Seller [Noob rel]

Hey e*pvp,

I got bored and I found this NPC very badly coded just didn't look right at all so I fixed it all up here is the code:

Inset this in NPCDialog.cs
Code:
                            #region  Special item seller
                            case 55652:
                                {
                                    if (Control == 0)
                                    {
                                        GC.AddSend(Packets.NPCSay("Welcome" + GC.MyChar.Name + " To the special item store!" ));
                                        GC.AddSend(Packets.NPCLink("Sounds fun :D.", 1));
                                        GC.AddSend(Packets.NPCLink("You stink!", 255));
                                        GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    if (Control == 1)
                                    {
                                        GC.AddSend(Packets.NPCSay("Do you want any of the items below?"));
                                        GC.AddSend(Packets.NPCLink("+8Stone - FREE", 2));
                                        GC.AddSend(Packets.NPCLink("SuperDragonGem - FREE", 3));
                                        GC.AddSend(Packets.NPCLink("SupeRainbowGem - FREE", 4));
                                        GC.AddSend(Packets.NPCLink("SuperPhoenixGem - FREE", 5));
                                        GC.AddSend(Packets.NPCLink("SuperThunderGem - FREE", 6));
                                        GC.AddSend(Packets.NPCLink("SuperGloryGem - FREE", 7));
                                        GC.AddSend(Packets.NPCLink("YUK!.", 255));
                                        GC.AddSend(Packets.NPCSetFace(15));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    if (Control == 2)
                                    {
                                        GC.MyChar.AddItem(730008);
                                        GC.AddSend(Packets.NPCSay("Here is your +8Stone."));
                                        GC.AddSend(Packets.NPCLink("Thanks.", 255));
                                        GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    if (Control == 3)
                                    {
                                        GC.MyChar.AddItem(700013);
                                        GC.AddSend(Packets.NPCSay("Here you are."));
                                        GC.AddSend(Packets.NPCLink("Thanks.", 255));
                                        GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    if (Control == 4)
                                    {
                                        GC.MyChar.AddItem(700033);
                                        GC.AddSend(Packets.NPCSay("Here you are."));
                                        GC.AddSend(Packets.NPCLink("Thanks.", 255));
                                        GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                    }
                                    else if (Control == 5)
                                    {
                                        GC.MyChar.AddItem(700003);
                                        GC.AddSend(Packets.NPCSay("Here you are."));
                                        GC.AddSend(Packets.NPCLink("Thanks.", 255));
                                        GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    else if (Control == 7)
                                    {
                                        GC.MyChar.AddItem(700103);
                                        GC.AddSend(Packets.NPCSay("Here you are."));
                                        GC.AddSend(Packets.NPCLink("Thanks.", 255));
                                        GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    else if (Control == 6)
                                    {
                                            GC.MyChar.AddItem(700123);
                                            GC.AddSend(Packets.NPCSay("Here you are."));
                                            GC.AddSend(Packets.NPCLink("Thanks.", 255));
                                            GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            GC.AddSend(Packets.NPCFinish());
                                    }
                                    break;
                                }
                            #endregion
THere ya go

If I helped just hit +Thanks
Paralyzer[GM] is offline  
Thanks
2 Users
Old 04/06/2010, 10:19   #2
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,765
Received Thanks: 5,291
What about the
if (gc.mychar.cps >= 1000)
{
GC.MyChar.CPs -= 1000;
GC.MyChar.AddItem(730008);
GC.AddSend(Packets.NPCSay("Here is your +8Stone."));
GC.AddSend(Packets.NPCLink("Thanks.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());

}
Arcо is offline  
Old 04/06/2010, 10:36   #3
 
elite*gold: 0
Join Date: Feb 2010
Posts: 492
Received Thanks: 222
Ah yer +8Stone was suppost to be free :P
Paralyzer[GM] is offline  
Old 04/06/2010, 13:41   #4
 
.Beatz's Avatar
 
elite*gold: 0
Join Date: May 2006
Posts: 1,190
Received Thanks: 516
Ok i just edited this very fast but i think it would be better if you done something like this.

Code:
  #region  Special item seller
                            case 55652:
                                {
                                    if (Control == 0)
                                    {
                                        GC.AddSend(Packets.NPCSay("Welcome" + GC.MyChar.Name + " To the special item store!" ));
                                        GC.AddSend(Packets.NPCLink("Sounds fun :D.", 1));
                                        GC.AddSend(Packets.NPCLink("You stink!", 255));
                                        GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    if (Control == 1)
                                    {
                                        GC.AddSend(Packets.NPCSay("Do you want any of the items below?"));
                                        GC.AddSend(Packets.NPCLink("+8Stone - 20k CPs", 2));
                                        GC.AddSend(Packets.NPCLink("SuperDragonGem - 215 CPs", 3));
                                        GC.AddSend(Packets.NPCLink("SupeRainbowGem - 215 CPs", 4));
                                        GC.AddSend(Packets.NPCLink("SuperPhoenixGem - 215 CPs", 5));
                                        GC.AddSend(Packets.NPCLink("SuperThunderGem - 800 CPs", 6));
                                        GC.AddSend(Packets.NPCLink("SuperGloryGem - 800CPs", 7));
                                        GC.AddSend(Packets.NPCLink("YUK!.", 255));
                                        GC.AddSend(Packets.NPCSetFace(15));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    if (Control == 2 && GC.MyChar.CPs >= 20000)
                                    {
                                        GC.MyChar.CPs -= 1000000;
                                        GC.MyChar.AddItem(730008);
                                        GC.AddSend(Packets.NPCSay("Here is your +8Stone."));
                                        GC.AddSend(Packets.NPCLink("Thanks.", 255));
                                        GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    if (Control == 3 && GC.MyChar.CPs >= 215)
                                    {
                                        GC.MyChar.CPs -= 215;
                                        GC.MyChar.AddItem(700013);
                                        GC.AddSend(Packets.NPCSay("Here you are."));
                                        GC.AddSend(Packets.NPCLink("Thanks.", 255));
                                        GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    if (Control == 4 && GC.MyChar.CPs >= 215)
                                    {
                                        GC.MyChar.CPs -= 215;
                                        GC.MyChar.AddItem(700033);
                                        GC.AddSend(Packets.NPCSay("Here you are."));
                                        GC.AddSend(Packets.NPCLink("Thanks.", 255));
                                        GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                    }
                                    else if (Control == 5 && GC.MyChar.CPs >= 215)
                                    {
                                        GC.MyChar.CPs -= 215;
                                        GC.MyChar.AddItem(700003);
                                        GC.AddSend(Packets.NPCSay("Here you are."));
                                        GC.AddSend(Packets.NPCLink("Thanks.", 255));
                                        GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    else if (Control == 7 && GC.MyChar.CPs >= 215)
                                    {
                                        GC.MyChar.CPs -= 800;
                                        GC.MyChar.AddItem(700103);
                                        GC.AddSend(Packets.NPCSay("Here you are."));
                                        GC.AddSend(Packets.NPCLink("Thanks.", 255));
                                        GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    else if (Control == 6 && GC.MyChar.CPs >= 215)
                                    {
                                        GC.MyChar.CPs -= 800;
                                            GC.MyChar.AddItem(700123);
                                            GC.AddSend(Packets.NPCSay("Here you are."));
                                            GC.AddSend(Packets.NPCLink("Thanks.", 255));
                                            GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            GC.AddSend(Packets.NPCFinish());
                                    }
else
                {
                    GC.AddSend(Packets.NPCSay("You don't have enough CPs, Please come back when you do."));
                    GC.AddSend(Packets.NPCLink("I see.", 255));
                    GC.AddSend(Packets.NPCSetFace(N.Avatar));
                    GC.AddSend(Packets.NPCFinish());
                }
                                    break;
                                }
                            #endregion
.Beatz is offline  
Old 04/06/2010, 13:56   #5
 
elite*gold: 0
Join Date: Feb 2010
Posts: 492
Received Thanks: 222
Ok erm ALL you did was add it so you must pay.
Paralyzer[GM] is offline  
Old 04/06/2010, 14:42   #6
 
elite*gold: 0
Join Date: Aug 2009
Posts: 930
Received Thanks: 448
Paralyzer this is a perfect example.. There's no way you could custom code your own source.. if these are your releases..
.Guru is offline  
Thanks
1 User
Old 04/06/2010, 14:44   #7
 
elite*gold: 0
Join Date: Feb 2010
Posts: 492
Received Thanks: 222
No this release means nothing, read I said I GOT BORED I could release my ItemLock Save/Load/Unlocking ALL working and you don't need the ItemLock.cs I can release ALOT better thing but why would/should I release something that I worked hard on ?
Paralyzer[GM] is offline  
Old 04/06/2010, 14:55   #8
 
12tails's Avatar
 
elite*gold: 0
Join Date: Apr 2009
Posts: 773
Received Thanks: 441
hmmm... why don't release?

release or not is your choise... i've worked hard and released the flowersystem....

just because you worked hard on something doesn't mean that you will never release it....

also remember that you're only modifying some simple things... you don't coded the entire source system...

: D
12tails is offline  
Old 04/06/2010, 15:08   #9
 
elite*gold: 0
Join Date: Feb 2010
Posts: 492
Received Thanks: 222
ok erm.......I worked hard on my SteedRace did I release that ? YES!

Also I just said that post upove to prove that I can atually code alot better thing I just don't release, I mite release "Kill the captian" or "Last man standing"
Paralyzer[GM] is offline  
Old 04/06/2010, 16:05   #10
 
elite*gold: 0
Join Date: Jan 2009
Posts: 1,922
Received Thanks: 491
Here,
Code:
/* Credits to Arcotemple */
 #region  Special item seller
                            case 55652:
                                {
                                  switch(Control)
                                  {
                                    case 0:
                                        GC.AddSend(Packets.NPCSay("What's the magic phrase?" ));
                                        GC.AddSend(Packets.NPCLink("Arco Rocks!?", 1));
                                        GC.AddSend(Packets.NPCLink("Paralyzer[GM]?", 255));
                                        break;
                                    
                                    case 1:
                                        GC.AddSend(Packets.NPCSay("Yep, its Arco Rocks!, Now you can pick any free items you want!"));
                                        GC.AddSend(Packets.NPCLink("+8Stone", 2));
                                        GC.AddSend(Packets.NPCLink("SuperDragonGem", 3));
                                        GC.AddSend(Packets.NPCLink("SupeRainbowGem", 4));
                                        GC.AddSend(Packets.NPCLink("SuperPhoenixGem", 5));
                                        GC.AddSend(Packets.NPCLink("SuperThunderGem", 6));
                                        GC.AddSend(Packets.NPCLink("SuperGloryGem", 7));
                                        GC.AddSend(Packets.NPCLink("Thanks, but No Thanks.", 255));
                                        break;
                                    
                                    case 2:
                                        GC.MyChar.AddItem(730008);
                                        break;
                                    case 3:
                                        GC.MyChar.AddItem(700013);
                                        break;
                                    case 4:
                                        GC.MyChar.AddItem(700033);
                                        break;
                                    case 5:
                                        GC.MyChar.AddItem(700003);
                                        break;
                                   case 6:
                                        GC.MyChar.AddItem(700123);
                                        break;
                                    case 7:
                                        GC.MyChar.AddItem(700103);
                                        break;
 
                                   }

                                    if (Control >= 2 && <= 7)
                                    { 
                                        GC.AddSend(Packets.NPCSay("Here you are."));
                                        GC.AddSend(Packets.NPCLink("Thanks.", 255));
                                    }
                                    GC.AddSend(Packets.NPCSetFace(15));
                                    GC.AddSend(Packets.NPCFinish());
                                      
                                    break;
                                }
                            #endregion
AcidCo Meltdown will fail if your creating it, without the help of others.

P.S. I'm not Arco. I just put his name on everything for the fun of it I can do it for you too, but you have to do me a favor .. < That is for anyone.
PeTe Ninja is offline  
Thanks
3 Users
Old 04/06/2010, 16:14   #11
 
elite*gold: 0
Join Date: Feb 2010
Posts: 492
Received Thanks: 222
Can you please tell me why you hate me so much you must insult every post I make ?
Paralyzer[GM] is offline  
Old 04/06/2010, 16:23   #12
 
elite*gold: 0
Join Date: Jan 2009
Posts: 1,922
Received Thanks: 491
Quote:
Originally Posted by Paralyzer[GM] View Post
Can you please tell me why you hate me so much you must insult every post I make ?
ON TOPIC: I posted a "quicker" way of doing this which requires not much coding at all..

RESPOND: I hate you because you assume that you can post stupid questions like this one that I am responding to in a thread and not get an infraction. You have 3 or 4 of these type of things which is spam. I could report you for all three and you would get banned. Anyway, I said you couldn't code AcidCo Meltdown to what it nearly was because your not that experienced and also your a one-man army with your coding skills.. I may be okay with Decker, but I will use him as an example. He did the same thing, he posted questions that he could of sent in a PM, he made multiple threads for the same thing, he released stupid ****. This is what you are doing. Stop it. If you want to release something, make it actually count. A simple NPC is nothing, no one cares for a NPC. Especially when that NPC is giving free items away. I mean If i wanted the players on my server to have free items, I would give them commands. I hope you take this criticism and change from it. If you reply with a flame or even a slight unpleasurable fashion.. well then your an artard.
PeTe Ninja is offline  
Old 04/06/2010, 16:32   #13
 
elite*gold: 0
Join Date: Feb 2010
Posts: 492
Received Thanks: 222
ONTOPIC: I got a +thanks so SOMEONE found it helpful

Offtopic: I am nothing like decker! so be quiet 10 year old and if I reply flaming jesus.crist!
Paralyzer[GM] is offline  
Old 04/06/2010, 19:19   #14
 
elite*gold: 0
Join Date: Jan 2009
Posts: 1,922
Received Thanks: 491
Quote:
Originally Posted by Paralyzer[GM] View Post
ONTOPIC: I got a +thanks so SOMEONE found it helpful

Offtopic: I am nothing like decker! so be quiet 10 year old and if I reply flaming jesus.crist!
..Ugh..If you really think a 10 year old is here.. then you are immature and retarded.
PeTe Ninja is offline  
Old 04/06/2010, 19:26   #15
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,765
Received Thanks: 5,291
Quote:
Originally Posted by Paralyzer[GM] View Post
I could release my ItemLock Save/Load/Unlocking ALL working and you don't need the ItemLock.cs.
Yeah, which somebody coded for you.
Arcо is offline  
Thanks
1 User
Reply


Similar Threads Similar Threads
Is there an item seller?
06/18/2010 - SRO Private Server - 1 Replies
.. so i don't have to click 500 times when im in town to sell all my items -.- edit: could somebody make it? it would have the option to not sell elixirs, potions, etc
[Release]Promotion Item Seller
01/26/2010 - CO2 PServer Guides & Releases - 16 Replies
#region Promotion Item Seller case 24: { if (Control == 0) { GC.AddSend(Packets.NPCSay("Would u like to buy any of these promotion items")); GC.AddSend(Packets.NPCLink("Eux Ores (10CPs)", 1)); GC.AddSend(Packets.NPCLink("Emerald (10CPs)",...
[Noob Release]Socketed Gourd Seller - Lotf
04/05/2009 - CO2 PServer Guides & Releases - 6 Replies
Credits 2 Tao4429 aka Saint and PeteNinja both for their help on 1 error xD **ALL CREDITS TO KINSHI! SOZ FOR DOUBLE POST!!! BUT THIS IS HOW IT WORKS! MY VERSIONS 2 LONG =/ Well here it is! if (CurrentNPC == 7501) // Socket'd Gourd Seller {



All times are GMT +2. The time now is 15:34.


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