Date: 2014/05/02 16:59:29 UTC-07:00
Type: Denizen Script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# This thing lets players pay for XP in fishing if you have mcMMO
# It was written by Wahrheit and you better believe it
# @author Wahrheit
# @version 1.0
# @last-updated August 7th 2013
"Fishing Master":
type: assignment
interact scripts:
- 10 Fishing
actions:
on assignment:
- teleport <npc> <npc.anchor[fishingmaster]>
- trigger name:proximity toggle:true
- trigger name:chat toggle:true
"Fishing Master Format":
type: format
format: "<gray>Old Fisherman<white><&co> <text>"
"Fishing":
type: interact
steps:
'Player Seen*':
proximity trigger:
entry:
script:
- narrate "format:Fishing Master Format" "Well, hello there. Have you come to learn some tricks about fishing? I can teach you. Right click me."
exit:
script:
- narrate "format:Fishing Master Format" "Thanks for visiting."
click trigger:
script:
- narrate "format:Fishing Master Format" "Alright, let's get you some training. I'll give you 100 Fishing XP for 1 gold. Say how much gold you want to spend, or anything else to cancel."
- zap 'step:Payment'
'Payment':
chat trigger:
'Confirm':
trigger: I'd like to pay /REGEX:\d+/ gold.
script:
- flag player ChosenAmount:<context.message>
- if <context.message.is[OR_MORE].than[<player.money>]>
- narrate "format:Fishing Master Format" "Okay, let's get you trained up."
- execute as_server "addxp <player.name> fishing <context.message.mul[100].as_int>
- execute as_server "money grant <player.name> -<player.flag[ChosenAmount]>"
- narrate "format:Fishing Master Format" "All done. Enjoy."
}
else narrate "format:Fishing Master Format" "You don't have that much gold."
- zap 'step:Player Seen'
'Fail':
trigger: "/REGEX:.+/"
script:
- narrate "format:Fishing Master 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:Fishing Master Format" "Just say how much gold you want to pay for XP, or anything else to cancel."