SHARE
TWEET

Untitled

a guest Sep 15th, 2019 86 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. "Archmage":
  2.     type: assignment
  3.     interact scripts:
  4.    - 10 Exp
  5.     actions:
  6.         on assignment:
  7.        - teleport npc <npc.anchor[repairmaster]>
  8.        - trigger name:proximity toggle:true
  9.         - trigger name:chat toggle:true
  10.    
  11. "Archmage Format":
  12.     type: format
  13.     format: "<gold>Archmage<white><&co> <text>"
  14.  
  15. "Exp":
  16.     type: interact
  17.     steps:
  18.         'Player Seen*':
  19.             proximity trigger:
  20.                 entry:
  21.                     script:
  22.                    - narrate "format:Archmage Format" "Hello apprentice! Want to learn about magic? I'll help you refine your craft. Right click me."
  23.                 exit:
  24.                     script:
  25.                    - narrate "format:Archmage Format" "Have a good one!"
  26.             click trigger:
  27.                 script:
  28.                - narrate "format:Archmage Format" "Alright, let's get you some training. I'll give you 1 XP for $100. Say how much money you want to spend, or anything else to cancel."
  29.                 - zap 'step:Payment'
  30.         'Payment':
  31.             chat trigger:
  32.                 'Confirm':
  33.                     trigger: I'd like to pay /REGEX:\d+/ dollar(s).
  34.                     script:
  35.                    - flag player ChosenAmount:<context.message.replace[regex:\D+]>
  36.                    - announce to_console "player.flag[ChosenAmount] equals <player.flag[ChosenAmount]>"
  37.                     - announce to_console "player.money is <player.money>"
  38.                     - if <player.flag[ChosenAmount].is[OR_LESS].than[<player.money>]>:
  39.                        - narrate "format:Archmage Format" "Okay, let's get you trained up."
  40.                         - execute as_server "xp give <player.name> <player.flag[ChosenAmount].mul[1]||0>"
  41.                         - announce to_console "ran command 'xp give <player.name> <player.flag[ChosenAmount].mul[1]||0>'"
  42.                         - take money qty:<player.flag[ChosenAmount]>
  43.                        - flag player ChosenAmount:!
  44.                         - narrate "format:Archmage Format" "All done. Enjoy."
  45.                     - else:
  46.                        - narrate "format:Archmage Format" "You don't have that much gold."
  47.                     - zap 'step:Player Seen'
  48.                 'Fail':
  49.                     trigger: "/REGEX:.+/"
  50.                     script:
  51.                    - narrate "format:Archmage Format" "I don't think that's a number. Sorry, I can't work with that."
  52.                     - zap 'step:Player Seen'
  53.             click trigger:
  54.                 script:
  55.                - narrate "format:Archmage Format" "Just say how much money you want to pay for XP, or anything else to cancel."
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top