Paste #2301: Untitled Paste

Date: 2014/02/24 14:34:51 UTC-08:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19


#An emerald that if held in your inventory will give you a speed boost on sprint.
"speedgem":
  type: item
  material: emerald
  display name: Gem of Speed
  lore:
  - This Gem will enhance your ability
  - to Sprint beyond that of a mortal.

"speedgemscript":
  type: world
  events:
    on player starts sprinting:
    - ^if <player.inventory.contains[speedgem].qty[4]> cast speed d:120 p:3
      else if <player.inventory.contains[speedgem].qty[3]> cast speed d:120 p:2
      else <player.inventory.contains[speedgem].qty[2]> cast speed d:120 p:1
      else <player.inventory.contains[speedgem].qty[1]> cast speed d:120 p:0
    on player stops sprinting:
    - ^if <player.inventory.contains[speedgem]> cast speed remove <player>