Register for your free account! | Forgot your password?

You last visited: Today at 21:00

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

Advertisement



Help on Flowers...

Discussion on Help on Flowers... within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
5supertao's Avatar
 
elite*gold: 0
Join Date: Feb 2010
Posts: 89
Received Thanks: 19
Help on Flowers...

Im adding public static void SaveFlowerRank to Database.cs

and its saying this.

Code:
Error	1	The name 'GetConnection' does not exist in the current context	C:\Documents and Settings\Administrator\My Documents\Fixed Source\rikardo updated\Database.cs	317	36	NewestCOServer

Im using this code... i use 5165

Code:
        public static void SaveFlowerRank(Game.Character C)
        {
            MySqlConnection Conn = GetConnection();
            bool exist = false;
            string Name = C.Name;

            if (Name.Contains("[PM]"))
                Name.Replace("[PM]", "");

            try
            {
                lock (Conn)
                {
                    MySqlCommand Cmd = new MySqlCommand("SELECT * FROM `cq_flowers` WHERE `charuid2` = '" + C.Name + "'", Conn);
                    MySqlDataReader DR = Cmd.ExecuteReader();

                    while (DR.Read())
                    {
                        exist = true;
                    }
                    DR.Close();
                }
                lock (Conn)
                {
                    Struct.Flowers F = C.Flowers;
                    if (exist)
                    {
                        MySqlCommand Cmd = new MySqlCommand("UPDATE `cq_flowers` SET `redroses` = " + F.RedRoses + ", `redrosestoday` = " + F.RedRoses2day + ",`lilies` = " + F.Lilies + ",`liliestoday` = " + F.Lilies2day + ",`redrosestoday` = " + F.Tulips + ",`redrosestoday` = " + F.Tulips2day + ",`orchads` = " + F.Orchads + ",`orchadstoday` = " + F.Orchads2day + ", WHERE `charuid2` = \"" + Name + "\"", Conn);
                        Cmd.ExecuteNonQuery();
                    }
                    else
                    {
                        MySqlCommand Cmd = new MySqlCommand("INSERT INTO `cq_flowers` (redroses, redrosestoday, lilies, liliestoday, tulips, tulipstoday, orchads, orchadstoday, charuid, charuid2) VALUES (" + F.RedRoses + "," + F.RedRoses2day + "," + F.Lilies + "," + F.Lilies2day + "," + F.Tulips + "," + F.Tulips2day + "," + F.Orchads + "," + F.Orchads2day + "," + C.EntityID + ",'" + Name + "')", Conn);
                        Cmd.ExecuteNonQuery();
                    }
                }
                lock (Conn)
                {
                    string Save = DateTime.Now.Year + "-" + DateTime.Now.Month + "-" + DateTime.Now.Day;
                    MySqlCommand Cmd = new MySqlCommand("UPDATE `cq_saves` SET `save_flower` = " + Save + " WHERE `type` = 0", Conn);
                    Cmd.ExecuteNonQuery();
                }
                Conn.Close();
            }
            catch (Exception ex) { Console.WriteLine(ex.ToString()); Conn.Close(); return; }
        }
5supertao is offline  
Old 02/26/2010, 10:40   #2
 
12tails's Avatar
 
elite*gold: 0
Join Date: Apr 2009
Posts: 782
Received Thanks: 458
GetConnection is the void that you use to connect on the database...
12tails is offline  
Reply


Similar Threads Similar Threads
pm can not use commands cause flowers?
06/24/2010 - EO PServer Hosting - 9 Replies
well i am thinking of releasing the flower fix so female pms can still use commands with flowers message me for details... eo folder > ini place it there and let me know if there are any issues it just get's rid of the flower in chat so if you want to keep flower chat in just hang it out to pms (havent fully tested it so let me know)
flowers
02/24/2010 - EO PServer Hosting - 1 Replies
im using candy db but for some reason u cant buy 999 flowers or 9999 flowers from mall if anyone can help it would be great thanks :)
D leveling at flowers
06/18/2009 - Silkroad Online - 3 Replies
HI i got both my acc's setup, one on my laptop, on my my main computer and and made the mistake of putting full str on my wizzy and only relished at lvl 42. So heres what im asking shall i start again and farm sp points with free 1 - 10 ong taxi or d lvl with my euro cleric or chinese res? and how long would this take if anybody is good at calculating. Thx.
Corupted flowers for EVERYONE!
05/16/2006 - WoW Exploits, Hacks, Tools & Macros - 1 Replies
The Nerfed One This doesnt work anymore here is a new working version
Corupted flowers for EVERYONE!
11/27/2005 - WoW Exploits, Hacks, Tools & Macros - 0 Replies
1) Find a friend that has completed steps 2-4 or 2) Goto http://www.thottbot.com/?m=6547 and Complete the quest Cleansing Felwood (lvl 48 ) http://www.thottbot.com/?s=Cleansing+Felwood 3) Get your lantern from the quest giver 4) Complete any of the quest she offers to get a plant salve http://www.thottbot.com/?i=2948 5) Goto a corupted plant http://www.thottbot.com/?i=2948 6) Clense the plant and stay on it. 7) Everyone should be able to open the dialog box now and as long as no...



All times are GMT +1. The time now is 21:00.


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.