Subzero Posted March 4, 2018 Group: Members Topic Count: 30 Topics Per Day: 0.01 Content Count: 60 Reputation: 0 Joined: 07/25/16 Last Seen: August 5, 2021 Share 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 Link to comment Share on other sites More sharing options...
1 pajodex Posted March 5, 2018 Group: Members Topic Count: 79 Topics Per Day: 0.03 Content Count: 439 Reputation: 173 Joined: 12/12/17 Last Seen: April 14 Share 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 Link to comment Share on other sites More sharing options...
0 Subzero Posted March 5, 2018 Group: Members Topic Count: 30 Topics Per Day: 0.01 Content Count: 60 Reputation: 0 Joined: 07/25/16 Last Seen: August 5, 2021 Author Share 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 Link to comment Share on other sites More sharing options...
0 pajodex Posted March 5, 2018 Group: Members Topic Count: 79 Topics Per Day: 0.03 Content Count: 439 Reputation: 173 Joined: 12/12/17 Last Seen: April 14 Share 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 Link to comment Share on other sites More sharing options...
0 Subzero Posted March 5, 2018 Group: Members Topic Count: 30 Topics Per Day: 0.01 Content Count: 60 Reputation: 0 Joined: 07/25/16 Last Seen: August 5, 2021 Author Share Posted March 5, 2018 thanks sir Quote Link to comment Share on other sites More sharing options...
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
Link to comment
Share on other sites
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.