Jump to content
  • 0

Random reward upon winning


Question

Posted

Hi all,

Is it possible for this script to be converted to a random reward instead of just 1 fixed reward?

This is @Poring King's script, however he hasn't replied to me yet, so seeking the forum for assistance.

-	script	Lucky_Pick	-1,{
OnMinute00:
	sleep 1000 * rand(60);
	if(addrid(0)){
		if(checkidle() < 600) setarray .AccountIds[getarraysize(.AccountIds)],getcharid(3);
		detachrid;
	} else { end; }
	while(!attachrid(.AccountIds[rand(getarraysize(.AccountIds))]));
	getitem 7539,1;
	announce "[ Lucky Prize ]" + strcharinfo(0) + " recived a prize from whos online event",0;
end;
}

 

2 answers to this question

Recommended Posts

  • 0
Posted (edited)

Try this.

-	script	Lucky_Pick	-1,{
OnMinute00:
	sleep 1000 * rand(60);
	if(addrid(0)){
		if(checkidle() < 600) setarray .AccountIds[getarraysize(.AccountIds)],getcharid(3);
		detachrid;
	} else { end; }
	while(!attachrid(.AccountIds[rand(getarraysize(.AccountIds))]));
   .@item = F_Rand( 501,502 ); // Items ID Here
	getitem .@item,1;
	announce "[ Lucky Prize ]" + strcharinfo(0) + " recived a prize from whos online event",0;
end;
}

 

Edited by cook1e
  • 0
Posted
On 1/22/2021 at 8:17 AM, cook1e said:

Try this.


-	script	Lucky_Pick	-1,{
OnMinute00:
	sleep 1000 * rand(60);
	if(addrid(0)){
		if(checkidle() < 600) setarray .AccountIds[getarraysize(.AccountIds)],getcharid(3);
		detachrid;
	} else { end; }
	while(!attachrid(.AccountIds[rand(getarraysize(.AccountIds))]));
   .@item = F_Rand( 501,502 ); // Items ID Here
	getitem .@item,1;
	announce "[ Lucky Prize ]" + strcharinfo(0) + " recived a prize from whos online event",0;
end;
}

 

Looks like it's no longer compatible to the latest revision?
image.png.3d8005604376d8146ff98d8c8747a641.png
 

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...