Paste #47867: tokens

Date: 2018/06/14 12:09:12 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


tokenhandlers:
  type: world
  debug: false
  events:
    on player clicks with flytoken:
    - ^take i@flytoken
    - inventory close d:<context.inventory> 
    - playsound <player> sound:CHEST_OPEN volume:0.8 pitch:0.5 
    - execute as_server "lp user <player.name> permission settemp cmi.command.fly true 3d"
    - narrate "You have recieved 3 days of fly permissions!"
    on player clicks with cbtoken1:
    - ^take i@cbtoken1
    - inventory close d:<context.inventory> 
    - playsound <player> sound:CHEST_OPEN volume:0.8 pitch:0.5 
    - execute as_server "adjustbonusclaimblocks <player.name> 100"
    - narrate "You have recieved 100 claimblocks!"
    on player clicks with cbtoken2:
    - ^take i@cbtoken2
    - inventory close d:<context.inventory> 
    - playsound <player> sound:CHEST_OPEN volume:0.8 pitch:0.5 
    - execute as_server "adjustbonusclaimblocks <player.name> 5000"
    - narrate "You have recieved 5000 claimblocks!"
    on player clicks with joblevel1:
    - ^take i@joblevel1
    - inventory close d:<context.inventory> 
    - playsound <player> sound:CHEST_OPEN volume:0.8 pitch:0.5 
    - execute as_server "change me! <player.name> 5"
    - narrate "You have recieved 5 job levels!"
    on player clicks with joblevel2:
    - ^take i@joblevel2
    - inventory close d:<context.inventory> 
    - playsound <player> sound:CHEST_OPEN volume:0.8 pitch:0.5 
    - execute as_server "change me! <player.name> 20"
    - narrate "You have recieved 20 job levels!"
    on player clicks with mcmmolevel1:
    - ^take i@mcmmolevel1
    - inventory close d:<context.inventory> 
    - playsound <player> sound:CHEST_OPEN volume:0.8 pitch:0.5 
    - execute as_server "addlevels <player.name> all 5"
    on player clicks with cratestoken:
    - ^take i@cratestoken
    - inventory close d:<context.inventory> 
    - playsound <player> sound:CHEST_OPEN volume:0.8 pitch:0.5 
    - execute as_server "crate key all common"
    - narrate "Youn all players a common crate key!"


flytoken:
  type: item
  material: i@paper
  enchantments: 
  - ARROW_DAMAGE:1
  display name: "<aqua>Fly Token"
  lore: 
  - Click me to redeem your reward!

cbtoken1:
  type: item
  material: i@paper
  enchantments:
  - ARROW_DAMAGE:1
  display name: "<gold>Claimblocks Token"
  lore: 
  - Click me to redeem your 100 Claimblocks!

cbtoken2:
  type: item
  material: i@paper
  enchantments:
  - ARROW_DAMAGE:1
  display name: "<gold>Claimblocks Token"
  lore: 
  - Click me to redeem your 5000 Claimblocks!
joblevel1:
  type: item
  material: i@paper
  enchantments:
  - ARROW_DAMAGE:1
  display name: "<dark_green>Job Levels Token"
  lore: 
  - Click me to redeem your 5 Job Levels!
joblevel2:
  type: item
  material: i@paper
  enchantments:
  - ARROW_DAMAGE:1
  display name: "<dark_green>Job Levels Token"
  lore: 
  - Click me to redeem your 20 Job Levels!
mcmmolevel1:
  type: item
  material: i@paper
  enchantments:
  - ARROW_DAMAGE
  display name: "<dark_aqua>Mcmmo Levels"
  lore:
  - Click me to redeem your 5 Mcmmo Levels!
cratestoken:
  type: item
  material: i@tripwire_hook
  enchantments:
  - ARROW_DAMAGE
  display name: "<aqua>Common Crate Keys Token"
  lore:
  - Click me to give everyone common crate keys!


giveflytoken:
  type: command
  debug: false
  name: giveflytoken
  description: Run this command to give yourself the fly token. 
  script:
  - if !<player.is_op> queue clear
  - give i@flytoken[flags=hide_enchants]
givecb1token:
  type: command
  debug: false
  name: givecbtoken1
  description: Run this command to give yourself the cb1 token. 
  script:
  - if !<player.is_op> queue clear
  - give i@cbtoken1[flags=hide_enchants]
givecb2token:
  type: command
  debug: false
  name: givecbtoken2
  description: Run this command to give yourself the cb2 token. 
  script:
  - if !<player.is_op> queue clear
  - give i@cbtoken2[flags=hide_enchants]
givejobs1token:
  type: command
  debug: false
  name: givejobstoken1
  description: Run this command to give yourself the jobslevel1 token.
  script:
  - if !<player.is_op> queue clear 
  - give i@joblevel1[flags=hide_enchants]
givejobs2token:
  type: command
  debug: false
  name: givejobstoken2
  description: Run this command to give yourself the jobslevel2 token.
  script:
  - if !<player.is_op> queue clear 
  - give i@joblevel2[flags=hide_enchants]
givemcmmolevel1token:
  type: command
  debug: false
  name: givemcmmotoken1
  description: Run this command to give yourself the jobslevel1 token.
  script:
  - if !<player.is_op> queue clear 
  - give i@mcmmolevel1[flags=hide_enchants]
givecratestoken:
  type: command
  debug: false
  name: givecratestoken
  description: Run this command to give yourself the crates token. 
  script:
  - if !<player.is_op> queue clear
  - give i@cratestoken[flags=hide_enchants]