Paste #29878: Untitled Paste

Date: 2016/02/07 20:51:15 UTC-08:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


coinsink_assignment:
  type: assignment 
  debug: false 
  actions: 
    on assignment: 
      - trigger name:click state:true 
      - trigger name:proximity state:true radius:5 
    on enter proximity: 
      - narrate format:coinsinkChat "What can I get for you?" 
      - WAIT 1s 
      - inventory open d:in@coinsink_Inventory

coinsinkChat:
  type: format 
  debug: false 
  format: <&6>Nicholas:<&f> <text>


####### Items

########  Main Menu

coinsink_Inventory:
  type: inventory
  size: 9
  title: Swanky Merchant Goods
  slots:
  - " [] [] [i@pets] [] [i@mounts] [] [i@commands] [] [] "

pets:
  type: item
  material: 383:95
  display name: <&3>Pets
  lore:
  - <&3> For all your pet wants


mounts:
  type: item
  material: saddle
  display name: <&3>Mounts
  lore:
  - <&3> For all your mount wants

commands:
  type: item
  material: redstone
  display name: <&3>Commands
  lore:
  - <&3> For all your command wants

###### Pet Secondary Menu


sheepPet:
  type: item
  material: 383:91
  display name: <&3>Sheep Pet
  lore:
  - <&3> Sheep Pet. 20 K Yora

rabbitPet:
  type: item
  material: 383:101
  display name: <&3>Rabbit Pet
  lore:
  - <&3> Rabbit Pet. 20 K Yora

endermitePet:
  type: item
  material: 383:67
  display name: <&3>Endermite Pet
  lore:
  - <&3> Endermite Pet.  20 K Yora

guardianPet:
  type: item
  material: 383:68
  display name: <&3>Guardian Pet
  lore:
  - <&3> Guardian Pet. 20 K Yora


pet_Inventory:
  type: inventory
  size: 9
  title: Pets
  slots:
  - " [] [i@sheepPet] [] [i@rabbitPet] [] [i@endermitePet] [] [i@guardianPet] [] "


######### Mounts

zombieMount:
  type: item
  material: 383:54
  display name: <&3>Zombie Mount
  lore:
  - <&3> Zombie Mount. 60 K Yora

cowMount:
  type: item
  material: 383:92
  display name: <&3>Cow Mount
  lore:
  - <&3> Cow Mount.  60 K Yora

pigMount:
  type: item
  material: 383:90
  display name: <&3>Pig Mount
  lore:
  - <&3> Pig Mount. 60 K Yora


mount_Inventory:
  type: inventory
  size: 9
  title: Mounts
  slots:
  - " [] [] [i@zombieMount] [] [i@cowMount] [] [i@pigMount] [] [] "


#######  Commands

satchel:
  type: item
  material: 342
  display name: <&3>Satchel
  lore:
  - <&3> 20 K Yora

duffel:
  type: item
  material: 408
  display name: <&3>Duffel
  lore:
  - <&3> 40 K Yora

hat:
  type: item
  material: skull_item
  display name: <&3>Hat
  lore:
  - <&3> 20 K Yora

command_Inventory:
  type: inventory
  size: 9
  title: Commands
  slots:
  - " [] [] [i@satchel] [] [i@duffel] [] [i@hat] [] [] "


########  World Interaction Scripts

coinsink_Control:
  type: world
  debug: false
  events:
    on player clicks in coinsink_Inventory:
      - determine cancelled

    on player drags in coinsink_Inventory:
      - determine cancelled

    on player clicks pets in coinsink_Inventory:
      - determine passively cancelled
      - inventory close
      - inventory open d:in@pet_Inventory

    on player clicks mounts in coinsink_Inventory:
      - determine passively cancelled
      - inventory close
      - inventory open d:in@mount_Inventory

    on player clicks commands in coinsink_Inventory:
      - determine passively cancelled
      - inventory close
      - inventory open d:in@command_Inventory


pet_Control:
  type: world
  debug: false
  events:
    on player clicks in pet_Inventory:
      - determine cancelled

    on player drags in pet_Inventory:
      - determine cancelled

    on player clicks sheepPet in pet_Inventory:
    - if !<player.has_permission[echopet.pet.type.sheep]> {
      - if <player.money> >= 20000 {
        - permission add echopet.pet.type.sheep
        - money take quantity:20000
        - inventory close
        - narrate format:coinsinkChat "Congratulations, you just brought the Sheep Pet!"
      }
      else {
        - inventory close
        - narrate format:coinsinkChat "Im sorry, your too poor.  Get outta my view"
      }
    }
    else {
      - inventory close
      - narrate format:coinsinkChat "What do you think your doing throwing free money my way?  Well, I mean I might take it as a bribe......."
    }

    on player clicks rabbitPet in pet_Inventory:
    - if !<player.has_permission[echopet.pet.type.rabbit]> {
      - if <player.money> >= 20000 {
        - permission add echopet.pet.type.rabbit
        - money take quantity:20000
        - inventory close
        - narrate format:coinsinkChat "Congratulations, you just brought the Rabbit Pet!"
      }
      else {
        - inventory close
        - narrate format:coinsinkChat "Im sorry, your too poor.  Get outta my view"
      }
    }
    else {
      - inventory close
      - narrate format:coinsinkChat "What do you think your doing throwing free money my way?  Well, I mean I might take it as a bribe......."
    }

    on player clicks endermitePet in pet_Inventory:
    - if !<player.has_permission[echopet.pet.type.endermite]> {
      - if <player.money> >= 20000 {
        - permission add echopet.pet.type.endermite
        - money take quantity:20000
        - inventory close
        - narrate format:coinsinkChat "Congratulations, you just brought the Endermite Pet!"
      }
      else {
        - inventory close
        - narrate format:coinsinkChat "Im sorry, your too poor.  Get outta my view"
      }
    }
    else {
      - inventory close
      - narrate format:coinsinkChat "What do you think your doing throwing free money my way?  Well, I mean I might take it as a bribe......."
    }

    on player clicks guardianPet in pet_Inventory:
    - if !<player.has_permission[echopet.pet.type.guardian]> {
      - if <player.money> >= 20000 {
        - permission add echopet.pet.type.guardian
        - money take quantity:20000
        - inventory close
        - narrate format:coinsinkChat "Congratulations, you just brought the Guardian Pet!"
      }
      else {
        - inventory close
        - narrate format:coinsinkChat "Im sorry, your too poor.  Get outta my view"
      }
    }
    else {
      - inventory close
      - narrate format:coinsinkChat "What do you think your doing throwing free money my way?  Well, I mean I might take it as a bribe......."
    }


mount_Inventory_Control:
  type: world
  debug: false
  events:
    on player clicks in mount_Inventory:
      - determine cancelled

    on player drags in mount_Inventory:
      - determine cancelled

    on player clicks zombieMount in mount_Inventory:
    - if !<player.has_permission[echopet.pet.ride.zombie]> {
      - if <player.money> >= 60000 {
        - permission add echopet.pet.type.zombie
        - permission add echopet.pet.ride.zombie
        - money take quantity:60000
        - inventory close
        - narrate format:coinsinkChat "Congratulations, you just brought the Zombie Mount!"
      }
      else {
        - inventory close
        - narrate format:coinsinkChat "Im sorry, your too poor.  Get outta my view"
      }
    }
    else {
      - inventory close
      - narrate format:coinsinkChat "What do you think your doing throwing free money my way?  Well, I mean I might take it as a bribe......."
    }

    on player clicks cowMount in mount_Inventory:
    - if !<player.has_permission[echopet.pet.ride.cow]> {
      - if <player.money> >= 60000 {
        - permission add echopet.pet.type.cow
        - permission add echopet.pet.ride.cow
        - money take quantity:60000
        - inventory close
        - narrate format:coinsinkChat "Congratulations, you just brought the Cow Mount!"
      }
      else {
        - inventory close
        - narrate format:coinsinkChat "Im sorry, your too poor.  Get outta my view"
      }
    }
    else {
      - inventory close
      - narrate format:coinsinkChat "What do you think your doing throwing free money my way?  Well, I mean I might take it as a bribe......."
    }

    on player clicks pigMount in mount_Inventory:
    - if !<player.has_permission[echopet.pet.ride.pig]> {
      - if <player.money> >= 60000 {
        - permission add echopet.pet.type.pig
        - permission add echopet.pet.ride.pig
        - money take quantity:60000
        - inventory close
        - narrate format:coinsinkChat "Congratulations, you just brought the Pig Mount!"
      }
      else {
        - inventory close
        - narrate format:coinsinkChat "Im sorry, your too poor.  Get outta my view"
      }
    }
    else {
      - inventory close
      - narrate format:coinsinkChat "What do you think your doing throwing free money my way?  Well, I mean I might take it as a bribe......."
    }


command_Inventory_Control:
  type: world
  debug: false
  events:
    on player clicks in command_Inventory:
      - determine cancelled

    on player drags in command_Inventory:
      - determine cancelled

    on player clicks satchel in command_Inventory:
    - if !<player.has_permission[denizen.backpack.satchel]> {
      - if <player.money> >= 20000 {
        - permission add denizen.backpack.satchel
        - money take quantity:20000
        - inventory close
        - narrate format:coinsinkChat "Congratulations, you just brought yourself a pretty nice Satchel!"
      }
      else {
        - inventory close
        - narrate format:coinsinkChat "Im sorry, your too poor.  Get outta my view"
      }
    }
    else {
      - inventory close
      - narrate format:coinsinkChat "What do you think your doing throwing free money my way?  Well, I mean I might take it as a bribe......."
    }

    on player clicks duffel in command_Inventory:
    - if !<player.has_permission[echopet.pet.ride.cow]> {
      - if <player.money> >= 40000 {
        - permission add denizen.backpack.duffel
        - money take quantity:40000
        - inventory close
        - narrate format:coinsinkChat "Congratulations, you just brought a Duffel. Wow, you can fit a body in there..... I dont recommend it though."
      }
      else {
        - inventory close
        - narrate format:coinsinkChat "Im sorry, your too poor.  Get outta my view"
      }
    }
    else {
      - inventory close
      - narrate format:coinsinkChat "What do you think your doing throwing free money my way?  Well, I mean I might take it as a bribe......."
    }

    on player clicks hat in command_Inventory:
    - if !<player.has_permission[essentials.hat]> {
      - if <player.money> >= 20000 {
        - permission add essentials.hat
        - money take quantity:20000
        - inventory close
        - narrate format:coinsinkChat "Congratulations, you just brought your self a pretty fancy hat!"
      }
      else {
        - inventory close
        - narrate format:coinsinkChat "Im sorry, your too poor.  Get outta my view"
      }
    }
    else {
      - inventory close
      - narrate format:coinsinkChat "What do you think your doing throwing free money my way?  Well, I mean I might take it as a bribe......."
    }