I want to make Stock Scripts Reset all player stock on 00:00 hour..
Below is my current example script :
OnClock0951:
query_sql "delete from `acc_reg_num` where `key` = '#S1'";
query_sql "delete from `acc_reg_num` where `key` = '#S2'";
query_sql "delete from `acc_reg_num` where `key` = '#S3'";
query_sql "delete from `acc_reg_num` where `key` = '#S4'";
query_sql "delete from `acc_reg_num` where `key` = '#S5'";
query_sql "delete from `acc_reg_num` where `key` = '#S6'";
query_sql "delete from `acc_reg_num` where `key` = '#S7'";
query_sql "delete from `acc_reg_num` where `key` = '#S8'";
query_sql "delete from `acc_reg_num` where `key` = '#S9'";
query_sql "delete from `acc_reg_num` where `key` = '#S10'";
announce "[Stock Market] Our stock has been reset!",bc_all,0xFF0000;
set $S_LastUpd$,"12:00";
goto S_Fluc;
end;
My current scripts sometimes make the map-server.exe broken/crash.. Not sure why..
Also, player who not relog.. Still can sell their current Stock.. And when ONLY IF they relog, the stock will be reset..
Already tried many ways.. But still somehow stuck.. Hope can get any guides.. Thank you..
Question
rakuzas
Hello,
I want to make Stock Scripts Reset all player stock on 00:00 hour..
Below is my current example script :
OnClock0951: query_sql "delete from `acc_reg_num` where `key` = '#S1'"; query_sql "delete from `acc_reg_num` where `key` = '#S2'"; query_sql "delete from `acc_reg_num` where `key` = '#S3'"; query_sql "delete from `acc_reg_num` where `key` = '#S4'"; query_sql "delete from `acc_reg_num` where `key` = '#S5'"; query_sql "delete from `acc_reg_num` where `key` = '#S6'"; query_sql "delete from `acc_reg_num` where `key` = '#S7'"; query_sql "delete from `acc_reg_num` where `key` = '#S8'"; query_sql "delete from `acc_reg_num` where `key` = '#S9'"; query_sql "delete from `acc_reg_num` where `key` = '#S10'"; announce "[Stock Market] Our stock has been reset!",bc_all,0xFF0000; set $S_LastUpd$,"12:00"; goto S_Fluc; end;
My current scripts sometimes make the map-server.exe broken/crash.. Not sure why..
Edited by rakuzasAlso, player who not relog.. Still can sell their current Stock.. And when ONLY IF they relog, the stock will be reset..
Already tried many ways.. But still somehow stuck.. Hope can get any guides.. Thank you..
Link to comment
Share on other sites
3 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.