Paste #15440: Diff note for paste #15439

Date: 2015/05/02 20:16:38 UTC-07:00
Type: Diff Report

View Raw Paste Download This Paste
Copy Link


-"miner":
+miner:
   type: assignment
   interact scripts:
   - 10 minediamonds
   actions:
     on assignment:
     - trigger name:chat toggle:true
     - trigger name:click toggle:true
     - trigger name:proximity toggle:true
     - equip i@IRON_AXE
-"minediamonds":
+
+minediamonds:
   type: interact
-      1:
-        proximity trigger:
-          - chat "<aqua>Shouldn't you be somewhere?"
+    1:
+      proximity trigger:
+        - chat "<aqua>Shouldn<&sq>t you be somewhere?"
 
-        click trigger:
-          script:
-          - ^random
-            - ^chat "<yellow>Hey <white><player.name><yellow> you should learn how to find diamonds. You up for a quest?"
-            - ^chat "<yellow>Aye, <white><player.name><yellow>, diamonds are out there, you should farm me some. Are you up for it?"
-            - ^chat "<yellow>You know when you've gotten tired. Finish mining for me and I'll reward ya, what do ya say?"
-            - ^chat "<yellow>You going mining? bring me some diamonds back would ya?"
-            - ^chat "<yellow>How are ya? Get me diamonds so I can pay to get food would ya?" }
-          - random {
-            - ^chat "<yellow>Why I'll give ya <gold>$<npc.constant[miningRewardQty]><yellow> <player.money.currency> if you can get <gray><npc.constant[diamondQty]><yellow> back to me."
-            - ^chat "<yellow>Money? you can get <gold>$<npc.constant[miningRewardQty]><yellow> <player.money.currency> for mining <gray><npc.constant[diamondQty]><yellow> diamonds."
-            - ^chat "<yellow>I need them diamonds, if you get <gray><npc.constant[diamondQty]><yellow> diamonds, I'll give <gold>$<npc.constant[miningRewardQty]><yellow> <player.money.currency>." }
+      click trigger:
+        script:
+          - ^random {
+            - chat "<yellow>Hey <white><player.name><yellow> you should learn how to find diamonds. You up for a quest?"
+            - chat "<yellow>Aye, <white><player.name><yellow>, diamonds are out there, you should farm me some. Are you up for it?"
+            - chat "<yellow>You know when you've gotten tired. Finish mining for me and I'll reward ya, what do ya say?"
+            - chat "<yellow>You going mining? bring me some diamonds back would ya?"
+            - chat "<yellow>How are ya? Get me diamonds so I can pay to get food would ya?"
+            }
+          - ^random {
+            - chat "<yellow>Why I'll give ya <gold>$<npc.flag[miningRewardQty]><yellow> <player.money.currency> if you can get <gray><npc.flag[diamondQty]><yellow> back to me."
+            - chat "<yellow>Money? you can get <gold>$<npc.flag[miningRewardQty]><yellow> <player.money.currency> for mining <gray><npc.flag[diamondQty]><yellow> diamonds."
+            - chat "<yellow>I need them diamonds, if you get <gray><npc.flag[diamondQty]><yellow> diamonds, I'll give <gold>$<npc.flag[miningRewardQty]><yellow> <player.money.currency>."
+            }
           - ^narrate "<red>Say<&co>"
           - ^narrate "<blue>Yes<blue> <gray>or<red> No"
-        chat trigger:
-          'Start Questline':
-            Trigger: /Yes/, I'll go hunt for diamonds!
-            script:
-            - flag <player> miningfordiamonds
-            - ^listen block "id:mining Listener" type:break block:DIAMOND_ORE qty:1 script:miningquestcheck
-            - chat "<yellow>Alright <white><player.name><yellow>! Bring me <red><npc.constant[diamondQty]><yellow> diamonds!"
-            - narrate "<red> Mining - Quest Started"
-            - flag player diamondcount:0
+      chat trigger:
+        Start Questline:
+          Trigger: /Yes/, I<&sq>ll go hunt for diamonds!
+          script:
+            - ^flag <player> MiningForDiamonds
+            - ^if <server.flag[advancedmining].as_list> !contains <player> {
+              - ^flag server advancedmining:->:<player>
+              }
+            - chat "<yellow>Alright <white><player.name><yellow>! Bring me <red><npc.flag[diamondQty]><yellow> diamonds!"
+            - title stay:3s 'subtitle:<&a>Mining For Diamonds Finished'
             - ^zap step:2
-            - flag server advancedmining:->:<player>
-          'Deny Questline':
-            Trigger: /No/, I have to go... sheer sheep.
+        Deny Questline:
+          Trigger: /No/, I have to go... sheer sheep.
+          script:
-            script:
             - random {
               - chat "<yellow>Fine, come back when you're man enough."
               - chat "<yellow>Tired of little girls like ya anyway."
-              - chat "<yellow>Go on then, be gone." }
+              - chat "<yellow>Go on then, be gone."
+              }
             - random {
               - narrate "<white><npc.name><red> raises a diamond to inspect it."
               - narrate "<aqua><npc.name><&sq><red> dusts off shoulder and yawns."
-              - narrate "<aqua><npc.name><red>Shakes head and sighs." }
+              - narrate "<aqua><npc.name><red> Shakes head and sighs."
+              }
 
-            'What did you say':
-              trigger: /REGEX:\w+/
-              script:
-              - chat "<white><player.name><yellow>, I don<&sq>t what <&sq><white><context.message><yellow><&sq> means."
+          What did you say:
+            trigger: /REGEX:\w+/
+            script:
+              - chat "<white><player.name><yellow>, I don<&sq>t know what <&sq><white><context.message><yellow><&sq> means."
               - ^narrate "<red>Say<&co>"
               - ^narrate "  <blue>Yes<blue> <gray>or<red> No"
-      2:
-        click trigger:
-          script:
+    2:
+      click trigger:
+        script:
           - chat "<aqua>Why are you back already?"
           - wait 1
-          - chat "<aqua>You only mined me <player.flag[diamondcount].as_int> diamonds."
-      3:
-        click trigger:
-          script:
+          - chat "<aqua>You only mined me <player.flag[MiningForDiamonds].as_int> diamonds."
+    3:
+      click trigger:
+        script:
+          - ^flag player minercooldown duration:2m
+          - ^flag player MiningForDiamonds:!
           - ^take i@diamond qty:25
           - ^random {
-            - ^chat "<yellow>A real good miner ya are <white><player.name><yellow>I may have somethin more for ya tomorrow."
+            - ^chat "<yellow>A real good miner ya are <white><player.name><yellow>. I may have somethin more for ya tomorrow."
             - ^chat "<yellow>Good job, come back tomorrow for another quest."
-            - ^chat "<yellow>Alright, I got nothin else for ya. Come back tomorrow." }
+            - ^chat "<yellow>Alright, I got nothin else for ya. Come back tomorrow."
+            }
           - wait 1
-          - narrate "<Mining - Quest Completed>"
+          - title stay:3s 'subtitle:<&6>Mining For Diamonds Complete'
+          - execute as_server "token add <player.name> 2"
+          - give money qty:2000
           - narrate "<aqua>You have received 2 tokens and $2000 for completing this quest."
-          - execute as_server "token add <player.name> 2"
-          - give money qty: 2000
-          - ^flag player minercooldown duration:2m
           - zap step:4
-      4:
-        click trigger:
-          script:
-            - chat "<yellow>I have no more quests for you at this time, check with another quest giver."
+    4:
+      click trigger:
+        script:
+          - chat "<yellow>I have no more quests for you at this time, check with another quest giver."
 
-"miningquestcheck":
+Quest_MineForDiamonds_World:
-  type: task
-  script:
-  - flag player diamondcount:++
-  - narrate "<red>You mined<player.flag[diamondcount].as_int>/25 diamonds."
-  - if <player.flag[diamondcount].as_int> >= 25 run miningquestreward
-    else run miningquestcontinue
-
-"miningquestcontinue":
-  type: task
-  script:
-  - ^listen block "id:mining Listener" type:break block:DIAMOND_ORE qty:1 script:miningquestcheck
-
-"miningquestreward":
-  type: task
-  script:
-  - narrate "<red>Your Quest should be completed by now, return to spawn and turn in your quest."
-  - zap step:3 "script:minediamonds"
-
-minerworld:
   type: world
   events:
-    on time changes in w@world:
+    on time changes in world:
     - foreach <server.flag[advancedmining].as_list> {
       - if !<%value%.as_player.flag[minercooldown]> && <s@DailyWGQuest.step[%value%]> != "minediamonds" {
-        - zap step:1 script:minediamonds
+        - zap player:<def[value].as_player> step:1 script:minediamonds
         - if <%value%.as_player.is_online> {
           - narrate "<red>The mining quest at spawn is now available."
           }
         }
       }
+
+    on player breaks diamond_ore:
+    - if !<player.has_flag[MiningForDiamonds]> queue clear
+    - run locally delay:1t Count
+
+
+  Count:
+    - ^flag player MiningForDiamonds:++
+    - ^if <player.flag[MiningForDiamonds].as_int> == 25 {
+      - title stay:3s 'subtitle:<&6>Mining For Diamonds Finished'
+      - wait 5s
+      - title stay:3s 'subtitle:<&6>Return to Spawn to Complete'
+      - zap step:3 "script:minediamonds"
+      - queue clear
+      }
+    - ^if <player.flag[MiningForDiamonds].as_int> > 25 {
+      - narrate "<red>Mining for Diamonds is completed. Please return to spawn and cash in your diamonds."
+      }
+    - ^narrate "<red>You mined <player.flag[MiningForDiamonds].as_int>/25 diamonds."
+
+
+
+#