-Java Version: 1.7.0_65
-CraftBukkit Version: git-Spigot-1616 (MC: 1.7.10)
-Active Plugins (24): 2WorldBorder: 1.8.0, 2DamageIndicatorHolograms: 1.2, 2WorldEdit: 5.6.2, 2VoxelSniper: 5.169.0-SNAPSHOT-jnks309-git7b2b282,
-2Vault: 1.4.1-b436, 2EasyTickets: 1.5.3.1, 2Modifyworld: 1.19.7, 2Multiverse-Core: 2.5-b678,
-2ProtocolLib: 3.5.0-SNAPSHOT, 2HealthBar: 1.8.2, 2PermissionsEx: 1.22.3, 2WorldGuard: 5.9,
-2Essentials: 2.13.1, 2Citizens: 2.0.13-SNAPSHOT (build 1166), 2RPG_Items: 3.0.4,
-2MagicSpells: 3.1, 2Towny: 0.85.0.0, 2Denizen: 0.9.5-SNAPSHOT (build 1515), 2EssentialsSpawn: 2.13.1,
-2Multiverse-Portals: 2.5-b699, 2Sentry: 1.8.2, 2BookShelf: 3.5, 2EnjinMinecraftPlugin: 2.6.8-bukkit,
-2TownyChat: 0.4
-Loaded Worlds (1): AincradFloor1
-Online Players (10): IamKnownAsMartin7(IamKnownAsMartin), sgtwolf123217(sgtwolf12321), BMasterOB12347(BMasterOB1234),
-SpartanCThuett7(SpartanCThuett), Pokenate10967(Pokenate1096), dylan_harvey1007(dylan_harvey100),
-Sotelosc7(Sotelosc), fKantorhr7(Kantorh), DragonBoyX47(DragonBoyX4), Mast3rM1nd28767(Mast3rM1nd2876),
+# Barkeep
+#
+# The barkeep will sell a player a selection of bar drinks and food from
+# the bar menu of which each have a different effect on the player, but
+# there is a limit to the number of drinks the player can consume. When
+# the drink limit has been reached the player will become violently ill
+# and will lose reputation.
+# After buying an item from the bar the player can tip the barkeep and
+# earn some reputation.
+# The bartender can be attacked and will attack back, and after a short
+# period of time the bartender will cool off.
+# If the barkeep is killed he will respawn, attack the player, and
+# the player will lose reputation.
+# If the player is killed the barkeep will cool off.
+# Use the NPC name "BarkeepNPC" if you want it has a bartender skin.
+# I created it for this script or any other bartender script.
+#
+# Todo
+# - Maybe refuse to serve people if they are below a certain rep.
+# DONE - Add an option for the barkeep to describe the menu items.
+# - If the player has high enough reputation a quest will be opened.
+# - Create a questing option if the player tips the barkeep, maybe search
+# for menu ingredients
+# - Randomize the quests
+# DONE (but need to test further) - Engage and disengage NPC during attack. Makes no sense to be
+# attacking and serving drinks.
+#
+#
+# Date Aug10-2013
+# Author: PrimerBlock
+#
+# Attacking timeouts
+# Player damages NPC - NPC attacks for 60 seconds
+# Player kills NPC - NPC responds and attacks for 3600 seconds (1 hour)
+# Player damages NPC and runs away - NPC - NPC attacks for 60 seconds
+
+"TheBarKeep":
+ type: assignment
+
+ interact scripts:
+ - 10 First visit to the barkeep
+ - 20 Welcome back to the bar
+ - 30 Describe a menu item
+ - 40 Buy a bar item
+ - 50 Barkeep on the attack
+
+ default constants:
+ # This is the starting point for the NPC
+ # set it with the command /npc anchor --save BarkeepStart
+ DrinkLimit: 6
+ DrinkLimitWarn: 4
+ BarName: "The Blue Squirrel"
+ NPCclr: "<blue>"
+ # Change this to whatever you want to sell as a drink item 5 is food
+ # Remember you can use constants to change per-npc
+ # /npc cons --set "MenuItem1" --value "Squirrel Blood"
+ MenuItem1: "Zombie Mead"
+ MenuItem1Price: 50
+ MenuItem1Desc: "Zombie Mead is a jigger of fermented zombie drool poured into a dirty glass."
+ MenuItem2: "Apple Cider"
+ MenuItem2Price: 25
+ MenuItem2Desc: "Apple Cider contains freshly pressed digital apples. It may have side effects!"
+ MenuItem3: "Squid Juice"
+ MenuItem3Price: 40
+ MenuItem3Desc: "Squid ink topped with a layer of milled coco beans. Yum!"
+ MenuItem4: "Squirrel Milk"
+ MenuItem4Price: 30
+ MenuItem4Desc: "Fresh squirrel milk shaken with a dollop of fermented spider eye jelly over ice. It<&sq>s a house specialty"
+ MenuItem5: "Ham Sandwich"
+ MenuItem5Price: 60
+ MenuItem5Desc: "Zombie Pigman flank, thinly sliced on freshly baked bread."
+
+ actions:
+ on assignment:
+ - if '<cons:BarkeepStart>' matches location
+ runtask "script:Barkeep Init" instant
+ else runtask 'script:Template Invalid Init' instant
+ - if <flag.n:loaded> true
+ narrate "NPC Template '<npc.name>' is ready to go!"
+ on assignment:
+ - runtask "script:Barkeep Init" instant
+
+ on spawn:
+ - runtask "script:Barkeep Init" instant
+
+ on death:
+ # This statement checks to see if the reputation.yml script is running
+ # if it is the task Halve Rep can be run otherwise it just prints a message.
+ # note - Halve Rep is a task in reputation.yml
+ - if <global.flag[reputation]> != null ^runtask "script:Halve Rep"
+ else chat "<red>I will have my revenge!"
+ # Change AttackedTheBarkeep to a longer number here later like an hour or several hours
+ - ^flag player "AttackedTheBarkeep:true" duration:900
+ - ^execute as_server "denizen save"
+ - random 3
+ - chat "<red>Arrgghhh!"
+ - chat "<red>Blood on my best shirt!"
+ - chat "<red>I<&sq>ll kill ya for that!"
+
+ on damage:
+ - ^engage
+ - ^random 3
+ - chat "<red>Are you looking for a fight?"
+ - chat "<red>I<&sq>m going to take you out!"
+ - chat "<red>You have messed with the wrong guy buddy!"
+ # Change AttackedTheBarkeep to a longer number here later like an hour or several hours
+ - ^flag player "AttackedTheBarkeep:true" duration:60
+ - ^equip hand:276:20 chest:315 boots:317 head:314 legs:317
+ - ^attack
+
+ on exit proximity:
+ - ^disengage
+
+
+
+
+"First visit to the barkeep":
+ type: interact
+ requirements:
+ Mode: All
+ List:
+ - -flagged player "BarVisited:true"
+ - -flagged player "AttackedTheBarkeep:true"
+ steps:
+ 'WelcomeFirstVisitToBar*':
+ click trigger:
+ script:
+ - chat "<cons:NPCclr>I don<&sq>t think I have seen you in here before."
+ - narrate "<cons:NPCclr>Well, welcome visitor to the <blue><cons:BarName><cons:NPCclr>. What will ya have today?"
+ - narrate "<dark_gray><&lb>Hint <&co> menu, describe, buy<&rb>"
+ - flag player "BarVisited:true"
+ proximity trigger:
+ entry radius: 6
+ entry:
+ script:
+ - random 3
+ - chat "<cons:NPCclr>Welcome, come on in!"
+ - chat "<cons:NPCclr>We<&sq>re open, have a seat."
+ - chat "<cons:NPCclr>Welcome visitor, best grub in town."
+ - ^attack stop
+ - ^disengage
+
+"Welcome back to the bar":
+ type: interact
+ requirements:
+ Mode: All
+ List:
+ - flagged player "BarVisited:true"
+ - -flagged player "AttackedTheBarkeep:true"
+ steps:
+ 'VisitingTheBarkeep*':
+ click trigger:
+ script:
+ - random 6
+ - chat "<cons:NPCclr>What can I do ya?"
+ - chat "<cons:NPCclr>How<&sq>s it going?"
+ - chat "<cons:NPCclr>Lil<&sq> hair o<&sq> the squirrel?"
+ - chat "<cons:NPCclr>Hey <light_purple><player.name><cons:NPCclr>! What will ya have?"
+ - chat "<cons:NPCclr>I don<&sq>t think I<&sq>ve seen you in here before??? Ah, I<&sq>m kidding <light_purple><player.name><cons:NPCclr>. I know who you are."
+ - chat "<cons:NPCclr>How<&sq>s it going <light_purple><player.name><cons:NPCclr>? What will you have today?"
+ - narrate "<dark_gray><&lb>Hint <&co> menu, describe, buy<&rb>"
+ proximity trigger:
+ entry radius: 6
+ exit radius: 9
+ entry:
+ script:
+ - lookclose toggle:true
+ - random 3
+ - chat "<cons:NPCclr>Hey <light_purple><player.name><cons:NPCclr>, come on in!"
+ - chat "<cons:NPCclr>Have a seat <light_purple><player.name><cons:NPCclr>."
+ - chat "<cons:NPCclr>Welcome back <light_purple><player.name><cons:NPCclr>."
+ exit:
+ script:
+ - random 3
+ - chat "<cons:NPCclr>See you later <light_purple><player.name><cons:NPCclr>."
+ - chat "<cons:NPCclr>Good seeing ya <light_purple><player.name><cons:NPCclr>."
+ - chat "<cons:NPCclr>Take it easy <light_purple><player.name><cons:NPCclr>."
+ - lookclose toggle:false
+ - flag player BuyABarItem:!
+ - flag player barkeepTip:!
+ - flag player TotalBarTab:!
+ chat trigger:
+ 'bar menu':
+ trigger: "What<&sq>s on the /menu/?"
+ script:
+ - chat "<cons:NPCclr>Here have a look."
+ - runtask "script:Bar Menu"
+ - chat "<cons:NPCclr>Let me know when you want to <light_purple>buy <cons:NPCclr>a menu item."
+ - narrate "<dark_gray><&lb>Hint <&co> menu, describe, buy<&rb>"
+ 'buy from bar':
+ trigger: "I<&sq>m ready to /buy/ from the menu."
+ script:
+ - chat "<cons:NPCclr>Sure, just choose from the menu."
+ - runtask "script:Bar Menu"
+ - narrate "<dark_gray><&lb>Hint <&co> 1 - 5<&rb>"
+ - flag player "BuyABarItem:true" duration:300
+ 'describe menu items':
+ trigger: "Can you /describe/ one of the menu items for me?"
+ script:
+ - chat "<cons:NPCclr>OK, just tell me the item number you want to know more about."
+ - runtask "script:Bar Menu"
+ - narrate "<dark_gray><&lb>Hint <&co> 1 - 5<&rb>"
+ - flag player "DescribeBarMenuItem:true" duration:300
+ 'tip barkeep':
+ trigger: "Thanks for the service! Here<&sq>s a /tip/ for you."
+ script:
+ - if <flag.p:TotalBarTab> == true runtask "script:Calc Bar Tip"
+ - if !<flag.p:TotalBarTab.asint> == true narrate "<red>You need to buy something before you tip. If you walked away before leaving a tip your bar tab total was forgotten."
+ else if <player.money.asint> <= 0 narrate "<red>Oops! Your broke, you don<&sq>t have enough <player.money.currency> to leave a tip!"
+ else if <player.money.asint> < <flag.p:barkeepTip.asint> narrate "<red>Nice gesture, but your broke. You only have <player.money> <player.money.currency>.
+ else runtask "script:Give a tip to the barkeep"
+ ## Working on enabling the barkeep to search for and use a chest as an ice-chest to pull drinks from.
+ ## I think this may be too resource intensive so the search should be a one time event such as when assigning the script.
+ 'What is your location Barkeep':
+ trigger: "What is your /location/ barkeep?"
+ script:
+ - narrate "<red> Debug code... remove before release"
+ - chat "My starting point is <blue><cons:BarkeepStart>"
+ # standing_on now show location instead of materials
+ #- chat "I<&sq>m standing on <blue><npc.location.standing_on>"
+ - chat "I<&sq>m standing at <blue><npc.location>"
+ - chat "I<&sq>m standing at X <blue><npc.location.x.asint>"
+ - chat "I<&sq>m standing at Y <blue><npc.location.y.asint>"
+ - chat "I<&sq>m standing at Z <blue><npc.location.z.asint>"
+ - chat "<blue><util.substr[<thisisatest>].from[1].to[4]>"
+ - chat "I<&sq>m standing in world <blue><npc.location.world.name>"
+ #- chat "<blue><location.block.below>"
+ #- chat "<blue><location.find.blocks[54].within[5]>"
+ #- chat "<blue><location.block.54>"
+ #- chat "<location.block.x>"
+ - chat "Barkeep is standing on material <blue><location[<cons:BarkeepStart>].block.material>"
+
+ 'I cant understand you':
+ trigger: /REGEX:\w+/
+ script:
+ - chat "<cons:NPCclr>Sorry, I don<&sq>t understand <white><player.chat_history><cons:NPCclr>. Why don<&sq>t you just <gold>buy <cons:NPCclr>something?"
+ - narrate "<dark_gray><&lb>Hint <&co> menu, describe, buy<&rb>"
+"Calc Bar Tip":
+ type: task
+ script:
+ - flag player barkeepTip:<flag.p:TotalBarTab>
+ - flag player barkeepTip:*:0.1
+
+"Describe a menu item":
+ type: interact
+ requirements:
+ mode: all
+ list:
+ - flagged player "BarVisited:true"
+ - flagged player "DescribeBarMenuItem:true"
+ steps:
+ 'BarkeepDescribesItems*':
+ click trigger:
+ script:
+ - chat "<cons:NPCclr><player.name> just tell me what item you want to know more about."
+ - runtask "script:Bar Menu"
+ - narrate "<dark_gray><&lb>Hint <&co> 1 - 5<&rb>"
+ chat trigger:
+ 'Menu Item 1':
+ trigger: "What is in item /1/?"
+ script:
+ - chat "<cons:NPCclr> <cons:NPCclr><cons:MenuItem1Desc>"
+ - ^flag player "DescribeBarMenuItem:!"
+ 'Menu Item 2':
+ trigger: "Number /2/ looks good. Tell me about it?"
+ script:
+ - chat "<cons:NPCclr> <cons:NPCclr><cons:MenuItem2Desc>"
+ - ^flag player "DescribeBarMenuItem:!"
+ 'Menu Item 3':
+ trigger: "Item /3/, <cons:MenuItem3>"
+ script:
+ - chat "<cons:NPCclr> <cons:NPCclr><cons:MenuItem3Desc>"
+ - ^flag player "DescribeBarMenuItem:!"
+ 'Menu Item 4':
+ trigger: "Item /4/ looks interesting."
+ script:
+ - chat "<cons:NPCclr> <cons:NPCclr><cons:MenuItem4Desc>"
+ - ^flag player "DescribeBarMenuItem:!"
+ 'Menu Item 5':
+ trigger: "What is item /5/?"
+ script:
+ - chat "<cons:NPCclr> <cons:NPCclr><cons:MenuItem5Desc>"
+ - ^flag player "DescribeBarMenuItem:!"
+ 'We dont serve that':
+ trigger: /REGEX:\w+/
+ script:
+ - chat "<cons:NPCclr>Sorry, we don<&sq>t serve <white><player.chat_history><cons:NPCclr>."
+ - narrate "<dark_gray><&lb>Hint <&co> menu, describe, buy<&rb>"
+ - ^flag player "DescribeBarMenuItem:!"
+"Buy a bar item":
+ type: interact
+ requirements:
+ Mode: All
+ List:
+ - flagged player "BarVisited:true"
+ - flagged player "BuyABarItem:true"
+ steps:
+ 'OrderFromTheBarMenu*':
+ click trigger:
+ script:
+ - chat "<cons:NPCclr>You didn<&sq>t get a menu? Well, here you go <player.name>."
+ - runtask "script:Bar Menu"
+ - narrate "<dark_gray><&lb>Hint <&co> 1 - 5<&rb>"
+
+ chat trigger:
+ 'Menu Item 1':
+ trigger: I<&sq>ll have a number /1/ <cons:MenuItem1> for <cons:MenuItem1Price> <player.money.currency>
+ script:
+ - ^flag player BarItemPrice:<cons:MenuItem1Price> duration:300
+ - ^flag player BarItemName:<cons:MenuItem1> duration:300
+ - ^flag player DrinkEffect:->:confusion
+ - ^flag player DrinkEffect:->:hunger
+ - ^flag player DrinkEffect:->:night_vision
+ - ^if <player.money> > <cons:MenuItem1Price> runtask script:CompleteMenuDrinkOrder
+ else if <player.money> = <cons:MenuItem1Price> runtask script:CompleteMenuDrinkOrder
+ else chat "<red>You don<&sq>t have enough for <cons:MenuItem1>. You need <cons:MenuItem1Price> <player.money.currency> and you only have <player.money> <player.money.currency>."
+ - ^flag player "BarItemPrice:!"
+ - ^flag player "BarFoodItem:!"
+ - ^flag player "BarItemName:!"
+ - ^flag player "DrinkEffect:!"
+ - chat "<cons:NPCclr>Do you want anything else?"
+ - narrate "<dark_gray><&lb>Hint <&co> yes, no, 1 - 5, tip<&rb>"
+ - ^equip hand:0 chest:0 boots:0 head:0 legs:0
+
+ 'Menu Item 2':
+ trigger: I<&sq>ll have a number /2/ <cons:MenuItem2> for <cons:MenuItem2Price> <player.money.currency>
+ script:
+ - flag player BarItemPrice:<cons:MenuItem2Price> duration:300
+ - flag player BarItemName:<cons:MenuItem2> duration:300
+ - flag player DrinkEffect:->:confusion
+ - flag player DrinkEffect:->:heal
+ - flag player DrinkEffect:->:blindness
+ - if <player.money> > <cons:MenuItem2Price> runtask script:CompleteMenuDrinkOrder
+ else if <player.money> = <cons:MenuItem2Price> runtask script:CompleteMenuDrinkOrder
+ else chat "<red>You don<&sq>t have enough for <cons:MenuItem2>. You need <cons:MenuItem2Price> <player.money.currency> and you only have <player.money> <player.money.currency>."
+ - ^flag player "BarItemPrice:!"
+ - ^flag player "BarFoodItem:!"
+ - ^flag player "BarItemName:!"
+ - ^flag player "DrinkEffect:!"
+ - chat "<cons:NPCclr>Do you want anything else?"
+ - narrate "<dark_gray><&lb>Hint <&co> yes, no, 1 - 5, tip<&rb>"
+ - ^equip hand:0 chest:0 boots:0 head:0 legs:0
+
+ 'Menu Item 3':
+ trigger: I<&sq>ll have a number /3/ <cons:MenuItem3> for <cons:MenuItem3Price> <player.money.currency>
+ script:
+ - flag player BarItemPrice:<cons:MenuItem3Price> duration:300
+ - flag player BarItemName:<cons:MenuItem3> duration:300
+ - flag player DrinkEffect:->:confusion
+ - flag player DrinkEffect:->:heal
+ - flag player DrinkEffect:->:poison
+ - if <player.money> > <cons:MenuItem3Price> runtask script:CompleteMenuDrinkOrder
+ else if <player.money> = <cons:MenuItem3Price> runtask script:CompleteMenuDrinkOrder
+ else chat "<red>You don<&sq>t have enough for <cons:MenuItem3>. You need <cons:MenuItem3Price> <player.money.currency> and you only have <player.money> <player.money.currency>."
+ - ^flag player "BarItemPrice:!"
+ - ^flag player "BarFoodItem:!"
+ - ^flag player "BarItemName:!"
+ - ^flag player "DrinkEffect:!"
+ - chat "<cons:NPCclr>Do you want anything else?"
+ - narrate "<dark_gray><&lb>Hint <&co> yes, no, 1 - 5, tip<&rb>"
+ - ^equip hand:0 chest:0 boots:0 head:0 legs:0
+
+ 'Menu Item 4':
+ trigger: I<&sq>ll have a number /4/ <cons:MenuItem4> for <cons:MenuItem4Price> <player.money.currency>
+ script:
+ - flag player BarItemPrice:<cons:MenuItem4Price> duration:300
+ - flag player BarItemName:<cons:MenuItem4> duration:300
+ - flag player DrinkEffect:->:confusion
+ - flag player DrinkEffect:->:jump
+ - flag player DrinkEffect:->:regeneration
+ - if <player.money> > <cons:MenuItem4Price> runtask script:CompleteMenuDrinkOrder
+ else if <player.money> = <cons:MenuItem4Price> runtask script:CompleteMenuDrinkOrder
+ else chat "<red>You don<&sq>t have enough for <cons:MenuItem4>. You need <cons:MenuItem4Price> <player.money.currency> and you only have <player.money> <player.money.currency>."
+ - ^flag player "BarItemPrice:!"
+ - ^flag player "BarFoodItem:!"
+ - ^flag player "BarItemName:!"
+ - ^flag player "DrinkEffect:!"
+ - chat "<cons:NPCclr>Do you want anything else?"
+ - narrate "<dark_gray><&lb>Hint <&co> yes, no, 1 - 5, tip<&rb>"
+ - ^equip hand:0 chest:0 boots:0 head:0 legs:0
+
+ 'Menu Item 5':
+ trigger: I<&sq>ll have a number /5/ - <cons:MenuItem5> for <cons:MenuItem5Price> <player.money.currency>
+ script:
+ - flag player BarItemPrice:<cons:MenuItem5Price> duration:300
+ - flag player BarItemName:<cons:MenuItem5> duration:300
+ - flag player BarFoodItem:->:320 duration:300
+ - flag player BarFoodItem:->:297 duration:300
+ - if <player.money> > <cons:MenuItem5Price> runtask script:CompleteMenuFoodOrder
+ else if <player.money> = <cons:MenuItem5Price> runtask script:CompleteMenuFoodOrder
+ else chat "<red>You don<&sq>t have enough for <cons:MenuItem5>. You need <cons:MenuItem5Price> <player.money.currency> and you only have <player.money> <player.money.currency>."
+ - flag player "BarItemPrice:!"
+ - ^flag player "BarFoodItem:!"
+ - ^flag player "BarItemName:!"
+ - chat "<cons:NPCclr>Do you want anything else?"
+ - narrate "<dark_gray><&lb>Hint <&co> yes, no, 1 - 5, tip<&rb>"
+ - ^equip hand:0 chest:0 boots:0 head:0 legs:0
+
+ 'Still ordering from the bar':
+ trigger: "/Yes/, I want something else from the menu."
+ script:
+ - chat "<cons:NPCclr>OK, here you go."
+ - runtask "script:Bar Menu"
+ - narrate "<dark_gray><&lb>Hint <&co> yes, no, 1 - 5, tip<&rb>"
+
+ 'Im done ordering from the bar':
+ trigger: /no/
+ script:
+ - equip HAND item:0
+ - flag player "BuyABarItem:!"
+ - chat "<cons:NPCclr>OK just let me know when you are ready"
+ - narrate "<dark_gray><&lb>Hint <&co> menu, describe, buy<&rb>"
+ - ^zap "step:VisitingTheBarkeep" "script:Welcome back to the bar"
+
+ 'Cant order that from the menu':
+ trigger: /REGEX:\w+/
+ script:
+ - chat "<cons:NPCclr>Sorry, I don<&sq>t have <white><player.chat_history><cons:NPCclr> on the menu."
+ - narrate "<dark_gray><&lb>Hint <&co> yes, no, 1 - 5, tip<&rb>"
+
+ 'tip barkeep':
+ trigger: "Thanks for the service! Here<&sq>s a /tip/ for you."
+ script:
+ - flag player barkeepTip:<flag.p:TotalBarTab>
+ - flag player barkeepTip:*:0.1
+ # need to first determine if player bought anything and check that they have enough money to tip
+ - if <flag.p:TotalBarTab.asint> >= 0 && <player.money.asint> >= <flag.p:barkeepTip.asint> runtask "script:Give a tip to the barkeep"
+ else narrate "<red>Oops! you don<&sq>t have enough <player.money.currency> or you have not bought anything yet. Try buying something first."
+ # later this may be replaced with paying bar tab script
+ - narrate "<dark_gray><&lb>Hint <&co> yes, no, 1 - 5, tip<&rb>"
+
+"Give a tip to the barkeep":
+ type: task
+ script:
+ - chat "<cons:NPCclr>Hey thanks!"
+ - ^narrate "Current bar tab paid<&co> <flag.p:TotalBarTab> <player.money.currency>."
+ - ^narrate "Tip given to <npc.name><&co> <flag.p:barkeepTip> <player.money.currency>. <gold>Your rep has gone up!"
+ - flag player TotalBarTab:!
+ - flag player barkeepTip:!
+ - flag player reputation:+:1
+ - execute as_server "denizen save"
+
+"Barracho":
+ type: task
+ script:
+ - chat "<red>Hey buddy! You<&sq>re turning <dark_green>green<red>. Don<&sq>t get sick in here!"
+ - cast confusion
+ - narrate "<dark_green>You begin to feel violently ill as your stomach begins to turn!"
+ - cast blindness
+ - cast poison duration:10 power:1
+ - ^flag player reducedRep:<flag.p:reputation>
+ - ^flag player reducedRep:-:10
+ - ^if <flag.p:reputation.asint> <= 0 flag player reputation:0
+ else flag player reputation:<flag.p:reducedRep>
+ - narrate "<red>Getting <dark_green>sick <red>in public does not look good! You lost some reputation."
+ - ^execute as_server "denizen save"
-15:25:08 [INFO] d+- Executing dCommand: DISENGAGE/p@IamKnownAsMartin
- ---------+
-15:25:08 [INFO] e+> 8Executing 'eDISENGAGE8': 8NPC='eAldat/528'
-15:25:08 [INFO] d feFOUND! NPC is in EXITING range: 'Aldat'
-15:25:08 [INFO] e+> 8Executing 'eAction8': 8Type='eOn exit proximity8'
- 8NPC='eAldat/528' 8Container='bTOBQUEST2e(ASSIGNMENT)8'
- 8Player='eIamKnownAsMartin8'
-15:25:08 [INFO] d+- Building action 'On EXIT PROXIMITY' for Aldat/52
- ---------+
-15:25:08 [INFO] d fStarting InstantQueue 'EEIZIIEEZD'...
-15:25:08 [INFO] d+- Executing dCommand: IF/p@IamKnownAsMartin ---------+
-15:25:08 [INFO] d cERROR! fconstant: tags are deprecated! Use
- <npc.constant[]>!
-15:25:08 [INFO] d fFilled tag <cons:QuestName> with 'Health and Happiness'.
-15:25:08 [INFO] d fFilled tag <player.flag[Health and HappinessCompleted]>
- with 'null'.
-15:25:08 [INFO] d cERROR! fconstant: tags are deprecated! Use
- <npc.constant[]>!
-15:25:08 [INFO] d fFilled tag <cons:QuestName> with 'Health and Happiness'.
-15:25:08 [INFO] d fFilled tag <player.flag[Health and HappinessStarted]>
- with 'null'.
-15:25:08 [INFO] d feComparable 1: fComparable='Element(bnullf)',
- Operator='EQUALS', ComparedTo='Boolean(btruef)' e-->
- OUTCOME='false'
-15:25:08 [INFO] d+- Executing dCommand: IF/p@IamKnownAsMartin ---------+
-15:25:08 [INFO] d cERROR in script 'TOBQUEST2'! fWoah! Invalid arguments were
- specified!
-15:25:08 [INFO] e+> [CommandExecuter] fUsage: if [<value>] (!)(<operator>
- <value>) (&&/|| ...) [<commands>] (else <commands>)
-15:25:08 [INFO] d+---------------------+
-15:25:08 [INFO] d+- Executing dCommand: QUEUE/p@IamKnownAsMartin ---------+
-15:25:08 [INFO] d cERROR in script 'TOBQUEST2'! fWoah! Invalid arguments were
- specified!
-15:25:08 [INFO] e+> [CommandExecuter] fe+> MESSAGE follows: f'The specified
- queue could not be found: else'
-15:25:08 [INFO] e+> [CommandExecuter] fUsage: queue (queue:<id>)
- [clear/stop/pause/resume/delay:<#>]
-15:25:08 [INFO] d+---------------------+
-15:25:08 [INFO] d+- Executing dCommand: ZAP/p@IamKnownAsMartin ---------+
-15:25:08 [INFO] e+> 8Executing 'eZAP8': Player='bp@IamKnownAsMartin8'
- 8script='bTOBQUEST2STARTe(INTERACT)8' step='b18'
-15:25:08 [INFO] d fCompleting queue 'EEIZIIEEZD'.
-15:25:08 [INFO] d+- Executing dCommand: ZAP/p@IamKnownAsMartin ---------+
-15:25:08 [INFO] e+> 8Executing 'eZAP8': Player='bp@IamKnownAsMartin8'
- 8script='bTOBQUEST2STARTe(INTERACT)8' step='b28'
-15:25:08 [INFO] d fCompleting queue 'NNEDDNEINE'.
-15:25:09 [INFO] e+> 8Executing 'eAction8': 8Type='eOn enter proximity8'
- 8NPC='eMerchant/768'
- 8Container='bCOMMONTIERMERCHANTe(ASSIGNMENT)8'
- 8Player='eIamKnownAsMartin8'
-15:25:09 [INFO] d+- Building action 'On ENTER PROXIMITY' for Merchant/76
- ---------+
-15:25:09 [INFO] d fStarting InstantQueue 'EDENEEEEZN'...
-15:25:09 [INFO] d+- Executing dCommand: RUN/p@IamKnownAsMartin ---------+
-15:25:09 [INFO] e+> 8Executing 'eRUN8':
- 8Container='bCOMMONTIERMERCHANTe(ASSIGNMENT)8'
- path='bMerchantProximity8' local='btrue8'
-15:25:09 [INFO] d fStarting TimedQueue 'EIDNEIEINZ'...
-15:25:09 [INFO] d+- Executing dCommand: YAML/p@IamKnownAsMartin ---------+
-15:25:09 [INFO] e+> 8Executing 'eYAML8': id='bitemdatabase8' action='bLOAD8'
- filename='bitemdatabase.yml8' value='b8'
-15:25:09 [INFO] d fCompleting queue 'EDENEEEEZN'.
-15:25:10 [INFO] d+- Executing dCommand: YAML/p@IamKnownAsMartin ---------+
-15:25:10 [INFO] e+> 8Executing 'eYAML8': id='bitemdatabase8' action='bSAVE8'
- filename='bitemdatabase.yml8' value='b8'
-15:25:10 [INFO] d+- Executing dCommand: ENGAGE/p@IamKnownAsMartin
- ---------+
-15:25:10 [INFO] e+> 8Executing 'eENGAGE8': 8duration='e0t8'
-15:25:10 [INFO] d+- Executing dCommand: IF/p@IamKnownAsMartin ---------+
-15:25:10 [INFO] d cERROR in script 'COMMONTIERMERCHANT'! fconstant: tags are
- deprecated! Use <npc.constant[]>!
-15:25:10 [INFO] d fFilled tag <cons:i4t> with 'i@LAZULICORE'.
-15:25:10 [INFO] d fFilled tag <player.item_in_hand> with 'i@air'.
-15:25:10 [INFO] d feComparable 1: fComparable='Element(bi@LAZULICOREf)',
- Operator='CONTAINS', ComparedTo='Element(bi@airf)' e-->
- OUTCOME='false'
-15:25:10 [INFO] d+- Executing dCommand: IF/p@IamKnownAsMartin ---------+
-15:25:10 [INFO] d fFilled tag <npc.flag[tradeshout]> with 'null'.
-15:25:10 [INFO] d fFilled tag <player.name> with 'IamKnownAsMartin'.
-15:25:10 [INFO] d feComparable 1: fComparable='Element(bnullf)',
- Operator='EQUALS', ComparedTo='Element(bIamKnownAsMartinf)'
- e--> OUTCOME='false'
-15:25:10 [INFO] d+- Executing dCommand: RANDOM/p@IamKnownAsMartin
- ---------+
-15:25:10 [INFO] e+> 8Executing 'eRANDOM8': 8possibilities='e128' 8choice='e98'
-15:25:10 [INFO] d+- Executing dCommand: CHAT/p@IamKnownAsMartin ---------+
-15:25:10 [INFO] e+> 8Executing 'eCHAT8': 8talkers='eli@n@768'
- 8targets='eli@p@ef029a7f-d94a-4c0a-95f9-a8f9004849ca8'
- message='bWelcome to the market, what can I get you?8'
- range='b5.08'
-15:25:10 [INFO] d fFilled tag <def[talker].name> with 'Merchant'.
-15:25:10 [INFO] d fFilled tag <def[message]> with 'Welcome to the market,
- what can I get you?'.
-15:25:10 [INFO] d fFilled tag <def[talker].name> with 'Merchant'.
-15:25:10 [INFO] d fFilled tag <def[target].name> with 'IamKnownAsMartin'.
-15:25:10 [INFO] d fFilled tag <def[message]> with 'Welcome to the market,
- what can I get you?'.
-15:25:10 [INFO] d+- Executing dCommand: FLAG/p@IamKnownAsMartin ---------+
-15:25:10 [INFO] d fFilled tag <player.name> with 'IamKnownAsMartin'.
-15:25:10 [INFO] e+> 8Executing 'eFLAG8': flag_name='bTRADESHOUT8'
- 8Action/Value='bSET_VALUEe(IamKnownAsMartin)8'
- 8duration='e4000t8' npc='bn@768'
+"CompleteMenuFoodOrder":
+ type: task
+ script:
+ - equip hand:297
+ - chat "<cons:NPCclr>Here<&sq>s your <flag.p:BarItemName>."
+ - equip hand:0
+ - ^runtask 'loop through' "context:ServingBarFood|BarFoodItem|player"
+ - ^take money "qty:<flag.p:BarItemPrice>"
+ - ^narrate "<flag.p:BarItemPrice> <player.money.currency> have been removed from your account."
+ - ^flag player TotalBarTab:+:<flag.p:BarItemPrice>
+ - ^chat "Item Price <flag.p:BarItemPrice>"
+ - ^narrate "Paid bar tab total<&co> <flag.p:TotalBarTab>"
+
+"ServingBarFood":
+ type: task
+ context: yumbarfood
+ script:
+ - give item:<context.yumbarfood> qty:1
+
+"CompleteMenuDrinkOrder":
+ type: task
+ script:
+ - equip hand:384
+ - wait 1
+ - chat "<cons:NPCclr>Here<&sq>s your <flag.p:BarItemName>."
+ - equip hand:374
+ - ^runtask 'loop through' "context:ServingBarDrink|DrinkEffect|player"
+ - ^take money "qty:<flag.p:BarItemPrice>"
+ - ^narrate "<flag.p:BarItemPrice> <player.money.currency> have been removed from your account."
+ - ^flag player TotalBarTab:+:<flag.p:BarItemPrice>
+ - ^flag player TotalDrinksConsumed:+:1 duration:3600
+ - ^if <flag.p:TotalDrinksConsumed.asint> >= <cons:DrinkLimit.asint> runtask "script:Barracho"
+ else if <flag.p:TotalDrinksConsumed.asint> >= <cons:DrinkLimitWarn.asint>
+ chat "<red>Are you getting sick? Maybe you should quit?"
+ else chat "<cons:NPCclr>Enjoy <player.name>."
+
+"ServingBarDrink":
+ type: task
+ context: BarDrinkItem
+ script:
+ - cast <context.BarDrinkItem> duration:20 power:1
+
+"Bar Menu":
+ type: task
+ script:
+ - ^narrate "<light_purple><cons:BarName> Menu"
+ - ^narrate "<green>=========================="
+ - ^narrate "<light_purple>1<cons:NPCclr> - <cons:MenuItem1> -- <gold><cons:MenuItem1Price> <cons:NPCclr><player.money.currency>"
+ - ^narrate "<light_purple>2<cons:NPCclr> - <cons:MenuItem2> -- <gold><cons:MenuItem2Price> <cons:NPCclr><player.money.currency>"
+ - ^narrate "<light_purple>3<cons:NPCclr> - <cons:MenuItem3> -- <gold><cons:MenuItem3Price> <cons:NPCclr><player.money.currency>"
+ - ^narrate "<light_purple>4<cons:NPCclr> - <cons:MenuItem4> -- <gold><cons:MenuItem4Price> <cons:NPCclr><player.money.currency>"
+ - ^narrate "<light_purple>5<cons:NPCclr> - <cons:MenuItem5> -- <gold><cons:MenuItem5Price> <cons:NPCclr><player.money.currency>"
+
+"Barkeep on the attack":
+ type: interact
+ requirements:
+ mode: ALL
+ list:
+ - flagged player AttackedTheBarkeep:true
+ steps:
+ 'AngryBarkeep*':
+ proximity trigger:
+ entry radius: 5
+ exit radius: 6
+ entry:
+ script:
+ - engage
+ - random 3
+ - chat "<red>How dare you show your face around here <light_purple><player.name><red>!"
+ - chat "<red>I<&sq>ll kill you <light_purple><player.name><red>!"
+ - chat "<red>Do you think I am playing around? <light_purple><player.name><red>!"
+ - ^equip hand:276:20 chest:315 boots:317 head:314 legs:317
+ - attack
+ exit:
+ script:
+ - ^chat "<red>Ya better run <light_purple><player.name><red>!"
+ - ^equip hand:0 chest:0 boots:0 head:0 legs:0
+ - ^disengage
+ - ^attack stop
+"Barkeep Init":
+ type: task
+ script:
+ - trigger name:chat toggle:true radius:5
+ - trigger name:click toggle:true radius:5
+ - trigger name:proximity toggle:true
+ - trigger name:damage toggle:true
+ - vulnerable toggle:true
+ - execute as_npc "npc select <npc.id>"
+ - execute as_npc "npc health --respawndelay 30s"
+ - health 50
+ - ^equip hand:0 chest:0 boots:0 head:0 legs:0
+
+"Barkeep Invalid Init":
+ type: task
+ script:
+ - narrate "<red>[X] <white>Oops! Barkeep failed to initialize<&cm> did you create the
+ anchors? Remember you need to create the NPC anchor before assigning the script.
+ Select the npc and run the following command at the location you want the NPC at<&co>
+ <green>/npc anchor --save BarkeepStart"
+ - narrate "<red>Assignment removed."
+ - assignment remove
+ - flag npc loaded:false
-15:25:10 [INFO] d+- Executing dCommand: DISENGAGE/p@IamKnownAsMartin
- ---------+
-15:25:10 [INFO] e+> 8Executing 'eDISENGAGE8': 8NPC='eMerchant/768'
-15:25:10 [INFO] d+- Executing dCommand: DISENGAGE/p@IamKnownAsMartin
- ---------+
-15:25:10 [INFO] e+> 8Executing 'eDISENGAGE8': 8NPC='eMerchant/768'
-15:25:10 [INFO] d fCompleting queue 'EIDNEIEINZ'.