Critica Posted June 17, 2012 Group: Members Topic Count: 82 Topics Per Day: 0.02 Content Count: 223 Reputation: 4 Joined: 02/23/12 Last Seen: March 28, 2018 Share Posted June 17, 2012 Sorry this is a repost, i couldnt find my old topic.. how can i make this more than 1 item again, and more than 1 (% chance) for ex. item 1,2,3,4,5 (1% chance) item 6,7,8,9 (3% chance) - script OnNPCKillEvent -1,{ end; OnNPCKillEvent: switch(rand(3)){ case 1: getitem 7227, 1; end; default: end; } end; } thanks you Quote Link to comment Share on other sites More sharing options...
frenzmu06 Posted June 17, 2012 Group: Members Topic Count: 16 Topics Per Day: 0.00 Content Count: 326 Reputation: 47 Joined: 04/01/12 Last Seen: February 1, 2023 Share Posted June 17, 2012 (edited) - script OnNPCKillEvent -1,{ end; OnNPCKillEvent: switch(rand(100)){ case 1: getitem 7227, 1; getitem ID, 1; getitem ID, 1; getitem ID, 1; getitem ID, 1; end; default: end; } end; } Edited June 17, 2012 by frenzmu06 Quote Link to comment Share on other sites More sharing options...
Emistry Posted June 17, 2012 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: 8 hours ago Share Posted June 17, 2012 it is better to do it in this way http://upaste.me/c3c4494a804a6b2 @frenzmu06 ur script give all items with the rate of 1% only. because you are using the switch-case... Quote Link to comment Share on other sites More sharing options...
frenzmu06 Posted June 17, 2012 Group: Members Topic Count: 16 Topics Per Day: 0.00 Content Count: 326 Reputation: 47 Joined: 04/01/12 Last Seen: February 1, 2023 Share Posted June 17, 2012 (edited) @Emistry yes all with 1%, i thought he just say 3% as example and he want 1% for all Edited June 17, 2012 by frenzmu06 Quote Link to comment Share on other sites More sharing options...
plankt Posted June 17, 2012 Group: Members Topic Count: 7 Topics Per Day: 0.00 Content Count: 130 Reputation: 43 Joined: 12/11/11 Last Seen: July 16, 2017 Share Posted June 17, 2012 @Emistry: The chances are actually 1%, 2% and 7% for your code. The else if makes sure that lower numbers are already counted for. For 1%, 3% and 10%, you should set them to "< 1", "< 4" and "< 14". 2 Quote Link to comment Share on other sites More sharing options...
Critica Posted June 17, 2012 Group: Members Topic Count: 82 Topics Per Day: 0.02 Content Count: 223 Reputation: 4 Joined: 02/23/12 Last Seen: March 28, 2018 Author Share Posted June 17, 2012 thank you guys! Quote Link to comment Share on other sites More sharing options...
Question
Critica
Sorry this is a repost, i couldnt find my old topic..
how can i make this more than 1 item again, and more than 1 (% chance)
for ex.
item 1,2,3,4,5 (1% chance)
item 6,7,8,9 (3% chance)
thanks you
Link to comment
Share on other sites
5 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.