away from how you code it and getting instant for each client and saving that to the database and update it
while im implementing similar systems i've had a problem with shops which is
assume you got 0 cps and 99999999 bound cps , it won't let you buy a bound expball from the new mall (it won't show the dialog which you decided at to buy the item with cps or bound cps and how many you are going to buy)
Quote:
Quote:
client.Entity.QuizPoints = 1;
|
dafuq ? are you for real ? resting people quizpoints when they vote ? such a trap ?
EDIT : just saw your reply and the other topic and figured out you are using it(the quizshow uint variable) cuz you can't create new instance -.-
k here
Code:
go to database , ctrl+d , entinity , create new column , call it whateveryouwant type byte , default 0
at entinity tables
Code:
client.Entity.whateveryouwant = reader.ReadUInt16("whateveryouwant");
at entity
Code:
public byte _whateveryouwant;
public byte whateveryouwant
{
get
{
return this._whateveryouwant ;
}
set
{
this._whateveryouwant = value;
}
}
and you are done
oh to reset it everyday
at the entitytable
Code:
public static void Resetwhateveryouwant(GameState client)
{
Conquer_Online_Server.Database.MySqlCommand command = new Conquer_Online_Server.Database.MySqlCommand(MySqlCommandType.UPDATE);
command.Update("entities").Set("whateveryouwant", (byte)0).Where("UID", (long)client.Entity.UID).Execute();
}
and call the above function from wherever you reset other stuff (like expballs and stuff)
if you are using impulse base (trinity) then find this at entinity tables
Code:
if (DateTime.Now.DayOfYear != client.LastResetTime.DayOfYear)
and call the reset function
wish that is helpful
|
so now you know what to do to create a new currency , forget about the reset cuz you won't reset there currency , search for the handlers of selling and buying at the packethandlers.cs
you will find how the server handle buying/selling to shops , if you couldn't get there then break on the method which spit packets and buy item and trace it
try everything i've said , if you couldn't get it to work then ill just provide you with codes
goodluck