Subzero Posted March 4, 2018 Posted March 4, 2018 hello rA,may i ask again about random reward on disguise event this is my current script https://pastebin.com/xgfupBjE i like to make a random reward for disguise event example reward 7539,7420,671,672,673 Quote
1 pajodex Posted March 5, 2018 Posted March 5, 2018 (edited) 11 hours ago, Subzero said: hello rA,may i ask again about random reward on disguise event this is my current script https://pastebin.com/xgfupBjE i like to make a random reward for disguise event example reward 7539,7420,671,672,673 Make it more exciting with this... Edit it by your own needs. It adds chance to get the reward. You can add more according to your needs. // setarray .@reward1, "chance", item id, item amount... setarray .@reward1, 5, 7539, 10; // Item ID 7539 x 10with chance of 5% in getting, You can add more.. setarray .@reward2, 15, 7420, 5; // Item ID 7420 x 5 with chance of 15% in getting, You can add more.. setarray .@reward3, 20, 671, 1; // etc... setarray .@reward4, 25, 672, 1; setarray .@reward5, 30, 673, 1; setarray .@reward7, 100, 673, 1; sleep2 300; set .@r, rand(100); while( .@r >= getd( ".@reward"+ .@i ) ) .@i++; .@rand_index = rand( 1,( getarraysize( getd( ".@reward"+ .@i ) ) -1 )/2 ) *2 -1; getitem getd( ".@reward"+ .@i +"["+ .@rand_index +"]" ), getd( ".@reward"+ .@i +"["+ (.@rand_index +1) +"]" ); Edited March 5, 2018 by pajodex 1 Quote
0 Subzero Posted March 5, 2018 Author Posted March 5, 2018 9 hours ago, pajodex said: Make it more exciting with this... Edit it by your own needs. It adds chance to get the reward. You can add more according to your needs. // setarray .@reward1, "chance", item id, item amount... setarray .@reward1, 5, 7539, 10; // Item ID 7539 x 10with chance of 5% in getting, You can add more.. setarray .@reward2, 15, 7420, 5; // Item ID 7420 x 5 with chance of 15% in getting, You can add more.. setarray .@reward3, 20, 671, 1; // etc... setarray .@reward4, 25, 672, 1; setarray .@reward5, 30, 673, 1; setarray .@reward7, 100, 673, 1; sleep2 300; set .@r, rand(100); while( .@r >= getd( ".@reward"+ .@i ) ) .@i++; .@rand_index = rand( 1,( getarraysize( getd( ".@reward"+ .@i ) ) -1 )/2 ) *2 -1; getitem getd( ".@reward"+ .@i +"["+ .@rand_index +"]" ), getd( ".@reward"+ .@i +"["+ (.@rand_index +1) +"]" ); which part should i change sir? Quote
0 pajodex Posted March 5, 2018 Posted March 5, 2018 50 minutes ago, Subzero said: which part should i change sir? Everything is pretty much explained. Please do read the comments in the codebox Quote
Question
Subzero
hello rA,may i ask again about random reward on disguise event
this is my current script https://pastebin.com/xgfupBjE
i like to make a random reward for disguise event example reward
7539,7420,671,672,673
4 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.