Register for your free account! | Forgot your password?

You last visited: Today at 03:37

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


[RELEASE] Easter Pack Trader

Reply
 
Old   #1
 
elite*gold: 0
Join Date: May 2006
Posts: 1,190
Received Thanks: 512
[RELEASE] Easter Pack Trader

Hey guys this is my first release so please dont flame.
This is a simple NPC who will trade players Easter Packs for Eggs that they find during gameplay,

First in NPCDialogue.cs add this
Code:
                            #region Easter Pack Giver
                            case 104937:
                                {
                                    if (Control == 0)
                                    {
                                        GC.AddSend(Packets.NPCSay("Happy Easter! Here I can trade Eggs for special packs."));
                                        GC.AddSend(Packets.NPCLink("Like what?", 1));
                                        GC.AddSend(Packets.NPCLink("Just passing by", 255));
                                        GC.AddSend(Packets.NPCSetFace(30));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    if (Control == 1)
                                    {
                                        GC.AddSend(Packets.NPCSay("I can trade 5 Special Eggs For a Gold Easter Pack. Also 5 Purple Eggs for a Silver Easter Pack, and 3 Ruby Eggs for a Bronze Easter Pack."));
                                        GC.AddSend(Packets.NPCLink("Ok Trade my Eggs", 76));
                                        GC.AddSend(Packets.NPCLink("No", 255));
                                        GC.AddSend(Packets.NPCSetFace(30));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    if (Control == 76)
                                    {
                                        GC.AddSend(Packets.NPCSay("What would you like to trade?"));
                                        GC.AddSend(Packets.NPCLink("Here take my Special Eggs.", 3));
                                        GC.AddSend(Packets.NPCLink("Here take my Purple Eggs.", 4));
                                        GC.AddSend(Packets.NPCLink("Here take my Ruby Eggs.", 5));
                                        GC.AddSend(Packets.NPCLink("No", 255));
                                        GC.AddSend(Packets.NPCSetFace(30));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                    }
                                    if (Control == 3)
                                    {
                                        if (GC.MyChar.InventoryContains(729934, 5))
                                        {
                                            GC.MyChar.RemoveItem(GC.MyChar.NextItem(729934));
                                            GC.MyChar.RemoveItem(GC.MyChar.NextItem(729934));
                                            GC.MyChar.RemoveItem(GC.MyChar.NextItem(729934));
                                            GC.MyChar.RemoveItem(GC.MyChar.NextItem(729934));
                                            GC.MyChar.RemoveItem(GC.MyChar.NextItem(729934));
                                            GC.MyChar.AddItem(720121);
                                            GC.AddSend(Packets.NPCSay("Great you have them. Take this pack."));
                                            GC.AddSend(Packets.NPCLink("Thanks Beatz!", 255));
                                            GC.AddSend(Packets.NPCSetFace(30));
                                            GC.AddSend(Packets.NPCFinish());
                                        }
                                        else
                                        {
                                            GC.AddSend(Packets.NPCSay("You do not have the required items"));
                                            GC.AddSend(Packets.NPCLink("Ok", 255));
                                            GC.AddSend(Packets.NPCSetFace(30));
                                            GC.AddSend(Packets.NPCFinish());
                                        }
                                    }
                                        if (Control == 4)
                                        {
                                            if (GC.MyChar.InventoryContains(729936, 5))
                                            {
                                                GC.MyChar.RemoveItem(GC.MyChar.NextItem(729936));
                                                GC.MyChar.RemoveItem(GC.MyChar.NextItem(729936));
                                                GC.MyChar.RemoveItem(GC.MyChar.NextItem(729936));
                                                GC.MyChar.RemoveItem(GC.MyChar.NextItem(729936));
                                                GC.MyChar.RemoveItem(GC.MyChar.NextItem(729936));
                                                GC.MyChar.AddItem(720122);
                                                GC.AddSend(Packets.NPCSay("Great you have them. Take this pack."));
                                                GC.AddSend(Packets.NPCLink("Thanks Beatz!", 255));
                                                GC.AddSend(Packets.NPCSetFace(30));
                                                GC.AddSend(Packets.NPCFinish());
                                            }
                                            else
                                            {
                                                GC.AddSend(Packets.NPCSay("You do not have the required items"));
                                                GC.AddSend(Packets.NPCLink("Ok", 255));
                                                GC.AddSend(Packets.NPCSetFace(30));
                                                GC.AddSend(Packets.NPCFinish());
                                            }
                                        }
                                            if (Control == 5)
                                            {
                                                if (GC.MyChar.InventoryContains(729937, 3))
                                                {
                                                    GC.MyChar.RemoveItem(GC.MyChar.NextItem(729937));
                                                    GC.MyChar.RemoveItem(GC.MyChar.NextItem(729937));
                                                    GC.MyChar.RemoveItem(GC.MyChar.NextItem(729937));
                                                    GC.MyChar.AddItem(720123);
                                                    GC.AddSend(Packets.NPCSay("Great you have them. Take this pack."));
                                                    GC.AddSend(Packets.NPCLink("Thanks Beatz!", 255));
                                                    GC.AddSend(Packets.NPCSetFace(30));
                                                    GC.AddSend(Packets.NPCFinish());
                                                }
                                                else
                                                {
                                                    GC.AddSend(Packets.NPCSay("You do not have the required items"));
                                                    GC.AddSend(Packets.NPCLink("Ok", 255));
                                                    GC.AddSend(Packets.NPCSetFace(30));
                                                    GC.AddSend(Packets.NPCFinish());
                                                }
                                            }
                                break;
                            #endregion
Next in mob.cs somewhere around line 553 add this
Code:
#region Easter Eggs
               if (MyMath.ChanceSuccess(4))
                {
                    if (Char != null)
                    {
                        if (Char.Inventory.Count <= 39)
                            Char.AddItem(729934);

                        return;
                    }
                }
                if (MyMath.ChanceSuccess(4))
                {
                    if (Char != null)
                    {
                        if (Char.Inventory.Count <= 39)
                            Char.AddItem(729936);

                        return;
                    }
                }
                if (MyMath.ChanceSuccess(9))
                {
                    if (Char != null)
                    {
                        if (Char.Inventory.Count <= 39)
                            Char.AddItem(729937);

                        return;
                    }
                }
                #endregion
**EDIT**
Sorry fogot to add if you want only certain mobs to drop the items place this under if (Char != null)
if (Name == "Pheasant") Change Pheasant to whatever mob you want to drop the item

Now some people will have the easter packs working and others might not.
So if you dont know if they are working login to your server and try and make one.
/item EasterGoldPack 0
/item EasterSilverPack 0
/item EasterBronzePack 0

If you are then able to open these packs you will not need to add the next lines of code. Also please take not of the number that comes on screen when you try to open the packs if they fail to open.

So go to character.cs and around line 5836 add this
Code:
                    #region EasterGoldPack
                    case [COLOR="Blue"]720121[/COLOR]:
                        {
                            if (Inventory.Count <= 34)
                            {
                                    RemoveItem(NextItem([COLOR="blue"]720121[/COLOR]));
                                    [COLOR="red"]AddItem(730006); // +6 Stones
				                    AddItem(730006); // +6 Stones
                                    AddItem(183305); // SandRaider
                                    AddItem(723017); // EXP Potion
				                    AddItem(723017); // EXP Potion
				                    AddItem(160259, 8); // SteelBoots[/COLOR]
				                    CPs += 100000;
                            }
                            break;
                        }
                    #endregion
                    #region EasterSilverPack
                    case [COLOR="blue"]720122[/COLOR]:
                        {
                            if (Inventory.Count <= 35)
                            {
                                RemoveItem(NextItem([COLOR="blue"]720122[/COLOR]));
                                    [COLOR="red"]AddItem(730004); // +4 Stone
                                    AddItem(181955); // DarkWizard
                                    AddItem(723017); // EXP Potion[/COLOR]
				    CPs += 60000;
                            }
                            break;
                        }
                    #endregion
                    #region EasterBronzePack
                    case [COLOR="blue"]720123[/COLOR]:
                        {
                            if (Inventory.Count <= 35)
                            {
                                RemoveItem(NextItem([COLOR="blue"]720123[/COLOR]));
                                    [COLOR="Red"]AddItem(723832); // +3 Stone
                                    AddItem(191905); // GoodLuck
                                    AddItem(723017); // EXP Potion[/COLOR]
				    CPs += 30000;
                            }
                            break;
                        }
                    #endregion
Change the items in red to anything you want.
Change the numbers in Blue to match the numbers that come up on screen when yo try to open the packs.
I am not sure if i changed mine at all

and for people who are too lazy to make an NPC add this to NPC.txt in oldCODB
Quote:
104937 6270 2 59 1036 153 153



.Beatz is offline  
Thanks
10 Users
Old 03/09/2010, 15:44   #2
 
elite*gold: 20
Join Date: Jan 2008
Posts: 2,338
Received Thanks: 489
good work


~Yuki~ is offline  
Thanks
2 Users
Old 03/09/2010, 16:39   #3
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,740
Received Thanks: 5,268
Good job!
Keep up the good work.
Arcо is offline  
Thanks
1 User
Old 03/09/2010, 18:59   #4
 
elite*gold: 0
Join Date: May 2006
Posts: 1,190
Received Thanks: 512
Quote:
Originally Posted by ~Yuki~ View Post
good work
Quote:
Originally Posted by .Arco View Post
Good job!
Keep up the good work.
I am slowly getting there xD .Arco im still trying to figure out that **** NPC im working on lol.
Might release some more easter quests when i have finished them xD


.Beatz is offline  
Old 03/09/2010, 19:19   #5
 
elite*gold: 0
Join Date: May 2006
Posts: 1,190
Received Thanks: 512
Quote:
Originally Posted by 6Sh00ter View Post
dude this is good nice good work
Thanks. I got more comin out soon just need to think of a few more ideas lol.
Hit th thanks button if ya use it xD
.Beatz is offline  
Old 03/09/2010, 21:12   #6
 
elite*gold: 0
Join Date: May 2009
Posts: 884
Received Thanks: 210
this is some good ****! I know many newcomers will refer to this and so will they also learn from this! goodjob I must say matt!
killersub is offline  
Thanks
1 User
Old 04/01/2010, 19:24   #7
 
elite*gold: 0
Join Date: Aug 2005
Posts: 96
Received Thanks: 25
very nice, im sure my players will like this

just so you know though in your character.cs for the EasterGoldPack you have an extra chatacter that im sure you accidentaly put in there...Just wanted to let you know before your release gets filled with error help requests

Code:
#region EasterGoldPack
                    case 720121[COLOR="Red"]][/COLOR]:
HardNotTo is offline  
Old 04/02/2010, 01:46   #8
 
elite*gold: 0
Join Date: May 2006
Posts: 1,190
Received Thanks: 512
Quote:
Originally Posted by HardNotTo View Post
very nice, im sure my players will like this

just so you know though in your character.cs for the EasterGoldPack you have an extra chatacter that im sure you accidentaly put in there...Just wanted to let you know before your release gets filled with error help requests

Code:
#region EasterGoldPack
                    case 720121[COLOR="Red"]][/COLOR]:
haha lol thanks i will go fix it now


.Beatz is offline  
Reply


Similar Threads
[Release]Honor Points Trader 5165
09/08/2010 - CO2 PServer Guides & Releases - 20 Replies
Hello today i will release my Honor Points Trader Now because the mods deleted honor arena i will teach you how to add one First in character.cs search for : public bool Ghost = false; Under that add: public int HonorPoints = 0;
Pro Pack NPC{1st Release}
03/15/2009 - CO2 PServer Guides & Releases - 21 Replies
it lets the GMs/PHs go and do /scroll home where they can go to there base place and get a pro pack, which is fully made items so they dont have to use all those commands ==]] Starting off go to Client.cs Search for and under that add



All times are GMT +1. The time now is 03:37.


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.