Register for your free account! | Forgot your password?

You last visited: Today at 21:47

  • 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 07/22/2009, 03:16   #31
 
xXxTwiztedKidxXx's Avatar
 
elite*gold: 0
Join Date: Jul 2009
Posts: 178
Received Thanks: 9
#Bump Please Its a Good Vip Start
xXxTwiztedKidxXx is offline  
Old 07/22/2009, 11:46   #32
 
elite*gold: 0
Join Date: May 2009
Posts: 874
Received Thanks: 174
lol making benefits for it snt all that hard
Arcotemple:) is offline  
Old 07/23/2009, 21:13   #33
 
Pyro-G's Avatar
 
elite*gold: 0
Join Date: Jul 2009
Posts: 25
Received Thanks: 10
EVERY SINGLE NPC I add to my server doesn't say anything...I add them right I know that but in game I click on it and it wont do anything or it will say the first line but if I click on 1 of the options it closes...It's really starting to **** me off because idk why its doing that. With this NPC too. I can click on it and it will say do you wanna become a vi[ blah blah blah but no matter what I click after that it just closes...Anyone know why?
Pyro-G is offline  
Old 07/23/2009, 22:42   #34
 
elite*gold: 0
Join Date: Nov 2008
Posts: 108
Received Thanks: 4
Quote:
Originally Posted by Pyro-G View Post
EVERY SINGLE NPC I add to my server doesn't say anything...I add them right I know that but in game I click on it and it wont do anything or it will say the first line but if I click on 1 of the options it closes...It's really starting to **** me off because idk why its doing that. With this NPC too. I can click on it and it will say do you wanna become a vi[ blah blah blah but no matter what I click after that it just closes...Anyone know why?
Lol , get sum1 from epvp to check if they are allrite , if they r not then tell em 2 tell u wtf is wrong wiv em.
WTFoRK is offline  
Old 07/24/2009, 03:02   #35
 
elite*gold: 0
Join Date: Feb 2008
Posts: 154
Received Thanks: 53
Quote:
Originally Posted by f0am View Post
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
Can you tell us,If this VIP working on Binary 5065 ?? if that so just let us how to make it working with binary 5065??
ELB@Sh@BeCkh@M is offline  
Old 07/24/2009, 04:46   #36
 
elite*gold: 0
Join Date: Jul 2009
Posts: 548
Received Thanks: 52
I dont know how to do binary sorry, i dont want to start
f0am is offline  
Old 07/24/2009, 04:56   #37
 
elite*gold: 0
Join Date: Feb 2008
Posts: 154
Received Thanks: 53
Quote:
Originally Posted by f0am View Post
I dont know how to do binary sorry, i dont want to start
****, Ok buudy thank you anyway
ELB@Sh@BeCkh@M is offline  
Old 07/24/2009, 05:03   #38
 
elite*gold: 0
Join Date: Jul 2009
Posts: 548
Received Thanks: 52
np, good luck =]
f0am is offline  
Old 08/10/2009, 19:05   #39
 
elite*gold: 0
Join Date: Jun 2009
Posts: 361
Received Thanks: 98
#Bump
Can someone help meh out plox? I'm getting an error in my colsole

System.InvalidCastException: Specified cast is not valid. at COServer_Project.Database.GetCharInfo<Character Charr, String UserName> in D:\Documents and Settings\Jordyn\Desktop\LOTF Source\Source\CoServerProject\Databae.cs:Line 1301

It seems to work though, I can get VIP Level to 3 and all but IDK if I benefits from it. Can someone help me with that error AND tell me some of the benefits VIP gives you so I can check? =D Thanks
//Edit: Um..When I log an account in it's ok at first but if I log out and log back in the char is invisible and cant move or do anything...Ever since I added the code. Any ideas?
Jay1029 is offline  
Old 08/10/2009, 21:42   #40
 
danielachraf's Avatar
 
elite*gold: 20
Join Date: Mar 2008
Posts: 958
Received Thanks: 494
can you read the error that you wrote ?! (Ctrl+G) and write the line and look arround and try to fix your problems .. If you want to learn C# try to fix the errors by yourself
danielachraf is offline  
Old 08/10/2009, 22:06   #41
 
elite*gold: 0
Join Date: Aug 2009
Posts: 5
Received Thanks: 0
Quote:
Originally Posted by danielachraf View Post
can you read the error that you wrote ?! (Ctrl+G) and write the line and look around and try to fix your problems .. If you want to learn C# try to fix the errors by yourself
I'm sick of you and your ****. STFU and stop posting useless **** in peoples threads. You don't think he read his own error before writing it out? Use your fat head next time dumb ***.
Krissta: is offline  
Old 08/11/2009, 01:40   #42
 
raidenx123's Avatar
 
elite*gold: 0
Join Date: Sep 2007
Posts: 1,705
Received Thanks: 438
Quote:
Posts: 3
3 posts and already sick of him o.o
raidenx123 is offline  
Old 08/11/2009, 01:46   #43
 
InfamousNoone's Avatar
 
elite*gold: 20
Join Date: Jan 2008
Posts: 2,012
Received Thanks: 2,882
Quote:
Originally Posted by Krissta: View Post
I'm sick of you and your ****. STFU and stop posting useless **** in peoples threads. You don't think he read his own error before writing it out? Use your fat head next time dumb ***.
I'm sick and tired of dumbasses and their ****. STFU and stop posting (all together). No I don't think he read his error because it is exactly what it's called, but it expects you to know programmatical terms. Oh what? You don't know what a cast is? Maybe you should learn some programming before trying to run a server. Just a thought.

InvalidCastException, Invalid Cast Exception. What's wrong? An invalid cast took place. What's an invalid cast? Here's an example, you figure it out.
Code:
int integer = 22;
object obj = integer;
string str = (string)obj; // invalidcastexception
InfamousNoone is offline  
Old 08/11/2009, 12:06   #44
 
elite*gold: 0
Join Date: Aug 2006
Posts: 323
Received Thanks: 14
Its a nice idea, My VIP is simply status 2 xD.
killermickle is offline  
Old 08/11/2009, 13:29   #45
 
elite*gold: 0
Join Date: Aug 2007
Posts: 187
Received Thanks: 45
I use CoEmuV2 but nice release
Andrew.A 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 +2. The time now is 21:47.


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.