Paste #44784: Diff note for paste #44783

Date: 2017/10/02 12:51:04 UTC-07:00
Type: Diff Report

View Raw Paste Download This Paste
Copy Link


 SartaqAssign:
     type: assignment
 
     default constants:
 
         SartaqOre Quest Cooldown: 1h
 
     interact scripts:
     - 10 SartaqInitiate
     - 20 SartaqDeliver
 
 SartaqInitiate:
     type: interact
     steps:
         1:
             Click Trigger:
                 Script:
-                - if <player.flag[SartaqOre]> == Complete {
-                  - chat "I will be sure to hire you again some time soon!" }
+                - if <player.has_flag[SartaqOre]> == Complete {
+                  - chat "I will be sure to hire you again some time soon!"
-                  else 
                 }
+                  else {
                     - CHAT "Welcome to my smithy, <player.name>."
                     - wait 2
                     - chat "I'm stuck inside today filling a backlog of orders, which could be troublesome."
                     - wait 2 
                     - chat "I don't have time to fill these orders if I have to leave to fetch more ore."
                     - wait 2
                     - chat "I need Iron as well as a bit of Gold."
                     - wait 2 
                     - chat "So, if you have the time, would you be able to gather some ore for me?"
                     - narrate "<red>Say<&co>"
                     - narrate "  <&9>Yes<&9> <&f>or<&9> No"
                   }
             Chat Trigger:
                 1:
                     Trigger: /Yes/, I can do that!
                     Script:
-                    - if <player.flag[SartaqOre]> == Complete {
-                      - chat "I will be sure to hire you again some time soon!"
-                }
+                    - if <player.has_flag[SartaqOre]> == Complete {
+                      - chat "I will be sure to hire you again some time soon!" 
+                    }
                       else {
                         - chat "Wonderful! Alright, let me think..."
                         - wait 2
                         - chat "A quick mining trip should see you with <&6>5 iron <&a>and <&6>2 gold ore <&a>in no time."
                         - wait 2
                         - chat "Make haste and safe mining!"
                         - narrate "<red>A Tall Order - Quest Started"
                         - finish
                         - zap 'step:2'
                       }
                 2:
                     Trigger: /No/, I'm no miner.
                     Script:
                     - chat "That is a shame, come back if you change your mind."
                     - zap 'step:1'
         2:
             click trigger:
                 script:
                 - chat "How goes the mining? Remember I need <&6>5 iron <&a>and <&6>2 gold ore."
 SartaqDeliver:
     Requirements:
         Mode: All
         List: 
         - script FINISHED 'script:SartaqInitiate'
         - ITEM IRON_ORE qty:5
         - ITEM GOLD_ORE qty:2
     type: interact
     steps:
         1:
             click trigger:
                 script:
-                - if <player.flag[SartaqOre]> == Complete {
-                  - chat "I will be sure to hire you again some time soon!"
+                - if <player.has_flag[SartaqOre]> == Complete {
+                  - chat "I will be sure to hire you again some time soon!" 
                 }
                   else {
                     - engage
                     - chat "Ah, you've brought the goods!"
                     - wait 2
                     - narrate "<&6><npc.name> <&f>takes the ore."
                     - take 'item:IRON_ORE' qty:5
                     - take 'item:GOLD_ORE' qty:2
                     - wait 2
                     - chat "I can keep up with my orders now, my utmost thanks to you!"
                     - wait 2
                     - chat "I'm sure I can find you something as payment..."
                     - wait 2
                     - give money qty:25
                     - narrate "<green>You were paid <gold>$25<green>."
                     - execute as_op "level addxp 25"
                     - random {
                         - execute as_op "give <player.name> IRONHELM 1 75 name:Knight_Helm lore:An_iron_helm|found_lying_around|Sartaq's_smithy"
                         - execute as_op "give <player.name> IRONCHESTPLATE 1 100 name:Knight_Chestplate lore:An_iron_chestplate|found_lying_around|Sartaq's_smithy"
                         - execute as_op "give <player.name> IRONLEGGINGS 1 90 name:Knight_Greaves lore:Iron_greaves|found_lying_around|Sartaq's_smithy"
                         - execute as_op "give <player.name> IRONBOOTS 1 75 name:Knight_Sabatons lore:Iron_sabatons|found_lying_around|Sartaq's_smithy"
                     - wait 2
                     - chat "Come back soon, I could use a trustworthy assistant like you!"
                     - flag <player> SartaqOre:Complete "duration:<npc.constant[SartaqOre Quest Cooldown]>"
                     - zap 'step:1' 'script:SartaqInitiate'
                     - disengage
                   }