Register for your free account! | Forgot your password?

You last visited: Today at 05:05

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

Advertisement



[Release] Flower System (5165)

Discussion on [Release] Flower System (5165) within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.

Reply
 
Old 02/20/2010, 20:47   #16
 
elite*gold: 40
Join Date: Feb 2010
Posts: 78
Received Thanks: 17
When i add this code

Code:
#region Flowers
                        case 1150:
                            {
                                string ID = "";
                                for (byte x = 18; x < 25; x++)
                                {
                                    ID += Convert.ToChar(Data[x]).ToString();
                                }
                                uint TargetID = uint.Parse(ID);
                                Character TC = (Character)Game.World.H_Chars[TargetID];
                                GC.LocalMessage(2005, "Sending flowers to " + TargetID.ToString() + ", wait for the answer.");
                                if (Game.World.H_Chars.Contains(TargetID))
                                {
                                    //GC.AddSend(Packets.SendFlowerScreen(GC.MyChar.EntityID));
                                    TC.MyClient.AddSend(Packets.ReceiveFlower(TC.EntityID, 0, 0, 0).Get);
                                }
                                for (byte i = 0; i < 12; i++)
                                    Console.WriteLine(Data[i].ToString());
                                break;
                            }
                        case 1151:
                            {
                                Struct.Flowers F = GC.MyChar.Flowers;
                                string ToSend = " " + F.RedRoses.ToString() + " " + F.RedRoses2day.ToString() + " " + F.Lilies.ToString() + " " + F.Lilies2day.ToString() + " ";
                                ToSend += F.Orchads.ToString() + " " + F.Orchads2day.ToString() + " " + F.Tulips.ToString() + " " + F.Tulips2day.ToString();
                                GC.AddSend(Packets.FlowerPacket(ToSend));
                                break;
                            }
                        #endregion
I get errors with "Characters" and "Struct"
Any idea why?
ArtOfWar is offline  
Old 02/20/2010, 21:39   #17
 
ramix's Avatar
 
elite*gold: 0
Join Date: Aug 2008
Posts: 272
Received Thanks: 61
12taisl and .Arco is rigth the release is for help ppl can be full or not is only for hlp ppl...


and PM's GM's drop staffs is easy to fix go to dropitem code and you will find the problem...
ramix is offline  
Old 02/20/2010, 21:42   #18
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,765
Received Thanks: 5,291
Quote:
Originally Posted by Decker_ View Post
Off-topic:
Do you have a code that you can release that PM/GM's can drop things and people can see it?
Yes
Arcо is offline  
Thanks
2 Users
Old 02/20/2010, 21:54   #19
 
elite*gold: 20
Join Date: Jan 2008
Posts: 2,338
Received Thanks: 490
Epic!
~Yuki~ is offline  
Old 02/20/2010, 23:28   #20
 
elite*gold: 0
Join Date: Aug 2005
Posts: 96
Received Thanks: 25
Quote:
Originally Posted by Decker_ View Post
Not necessarily.
Everyone has there own opinions and my opinion is people shoudn't release stuff that is not completed.
I'm sure people would agree with me.

Off-topic:
Do you have a code that you can release that PM/GM's can drop things and people can see it?
does anyone ever agree with you?
HardNotTo is offline  
Old 02/20/2010, 23:33   #21
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,765
Received Thanks: 5,291
Quote:
Originally Posted by HardNotTo View Post
does anyone ever agree with you?
Nope.
Arcо is offline  
Old 02/21/2010, 02:03   #22
 
elite*gold: 0
Join Date: Aug 2005
Posts: 96
Received Thanks: 25
after working on some of the errors I had this is what im left with.

Code:
Error	7	'NewestCOServer.Game.World' does not contain a definition for 'Flowers'	C:\rock test server\rikardo updated\Database.cs	500	44	NewestCOServer
im not good at creating voids just yet...
HardNotTo is offline  
Old 02/21/2010, 02:18   #23
 
elite*gold: 0
Join Date: May 2008
Posts: 66
Received Thanks: 0
lol 1 error here

Quote:
Error 1 'object' does not contain a definition for 'Get' and no extension method 'Get' accepting a first argument of type 'object' could be found (are you missing a using directive or an assembly reference?) C:\Weird-CoV2\PacketHandler.cs 48 101 NewestCOServer
dillhack is offline  
Old 02/21/2010, 04:22   #24
 
hunterman01's Avatar
 
elite*gold: 20
Join Date: Dec 2006
Posts: 945
Received Thanks: 175
Quote:
Originally Posted by HardNotTo View Post
after working on some of the errors I had this is what im left with.

Code:
Error	7	'NewestCOServer.Game.World' does not contain a definition for 'Flowers'	C:\rock test server\rikardo updated\Database.cs	500	44	NewestCOServer
im not good at creating voids just yet...
Code:
public int Flowers =0;
hunterman01 is offline  
Old 02/21/2010, 11:19   #25
 
12tails's Avatar
 
elite*gold: 0
Join Date: Apr 2009
Posts: 773
Received Thanks: 441
Releasing updates... thats will make the flower system mostly complete... will just miss on how to save and the npc will be removed.... i've got how to get the item and amount + flower type : D

in a sec it'll be at first post : P
12tails is offline  
Old 02/21/2010, 19:12   #26
 
killersub's Avatar
 
elite*gold: 0
Join Date: May 2009
Posts: 884
Received Thanks: 211
lol since I'm like a super noob I don't know how to save/load the flowers in my server...
u have a mysql database I don't lol...

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; }
        }
I wanna put that into my database It's ini not mysql...

If anyone can fix this for me/tell me where to put it at...It'll be very helpful!
killersub is offline  
Old 02/21/2010, 19:26   #27
 
Luiz01's Avatar
 
elite*gold: 0
Join Date: Apr 2009
Posts: 110
Received Thanks: 32
Haiii 12tails my friend =D
stay doing this great job thanks
Luiz01 is offline  
Old 02/22/2010, 03:41   #28
 
-Shunsui-'s Avatar
 
elite*gold: 0
Join Date: Apr 2008
Posts: 1,152
Received Thanks: 321
Tommorrow (My TIme, Us East (UTC)) We will work On Saving It and Loading it, Also The thread will be updated to the normal Use of 5165 since hes already converted to MySql normal used tested on my source will be updated tommorow
-Shunsui- is offline  
Old 02/22/2010, 03:45   #29
 
walmartboi's Avatar
 
elite*gold: 0
Join Date: Dec 2007
Posts: 378
Received Thanks: 163
I'll post my .ini save flower script once it's done
walmartboi is offline  
Old 02/22/2010, 15:37   #30
 
elite*gold: 0
Join Date: Dec 2007
Posts: 1,326
Received Thanks: 539
FlowerName is underlined red in Packet Handler
[GM] is offline  
Reply


Similar Threads Similar Threads
[Release] 5165 Warehouses Auth System
04/01/2011 - CO2 PServer Guides & Releases - 18 Replies
this is just a simple Auth system for warehouses. It will ask for password (set from WHGuardian) each time players will open their warehouse. Attempt limit is not included in this release... btw; with this release, warehouseGuardian will now save the password in Character file. here are the screenshots: http://img408.imageshack.us/img408/6986/98867182. jpg Click The Image to see more screen shots 1. Go to NPCDialog.cs and search for this code: public static void...
[RELEASE]Anti bot system 5165
06/15/2010 - CO2 PServer Guides & Releases - 15 Replies
Here is an simple anti bot system. Credits goes to Arco for the npc send thing :) First go to MyThreads.cs and find: interval = Interval; T = new Thread(new ThreadStart(Run)); T.Start();
[Release]NPC system 5165 simplified
05/10/2010 - CO2 PServer Guides & Releases - 14 Replies
//
some1 have 5165 source with flower system please post download link here
01/31/2010 - CO2 Private Server - 7 Replies
some1 have 5165 source with flower system please post download link here:(



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


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.