Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //=============================================================//
- // Daily Online User Roulette //
- //==== Copyright ==============================================//
- // Innos '2010 for www.ex-RO.de //
- //==== Version ================================================//
- // V.1.0 - Final **** Tested & Worked **** //
- //==== Infos ==================================================//
- // Special daily Event from 10a.m. to 10p.m. //
- // Set Random Hour an pick a Online User //
- // The Winner take a random price with message & Broadcast //
- //=============================================================//
- - script roulette -1,{
- OnClock1000:
- OnClock1100:
- OnClock1200:
- OnClock1300:
- OnClock1400:
- OnClock1500:
- OnClock1600:
- OnClock1700:
- OnClock1800:
- OnClock1900:
- OnClock2000:
- OnClock2100:
- OnClock2200:
- if(gettime(3) == .rand)
- {
- query_sql "SELECT `account_id` FROM `char` WHERE `online` = '1' ORDER BY `account_id` ASC",.@aid;
- if(!.@aid){ end; }
- for(set .@i,0; .@i < getarraysize(.@aid); set .@i,.@i+1)
- {
- set .@total,.@i;
- }
- set .rand2,(4);
- set .rand3,rand(.@total);
- for(set .@i,0; .@i < getarraysize(.@aid); set .@i,.@i+1)
- {
- if (attachrid(.@aid[.rand3])) {
- getitem .items[.rand2],1;
- }
- }
- announce "The Winner of the Daily User Roulette is "+rid2name(.@aid[.rand3])+"! Gratulations!",bc_all;
- }
- OnClock0955:
- set .rand,rand(13);
- end;
- OnInit:
- set .rand,rand(13);
- setarray .items[0],616,12103,30000,12106;
- end;
- }
- /*
- #616 - Old Card Album
- #12103 - Bloddy Branch
- #30000 - exCoin
- #12106 - Jewelry Box
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement