mhielo12 Posted April 28, 2021 Group: Members Topic Count: 23 Topics Per Day: 0.01 Content Count: 114 Reputation: 4 Joined: 08/28/14 Last Seen: 9 hours ago Share Posted April 28, 2021 (edited) Quote byako,83,154,4 script Who's Online Event 99,{ if (getgroupid() == 99) goto Event_Menu; mes "[Who's Online Event]"; mes "Only GM's are allowed to use this NPC."; close; Event_Menu: set .@invokeid,getcharid(3); mes "[Who's Online Event]"; mes "Enable event?"; menu "Yes",-,"No",Event_End; while(1){ query_sql "select account_id from `char` where online = 1 order by rand() limit 1", .@aid; attachrid .@aid; if( CheckVending() || getgroupid() >= 2 ){ DetachRID(); continue; } announce strcharinfo(0) +" won 1 Lucky Pick Box in Exiled Lucky Pick", 0,0x00FF00; getitem 50043,1; break; } attachrid(.@invokeID); close; Event_End: close; } How to make this every 3 hours and for specific map only Edited April 28, 2021 by mhielo12 Quote Link to comment Share on other sites More sharing options...
0 Emistry Posted August 31, 2021 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Sunday at 05:32 PM Share Posted August 31, 2021 try byako,83,154,4 script Who's Online Event 99,{ mes "[Who's Online Event]"; if (getgroupid() < 99) { mes "Only GM's are allowed to use this NPC."; } else { mes "Enable event?"; if (select("Yes", "No") == 1) { mes "Event started."; donpcevent strnpcinfo(3)+"::OnStart"; } } close; OnHour00: OnHour03: OnHour06: OnHour09: OnHour12: OnHour15: OnHour18: OnHour21: OnStart: do { query_sql "select `account_id`, `name` from `char` where online = 1 order by rand() limit 1", .@aid, .@name$; attachrid .@aid; } while (checkvending() || getgroupid() >= 2 || inarray(.map$, strcharinfo(3)) == -1); announce strcharinfo(0) +" won 1 Lucky Pick Box in Exiled Lucky Pick", bc_all, 0x00FF00; getitem 50043,1; end; OnInit: setarray .map$, "prontera", "izlude", "payon"; end; } Quote Link to comment Share on other sites More sharing options...
Question
mhielo12
How to make this every 3 hours and for specific map only
Link to comment
Share on other sites
1 answer 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.