Gouki Posted January 21, 2021 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
0 cook1e Posted January 22, 2021 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
0 Gouki Posted January 23, 2021 Author 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
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; }
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.