Jump to content

Question

Posted

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

5 answers to this question

Recommended Posts

Posted (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 by frenzmu06
Posted

@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".

  • Upvote 2

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...