Hi there, I need help for this script. It will randomly choose online players at the time given.
But I want it to pick 5 Players instead of 1, and will not pick from Autovended characters. Is this possible? I will attach the script below. Thank you in advance!
prontera,155,181,5 script 2X NPC -1,{
if( .name_list_size ){
for( .@i = 0; .@i < .name_list_size; .@i++ )
mes ""+.name_list$[.@i];
}
else{
mes "Doesnt have any record yet.";
}
close;
OnClock1900:
.@hour = 24;
.@player = 5;
query_sql( "SELECT `account_id`,`name` FROM `char` WHERE `online` = 1 ORDER BY RAND() LIMIT "+.@player,.@aid,.name_list$ );
.name_list_size = getarraysize( .@aid );
for( .@i = 0; .@i < .name_list_size; .@i++ )
if( attachrid( .@aid[.@i] ) ){
dispbottom "Gained 2X DROP for next "+.@hour+" Hours.";
sc_start SC_ITEMBOOST,( .@hour * 3600000 ),100;
.@name$ = .@name$ + .name_list$[.@i] + ",";
}
detachrid;
announce "Congratulations "+.@name$+" You have been selected as Winner for 2X Event for today.",bc_all;
end;
}
Question
Yami
Hi there, I need help for this script. It will randomly choose online players at the time given.
But I want it to pick 5 Players instead of 1, and will not pick from Autovended characters. Is this possible? I will attach the script below.
Thank you in advance!
Link to comment
Share on other sites
0 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.