Register for your free account! | Forgot your password?

You last visited: Today at 21:38

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

Advertisement



[Request] Nobility

Discussion on [Request] Nobility within the CO2 Private Server forum part of the Conquer Online 2 category.

Closed Thread
 
Old   #1
 
elite*gold: 0
Join Date: Jun 2009
Posts: 361
Received Thanks: 98
[Request] Nobility

I've seen things you can add for nobility but I can't find everything I need to make it work without errors

Someone said I need Rank, Donation, SaveRank, and SaveDonation but I cant find it.
If it's possible, I would appreciate it if someone would send me the whole thing or just what I've listed above.
Jay1029 is offline  
Old 08/05/2009, 05:41   #2
 
n0mansland's Avatar
 
elite*gold: 0
Join Date: Aug 2008
Posts: 780
Received Thanks: 255
All the releases have it lol..

Character.cs
Code:
public int Rank = 0;
public int Donation = 0;
Database.cs search for

Code:
public void savechar
Under it add this

Code:
        public void SaveDonation()
        {
            if (MyClient.There)
                if (MyClient.Online)
                    DataBase.SaveDonation(this);
        }
        public void SaveRank()
        {
            if (MyClient.There)
                if (MyClient.Online)
                    DataBase.SaveRank(this);
        }
Now in Database.cs search for
Code:
public static void saverchar
Under it add this..

Code:
        public static void Donation(Character Charr)
        {
            try
            {
                MySqlCommand Command = null;
                Command = new MySqlCommand("UPDATE `Characters` SET `Donation` = '" + Charr.Donation + "' WHERE `Account` = '" + Charr.MyClient.Account + "'", Connection);
                Command.ExecuteNonQuery();

            }
            catch (Exception Exc) { General.WriteLine(Convert.ToString(Exc)); }
        }
        public static void Rank(Character Charr)
        {
            try
            {
                MySqlCommand Command = null;
                Command = new MySqlCommand("UPDATE `Characters` SET `Rank` = '" + Charr.Rank + "' WHERE `Account` = '" + Charr.MyClient.Account + "'", Connection);
                Command.ExecuteNonQuery();

            }
            catch (Exception Exc) { General.WriteLine(Convert.ToString(Exc)); }
        }
Save Compile

MySQL design table add field.. Donation and Rank.. Guides should tell you what to put.
n0mansland is offline  
Thanks
1 User
Old 08/05/2009, 18:50   #3
 
elite*gold: 0
Join Date: Jun 2009
Posts: 361
Received Thanks: 98
public void savechar
Can't be found. Do you mean public void Save()?
agian..
public static void savechar can't be found
Do you mean public static void SaveAllChars()?..

SaveDonation and SaveRank are underlined.
I should have held my thanks until I actually got it working -.-
Jay1029 is offline  
Old 08/05/2009, 19:15   #4
 
damianpesta's Avatar
 
elite*gold: 0
Join Date: Jan 2007
Posts: 1,034
Received Thanks: 58
Quote:
Originally Posted by Jay1029 View Post
public void savechar
Can't be found. Do you mean public void Save()?
agian..
public static void savechar can't be found
Do you mean public static void SaveAllChars()?..

SaveDonation and SaveRank are underlined.
yeah he meant Save...
damianpesta is offline  
Old 08/05/2009, 19:24   #5
 
n0mansland's Avatar
 
elite*gold: 0
Join Date: Aug 2008
Posts: 780
Received Thanks: 255
Yea doesn't really matter just how it is for mine.. As long as you see codes similar to the ones listed.. You can put above or below..
n0mansland is offline  
Old 08/05/2009, 20:25   #6
 
elite*gold: 0
Join Date: Jun 2009
Posts: 361
Received Thanks: 98
Yeah, that's what I figured but SaveDonation and SaveRank are still underlined.
Could I have added
Code:
public int Rank = 0;
public int Donation = 0;
in the wrong place? I added it under public byte Stamina = 0;

I added this: under public void Save()
Code:
        public void SaveDonation()
        {
            if (MyClient.There)
                if (MyClient.Online)
                    DataBase.SaveDonation(this);
        }
        public void SaveRank()
        {
            if (MyClient.There)
                if (MyClient.Online)
                    DataBase.SaveRank(this);
        }
And this: under public static void SaveChar(Character Charr)
Code:
        public static void Donation(Character Charr)
        {
            try
            {
                MySqlCommand Command = null;
                Command = new MySqlCommand("UPDATE `Characters` SET `Donation` = '" + Charr.Donation + "' WHERE `Account` = '" + Charr.MyClient.Account + "'", Connection);
                Command.ExecuteNonQuery();

            }
            catch (Exception Exc) { General.WriteLine(Convert.ToString(Exc)); }
        }
        public static void Rank(Character Charr)
        {
            try
            {
                MySqlCommand Command = null;
                Command = new MySqlCommand("UPDATE `Characters` SET `Rank` = '" + Charr.Rank + "' WHERE `Account` = '" + Charr.MyClient.Account + "'", Connection);
                Command.ExecuteNonQuery();

            }
            catch (Exception Exc) { General.WriteLine(Convert.ToString(Exc)); }
        }
I'm pretty sure everything is right. Just check that for me please.
Jay1029 is offline  
Old 08/07/2009, 23:41   #7
 
elite*gold: 0
Join Date: Jun 2009
Posts: 361
Received Thanks: 98
When I add
public void SaveDonation()
{
if (MyClient.There)
if (MyClient.Online)
DataBase.SaveDonation(this);
}
public void SaveRank()
{
if (MyClient.There)
if (MyClient.Online)
DataBase.SaveRank(this);
}

Under
public void Save()

SaveDonation and SaveRank are underlined =\ Do you know how to fix that?
Jay1029 is offline  
Old 08/07/2009, 23:59   #8
 
n0mansland's Avatar
 
elite*gold: 0
Join Date: Aug 2008
Posts: 780
Received Thanks: 255
You don't have the public static void SaveDonation with it..
n0mansland is offline  
Old 08/09/2009, 05:09   #9
 
elite*gold: 0
Join Date: Jun 2009
Posts: 361
Received Thanks: 98
But you didn't include that in your post before Oo
So what do I add and where do I add it?=p

//edit: This is what I tried. I'm almost 100% sure it wont work because I'm noob >.>

public static void SaveRank(Character Charr)
{
MySqlCommand Command = null;
Command = new MySqlCommand("UPDATE `Characters` SET `Rank` = '" + Charr.Rank + "' WHERE `Account` = '" + Charr.MyClient.Account + "'", Connection);
Command.ExecuteNonQuery();
}
public static void SaveDonation(Character Charr)
{
MySqlCommand Command = null;
Command = new MySqlCommand("UPDATE `Characters` SET `Donation` = '" + Charr.Donation + "' WHERE `Account` = '" + Charr.MyClient.Account + "'", Connection);
Command.ExecuteNonQuery();
}
Jay1029 is offline  
Old 08/09/2009, 05:10   #10
 
elite*gold: 0
Join Date: Jul 2009
Posts: 289
Received Thanks: 425
Just thought I'd let you know that I think this coding could be better, and at the end youll run into a problem where the effect spawns rapidly so...
TehPwnzor is offline  
Thanks
1 User
Old 08/09/2009, 05:15   #11
 
andyd123's Avatar
 
elite*gold: 20
Join Date: Apr 2006
Posts: 1,341
Received Thanks: 886
It appears you posted relatively the same thing earlier.
Please, do not make multiple threads for the same thing!

#Closed
andyd123 is offline  
Closed Thread


Similar Threads Similar Threads
[Request]Nobility Rank
03/22/2010 - CO2 Private Server - 8 Replies
Hello, i would like to know if there is any way (and if there is would you be so kind to tell me) how to add Nobility Rank to my private server i just think it would be a nice "plus" to my P.Server Thank You.
[Request]Nobility System ^.^
12/06/2009 - CO2 Private Server - 3 Replies
Could somebody kindly give me a working Nobility System for CoEmu v2? I'd be very greatfull. Please and Thankyou! PM me or Post a DL link here please.
[REQUEST] How do I add Nobility NPC?
10/11/2009 - CO2 Private Server - 4 Replies
I am using Yuki's CoMy 1.25, nobility is in source but there is no NPC to make me become king. How do I add NPC?
[REQUEST] Nobility help -.-
10/02/2009 - CO2 Private Server - 9 Replies
Hey, I'm making a long quest that allows you to walk through every unused map in the game, at at the end of the quest, I want there to be an NPC that gives you king rank in nobility, now... I don't have nobility added like that, but I'd just love for the effects and rank title to work, it would be amazing if someone could post the code needed here for that NPC! Thanks wonderfull people of the misty new black themed Elitepisthatabullpers. Elitepvpers* ;)
Request For Nobility Efects
08/12/2009 - CO2 Weapon, Armor, Effects & Interface edits - 0 Replies
Hello Guyz I really wanna see my own efect of nobility rank , can some1 help me Please?



All times are GMT +2. The time now is 21:38.


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.