Advertisement
nfell2009

Skript - ModifyHealth

Jun 1st, 2014
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 0.87 KB | None | 0 0
  1. command /health <text> <text>:
  2.     trigger:
  3.         if arg 1 is not set:
  4.             message "&4You must give the health you want!"
  5.         else if arg 1 is "0" or "1" or "2" or "3" or "4" or "5" or "6" or "7" or "8" or "9" or "10" or "11" or "12" or "13" or "14" or "15" or "16" or "17" or "18" or "19" or "20":
  6.             if arg 2 is "me" or "player":
  7.                 set {_h} to arg 1 parsed as integer
  8.                 set the health of the player to {_h}
  9.                 message "&aYour health is now: %arg 1%"
  10.             else if arg 2 is "mob":
  11.                 if target is an entity:
  12.                     set {_h} to arg 1 parsed as integer
  13.                     set the health of the targeted entity to {_h}
  14.                     message "&aYou set the %targeted entity%'s health to %arg 1%"
  15.                 else:
  16.                     message "&4You can only set health of an entity!"
  17.             else:
  18.                 message "&4Unknown type!"
  19.         else:
  20.             message "&4You either gave a number too big (max 20) or too small (min 0) or not a number!"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement