Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- "Archmage":
- type: assignment
- interact scripts:
- - 10 Exp
- actions:
- on assignment:
- - teleport npc <npc.anchor[repairmaster]>
- - trigger name:proximity toggle:true
- - trigger name:chat toggle:true
- "Archmage Format":
- type: format
- format: "<gold>Archmage<white><&co> <text>"
- "Exp":
- type: interact
- steps:
- 'Player Seen*':
- proximity trigger:
- entry:
- script:
- - narrate "format:Archmage Format" "Hello apprentice! Want to learn about magic? I'll help you refine your craft. Right click me."
- exit:
- script:
- - narrate "format:Archmage Format" "Have a good one!"
- click trigger:
- script:
- - 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."
- - zap 'step:Payment'
- 'Payment':
- chat trigger:
- 'Confirm':
- trigger: I'd like to pay /REGEX:\d+/ dollar(s).
- script:
- - flag player ChosenAmount:<context.message.replace[regex:\D+]>
- - announce to_console "player.flag[ChosenAmount] equals <player.flag[ChosenAmount]>"
- - announce to_console "player.money is <player.money>"
- - if <player.flag[ChosenAmount].is[OR_LESS].than[<player.money>]>:
- - narrate "format:Archmage Format" "Okay, let's get you trained up."
- - execute as_server "xp give <player.name> <player.flag[ChosenAmount].mul[1]||0>"
- - announce to_console "ran command 'xp give <player.name> <player.flag[ChosenAmount].mul[1]||0>'"
- - take money qty:<player.flag[ChosenAmount]>
- - flag player ChosenAmount:!
- - narrate "format:Archmage Format" "All done. Enjoy."
- - else:
- - narrate "format:Archmage Format" "You don't have that much gold."
- - zap 'step:Player Seen'
- 'Fail':
- trigger: "/REGEX:.+/"
- script:
- - narrate "format:Archmage Format" "I don't think that's a number. Sorry, I can't work with that."
- - zap 'step:Player Seen'
- click trigger:
- script:
- - narrate "format:Archmage Format" "Just say how much money you want to pay for XP, or anything else to cancel."
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement