Jump to content
  • 0

Random reward upon winning


Gouki

Question


  • Group:  Members
  • Topic Count:  82
  • Topics Per Day:  0.06
  • Content Count:  241
  • Reputation:   11
  • Joined:  08/12/20
  • Last Seen:  

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;
}

 

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  171
  • Reputation:   68
  • Joined:  10/25/20
  • Last Seen:  

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

  • 0

  • Group:  Members
  • Topic Count:  82
  • Topics Per Day:  0.06
  • Content Count:  241
  • Reputation:   11
  • Joined:  08/12/20
  • Last Seen:  

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
 

Link to comment
Share on other sites

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...