themon Posted August 25, 2013 Group: Members Topic Count: 53 Topics Per Day: 0.01 Content Count: 240 Reputation: 40 Joined: 04/27/13 Last Seen: June 17, 2015 Share Posted August 25, 2013 (edited) User will get their Daily Hourly Bonus by every hourhttp://www.mediafire.com/?41ody4opst2ipzr hourlybonus.txt hourlybonus Array Version.txt Edited October 17, 2013 by themon Quote Link to comment Share on other sites More sharing options...
Stolao Posted September 4, 2013 Group: Developer Topic Count: 48 Topics Per Day: 0.01 Content Count: 1443 Reputation: 344 Joined: 10/17/12 Last Seen: Sunday at 01:58 PM Share Posted September 4, 2013 Ok there are a few things about your script id like to advise you on, Firstly You use $DLogin , which is a global variable, once one person claims rewards no one else on server will be able to till following day Instead try using an account variable #DLogin and using an sql data wipe at 00:00 like so OnClock0000: set $DLogin,0; query_sql("DELETE FROM `global_reg_value` WHERE `str` = '#DLogin'"); set .@size, query_sql("select account_id from `char` where online = 1", .@aid); for(set .@i,0; .@i<.@size; set .@i,.@i+1) { if(attachrid(.@aid[.@i])){ set #DLogin,0; } } Announce "You can now claim your Daily Bonus!",8; end; Secondly Don't use goto, goto goto for the same code with a variable difference, instead make the script dynamic using arrays example if(#DLogin == 1){ mes "You had already received your gift today."; mes "Please! come back again tomorrow."; emotion e_bzz; close; } mes "Im glad to give you your Daily Bonus!"; next; switch(rand(5)){ // 1/rand will be items, rest will be zeny case 0: //Items // Card, Enchant, Healing, All items setarray .@Plow, 4001, 4700, 401, 501; setarray .@Phigh,4555, 4871, 599, 21005; set .@x, rand(getarraysize(.Plow)); set .@p, rand(.Plow[.@x],.PHigh[.@x]); while(getitemname(.@p) == "null"){ set .@p, rand(.Plow[.@x],.PHigh[.@x]); } if (checkweight(@claim,1) == 0 ){ mes "Sorry you are overweight!"; emotion e_bzz; close; } getitem .@p,1; Announce "" + strcharinfo(0) + " got " + getitemname(.@p) + "",8; break; default: //Zeny setarray .@x,5,10,50,100,500,1000,5000,100000,1000000; set .@p, .@x[rand(getarraysize(.@x))] * rand(1,50); set Zeny,zeny + .@p; Announce "" + strcharinfo(0) + " got " + .@p + "z!",8; break; } emotion e_thx; set #DLogin,1; close; Hope this helps~ Quote Link to comment Share on other sites More sharing options...
themon Posted September 7, 2013 Group: Members Topic Count: 53 Topics Per Day: 0.01 Content Count: 240 Reputation: 40 Joined: 04/27/13 Last Seen: June 17, 2015 Author Share Posted September 7, 2013 Ok thanks for the advice Quote Link to comment Share on other sites More sharing options...
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.