Critica Posted June 17, 2012 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
frenzmu06 Posted June 17, 2012 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
Emistry Posted June 17, 2012 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
frenzmu06 Posted June 17, 2012 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
plankt Posted June 17, 2012 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
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
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.