Gouki Posted January 21, 2021 Group: Members Topic Count: 88 Topics Per Day: 0.05 Content Count: 261 Reputation: 13 Joined: 08/12/20 Last Seen: November 21, 2024 Share Posted January 21, 2021 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; } Quote Link to comment Share on other sites More sharing options...
0 cook1e Posted January 22, 2021 Group: Members Topic Count: 5 Topics Per Day: 0.00 Content Count: 172 Reputation: 68 Joined: 10/25/20 Last Seen: 16 hours ago Share Posted January 22, 2021 (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 January 22, 2021 by cook1e Quote Link to comment Share on other sites More sharing options...
0 Gouki Posted January 23, 2021 Group: Members Topic Count: 88 Topics Per Day: 0.05 Content Count: 261 Reputation: 13 Joined: 08/12/20 Last Seen: November 21, 2024 Author Share Posted January 23, 2021 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? Quote Link to comment Share on other sites More sharing options...
Question
Gouki
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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.