Paste #5212: Sample Prison Guard Assignment Script

Date: 2014/06/11 06:25:41 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


#
#   Proctor for the Archery Test
#
"paul":
  type: assignment
  debug: false
  actions:
    on assignment:
    - trigger name:chat toggle:true
    - trigger name:click toggle:true
    - lookclose state:true
  interact scripts:
  - 10 MineP

MineP:
  type: interact
  steps:
    Finish:
      click trigger:
        script:
        - if <player.in_group[P]> {
          - chat "You have already ranked up to P, please proceed to the mine or use /warp P."
          } else if !<player.in_group[O]> {
            - chat "You haven't achieved Rank O yet.  Come back later."
            }
            else if <player.money> >= <global.flag[Ranks.P.Amount].as_int> {
            - chat "Are you ready to move on?"
            - chat "Taking your fee to rank up."
            - take money qty:<global.flag[Ranks.P.Amount].as_int>
            - chat "You have now achieved the <gold>Prisoner Rank of P!"
            - announce "<white>Prisoner <gold><player.name><white> has achieved <red> Rank P"
            - wait 1
            - execute as_server "manselect Prison"
            - execute as_server "manuaddsub <player.name> P"
            - chat "Please enter the mine."
            } else {
            - chat "You don't have the required fee to rank up."
            - chat "Come back when you have $<global.flag[Ranks.P.Amount].as_int>."
            }
          }