|
You last visited: Today at 19:36
Advertisement
restet lottery
Discussion on restet lottery within the CO2 Private Server forum part of the Conquer Online 2 category.
10/13/2011, 21:45
|
#1
|
elite*gold: 0
Join Date: Mar 2010
Posts: 475
Received Thanks: 15
|
restet lottery
hello there , i tried to make its reset the lottery
so i created this code
PHP Code:
#region restart lottery
try
{
if (Now.Hour == 23 && Now.Minute == 55 && Now.Second == 00)
{
ServerBase.Kernel.SendWorldMessage(new Network.GamePackets.Message(" Server will restart in 5 minutes , Do not sign up for the arena now, save all your data and log out game", System.Drawing.Color.Orange, Network.GamePackets.Message.Center), ServerBase.Kernel.GamePool.Values);
{
System.Threading.Thread.Sleep(60000);
ServerBase.Kernel.SendWorldMessage(new Network.GamePackets.Message(" Server will restart in 4 minutes , Do not sign up for the arena now, save all your data and log out game", System.Drawing.Color.Orange, Network.GamePackets.Message.Center), ServerBase.Kernel.GamePool.Values);
System.Threading.Thread.Sleep(60000);
ServerBase.Kernel.SendWorldMessage(new Network.GamePackets.Message(" Server will restart in 3 minutes , Do not sign up for the arena now, save all your data and log out game", System.Drawing.Color.Orange, Network.GamePackets.Message.Center), ServerBase.Kernel.GamePool.Values);
System.Threading.Thread.Sleep(60000);
ServerBase.Kernel.SendWorldMessage(new Network.GamePackets.Message(" Server will restart in 2 minutes , Do not sign up for the arena now, save all your data and log out game", System.Drawing.Color.Orange, Network.GamePackets.Message.Center), ServerBase.Kernel.GamePool.Values);
System.Threading.Thread.Sleep(60000);
ServerBase.Kernel.SendWorldMessage(new Network.GamePackets.Message(" Server will restart in 1 minutes , Do not sign up for the arena now, save all your data and log out game ", System.Drawing.Color.Orange, Network.GamePackets.Message.Center), ServerBase.Kernel.GamePool.Values);
System.Threading.Thread.Sleep(30000);
ServerBase.Kernel.SendWorldMessage(new Network.GamePackets.Message(" Server will restart in 30 Seconds , Do not sign up for the arena now, save all your data and log out game ", System.Drawing.Color.Orange, Network.GamePackets.Message.Center), ServerBase.Kernel.GamePool.Values);
System.Threading.Thread.Sleep(30000);
foreach (Client.GameState clients2 in ServerBase.Kernel.GamePool.Values)
{
Database.PkWarEvent.QQ(clients2);
Database.EntityTable.ResetLottery2(clients2);
Database.EntityTable.ResetLottery(clients2);
MySqlCommand cmd = new MySqlCommand(MySqlCommandType.UPDATE);
cmd.Update("entities").Set("LotteryEntries", 0).Where("restart", 1).Execute();
CommandsAI("@save");
CommandsAI("@restart");
// ServerStuff.Closed = true;
Conquer_Online_Server.Game.ConquerStructures.PlayersVot Vot = new Conquer_Online_Server.Game.ConquerStructures.PlayersVot();
Vot.AdressIp = clients2.Account.IP;
Vot.Uid = clients2.Entity.UID;
Kernel.VotePool.Remove(Vot.AdressIp);
Kernel.VotePoolUid.Remove(Vot.Uid);
Database.EntityTable.DeletVotes(Vot);
}
}
}
}
catch { }
//return;
#endregion
but didn't worked
any help ?
|
|
|
10/13/2011, 23:27
|
#2
|
elite*gold: 0
Join Date: Sep 2011
Posts: 40
Received Thanks: 8
|
how it didn't work explane you problom
|
|
|
10/14/2011, 00:16
|
#3
|
elite*gold: 0
Join Date: Mar 2010
Posts: 475
Received Thanks: 15
|
Quote:
Originally Posted by DontSpeakToMe
how it didn't work explane you problom
|
i tried to make its reset the lottery
so i created this code , but its didnt work
i mean when you change the time and go to lady lucky , she is telling you you already joined 10 times
|
|
|
10/14/2011, 00:20
|
#4
|
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,380
|
Does this code actually run?
Eg: Does it actually do the whole "server is restarting" message at midnight
If so then I'd look into how your storing and resetting lottery plays.
Personally I wouldn't use a 'reset at midnight' type system... it makes it so that I can play 10 times at 12:50 and another 10 times 10 minutes later...
I'd do a per user reset system so that basically 24 hours after my 'first' lotto play it will reset my lotto uses. This way if I use lotto once at 11:00AM at 11:00AM the next day it will reset... if I then play lotto 9 more times at 10:50AM the next day my reset is still in 10 minutes. The 'reset time' just needs MINOR logic to keep it from causing issues.
IE: if I play lotto and my lotto count == 0 i set my lotto reset to 24 hours from now. When that time expires it will reset my count to 0 regardless of if it's reached 10 yet or not.
|
|
|
10/14/2011, 01:02
|
#5
|
elite*gold: 0
Join Date: Mar 2010
Posts: 475
Received Thanks: 15
|
Quote:
Originally Posted by pro4never
Does this code actually run?
Eg: Does it actually do the whole "server is restarting" message at midnight
If so then I'd look into how your storing and resetting lottery plays.
Personally I wouldn't use a 'reset at midnight' type system... it makes it so that I can play 10 times at 12:50 and another 10 times 10 minutes later...
I'd do a per user reset system so that basically 24 hours after my 'first' lotto play it will reset my lotto uses. This way if I use lotto once at 11:00AM at 11:00AM the next day it will reset... if I then play lotto 9 more times at 10:50AM the next day my reset is still in 10 minutes. The 'reset time' just needs MINOR logic to keep it from causing issues.
IE: if I play lotto and my lotto count == 0 i set my lotto reset to 24 hours from now. When that time expires it will reset my count to 0 regardless of if it's reached 10 yet or not.
|
i agree with , it shall reset its self when its become 12.00 midnight , but its doesn't , so i have to do anything to fix this issue , so i tried this code , and about you can play 10 times when it 11-55 ,if you recheck the code you will know i coded it to reset the lottery entries before its restart with less than 1 second .
so any help ??
|
|
|
10/14/2011, 01:48
|
#6
|
elite*gold: 0
Join Date: Sep 2011
Posts: 40
Received Thanks: 8
|
make sure that the code is in EntityTable.cs and if still don't work try to make
reset lottery code alone but make sure that the server restart and reset lottery
are not the same time
|
|
|
10/14/2011, 01:57
|
#7
|
elite*gold: 0
Join Date: Mar 2010
Posts: 475
Received Thanks: 15
|
Quote:
Originally Posted by DontSpeakToMe
make sure that the code is in EntityTable.cs and if still don't work try to make
reset lottery code alone but make sure that the server restart and reset lottery
are not the same time
|
as you see my code is making reset by MYSQL commands then restart , how to check code in intity table ?
|
|
|
10/14/2011, 02:21
|
#8
|
elite*gold: 0
Join Date: Sep 2011
Posts: 40
Received Thanks: 8
|
i mean check you EntityTable by see if there is reset lottery
look at my code in EntityTable
Code:
public static void ResetLottery(Client.GameState client)
{
MySqlCommand cmd = new MySqlCommand(MySqlCommandType.UPDATE);
cmd.Update("entities").Set("LotteryEntries", 0).Where("UID", client.Entity.UID).Execute();
}
|
|
|
10/14/2011, 02:25
|
#9
|
elite*gold: 0
Join Date: Mar 2010
Posts: 475
Received Thanks: 15
|
Quote:
Originally Posted by DontSpeakToMe
i mean check you EntityTable by see if there is reset lottery
look at my code in EntityTable
Code:
public static void ResetLottery(Client.GameState client)
{
MySqlCommand cmd = new MySqlCommand(MySqlCommandType.UPDATE);
cmd.Update("entities").Set("LotteryEntries", 0).Where("UID", client.Entity.UID).Execute();
}
|
yes
PHP Code:
public static void ResetLottery(Client.GameState client)
{
MySqlCommand cmd = new MySqlCommand(MySqlCommandType.UPDATE);
cmd.Update("entities").Set("LotteryEntries", 0).Where("UID", client.Entity.UID).Execute();
}
public static void ResetLottery2(Client.GameState client)
{
MySqlCommand cmd = new MySqlCommand(MySqlCommandType.UPDATE);
cmd.Update("entities").Set("LotteryEntries2", 0).Where("UID", client.Entity.UID).Execute();
}
public static void ResetExpball(Client.GameState client)
{
MySqlCommand cmd = new MySqlCommand(MySqlCommandType.UPDATE);
cmd.Update("entities").Set("ExpBalls", 0).Where("UID", client.Entity.UID).Execute();
}
Exp balls working correctly , but the lottery isn't
|
|
|
 |
Similar Threads
|
lottery
11/10/2010 - EO Exploits, Hacks, Tools & Macros - 16 Replies
hey guy is anyone still trying to find out how to go into lottery with no ep..
|
if can be done? lottery.
02/17/2010 - Eudemons Online - 17 Replies
wounder if u can make like a packet grabber hack with know memory codes address so when u put the arrow over the lottery box it reades the address and tells what it is .so u can then pick what u want out of lottery i also believe if u wait the box constanly changes whats in them like every 20 secs thats why so random but i had a freind grab the same brown box at 8:29 and 29 sec to his clock and both times he got +12 2soc item but this was back like 4 patches ago.any ideas.
|
zzyt2 restet
08/20/2009 - Metin2 Private Server - 0 Replies
hey ich wollte mal fragen ob jetzt um 11 restet ist??
|
Restet!!!!!!!!!!!!
04/18/2009 - Rohan - 5 Replies
hi i ask all menbers of forum exist any hack for reset skill and stats for rohan ????:)
|
Lottery
09/02/2007 - Eudemons Online - 2 Replies
Well some people belive lottery is luck...i dont.
Who chooses the same box?
and who chooses diffrent boxes every time they go in?
Ok next time you got 900EP's and you can go in the lottery 20 times...
Pick your first char go in and pick random boxes each time...
then with the other char pick the same box over and over...
tried it...same box is the best
i belive when you do the same box your picking out all the s*it stuff to get to the good stuff...like me "Mage Tinna, Warrior Cute,...
|
All times are GMT +1. The time now is 19:37.
|
|