Paste #31206: Untitled Paste

Date: 2016/03/04 16:28:42 UTC-08:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


SugarRush_events:
  type: world  
  events:  
    on player breaks emerald_ore: 
    - if <context.material.is[==].to[m@emerald_ore]> && <player.item_in_hand.enchantments.contains[loot_bonus_blocks]> {  
      - determine emerald qty:1 
    } 
    - give <player> emerald qty:1 
    on player right clicks with SugarRush:  
    - if <player.has_flag[SugarRushCD]> {   
      - narrate "<&7>Sugar rush is on cooldown for <player.flag[SugarRushCD].expiration.formatted.replace[forever].with[0s]>, please wait!"   
      - queue clear   
    } 
    - if !<player.item_in_hand.lore.contains_text[Charges]> {  
      - queue clear 
    } 
    - define item <player.item_in_hand>  
    - define slot <player.item_in_hand.slot> 
    - define charges "<player.item_in_hand.lore.map_get[Charges].split_by[:]>" 
    - if "<def[charges]>" > 1 { 
      - adjust <def[item]> "lore:<&6><&o>Right-click to active Sugar Rush!|<&a><&o>Cooldown:1m|Charges:<def[charges]>" save:new 
      - take slot:<def[slot]>  
      - give <entry[new].result> slot:<def[slot]> 
    } else { 
      - take <player> <def[item]>   
      - playsound <player> sound:entity_item_break volume:1 
    } 
    - narrate "<&c>***<&f> Sugar rush<&c> ***" 
    - cast <player> speed p:2 duration:10s   
    - flag <player> SugarRushCD duration:1m    
    on player right clicks with StrengthBoost:  
    - determine cancelled passively 
    - if <player.has_flag[SuperStrengthCD]> {  
      - narrate "<&7>Super strength is on cooldown for <player.flag[SuperStrengthCD].expiration.formatted.replace[forever].with[0s]>, please wait!"  
      - queue clear  
    }  
    - flag <player> effect_list:<player.list_effects> 
    - narrate "<&c>***<&f> Super Strength<&c> ***"  
    - define power 1.5 
    - cast <player> INCREASE_DAMAGE power:2 duration:5s 
    - flag <player> SuperStrengthCD duration:1m   
    - wait 5s 
    - cast <player> <player.flag[effect_list]>  
    on player right clicks with MedicKit:  
    - determine cancelled passively 
    - if <player.has_flag[MedicKitCD]> {  
      - narrate "<&7>Medic Kit is on cooldown for <player.flag[MedicKitCD].expiration.formatted.replace[forever].with[0s]>, please wait!"  
      - queue clear  
    } 
    - flag <player> effect_list:<player.list_effects> 
    - flag <player> MedicKitChance:<util.random.int[1].to[5]> 
    - if <player.flag[MedicKitChance]> >= 2 { 
      - cast <player> Regeneration p:2 duration:10s  
      - flag <player> MedicKitCD duration:2m   
      - narrate "<&c>***<&f> Medic Kit<&c> ***"  
      - wait 10s 
      - cast <player> <player.flag[effect_list]> 
    } else { 
      - narrate "<&7><&o>You notice that the medic kit has expired and start feeling nauseous..." 
      - flag <player> MeditKitCD duration:2m 
      - cast <player> Confusion p:1 duration:10s 
    } 
    on player right clicks with Torch_Light:
    - if <player.has_flag[torch_light_prev]> {
      - showfake m@air <context.previous_location> duration:1t 
      - flag player torch_light_prev:! 
    } 
    - if <player.item_in_hand.material.name> == torch && !<context.location.add[0,1,0].material.is_solid> { 
      - showfake m@torch <context.location.add[0,1,0]> duration:1d 
      - flag player torch_light_prev 
    } 
    - determine cancelled
"SugarRush": 
    type: item   
    material: i@sugar   
    display name: <&7><&o>Sugar rush!   
    lore:   
    - <&6><&o>Right-click to active Sugar Rush!  
    - <&a><&o>Cooldown: 1m  
    - <&7><&o>Charges:10 
    enchantments:   
    - durability:1  
    recipe:   
    - i@air|i@air|i@sugar  
    - i@air|i@emerald|i@air   
    - i@air|i@air|i@air   
    shapeless_recipe: i@emerald|i@sugar 
"StrengthBoost":
    type: item 
    material: i@redstone 
    display name: <&c><&o>Power up! 
    lore: 
    - <&6><&o>Right-click to active Power up!  
    - <&a><&o>Cooldown: 1m  
    enchantments:  
    - durability:1 
    recipe:  
    - i@air|i@air|i@redstone 
    - i@air|i@emerald|i@air  
    - i@air|i@air|i@air  
    shapeless_recipe: i@emerald|i@redstone 
"MedicKit":
    type: item 
    material: i@ghast_tear 
    display name: <&c><&o>Medic Kit! 
    lore: 
    - <&6><&o>Right-click to use the Medic Kit!  
    - <&a><&o>Cooldown: 2m  
    - <&7><&o>You have a slight chance of finding an expired Medic kit... 
    enchantments:  
    - durability:1 
    recipe: 
    - i@air|i@air|i@ghast_tear 
    - i@air|i@emerald|i@air 
    - i@air|i@air|i@air 
    shapeless_recipe: i@emerald|i@ghast_tear 
"Cheater":
    type: item 
    material: i@diamondsword
    display name: <&c><&o>Naughty Cheater Slayer! 
    lore: 
    - <&7><&o>This naughty guy used cheats to gain advantage over other users.
    - <&7><&o>Bad boy...
    enchantments:  
    - damage_all:5 
"Torch_light":
    type: item
    material: i@torch
    display name: <&e><&o>Torch Light
    lore:
    - <&6><&o>Right-click to use Torch Light