Time and Weather Changing Wizard with Questline


Author: mythanical
Created: 2013-02-22T08:27:01-0500
Edited: 2013-05-05T11:44:38-0400
Denizen Version: 0.8.8+
Views: 199
Downloads: 939
Likes: 4


WGET
Description: Time and Weather Changing Wizard with Questline
Denizen 0.8.8+

To assign to an NPC, type:
/npc assign --set "Time Changer"

NOTE: This requires an economy to deal with 'money' as a method of reward.

Description:

The wizard requires you to do a few quests and at completion will unlock a service where you can pay him to change the time and weather on the Minecraft server.

This is a complete rewrite of the 'Wizard Quest' script by man_cub so it works with Denizen 0.8.8+ and adds some extra features.

The script demonstrates specifically how 'interact scripts' can be prioritized and requirements checked against each script to see whether it should run or move onto the next one in the priority list. As an alternative to using priorities, you can use 'if' statements but this script doesn't focus on that method.

# Time and Weather Changing Wizard with Questline
#
# To assign to an NPC, type:
# /npc assign --set "Time Changer"
#
#
# @author mythanical
# @script version 0.9
# @denizen v0.8.8+
# @last-updated Feb 28 2013
# @irc EsperNet IRC Network #denizen-dev
# @Minecraft Server - minecraft.geek.nz
# @Donate Bitcoin: 1Fzacc2gZ5NGRMXg5jWP6NcUkWei34xjzt

"Time Changer":
    type: assignment

    default constants:

        # A list of constant values that you should change to suit your needs, for the quest line.
        BonesQty: 9
        RottenFleshQty: 10
        StringQty: 12
        EnderPearlQty: 1
        ChangeTimeFee: 100
        RewardAmount: 300
        Townname: 'Arrowin'
 
        # This is the locations of where the no_damage lightning bolts will hit when the NPC changes the
        # weather to stormy. This is purely for effect and immersion.
        Lightning Bolt One Location: "128,65,250,world"
        Lightning Bolt Two Location: "125,65,255,world"
        Lightning Bolt Three Location: "130,65,252,world"
        Lightning Bolt Four Location: "127,65,248,world"
 
    # Specify the priority of scripts when player interacts with NPC (higher number means higher priority)
    interact scripts:
    - 5 Wizard Quest Status
    - 10 Wizard Quest Line
    - 20 Wizard Quest One
    - 21 Wizard Quest Two
    - 22 Wizard Quest Three
    - 23 Wizard Quest Four
    - 30 Change Time Itself

    actions:
        on assignment:
        # This enables interaction with NPC via clicking, chatting, proximity and damage.
        - trigger name:chat toggle:true
        - trigger name:click toggle:true
        - trigger name:proximity toggle:true
        - trigger name:damage toggle:true
        # Make the NPC so they can be killed by the player. They will respawn a few seconds later.
        - execute as_npc "npc sel <npc.id>"
        - execute as_npc "trait health"
        - execute as_npc "npc vulnerable"
 
        # When a player kills the NPC, narrate something. On my server, I run another script instead that 
        # changes the alignment of the player for commiting such a heinous act.
        on death by player:
        - narrate "<red>You have killed <yellow><npc.name><red>. Are you pleased with yourself?"

"Wizard Quest Line":
    Requirements:
        Mode: All
        List:
        # This script will only run if the flag has none of the values listed below. That is what the 'minus'
        # in front of the FLAGGED means - e.g. where the flag WizardQuest does NOT have a value
        # of 'Completed' etc.
        - -FLAGGED PLAYER 'WizardQuest:Completed'
        - -FLAGGED PLAYER 'WizardQuest:Quest1'
        - -FLAGGED PLAYER 'WizardQuest:Quest2'
        - -FLAGGED PLAYER 'WizardQuest:Quest3'
        - -FLAGGED PLAYER 'WizardQuest:Quest4'
    type: interact
  
    steps:
        1:
            proximity trigger:
                entry:
                    script:
                    # On player entering proximity range, run a script (located further down).
                    - ^runtask "script:Wizard Check Requirements"

            click trigger:
                script:
                # On clicking, run a slightly different script to check requirements before presenting quest stage 1.
                - ^runtask "script:Check Initial Quest Requirement"

            damage trigger:
                script:
                # When you hit the NPC, it will run the script called Warning (further below).
                - ^runtask "script:Warning"

        2:
            chat trigger:
                'Start Questline':
                    Trigger: /Yes/, I am interested. What is my first quest?
                    # This will start the quest line and put a flag against the player to indicate which stage they are at.
                    script:
                    - engage now
                    - chat "Great! Well, the first ingredient I need for my potion is <gold><cons:BonesQty><green> bones! Please bring it to me."
                    - chat "Each ingredient you bring me will earn you <gold><cons:RewardAmount><green> gold coins."
                    - narrate "<red> Stage 1 of 4 started."
                    - ^flag player "WizardQuest:Quest1"
                    - disengage
                'Deny Questline':
                    Trigger: /No/, I am not interested.
                    script:
                    # If the player says 'no', zap them back to the first step in 'Wizard Quest Line' script.
                    - chat "OH that is GRea..oh, what? Ok then. That is fine. Come back when you change your mind."
                    - narrate "<red><npc.name>'s eye twitches."
                    - ^zap 1 "script:Wizard Quest Line"
            
            proximity trigger:
                exit:
                    script:
                    # When player leaves NPC proximity, put them back to step 1 in 'Wizard Quest Line' script.
                    - ^zap 1 "script:Wizard Quest Line"

            click trigger:
                script:
                # I add this here, in case someone clicks the NPC while it's waiting for them to respond with a 'yes' or 'no'
                # so that they don't lose where they are in the dialog.
                - ^runtask "script:Check Initial Quest Requirement"

            damage trigger:
                script:
                - ^runtask "script:Warning"

"Wizard Check Requirements":
    type: task

    script:
    # The if statement checks to see if the player is holding a sword, if they are then deny interaction until
    # player selects another item.
    - if 267|268|272|276 contains <player.item_in_hand.id> runtask "script:Deny Interaction"
      else runtask "script:Wizard General Chat"

"Wizard General Chat":
    type: task

    script:
    # This will pick a random line for the NPC to say when the player enters proximity.
    - ^random 5
    - ^chat "Barack Obama, foreign policy wizard. I just have to laugh."
    - ^chat "We live as ripples of energy in the vast ocean of energy."
    - ^chat "Without silence, there cannot be any real appreciation in life, which is as delicate in its inner fabric as a closed rosebud."
    - ^chat "Nature reflects the moods of the wizard."
    - ^chat "My mind is the knife that cuts the continuum of space and time into neat slices of linear experience."

"Warning":
    type: task

    script:
    # When you hit (damage) the NPC, they will respond with one of the following 5 lines.
    - ^random 5
    - chat "<red>Oucch! <green>Why would you do that? If I die, you WILL regret it!"
    - chat "<red>Aaarrggg! <green>What did I ever do to you? Don't hit me again!"
    - chat "<red>Wha..why are you hurting me? <green>Oh, these cuts..they hurt so much."
    - chat "<red>Please don't hurt me! <green>I have never done anything bad to you!"
    - chat "<red>Owwee! <green>Don't do something now that you will regret later.."

"Deny Interaction":
    type: task

    script:
    # If you are holding a sword, checked by the if statement above, it will respond with
    # one of the following 5 lines.
    - ^random 5
    - ^chat "Oh, why do you come to me armed? Please put away your weapon first."
    - ^chat "Is that a..weapon in your hand? Please don't hurt me! You might regret it."
    - ^chat "<cons:Townname> is a friendly town, please put your weapon away!"
    - ^chat "It's courtesy to put your weapon away while talking to people in <cons:Townname>."
    - ^chat "Why is a weapon necessary here? Are we engaging in some kind of fight?"

"Check Initial Quest Requirement":
    type: task

    script:
    # If player is holding a sword, deny interaction otherwise run the quest dialog script below.
    - if 267|268|272|276 contains <player.item_in_hand.id> runtask "script:Deny Interaction"
      else runtask "script:Wizard Quest Dialog"

"Wizard Quest Dialog":
    type: task

    script:
    # Present player with the option to 'yes' or 'no' to beginning the quest line. Then zap player to 
    # step 2 in 'Wizard Quest Line' above, where it's expecting a chat from the player.
    - chat "Hello there <player.name>! I need some very specific ingredients to make a secret potion."
    - narrate "<npc.name> scratches his chin.."
    - wait 3
    - chat "If you can help me get these ingredients together, I am willing to unlock you a service that only I can provide."
    - wait 4
    - chat "For a mere <gold><cons:ChangeTimeFee><green> gold coins, I will change the TIME or WEATHER! From day to night or night to day! Rain or sunshine, all at your command!"
    - wait 4
    - chat "Now tell me <player.name>, are you interested in unlocking this service?"
    - ^narrate "<red>Say:"
    - ^narrate "  <blue>Yes<blue> <gray>or<red> No"
    - ^zap 2 "script:Wizard Quest Line"

"Wizard Quest One":
    Requirements:
        Mode: All
        List:
        # On interaction with NPC, check to see if player has 1. accepted the quest line and 2. got enough bones.
        - FLAGGED PLAYER 'WizardQuest:Quest1'
        - ITEM 352 QTY:<cons:BonesQty>
    type: interact
    steps:
        1:
            proximity trigger:
                entry:
                    script:
                    # On entering proximity the NPC already 'knows' the player has enough bones.
                    - chat "Great! Seems like you've got what I need."
                    - narrate "<red>Right click <npc.name> to hand him the <gray>Bones."

            click trigger:
                script:
                # NPC takes bones, he rewards you with the 'RewardAmount' you specified in the constant
                # value at the top of the script and enables stage 2 in the quest line.
                - ^engage now
                - ^take 'item:352' qty:<cons:BonesQty>
                - narrate "<red>You hand <npc.name> <cons:BonesQty> bones."
                - wait 1
                - chat "Thank you <player.name>. Here take this."
                - wait 1
                - narrate "<red><npc.name> gives you <gold><cons:RewardAmount><red> coins."
                - give money qty:<cons:RewardAmount>
                - ^flag player "WizardQuest:Quest2"
                - chat "<player.name>, now I will need <gray><cons:RottenFleshQty> rotten flesh<green>! Please bring it to me."
                - wait 1
                - narrate "<red> Stage 2 of 4 started."
                - ^disengage

            damage trigger:
                script:
                - ^runtask "script:Warning"

"Wizard Quest Two":
    Requirements:
        Mode: All
        List:
        # Check if player is on stage 2 of questline and has enough rotten flesh.
        - FLAGGED PLAYER 'WizardQuest:Quest2'
        - ITEM 367 QTY:<cons:RottenFleshQty>
    type: interact
    steps:
        1:
            proximity trigger:
                entry:
                    script:
                    - chat "Great! Seems like you've got what I need."
                    - narrate "<red>Right click <npc.name> to hand him the <gray>Rotten Flesh."

            click trigger:
                script:
                # take flesh, reward player and flag stage 3 of quest line.
                - ^engage now
                - ^take 'item:367' qty:<cons:RottenFleshQty>
                - narrate "<red>You hand <npc.name> <cons:RottenFleshQty> Rotten Flesh."
                - wait 1
                - chat "Thank you <player.name>. Here take this."
                - wait 1
                - narrate "<red><npc.name> gives you <gold><cons:RewardAmount><red> coins."
                - give money qty:<cons:RewardAmount>
                - ^flag player "WizardQuest:Quest3"
                - chat "Next I need you to bring me <gray><cons:StringQty> string<green> from those disgusting hairy spiders!"
                - wait 1
                - narrate "<red> Stage 3 of 4 started."
                - ^disengage

            damage trigger:
                script:
                - ^runtask "script:Warning"

"Wizard Quest Three":
    Requirements:
        Mode: All
        List:
        # Check if player is on stage 3 of questline and has enough string.
        - FLAGGED PLAYER 'WizardQuest:Quest3'
        - ITEM 287 QTY:<cons:StringQty>
    type: interact
    steps:
        1:
            proximity trigger:
                entry:
                    script:
                    - chat "Great! Seems like you've got what I need."
                    - narrate "<red>Right click <npc.name> to hand him the <gray><cons:StringQty> String."

            click trigger:
                script:
                - ^engage now
                - ^take 'item:287' qty:<cons:StringQty>
                - narrate "<red>You hand <npc.name> <cons:StringQty> String."
                - wait 1
                - chat "Thank you <player.name>. Here take this."
                - wait 1
                - narrate "<red><npc.name> gives you <gold><cons:RewardAmount><red> coins."
                - give money qty:<cons:RewardAmount>
                - ^flag player "WizardQuest:Quest4"
                - chat "For the last ingredient, I need <cons:EnderPearlQty> Ender Pearl! Kill an Enderman and bring me one."
                - wait 1
                - narrate "<red> Last Stage started."
                - ^disengage

            damage trigger:
                script:
                - ^runtask "script:Warning"

"Wizard Quest Four":
    Requirements:
        Mode: All
        List:
        - FLAGGED PLAYER 'WizardQuest:Quest4'
        - ITEM 368 QTY:<cons:EnderPearlQty>
    type: interact
    steps:
        1:
            proximity trigger:
                entry:
                    script:
                    - chat "Great! Seems like you've got what I need."
                    - narrate "<red>Right click <npc.name> to hand over the <gray><cons:EnderPearlQty> Ender Pearl."

            click trigger:
                script:
                # Player hands NPC ender pearl/s, NPC flags completion of quest line and also offers the player a 1
                # time free voucher for changing the time or whether. Player can decide to use it now or later.
                - ^engage now
                - ^take 'item:368' qty:<cons:EnderPearlQty>
                - narrate "<red>You hand <npc.name> <cons:EnderPearlQty> Ender Pearl."
                - wait 1
                - chat "Fantastic <player.name>! Here take this."
                - wait 1
                - narrate "<red><npc.name> gives you <gold><cons:RewardAmount><red> coins."
                - give money qty:<cons:RewardAmount>
                - ^flag player "WizardQuest:Completed"
                - ^flag player "WizardVoucher:Unused"
                - chat "Now that you have handed me all the ingredients, I will combine them together!"
                - wait 1
                - narrate "<red><npc.name> mixes the ingredients together."
                - wait 5
                - narrate "<red><npc.name> then applies the mixture to his...face."
                - wait 3
                - chat "Yes! It worked perfectly. Anti-aging cream! I LOOK YOUNG AGAIN!"
                - wait 3
                - chat "Thank you <player.name>! Anyway, I promised you my services. For a small fee,<gold> <cons:ChangeTimeFee><green> coins, I can change TIME and WEATHER for you!"
                - wait 3
                - chat "Your first one is free! Do you want to give it a try now?"
                - ^narrate "<red>Say:"
                - ^narrate "  <blue>Yes<blue> <gray>or<red> No"
                - ^zap 2 "script:Change Time Itself"
                - ^disengage

            damage trigger:
                script:
                - ^runtask "script:Warning"

"Change Time Itself":
    Requirements:
        Mode: All
        List:
        # Check to see if all quests had completed and since this script is the higest priority in the list specified
        # at the top of script, it means the user will from now on only get these dialog options below. The quest line
        # has been completed and cannot be repeated.
        - FLAGGED PLAYER 'WizardQuest:Completed'
    type: interact
    steps:
        1:
            proximity trigger:
                entry:
                    script:
                    - ^runtask "script:Wizard Check Requirements"
                    - narrate "<red>Right click <npc.name> to start TIME and WEATHER change dialog."

            click trigger:
                script:
                # When the player clicks on the NPC, it checks to see if they have a sword, if not it will start
                # the dialog asking the player what they would like to change the time or weather to.
                - ^engage now
                - if 267|268|272|276 contains <player.item_in_hand.id> runtask "script:Deny Interaction"
                  else runtask "script:Change Time Itself Dialog"
                - ^disengage

            damage trigger:
                script:
                - ^runtask "script:Warning"
        2:
            chat trigger:
                'Change Weather Now':
                    Trigger: /Yes/, I would like to try changing TIME or WHEATHER now.
                    script:
                    # This 'yes' and 'no' chat trigger is used if the player decides to try changing the time
                    # or weather immediately after completing the quest line.
                    - engage now
                    - runtask "script:Change Time Itself Dialog"
                    - disengage
                'Do Not Change Weather Now':
                    Trigger: /No/, I do not wish to use my free TIME or WHEATHER change voucher right now.
                    script:
                    - chat "Very well, come back to me once you change your mind!"
                    - ^zap 1 "script:Change Time Itself"

            click trigger:
                script:
                - ^engage now
                - if 267|268|272|276 contains <player.item_in_hand.id> runtask "script:Deny Interaction"
                  else runtask "script:Change Time Itself Dialog"
                - ^disengage

            proximity trigger:
                exit:
                    script:
                    - ^zap 3 "script:Wizard Quest Line"

            damage trigger:
                script:
                - ^runtask "script:Warning"

        3:
            chat trigger:
                'Day Time':
                    Trigger: I would like it to be /day/time please.
                    script:
                    # If player says 'day' it will run the relevant script for changing the time to day. The same
                    # goes for the other chat options below. If the player doesn't have enough money, run the
                    # 'Wizard Not Enough Money' script which will display a simple message.
                    - engage now
                    - if <player.money> >= <cons:ChangeTimeFee> runtask "script:Change to Day"
                      else runtask "script:Wizard Not Enough Money"
                    - disengage
                'Night Time':
                    Trigger: I would like it to be /night/time please.
                    script:
                    - engage now
                    - if <player.money> >= <cons:ChangeTimeFee> runtask "script:Change to Night"
                      else runtask "script:Wizard Not Enough Money"
                    - disengage
                'Sunshine':
                    Trigger: I would like it to be /sunny/ please.
                    script:
                    - engage now
                    - if <player.money> >= <cons:ChangeTimeFee> runtask "script:Change to Sunshine"
                      else runtask "script:Wizard Not Enough Money"
                    - disengage
                'Storm':
                    Trigger: I would like it to be /stormy/ please.
                    script:
                    - engage now
                    - if <player.money> >= <cons:ChangeTimeFee> runtask "script:Change to Storm"
                      else runtask "script:Wizard Not Enough Money"
                    - disengage
                'Rain':
                    Trigger: I would like it to be /rainy/ please.
                    script:
                    - engage now
                    - if <player.money> >= <cons:ChangeTimeFee> runtask "script:Change to Rain"
                      else runtask "script:Wizard Not Enough Money"
                    - disengage
                'No Weather Change':
                    Trigger: /Nevermind/ but thank you.
                    script:
                    - chat "No problem, come see me when you change your mind."

            click trigger:
                script:
                - ^engage now
                - if 267|268|272|276 contains <player.item_in_hand.id> runtask "script:Deny Interaction"
                  else runtask "script:Change Time Itself Dialog"
                - ^disengage

            proximity trigger:
                exit:
                    script:
                    - ^zap 1 "script:Change Time Itself"

            damage trigger:
                script:
                - ^runtask "script:Warning"

"Change Time Itself Dialog":
    type: task

    script:
    # This presents the user will a list of options to change the time and weather. It then 'zaps' them to
    # step 3 in the 'Change Time Itself' script where it's expecting one of the values given below.
    - ^engage now
    - chat "What would you like to change the TIME or WEATHER to?"
    - wait 1
    - ^narrate "<red>Say:"
    - ^narrate "  <blue>Day<blue>     - <gold><cons:ChangeTimeFee> coins"
    - ^narrate "  <blue>Night<blue>    - <gold><cons:ChangeTimeFee> coins"
    - ^narrate "  <green>Sunny<blue>  - <gold><cons:ChangeTimeFee> coins"
    - ^narrate "  <green>Rainy<blue>   - <gold><cons:ChangeTimeFee> coins"
    - ^narrate "  <green>Stormy<blue>  - <gold><cons:ChangeTimeFee> coins"
    - ^narrate "<red>'<blue>Nevermind<red>' if you're not interested in changing the weather."
    - ^disengage
    - ^zap 3 "script:Change Time Itself" 

"Wizard Not Enough Money":
    type: task

    script:
    # This is the script that runs if you don't have enough money to change the time.
    # It then 'zaps' the player back to the first step in the script called 'Change Time Itself'.
    - narrate "<red>Unfortunately you do not have enough money."
    - zap 1 "script:Change Time Itself"

"Change to Day":
    type: task

    script:
    # This is the actual script that 'uses' up the voucher and doesn't charge the player for
    # the first time they use the service, that then executes the command to the server to change
    # time to day, then play a sound effect and announce server wide that the NPC has changed
    # it to day. Zap the player back to the first step in the 'Change Time Itself' script.
    - chat "Day it is!"
    - ^if <flag.p:WizardVoucher> == 'Used' take money qty:<cons:ChangeTimeFee>
      else narrate "<red>You use your <gold>'One Free Time or Weather Change'<red> voucher."
    - ^if <flag.p:WizardVoucher> == 'Used' narrate "<red>You pay <npc.name> <gold><cons:ChangeTimeFee><green> coins."
    - ^flag player "WizardVoucher:Used"
    - wait 2
    - execute as_npc "time set day"
    - ^playsound sound:AMBIENCE_CAVE location:<player.location>
    - announce "<dark_purple><npc.name> cast a mystical spell to change time to DAY!"
    - zap 1 "script:Change Time Itself"

"Change to Night":
    type: task

    script:
    - chat "You know the monsters come out at night, right? Very well. Night it is!"
    - ^if <flag.p:WizardVoucher> == 'Used' take money qty:<cons:ChangeTimeFee>
      else narrate "<red>You use your <gold>'One Free Time or Weather Change'<red> voucher."
    - ^if <flag.p:WizardVoucher> == 'Used' narrate "<red>You pay <npc.name> <gold><cons:ChangeTimeFee><green> coins."
    - ^flag player "WizardVoucher:Used"
    - wait 2
    - execute as_npc "time set night"
    - ^playsound sound:AMBIENCE_CAVE location:<player.location>
    - announce "<dark_purple><npc.name> casts a mystical spell to change time to NIGHT!"
    - zap 1 "script:Change Time Itself"

"Change to Sunshine":
    type: task

    script:
    # Same as above except the server command is slightly different, this time using 'weather' instead of 'time set'.
    - chat "Ahh, nothing quite like the warmth of the sun... to fry zombies! Haha."
    - ^if <flag.p:WizardVoucher> == 'Used' take money qty:<cons:ChangeTimeFee>
      else narrate "<red>You use your <gold>'One Free Time or Weather Change'<red> voucher."
    - ^if <flag.p:WizardVoucher> == 'Used' narrate "<red>You pay <npc.name> <gold><cons:ChangeTimeFee><green> coins."
    - ^flag player "WizardVoucher:Used"
    - wait 2
    - execute as_npc "weather clear"
    - ^playsound sound:AMBIENCE_CAVE location:<player.location>
    - announce "<dark_purple><npc.name> casts a mystical spell to change the weather to SUNSHINE!"
    - zap 1 "script:Change Time Itself"

"Change to Rain":
    type: task

    script:
    - chat "I'm singing in the rain, I'm just siiiingi... oh sorry. Yes, make it rain!"
    - ^if <flag.p:WizardVoucher> == 'Used' take money qty:<cons:ChangeTimeFee>
      else narrate "<red>You use your <gold>'One Free Time or Weather Change'<red> voucher."
    - ^if <flag.p:WizardVoucher> == 'Used' narrate "<red>You pay <npc.name> <gold><cons:ChangeTimeFee><green> coins."
    - ^flag player "WizardVoucher:Used"
    - wait 2
    - execute as_npc "weather rain"
    - ^playsound sound:AMBIENCE_CAVE location:<player.location>
    - announce "<dark_purple><npc.name> casts a mystical spell causing it to RAIN!"
    - zap 1 "script:Change Time Itself"

"Change to Storm":
    type: task

    script:
    # This is where those lightning bolts will hit the locations you set at the top of the script.
    - chat "Thunderbolts of lightning very very frightening! I bring you a STORM!"
    - ^if <flag.p:WizardVoucher> == 'Used' take money qty:<cons:ChangeTimeFee>
      else narrate "<red>You use your <gold>'One Free Time or Weather Change'<red> voucher."
    - ^if <flag.p:WizardVoucher> == 'Used' narrate "<red>You pay <npc.name> <gold><cons:ChangeTimeFee><green> coins."
    - ^flag player "WizardVoucher:Used"
    - wait 2
    - strike no_damage "location:<cons:Lightning Bolt One Location>"
    - strike no_damage "location:<cons:Lightning Bolt Two Location>"
    - strike no_damage "location:<cons:Lightning Bolt Three Location>"
    - strike no_damage "location:<cons:Lightning Bolt Four Location>"
    - execute as_npc "weather thunder"
    - ^playsound sound:AMBIENCE_CAVE location:<player.location>
    - announce "<dark_purple><npc.name> casts a mystical spell to create a STORM!"
    - zap 1 "script:Change Time Itself"

"Wizard Quest Status":
    Requirements:
        Mode: All
        List:
        # This is the lowest priority script and basically runs as a last resort if none of the other scripts have
        # had their requirements met. This script provides the player with feed back on what they still need to do
        # to succesfully complete the other scripts. It'll do so on the player entering proximity or by them clicking
        # the NPC.
        - -FLAGGED PLAYER 'WizardQuest:Completed'
    type: interact
  
    steps:
        1:
            proximity trigger:
                entry:
                    script:
                    - if 267|268|272|276 contains <player.item_in_hand.id> runtask "script:Deny Interaction"
                      else if <flag.p:WizardQuest> == 'Quest1' chat "Hi <player.name>, I'm still eagerly waiting for the <gold><cons:BonesQty><green> bones."
                      else if <flag.p:WizardQuest> == 'Quest2' chat "Hi <player.name>, I'm still eagerly waiting for the <gray><cons:RottenFleshQty> rotten flesh<green>."
                      else if <flag.p:WizardQuest> == 'Quest3' chat "Hi <player.name>, I'm still eagerly waiting for the <gray><cons:StringQty> String."
                      else if <flag.p:WizardQuest> == 'Quest4' chat "Hi <player.name>, I'm still eagerly waiting for the <gray><cons:EnderPearlQty> Ender Pearl."

            click trigger:
                script:
                - if 267|268|272|276 contains <player.item_in_hand.id> runtask "script:Deny Interaction"
                  else if <flag.p:WizardQuest> == 'Quest1' chat "Hi <player.name>, I'm still eagerly waiting for the <gold><cons:BonesQty><green> bones."
                  else if <flag.p:WizardQuest> == 'Quest2' chat "Hi <player.name>, I'm still eagerly waiting for the <gray><cons:RottenFleshQty> rotten flesh<green>."
                  else if <flag.p:WizardQuest> == 'Quest3' chat "Hi <player.name>, I'm still eagerly waiting for the <gray><cons:StringQty> String."
                  else if <flag.p:WizardQuest> == 'Quest4' chat "Hi <player.name>, I'm still eagerly waiting for the <gray><cons:EnderPearlQty> Ender Pearl."




Comments
2013-06-10 16:21:00 - jstmemage:

so two things to note. One for some reason on my server I have to tell the wizard to execute all his commands as op, which actually makes the person asking for the time change run the command as OP. and Two in this and other scripts where you have a Deny Interaction you don't list 283 which is gold sword, On purpose?
2013-08-18 09:27:44 - mythanical:

Not sure why you have to run as_op, probably a question for the Devs or some configuration with your server. In regards to the gold sword, it should be in there! I just accidentally missed out on it. Good observation :)