Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server
You last visited: Today at 23:35

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

Advertisement



[Help Needed]Drop Event

Discussion on [Help Needed]Drop Event within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Aug 2005
Posts: 96
Received Thanks: 25
[Help Needed]Drop Event

I searched 2 forums for a fix for this and have not found anything so I came here. I have the following code for a drop event,(not my code, came with the source), and the event works fine, only problem is the event does not end until a server restart. Is there some way to make it end when the timer is over?

Code:
if (Cmd[0] == "/dropevent")
                        {
                            try
                            {
                                if (Program.DropEventTimer == null)
                                {
                                    bool start = true;
                                    if (Cmd[1].ToLower() == "dragonball")
                                    {
                                        Program.DropEventType = "dragonball";
                                        Program.SaveOldRate = DropRates.DragonBall;
                                        DropRates.DragonBall = (DropRates.DragonBall * int.Parse(Cmd[3]));
                                    }
                                    else if (Cmd[1].ToLower() == "meteor")
                                    {
                                        Program.DropEventType = "meteor";
                                        Program.SaveOldRate = DropRates.Meteor;
                                        DropRates.Meteor = (DropRates.Meteor * int.Parse(Cmd[3]));
                                    }
                                    else if (Cmd[1].ToLower() == "minicpbag")
                                    {
                                        Program.DropEventType = "minicpbag";
                                        Program.SaveOldRate = DropRates.CPMiniBag;
                                        DropRates.CPMiniBag = (DropRates.CPMiniBag == 0 ? 1 : DropRates.CPMiniBag * int.Parse(Cmd[3]));
                                    }
                                    else if (Cmd[1].ToLower() == "cpbag")
                                    {
                                        Program.DropEventType = "cpbag";
                                        Program.SaveOldRate = DropRates.CPBag;
                                        DropRates.CPBag = (DropRates.CPBag == 0 ? 1 : DropRates.CPBag * int.Parse(Cmd[3]));
                                    }
                                    else if (Cmd[1].ToLower() == "pointcard")
                                    {
                                        Program.DropEventType = "pointcard";
                                        Program.SaveOldRate = DropRates.PointCard;
                                        DropRates.PointCard = (DropRates.PointCard == 0 ? 1 : DropRates.PointCard * int.Parse(Cmd[3]));
                                    }
                                    else
                                        start = false;

                                    if (start)
                                    {
                                        Program.DropEventTimer = new System.Timers.Timer();
                                        Program.DropEventTimer.Interval = (int.Parse(Cmd[2]) * 60000);
                                        Program.DropEventTimer.Elapsed += new System.Timers.ElapsedEventHandler(Program.QuestDropDone);
                                        Program.DropEventTimer.Start();
                                        Game.World.SendMsgToAll("Server", "[Event] Server will drop " + Cmd[1] + "s " + Cmd[3] + "x for " + Cmd[2] + " minutes.", 2011, 0);
                                    }
                                    else
                                        GC.LocalMessage(2001, "Item name is not a dropevent!");
                                }
                                else
                                    GC.LocalMessage(2001, "There is a running event, you must wait it end to start a new!");
                            }
                            catch { GC.LocalMessage(2001, "Wrongs values!"); GC.LocalMessage(2001, "Format: /dropevent ItemName Minutes Timers"); GC.LocalMessage(2001, "Example: /dropevent dragonball 15 1000    its in up the rates to 1000x in 15 minutos."); }
                        }
HardNotTo is offline  
Old 02/18/2010, 21:55   #2
 
~jochemke~'s Avatar
 
elite*gold: 0
Join Date: Sep 2008
Posts: 259
Received Thanks: 64
Probably there will be a way to let it end with a timer but since i'm not a pro i can't tell u . but maybe u can make a command to let it stop or not?
~jochemke~ is offline  
Old 02/19/2010, 00:13   #3
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,376
Why not just use a value for how many items you want to drop and then do a while loop saying while (amount > 0) and reduce amount by 1 each loop the drop code goes through?
pro4never is offline  
Reply


Similar Threads Similar Threads
WTT Event karkaen(10% exp/drop) for Biglos 2 slot!!! [EU 2]
06/16/2010 - Archlord Trading - 0 Replies
title says all^^ i wtt my karkaen with exp and drop for a biglos 2 slot!!
[How To]Exp,Yang,Item Drop Event machen
06/14/2010 - Metin2 PServer Guides & Strategies - 37 Replies
Hey, in dem Video könnt ihr sehen wie man ein Event macht ;D YouTube - Metin2 - Event machen Have Fun, SunSnacks
Zp Drop event this month - hack it?
06/02/2009 - Zero - 0 Replies
Hey all i dont know if this is possible cause its never been done but i was wondering if some1 might be able to use the upcoming zp drop events to hack zero so that zp always drops or something like that. probly not possible i just putting it out there :S Thanks, Jay
10% Exp & Drop Rate for 30 days Event
09/05/2008 - General Gaming Discussion - 0 Replies
Hi, Hero shall starts new event. Please claim from Event Manager each day for a coupon. The coupon last 3 hours for 10% Exp and Drop rate. If claim 30 days consecutive, can claim a small tiger statue... DM



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


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.