Jump to content
  • 0

Item Script that gives random effect


Question

Posted

Hi! Scripters,

Need help on this, an item script that once you use an item it is either the player that opens the item will die or the player that opens the item will receive an item.

TIA!

1 answer to this question

Recommended Posts

  • 0
Posted
{ .@rNum = rand(1,100); if(.@rNum < 20) percentheal -100,0; if(.r@Num >= 20) getitem 501,1; },{},{}

This currently has a 20% chance to kill the player, and 80% chance to reward them with an item.

Change the 20 to whatever percent you'd like the cutoff to be for death vs item. Change the item from 501 to whatever you want the item to be.

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