legtoleg Posted June 1, 2020 Posted June 1, 2020 Hello ! I would like to have a npc where we give items and in return we have a 50% chance of having defined items or having nothing at all. For example, you have to give 10 apples to have a 50% chance of having certain items and 50% of having nothing Can you help me ? Thanks Quote
0 Start_ Posted June 2, 2020 Posted June 2, 2020 .@req_amount = 10; .@req_item_id = 501; if(countitem(.@req_item_id) >= .@req_amount) { delitem .@req_item_id,.@req_amount; if(rand(100) >= 50){ getitem 1599,1; } } Try this. Quote
0 legtoleg Posted June 2, 2020 Author Posted June 2, 2020 Thanks you so much ! it's perfect n fact, i would like them not to choose the item. He click on the pnj, this one checks if has the request items (10 red potion) if he has everything, the npv gives him an item (put in the script list) or nothing 50% chance. Like on chiken ro for the connoisseur (cla machine) Quote
Question
legtoleg
Hello !
I would like to have a npc where we give items and in return we have a 50% chance of having defined items or having nothing at all. For example, you have to give 10 apples to have a 50% chance of having certain items and 50% of having nothing
Can you help me ?
Thanks
3 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.