"The Fishermans Shop":
type: assignment
interact scripts:
- 10 Fishermans Shop
default constants:
Cost1: 8.25
Cost2: 900
Cost3: 3
Cost4: 6
Cost5: 6.8
"Fishermans Shop":
type: interact
steps:
"1":
click trigger:
script:
- chat "Hello <player.name>, what would you like to buy?"
- chat "Say <blue>list<green> if you want to see a list of the stuff I have."
- flag player "Shopping"
chat trigger:
"1":
trigger: "/List/"
script:
- chat "<red>The items that I sell are:"
- chat "Fishing Rod $8,25"
- chat "Clock $900,-"
- chat "Stick(4) $3,00"
- chat "String(2) $6,00"
- chat "Torch(4) $6,80"
- zap "step:3"
"2":
trigger: /REGEX:\w+/
script:
- lookclose toggle:true
- chat "Sorry I dont have that."
- chat "Say <blue>list<green> if you want to see a list of the stuff I have."
- wait 3
- lookclose toggle:false
"3":
chat trigger:
"1":
trigger: "A /Fishing/ /Rod/, please."
script:
- lookclose toggle:true
- chat "That will be $8,25, say yes to confirm, say no to decline."
- zap "step:4"
"2":
trigger: "A /Clock/, please."
script:
- lookclose toggle:true
- chat "That will be $900,-, say yes to confirm, say no to decline."
- zap "step:5"
"3":
trigger: "A /Stick/, please."
script:
- lookclose toggle:true
- chat "That will be $3,00, say yes to confirm, say no to decline."
- zap "step:6"
"4":
trigger: "A /String/, please."
script:
- lookclose toggle:true
- chat "That will be $6,00, say yes to confirm, say no to decline."
- zap "step:7"
"5":
trigger: "A /Torch/, please."
script:
- lookclose toggle:true
- chat "That will be $6,70, say yes to confirm, say no to decline."
- zap "step:8"
click trigger:
script:
- zap "step:1"
"4":
chat trigger:
"1":
trigger: "/Yes/, I /accept/."
script:
- if "<player.money>" < "8.25" chat 'You only have <red>$<player.money><green>.'
else runtask "script:GiveFishingRod"
- lookclose toggle:false
- zap 'step:1'
"2":
trigger: "/No/, I /decline/."
script:
- chat "Ok, maybe later?"
- wait 1
- lookclose toggle:false
- zap 'step:1'
"5":
chat trigger:
"1":
trigger: "/Yes/, I /accept/."
script:
- if "<player.money>" < "<cons:Cost2>" chat 'You only have <red>$<player.money><green>.'
else runtask "script:GiveClock"
- lookclose toggle:false
- zap 'step:1'
"2":
trigger: "/No/, I /decline/."
script:
- chat "Ok, maybe later?"
- wait 1
- lookclose toggle:false
- zap 'step:1'
"6":
chat trigger:
"1":
trigger: "/Yes/, I /accept/."
script:
- if "<player.money>" < "<cons:Cost3>" chat 'You only have <red>$<player.money><green>.'
else runtask "script:GiveStick"
- lookclose toggle:false
- zap 'step:1'
"2":
trigger: "/No/, I /decline/."
script:
- chat "Ok, maybe later?"
- wait 1
- lookclose toggle:false
- zap 'step:1'
"7":
chat trigger:
"1":
trigger: "/Yes/, I /accept/."
script:
- if "<player.money>" < "<cons:Cost4>" chat 'You only have <red>$<player.money><green>.'
else runtask "script:GiveString"
- lookclose toggle:false
- zap 'step:1'
"2":
trigger: "/No/, I /decline/."
script:
- chat "Ok, maybe later?"
- wait 1
- lookclose toggle:false
- zap 'step:1'
"8":
chat trigger:
"1":
trigger: "/Yes/, I /accept/."
script:
- if "<player.money>" < "6.8" chat 'You only have <red>$<player.money><green>.'
else runtask "script:GiveTorch"
- lookclose toggle:false
- zap 'step:1'
"2":
trigger: "/No/, I /decline/."
script:
- chat "Ok, maybe later?"
- wait 1
- lookclose toggle:false
- zap 'step:1'
"GiveFishingRod":
type: task
script:
- chat "Here you go, come back any time!"
- ^take money qty:<cons:Cost1>
- give item:Fishing_Rod qty:1
"GiveClock":
type: task
script:
- chat "Here you go, come back any time!"
- ^take money qty:<cons:Cost2>
- give item:Clock qty:1
"GiveStick":
type: task
script:
- chat "Here you go, come back any time!"
- ^take money qty:<cons:Cost3>
- give item:Stick qty:4
"GiveString":
type: task
script:
- chat "Here you go, come back any time!"
- ^take money qty:<cons:Cost4>
- give item:String qty:2
"GiveTorch":
type: task
script:
- chat "Here you go, come back any time!"
- ^take money qty:<cons:Cost5>
- give item:Torch qty:4