Jump to content
  • 0

Request> Lucky machine Script


Question

Posted

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

  • 0
Posted
.@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.

  • 0
Posted

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) 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...