CustomQuestGUI: type: assignment actions: on click: - inventory open d:in@QuestGUI - flag server "currentplayeropen:" - inject QuestRewards QuestGUI: type: inventory inventory: chest title: "<&6><&l>Quest Master" size: 63 definitions: border: i@border_item return_button: i@return_button CoalOreQuest: i@CoalOreQuest IronOreQuest: i@IronOreQuest GoldOreQuest: i@GoldOreQuest ResetFlags: i@ResetFlags slots: - "[border] [border] [border] [border] [border] [border] [border] [border] [border]" - "[border] [] [] [] [] [] [] [] [border]" - "[border] [] [CoalOreQuest] [] [IronOreQuest] [] [GoldOreQuest] [] [border]" - "[border] [] [] [] [] [] [ResetFlags] [] [border]" - "[border] [] [] [] [] [] [] [] [border] " - "[border] [] [] [] [] [] [] [] [border] " - "[border] [border] [border] [border] [border] [border] [border] [border] [return_button]" GUI_Inventory_World: type: world events: on player clicks in QuestGUI: - determine cancelled on player clicks ResetFlags in QuestGUI: - Inject ResetQuestFlags - narrate "<&a>All quests have now been reset." on player clicks CoalOreQuest in QuestGUI: - if { - narrate "<&7><&o>You can repeat this quest in " - queue clear } - if { - narrate "<&6>Your Quest log is full! Return your current quests to accept new ones." - queue clear } - flag player Quest_Log_Count:++ - flag player coal_ore_quest - flag player coal_ore_quest_count:0 - narrate "<&6>-=+ Break <&7>64 <&6>Coal Ore +=-" - narrate "<&a> Coal Ores mined!" on player breaks coal_ore: - if { - flag player coal_ore_quest_count:++ - narrate "<&a>You have mined Coal Ore!" - if >= 64 { - narrate "<&6>[Return to the Quest Master]" - flag player gold_ore_quest:! } } on player clicks IronOreQuest in QuestGUI: - if { - narrate "<&7><&o>You can repeat this quest in " - queue clear } - if { - narrate "<&6>Your Quest log is full! Return your current quests to accept new ones." - queue clear } - flag player Quest_Log_Count:++ - flag player iron_ore_quest - flag player iron_ore_quest_count:0 - narrate "<&6>-=+ Break <&f>32<&6>Iron Ore +=-" - narrate "<&a> Iron Ores mined!" on player breaks iron_ore: - if { - flag player iron_ore_quest_count:++ - if <= 32 { - narrate "<&a>You have mined Iron Ore!" } - if >= 32 { - narrate "<&6>[Return to the Quest Master]" - flag player iron_ore_quest:! } } on player clicks GoldOreQuest in QuestGUI: - if { - narrate "<&7><&o>You can repeat this quest in " - queue clear } - if { - narrate "<&6>Your Quest log is full! Return your current quests to accept new ones." - queue clear } - flag player Quest_Log_Count:++ - flag player gold_ore_quest - flag player gold_ore_quest_count:0 - narrate "<&6>-=+ Break <&6>128 <&6>Gold Ore +=-" - narrate "<&a> Gold Ores mined!" on player breaks gold_ore: - if { - flag player gold_ore_quest_count:++ - if <= 128 { - narrate "<&a>You have mined Gold Ore!" } - if >= 128 { - narrate "<&6>[Return to the Quest Master]" - flag player gold_ore_quest:! } } border_item: type: item material: i@black_stained_glass_pane display name: <&sp> return_button: type: item material: i@redstone_torch_on display name: "<&6><&l>Close Menu" ResetFlags: type: item material: i@string display name: "<&a><&l>Reset Quests" lore: - "<&c><&l>NOTE:<&c> Resetting Quests will completely ERASE all Quest data from your profile." - "<&c>ALL quest cooldowns get put on their original timers to prevent abusing this feature." CoalOreQuest: type: item material: i@coal_ore display name: "<&7><&o>Industrialized" lore: - "<&a>Mine <&7>64<&a> Coal Ore!" - "<&6>Cooldown:<&7><&o> " - - "<&6>Quest Reward:<&e><&o> $30,000 IronOreQuest: type: item material: i@iron_ore display name: "<&f><&o>Factorization" lore: - "<&a>Mine <&7>32<&a> Iron Ore!" - "<&6>Cooldown:<&7><&o> " - - "<&6>Quest Reward:<&e><&o> $65,000 GoldOreQuest: type: item material: i@Gold_pickaxe display name: "<&6><&o>Gold Mining!" lore: - "<&a>Mine <&7>6<&a> Gold Ore!" - "<&6>Cooldown:<&7><&o> " - - "<&6>Quest Reward:<&e><&o> $120,000 QuestRewards: type: task script: - if { - if >= 128 { - narrate "<&6>Highlord: <&7><&o>Great work! Here's your reward!" - narrate "<&2>$120,000 has been added to your account." - give money qty:120000 - flag player Quest_Log_Count:! - flag player gold_ore_quest_count:! - flag player gold_ore_quest:! - flag player gold_ore_quest_cooldown duration:48h - inventory close - queue clear } } - if { - if >= 32 { - narrate "<&6>Highlord: <&7><&o>Great work! Here's your reward!" - give xp quantity:800 - narrate "<&2>$65,000 has been added to your account." - give money qty:65000 - flag player Quest_Log_Count:! - flag player iron_ore_quest_count:! - flag player iron_ore_quest:! - flag player iron_ore_quest_cooldown duration:48h - inventory close - queue clear } } - if { - if >= 64 { - narrate "<&6>Highlord: <&7><&o>Great work! Here's your reward!" - narrate "<&2>$30,000 has been added to your account." - give money qty:30000 - flag player Quest_Log_Count:! - flag player coal_ore_quest_count:! - flag player coal_ore_quest:! - flag player coal_ore_quest_cooldown duration:24h - inventory close - queue clear } ResetQuestFlags: type: task script: - flag Quest_Log_Count:! - flag player Quest_Log_Count:! - flag player gold_ore_quest_count:! - flag player gold_ore_quest:! - flag player gold_ore_quest_cooldown duration:48h - flag player iron_ore_quest_count:! - flag player iron_ore_quest:! - flag player iron_ore_quest_cooldown duration:48h - flag player coal_ore_quest_count:! - flag player coal_ore_quest:! - flag player coal_ore_quest_cooldown duration:48h