Register for your free account! | Forgot your password?

You last visited: Today at 16:40

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

Advertisement



[Release] A Start For VIP

Discussion on [Release] A Start For VIP within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jul 2009
Posts: 548
Received Thanks: 52
[Release] A Start For VIP

This is for LOTF.





Character.cs Definition..

Code:
public byte VIP = 0;
Ctrl+F and find
Code:
 public void Save()
Above place

Code:
        public void SaveVIP()
        {
            if (MyClient.There)
                if (MyClient.Online)
                    DataBase.SaveVIP(this);
        }
Next Ctrl + F and find
Code:
 public static void SaveChar(Character Charr)
and above place

Code:
        public static void SaveVIP(Character Charr)
        {
            try
            {
                MySqlCommand Command = new MySqlCommand("UPDATE `Characters` SET `VIP` = '" + Charr.VIP + "' WHERE `Account` = '" + Charr.MyClient.Account + "'", Connection);
                Command.ExecuteNonQuery();
            }
            catch (Exception Exc) { General.WriteLine(Convert.ToString(Exc)); }
        }
Next search for
Code:
Charr.RBCount = Convert.ToByte((uint)DR["RBCount"]);
under it place

Code:
Charr.VIP= Convert.ToByte((uint)DR["VIP"]);
Dialog for npc
Code:
                            if (CurrentNPC == 1200) // Vip Grants
                            {
                                SendPacket(General.MyPackets.NPCSay("Would you like to become a VIP Member?"));
                                SendPacket(General.MyPackets.NPCLink("What does a VIP get?", 1));
                                SendPacket(General.MyPackets.NPCLink("Yes!", 2));
                                SendPacket(General.MyPackets.NPCLink("What's my VIP Level?", 4));
                                SendPacket(General.MyPackets.NPCLink("Hell No!", 255));
                                SendPacket(General.MyPackets.NPCSetFace(30));
                                SendPacket(General.MyPackets.NPCFinish());
                            }
Control for npc

Code:
                            #region VIP Grant
                            if (CurrentNPC == 1200) // Vip Grants
                            {
                                if (Control == 1) // info about vip
                                {
                                    SendPacket(General.MyPackets.NPCSay("You get special permissions and special deals and more!"));
                                    SendPacket(General.MyPackets.NPCLink("Awesome!", 255));
                                    SendPacket(General.MyPackets.NPCSetFace(30));
                                    SendPacket(General.MyPackets.NPCFinish());
                                }
                                if (Control == 2) // checks vip classes makes them vip
                                {
                                    if (MyChar.VIP == 0) // checks vip level 0
                                    {
                                        SendPacket(General.MyPackets.NPCSay("Would you like to become a VIP Member ( Level 1 ) It costs 4500 CPs. "));
                                        SendPacket(General.MyPackets.NPCLink("Yes", 3));
                                        SendPacket(General.MyPackets.NPCLink("Nope", 255));
                                        SendPacket(General.MyPackets.NPCSetFace(30));
                                        SendPacket(General.MyPackets.NPCFinish());
                                    }
                                    else if (MyChar.VIP == 1) // checks vip level 1
                                    {
                                        SendPacket(General.MyPackets.NPCSay("Would you like to upgrade to VIP Member ( Level 2 ) It costs 9500 CPs. "));
                                        SendPacket(General.MyPackets.NPCLink("Yes", 3));
                                        SendPacket(General.MyPackets.NPCLink("Nope", 255));
                                        SendPacket(General.MyPackets.NPCSetFace(30));
                                        SendPacket(General.MyPackets.NPCFinish());
                                    }
                                    else if (MyChar.VIP == 2) // checks vip level 2
                                    {
                                        SendPacket(General.MyPackets.NPCSay("Would you like to upgrade to VIP Member ( Level 3 ) It costs 14500 CPs. "));
                                        SendPacket(General.MyPackets.NPCLink("Yes", 3));
                                        SendPacket(General.MyPackets.NPCLink("Nope", 255));
                                        SendPacket(General.MyPackets.NPCSetFace(30));
                                        SendPacket(General.MyPackets.NPCFinish());
                                    }
                                    else if (MyChar.VIP == 3) // checks vip level 3
                                    {
                                        SendPacket(General.MyPackets.NPCSay("You are already a VIP Member ( Level 3 ), You can't go higher."));
                                        SendPacket(General.MyPackets.NPCLink("Nice..", 255));
                                        SendPacket(General.MyPackets.NPCSetFace(30));
                                        SendPacket(General.MyPackets.NPCFinish());
                                    }

                                }
                                if (Control == 3) // Changes VIP level
                                {
                                    if (MyChar.VIP == 0) // checks vip level 0
                                    {
                                        if (MyChar.CPs >= 4500) // checks cps 
                                        {
                                            MyChar.CPs -= 4500;
                                            SendPacket(General.MyPackets.Vital((long)MyChar.UID, 30, MyChar.CPs));
                                            MyChar.VIP = 1; // sets vip
                                            MyChar.SaveVIP(); // saves vip
                                            SendPacket(General.MyPackets.NPCSay("Congratulations you are now a VIP Member ( Level 1 )"));
                                            SendPacket(General.MyPackets.NPCLink("Woohoo!", 255));
                                            SendPacket(General.MyPackets.NPCSetFace(30));
                                            SendPacket(General.MyPackets.NPCFinish());
                                        }
                                        else
                                        {
                                            SendPacket(General.MyPackets.NPCSay("You do not have enough CPs!"));
                                            SendPacket(General.MyPackets.NPCLink("Damn", 255));
                                            SendPacket(General.MyPackets.NPCSetFace(30));
                                            SendPacket(General.MyPackets.NPCFinish());
                                        }

                                    }
                                    else if (MyChar.VIP == 1) // checks vip level 1
                                    {
                                        if (MyChar.CPs >= 9500) // checks cps 
                                        {
                                            MyChar.CPs -= 9500;
                                            SendPacket(General.MyPackets.Vital((long)MyChar.UID, 30, MyChar.CPs));
                                            MyChar.VIP = 2; // sets vip
                                            MyChar.SaveVIP(); // saves vip
                                            SendPacket(General.MyPackets.NPCSay("Congratulations you are now a VIP Member ( Level 2 )"));
                                            SendPacket(General.MyPackets.NPCLink("Woohoo!", 255));
                                            SendPacket(General.MyPackets.NPCSetFace(30));
                                            SendPacket(General.MyPackets.NPCFinish());
                                        }
                                        else
                                        {
                                            SendPacket(General.MyPackets.NPCSay("You do not have enough CPs!"));
                                            SendPacket(General.MyPackets.NPCLink("Damn", 255));
                                            SendPacket(General.MyPackets.NPCSetFace(30));
                                            SendPacket(General.MyPackets.NPCFinish());
                                        }
                                    }
                                    else if (MyChar.VIP == 2) // checks vip level 2
                                    {
                                        if (MyChar.CPs >= 14500) // checks cps 
                                        {
                                            MyChar.CPs -= 14500;
                                            SendPacket(General.MyPackets.Vital((long)MyChar.UID, 30, MyChar.CPs));
                                            MyChar.VIP = 3; // sets vip
                                            MyChar.SaveVIP(); // saves vip
                                            SendPacket(General.MyPackets.NPCSay("Congratulations you are now a VIP Member ( Level 3 )"));
                                            SendPacket(General.MyPackets.NPCLink("Woohoo!", 255));
                                            SendPacket(General.MyPackets.NPCSetFace(30));
                                            SendPacket(General.MyPackets.NPCFinish());
                                        }
                                        else
                                        {
                                            SendPacket(General.MyPackets.NPCSay("You do not have enough CPs!"));
                                            SendPacket(General.MyPackets.NPCLink("Damn", 255));
                                            SendPacket(General.MyPackets.NPCSetFace(30));
                                            SendPacket(General.MyPackets.NPCFinish());
                                        }
                                    }
                                }
                                if (Control == 4) // tells current vip level
                                {
                                    SendPacket(General.MyPackets.NPCSay("Your VIP Level is " + MyChar.VIP + " ."));
                                    SendPacket(General.MyPackets.NPCLink("Hmm, Upgrade Time!", 2));
                                    SendPacket(General.MyPackets.NPCLink("Cool!", 255));
                                    SendPacket(General.MyPackets.NPCSetFace(30));
                                    SendPacket(General.MyPackets.NPCFinish());
                                }
                            }
                            #endregion

And finally add this into the characters table structure part

Code:
Field - VIP
Type - INT
Attributes - Unsigned
NULL - not null
Default - 0

Any problems ask, if you ask if this is for coemu you obviously didn't read the thread
f0am is offline  
Thanks
4 Users
Old 07/14/2009, 18:13   #2
 
elite*gold: 0
Join Date: Jan 2009
Posts: 196
Received Thanks: 106
good job
MeYuly14 is offline  
Old 07/14/2009, 18:13   #3
 
danielachraf's Avatar
 
elite*gold: 20
Join Date: Mar 2008
Posts: 958
Received Thanks: 494
Yes , i did that yesterday but i did another things different ... Pay in the site ... etc anyway it is easy
danielachraf is offline  
Old 07/14/2009, 18:17   #4
 
elite*gold: 0
Join Date: Jul 2009
Posts: 548
Received Thanks: 52
Quote:
Originally Posted by danielachraf View Post
Yes , i did that yesterday but i did another things different ... Pay in the site ... etc anyway it is easy

Ha i beat you i did this 2 days ago for Temple...anyway this is for non donation servers
f0am is offline  
Old 07/14/2009, 18:19   #5
 
elite*gold: 0
Join Date: Jun 2009
Posts: 149
Received Thanks: 15
I think VIP should just be VIP. Paying for it is gay. You gotta be a VERY FAWKIN IMPORTANT FAWKIN PERSON

Anyways nice release.
AmbiguousStatement is offline  
Old 07/14/2009, 18:21   #6

 
elite*gold: 169
Join Date: Jan 2009
Posts: 1,567
Received Thanks: 509
Good Job!
Xanrry is offline  
Old 07/14/2009, 18:50   #7
 
elite*gold: 0
Join Date: Jul 2009
Posts: 548
Received Thanks: 52
Thx! Next release will either be 1st and 2nd rb ( my way ) or iTBoT
f0am is offline  
Old 07/14/2009, 21:15   #8
 
elite*gold: 0
Join Date: May 2009
Posts: 874
Received Thanks: 174
Quote:
Originally Posted by f0am View Post
Ha i beat you i did this 2 days ago for Temple...anyway this is for non donation servers
thanks for giving me the code but i thought youwerent gonna give it out
i was supposed to be the only one with it
Arcotemple:) is offline  
Old 07/14/2009, 22:26   #9
 
damianpesta's Avatar
 
elite*gold: 0
Join Date: Jan 2007
Posts: 1,034
Received Thanks: 58
Quote:
Originally Posted by Arcotemple:) View Post
thanks for giving me the code but i thought youwerent gonna give it out
i was supposed to be the only one with it
LOL , I could make it in less than 7 minutes.Just so you wouldnt be the only 1 ROFL .Yeah I am mean.
damianpesta is offline  
Old 07/15/2009, 01:34   #10
 
elite*gold: 0
Join Date: Jul 2009
Posts: 548
Received Thanks: 52
Quote:
Originally Posted by damianpesta View Post
LOL , I could make it in less than 7 minutes.Just so you wouldnt be the only 1 ROFL .Yeah I am mean.
BS


( Big Shoes )


YEAH, BUT IM SUPER CREATIVE WITH MY CREATIVE MIND I HAVE CREATIVE IDEAS FOR THE CREATIVITY OF MY CREATIVE VIP MEMBERS.

If your counting how much i used Creative its 6.
f0am is offline  
Old 07/15/2009, 02:47   #11
 
elite*gold: 0
Join Date: Jun 2008
Posts: 39
Received Thanks: 2
i did all but i want to know how to add Control for npc
thats all help plz
bazoka2020 is offline  
Old 07/15/2009, 13:17   #12
 
elite*gold: 0
Join Date: Jul 2009
Posts: 548
Received Thanks: 52
Quote:
Originally Posted by bazoka2020 View Post
i did all but i want to know how to add Control for npc
thats all help plz
Ok for adding dialog look for

Code:
If (CurrentNPC == 7500)
make sure its the dialog part so it will have the word like got many dragonballs? then place it above that npc

then search for it again and it should have like if (Control == 1) and place it above that npc.
f0am is offline  
Old 07/15/2009, 13:29   #13
 
Yooha's Avatar
 
elite*gold: 0
Join Date: Jul 2009
Posts: 47
Received Thanks: 5
what the VIP do?
Yooha is offline  
Old 07/15/2009, 14:12   #14
 
elite*gold: 0
Join Date: Jul 2009
Posts: 548
Received Thanks: 52
Quote:
Originally Posted by Yooha View Post
what the VIP do?
This was just a start, The rest is up to you now if you added this you can do MyChar.VIP
f0am is offline  
Old 07/15/2009, 18:18   #15
 
raidenx123's Avatar
 
elite*gold: 0
Join Date: Sep 2007
Posts: 1,705
Received Thanks: 441
Something to add:
In Character.cs search
Code:
Stamina < 100
And replace (Action == 250) with:
Code:
if (Action == 250)
                if (MyChar.VIP)
                {
                    if (Stamina < 130)
                        Stamina += 15;
                    if (Stamina > 130)
                        Stamina = 130;
                }
                else
                {
                    if (Stamina < 100)
                    {
                        Stamina += 8;
                        if (Stamina > 100)
                            Stamina = 100;
                        MyClient.SendPacket(General.MyPackets.Vital(UID, 9, Stamina));
                    }
And one error should pop-up about putting "}" put click the error and just put it there.

Now search
Code:
 Stamina = 100
And replace the whole code with:
Code:
if (revp[0] == LocMap)
                    {
                        if (MyChar.VIP)
                        {
                            Stamina = 130;
                            Teleport(revp[1], revp[2], revp[3]);
                            break;
                        }
                        else
                        {
                        Stamina = 100;
                        Teleport(revp[1], revp[2], revp[3]);
                        break;
                    }
                }
            }
And once again an error should occur about "}" and click the error, and add the "}" And now you see my point just keep searching
Code:
 Stamina = 100;
and do as I did my adding
Code:
 if (MyChar.VIP)
{
And changing the Stamina amount to 130 instead of 100 and then do
Code:
}
else
{
And do if they arent VIP
raidenx123 is offline  
Reply


Similar Threads Similar Threads
Start Npc(also start Equiqment)und wie connectet man(Navicat)
05/02/2010 - WoW Private Server - 1 Replies
Hallo Elitepvpers, ich hoffe ich bin hier im richtigen Forum. Wie macht man einen Npc für start Equiqment? und wie connectet man in Navicat(for MySQL)? danke im vorraus:handsdown::handsdown:
[Release] S4League auto start
04/01/2010 - S4 League - 16 Replies
hey leute ich hatte ma lust einen s4-starter zu machen ;) ich rede nicht um den heißen brei herum da es mein erster AutoIT-Projekt ist und ich net so genau weiß was ich schreiben soll :rolleyes: How to: 1. VT anschaun :) 2. Downloaden 3. In euren S4 ordner rein 4. Verknüpfung auf euren Desktop machen 5. Starten 6. Have fun :)
First release. NPC that gives start items and cps[SIMPLE]
11/11/2009 - CO2 PServer Guides & Releases - 9 Replies
Hello there, well this is my first release for elitepvpers. The release is for LOTF This is just a quick npc that I fooled around with. Is just a NPC you can put to birth village, the NPC sends you to twincity and give you some start items and 2000cps. You can also put it in twin city, because peoples can only use it once. SIMPLE! Database.cs:
[My first release] How to make a char start with a hair on CoEmu V2 Source.
05/29/2009 - CO2 PServer Guides & Releases - 4 Replies
Well well. This is my first "small release". Most of the npcs are not coded yet. So the npc to change your hairstyle dont work. Go to GameServer Database.cs and Search for: In the int Hair = 420; Change the ID for 410 (And all new characters will start with the normal hairstyle) Or change to another id. Test it :)
[Release] Start with Equips On (LOTF- Converted to Ini)
03/11/2009 - CO2 PServer Guides & Releases - 2 Replies
Okay, before we begin, please read the title of this thread. http://www.elitepvpers.com/forum/co2-pserver-discu ssions-questions/209326-release-lotf-source-conver ted-ini.html First, search for public static bool CreateCharacter Then replace with this one: public static bool CreateCharacter(string Name, uint Class, uint Model, uint Avatar, Client UClient) { if (!File.Exists(System.Windows.Forms.Application.Sta rtupPath + @"\characters\\" + Name + ".chr")) {...



All times are GMT +1. The time now is 16:40.


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.