Paste #47351: Untitled Paste

Date: 2018/05/04 20:49:41 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


Wanderer_assignment:
  type: assignment
  actions:
    on assignment:
    - trigger name:chat state:true radius:100
  interact scripts:
  - 1 Wanderer
#----------------------------------
#  Start of the quest scripts, I
#  would not advise editing any-
#  thing beyond here if you are not
#  an experienced scripter.
#----------------------------------
Wanderer:
  Type: Interact
  Steps:
    1:
      Click trigger:
            Script:
            - ^engage
            - chat "Hey Stranger, need help?"
            - chat "It's <red>3333<white> gold"
            - narrate "<white>You can say, <green>yes<white> or <red>no<white>."
            - ^disengage
      Chat Trigger:
        1:
           Trigger: /yes/
           Script:
           - if <player.money> >= "3333" {
             - chat "Alright!!"
             - money take quantity:3333
             - narrate "<&c>A NPC joins you, 3333 gold removed."
             - EXECUTE as_op "npc create Companion --trait sentinel" (silent)
             - EXECUTE as_op "npc skin Parkour" (silent)
             - EXECUTE as_op "sentinel addtarget MONSTERS" (silent)
             - EXECUTE as_op "sentinel damage 10" (silent)
             - EXECUTE as_op "sentinel health 175" (silent)
             - EXECUTE as_op "sentinel speed 1.39" (silent)
             - EXECUTE as_op "sentinel respawntime 5" (silent)
             - EXECUTE as_op "npc assign script --set bodyguard1a" (silent)
             - narrate "right click your bodyguard to give him orders!<delay=120>" (silent)
             } else {
             - narrate "<&c>You do not have enough money!"
             }
        2:
           Trigger: /no/ 
           Script:
           - ^engage
           - chat "As you want."
           - ^disengage
I made my first script
But one thing is I want to set a value that if player have that value stored on him
he cant buy another bodyguard
with IF function
What would you do?