Advertisement
Emistry

[RO] Hourly Online Reward

Sep 2nd, 2016
263
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. - script hourly_reward_main -1,{
  2.  
  3. OnInit:
  4. setarray .itemid,512,512,512,512,512;
  5. setarray .amount,1,1,1,1,1;
  6.  
  7. .itemid_size = getarraysize( .itemid );
  8. end;
  9.  
  10. OnMinute00:
  11. query_sql( "SELECT `account_id`,`name` FROM `char` WHERE `online` = 1 ORDER BY RAND() LIMIT 1",.@aid,.@name$ );
  12. if ( .@aid ) {
  13. .@i = rand( .itemid_size );
  14. getitem .itemid[.@i],.amount[.@i],.@aid;
  15. announce "Sakray Server - Lucky Player ["+.@name$+"] has receive ["+.amount[.@i]+"x "+getitemname( .itemid[.@i] )+"]!!",bc_all;
  16. }
  17. end;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement