Jump to content
  • 0

Item Script that gives random effect


DrakeSky

Question


  • Group:  Members
  • Topic Count:  27
  • Topics Per Day:  0.01
  • Content Count:  69
  • Reputation:   0
  • Joined:  03/27/18
  • Last Seen:  

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!

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  18
  • Reputation:   12
  • Joined:  04/10/20
  • Last Seen:  

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

Link to comment
Share on other sites

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.

×
×
  • Create New...