Jump to content
  • 0

Random Online Player x2 Boost Event


Yami

Question


  • Group:  Members
  • Topic Count:  35
  • Topics Per Day:  0.01
  • Content Count:  111
  • Reputation:   2
  • Joined:  01/02/14
  • Last Seen:  

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;
}
Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...