Mushnar's Mostly Safe Mining by mushnar
Description from the author:
####################### WARNING ########################
# Verify the following Razor settings
# Open Razor > Filters tab > Text & Messages tab
# ### UNCHECK Filter repeating system messages
# ### UNCHECK Filter repeating Razor messages
# ### UNCHECK Filter repeating overhead messages
########################################################
##################### CHANGE LOG ######################
# VERSION 1.7
# ## Added additional non-hostile mobs to the peacemaking ignore list
# ## Changed the automatically gate when hostiles detected distance to 50 steps after a few "accidents"
# ## Added the stone grate forge object to the forge detection
# ### Forges inside the quarry are usable to smelt ore manually, but aren't able to be detected by scripts due to lacking an item ID with >info
########################################################
##################### SCRIPT SETUP #####################
# CUSTOMIZE THE FOLLOWING VARIABLES
# ## house_door_id_number_when_open
# ## house_door_serial_number
# ## resource_stockpile_serial_number
# ## storage_container_id_number
# ALL OTHER VARIABLES SET 1 TO ENABLE 0 TO DISABLE
# REPLACE "HOME RUNE NAME" ON LINES 301, 397, 409, 669, 680, 691
########################################################
@clearsysmsg
@clearignore
@setvar! automatically_gate_when_overweight 0
@setvar! weight_remaining_limit 30
@setvar! automatically_gate_when_detecting_hostile_any_distance 0
@setvar! automatically_gate_when_detecting_hostile_within_50_steps 1
@setvar! track_only_red_players 0
@setvar! automatically_detect_popped_pouches 1
@setvar! automatically_gate_when_pouch_popped 0
@setvar! warn_if_low_pickaxe_count 1
@setvar! low_pick_axe_count 2
@setvar! stop_script_if_no_runebook 1
@setvar! storage_container_id_number 2473
@setvar! automatically_gate_when_large_amount_of_ingots 0
@setvar! automatically_gate_when_large_amount_of_ore 0
@setvar! ingots_gate_amount 1250
@setvar! ore_gate_amount 1000
@setvar! automatically_smelt_ore 1
@setvar! automatically_restock_at_resource_stockpile 1
@setvar! always_display_tracking_window 1
@setvar! use_peacemaking 1
@setvar! detect_hidden_during_warmode 0
@setvar! automatically_close_house_door 1
@setvar! house_door_id_number_when_open 1664
@setvar! house_door_serial_number 0x4A6A2E7F
@setvar! resource_stockpile_serial_number 0x420A5B19
@setvar! automatically_bandage_player 1
@setvar! automatically_drink_potions 1
@setvar! automatically_open_potion_satchel 1
@setvar! automatically_drink_healing_potion 1
@setvar! automatically_drink_cure_potion 1
@setvar! health_value_to_drink_healing_potion 75
@setvar! health_value_to_drink_cure_potion 75
@setvar! potion_error_message_frequency 3000
@setvar! overhead_message_frequency 10000
@setvar! error_message_frequency 3000
@setvar! forge_overhead_ping_frequency 4000
@setvar! tracking_hostile_overhead_alert_frequency 5000
if not timerexists "skill_cooldown_timer"
createtimer "skill_cooldown_timer"
settimer "skill_cooldown_timer" 10000
endif
if not timerexists "forge_ping"
createtimer "forge_ping"
settimer "forge_ping" forge_overhead_ping_frequency
endif
if not timerexists "overhead_cooldown"
createtimer "overhead_cooldown"
settimer "overhead_cooldown" overhead_message_frequency
endif
if not timerexists "tracking_hostile_overhead_alert"
createtimer "tracking_hostile_overhead_alert"
settimer "tracking_hostile_overhead_alert" tracking_hostile_overhead_alert_frequency
endif
if not timerexists "error_overhead_cooldown"
createtimer "error_overhead_cooldown"
settimer "error_overhead_cooldown" error_message_frequency
endif
removetimer "potion_error_message_cooldown"
if not timerexists "potion_error_message_cooldown"
createtimer "potion_error_message_cooldown"
settimer "potion_error_message_cooldown" potion_error_message_frequency
endif
removelist animalsIgnoreList
createlist animalsIgnoreList
pushlist animalsIgnoreList "a plover"
pushlist animalsIgnoreList "a sheep"
pushlist animalsIgnoreList "a frenzied ostard"
pushlist animalsIgnoreList "a tundra ostard"
pushlist animalsIgnoreList "a desert ostard"
pushlist animalsIgnoreList "a forest ostard"
pushlist animalsIgnoreList "a finch"
pushlist animalsIgnoreList "a sparrow"
pushlist animalsIgnoreList "a towhee"
pushlist animalsIgnoreList "a lapwing"
pushlist animalsIgnoreList "a silverback"
pushlist animalsIgnoreList "a crow"
pushlist animalsIgnoreList "a woodpecker"
pushlist animalsIgnoreList "a horse"
pushlist animalsIgnoreList "a swift"
pushlist animalsIgnoreList "a skylark"
pushlist animalsIgnoreList "a hawk"
pushlist animalsIgnoreList "a chickadee"
pushlist animalsIgnoreList "a cat"
pushlist animalsIgnoreList "a dog"
pushlist animalsIgnoreList "a black bear"
pushlist animalsIgnoreList "a brown bear"
pushlist animalsIgnoreList "a bull"
pushlist animalsIgnoreList "a cow"
pushlist animalsIgnoreList "a chicken"
pushlist animalsIgnoreList "a bird"
pushlist animalsIgnoreList "an eagle"
pushlist animalsIgnoreList "a nuthatch"
pushlist animalsIgnoreList "an elk"
pushlist animalsIgnoreList "a great hart"
pushlist animalsIgnoreList "a kingfisher"
pushlist animalsIgnoreList "a hind"
pushlist animalsIgnoreList "a llama"
pushlist animalsIgnoreList "a sand crab"
pushlist animalsIgnoreList "a pig"
pushlist animalsIgnoreList "a polar bear"
pushlist animalsIgnoreList "a walrus"
pushlist animalsIgnoreList "a cougar"
pushlist animalsIgnoreList "a goat"
pushlist animalsIgnoreList "a raven"
pushlist animalsIgnoreList "a magpie"
pushlist animalsIgnoreList "a warbler"
pushlist animalsIgnoreList "a tern"
pushlist animalsIgnoreList "a nightingale"
pushlist animalsIgnoreList "a wren"
pushlist animalsIgnoreList "red rubble"
pushlist animalsIgnoreList "a spirit wolf"
pushlist animalsIgnoreList "a spirit sabertus"
pushlist animalsIgnoreList "a death asp"
pushlist animalsIgnoreList "a death adder"
pushlist animalsIgnoreList "a wisp"
pushlist animalsIgnoreList "a bison"
pushlist animalsIgnoreList "a wolf"
pushlist animalsIgnoreList "a cuckoo"
pushlist animalsIgnoreList "a starling"
if use_peacemaking = 1
if timer "skill_cooldown_timer" >= 10000
skill "Peacemaking"
waitfortarget 1000
endif
if insysmsg "What instrument shall you play"
if findtype "standing harp|sackbut|bamboo flute|tambourine|drum|lute|lap harp|gemshorn|hurdy gurdy|psaltery|shawm|vielle" as instrument
target instrument
settimer "skill_cooldown_timer" 0
else
overhead "NO INSTRUMENT" 33
overhead "NO INSTRUMENT" 33
overhead "NO INSTRUMENT" 33
overhead "NO INSTRUMENT" 33
overhead "NO INSTRUMENT" 33
endif
elseif insysmsg "What do you wish to pacify"
hotkey "Cancel Current Target"
settimer "skill_cooldown_timer" 10000
wait 500
endif
endif
if not findtype "runebook" backpack and not findtype "runetome" backpack
overhead "NO RUNEBOOK" 1288
overhead "NO RUNEBOOK" 1288
overhead "NO RUNEBOOK" 1288
overhead "NO RUNEBOOK" 1288
overhead "NO RUNEBOOK" 1288
if stop_script_if_no_runebook = 1
stop
endif
endif
if warn_if_low_pickaxe_count = 1
if counttype "pickaxe" =< low_pick_axe_count
if timer "error_overhead_cooldown" >= error_message_frequency
overhead "LOW ON PICKAXES" 1288
settimer "error_overhead_cooldown" 0
endif
endif
endif
while not dead
if skill "Tracking" > 0
if not findbuff "tracking"
clearsysmsg
if timer "skill_cooldown_timer" >= 10000
while not gumpexists 4267467659
useskill 'tracking'
getlabel backpack ping
settimer "skill_cooldown_timer" 0
endwhile
endif
if gumpexists 4267467659
if track_only_red_players = 1
while not insysmsg "You will now hunt murderer players"
gumpresponse 8 4267467659
waitforgump 4267467659 5000
endwhile
else
while not insysmsg "You will now hunt all hostile players"
gumpresponse 8 4267467659
waitforgump 4267467659 5000
endwhile
endif
gumpresponse 6 4267467659
getlabel backpack ping
endif
if always_display_tracking_window = 0
gumpclose 4267467659
endif
endif
endif
if always_display_tracking_window = 1
if not gumpexists 4267467659
useskill 'tracking'
getlabel backpack ping
endif
endif
if timer "skill_cooldown_timer" >= 10000
if detect_hidden_during_warmode = 1
skill "detectinghidden"
waitfortarget 100
target "self"
settimer "skill_cooldown_timer" 0
else
if warmode on
# Do nothing
else
skill "detectinghidden"
waitfortarget 100
target "self"
settimer "skill_cooldown_timer" 0
endif
endif
endif
if insysmsg "You reveal what was hidden"
overhead "HIDDEN REVEALED" 53
overhead "HIDDEN REVEALED" 53
overhead "HIDDEN REVEALED" 53
overhead "HIDDEN REVEALED" 53
overhead "HIDDEN REVEALED" 53
endif
if insysmsg "attempting to peak into"
overhead "THIEF SNOOPING" 53
overhead "THIEF SNOOPING" 53
overhead "THIEF SNOOPING" 53
overhead "THIEF SNOOPING" 53
overhead "THIEF SNOOPING" 53
endif
if automatically_detect_popped_pouches = 1
if findtype 3705 backpack 0 as popped_pouch
overhead "POUCH POPPED" 33
overhead "POUCH POPPED" 33
overhead "POUCH POPPED" 33
overhead "POUCH POPPED" 33
overhead "POUCH POPPED" 33
@ignore popped_pouch
if automatically_gate_when_pouch_popped = 1
overhead "■■ GATING HOME ■■" 88
say "[RecallCharge HOME RUNE NAME"
endif
endif
endif
if automatically_gate_when_detecting_hostile_within_50_steps = 1
@setvar! gate_now 0
if insysmsg "Distance to destination: 50 steps" or insysmsg "(50 spaces to target)"
@setvar! gate_now 1
elseif insysmsg "Distance to destination: 49 steps" or insysmsg "(49 spaces to target)"
@setvar! gate_now 1
elseif insysmsg "Distance to destination: 48 steps" or insysmsg "(48 spaces to target)"
@setvar! gate_now 1
elseif insysmsg "Distance to destination: 47 steps" or insysmsg "(47 spaces to target)"
@setvar! gate_now 1
elseif insysmsg "Distance to destination: 46 steps" or insysmsg "(46 spaces to target)"
@setvar! gate_now 1
elseif insysmsg "Distance to destination: 45 steps" or insysmsg "(45 spaces to target)"
@setvar! gate_now 1
elseif insysmsg "Distance to destination: 44 steps" or insysmsg "(44 spaces to target)"
@setvar! gate_now 1
elseif insysmsg "Distance to destination: 43 steps" or insysmsg "(43 spaces to target)"
@setvar! gate_now 1
elseif insysmsg "Distance to destination: 42 steps" or insysmsg "(42 spaces to target)"
@setvar! gate_now 1
elseif insysmsg "Distance to destination: 41 steps" or insysmsg "(41 spaces to target)"
@setvar! gate_now 1
elseif insysmsg "Distance to destination: 40 steps" or insysmsg "(40 spaces to target)"
@setvar! gate_now 1
elseif insysmsg "Distance to destination: 39 steps" or insysmsg "(39 spaces to target)"
@setvar! gate_now 1
elseif insysmsg "Distance to destination: 38 steps" or insysmsg "(38 spaces to target)"
@setvar! gate_now 1
elseif insysmsg "Distance to destination: 37 steps" or insysmsg "(37 spaces to target)"
@setvar! gate_now 1
elseif insysmsg "Distance to destination: 36 steps" or insysmsg "(36 spaces to target)"
@setvar! gate_now 1
elseif insysmsg "Distance to destination: 35 steps" or insysmsg "(35 spaces to target)"
@setvar! gate_now 1
elseif insysmsg "Distance to destination: 34 steps" or insysmsg "(34 spaces to target)"
@setvar! gate_now 1
elseif insysmsg "Distance to destination: 33 steps" or insysmsg "(33 spaces to target)"
@setvar! gate_now 1
elseif insysmsg "Distance to destination: 32 steps" or insysmsg "(32 spaces to target)"
@setvar! gate_now 1
elseif insysmsg "Distance to destination: 31 steps" or insysmsg "(31 spaces to target)"
@setvar! gate_now 1
elseif insysmsg "Distance to destination: 30 steps" or insysmsg "(30 spaces to target)"
@setvar! gate_now 1
elseif insysmsg "Distance to destination: 29 steps" or insysmsg "(29 spaces to target)"
@setvar! gate_now 1
elseif insysmsg "Distance to destination: 28 steps" or insysmsg "(28 spaces to target)"
@setvar! gate_now 1
elseif insysmsg "Distance to destination: 27 steps" or insysmsg "(27 spaces to target)"
@setvar! gate_now 1
elseif insysmsg "Distance to destination: 26 steps" or insysmsg "(26 spaces to target)"
@setvar! gate_now 1
elseif insysmsg "Distance to destination: 25 steps" or insysmsg "(25 spaces to target)"
@setvar! gate_now 1
elseif insysmsg "Distance to destination: 24 steps" or insysmsg "(24 spaces to target)"
@setvar! gate_now 1
elseif insysmsg "Distance to destination: 23 steps" or insysmsg "(23 spaces to target)"
@setvar! gate_now 1
elseif insysmsg "Distance to destination: 22 steps" or insysmsg "(22 spaces to target)"
@setvar! gate_now 1
elseif insysmsg "Distance to destination: 21 steps" or insysmsg "(21 spaces to target)"
@setvar! gate_now 1
elseif insysmsg "Distance to destination: 20 steps" or insysmsg "(20 spaces to target)"
@setvar! gate_now 1
elseif insysmsg "Distance to destination: 19 steps" or insysmsg "(19 spaces to target)"
@setvar! gate_now 1
elseif insysmsg "Distance to destination: 18 steps" or insysmsg "(18 spaces to target)"
@setvar! gate_now 1
elseif insysmsg "Distance to destination: 17 steps" or insysmsg "(17 spaces to target)"
@setvar! gate_now 1
elseif insysmsg "Distance to destination: 16 steps" or insysmsg "(16 spaces to target)"
@setvar! gate_now 1
elseif insysmsg "Distance to destination: 15 steps" or insysmsg "(15 spaces to target)"
@setvar! gate_now 1
elseif insysmsg "Distance to destination: 14 steps" or insysmsg "(14 spaces to target)"
@setvar! gate_now 1
elseif insysmsg "Distance to destination: 13 steps" or insysmsg "(13 spaces to target)"
@setvar! gate_now 1
elseif insysmsg "Distance to destination: 12 steps" or insysmsg "(12 spaces to target)"
@setvar! gate_now 1
elseif insysmsg "Distance to destination: 11 steps" or insysmsg "(11 spaces to target)"
@setvar! gate_now 1
elseif insysmsg "Distance to destination: 10 steps" or insysmsg "(10 spaces to target)"
@setvar! gate_now 1
elseif insysmsg "Distance to destination: 9 steps" or insysmsg "(9 spaces to target)"
@setvar! gate_now 1
elseif insysmsg "Distance to destination: 8 steps" or insysmsg "(8 spaces to target)"
@setvar! gate_now 1
elseif insysmsg "Distance to destination: 7 steps" or insysmsg "(7 spaces to target)"
@setvar! gate_now 1
elseif insysmsg "Distance to destination: 6 steps" or insysmsg "(6 spaces to target)"
@setvar! gate_now 1
elseif insysmsg "Distance to destination: 5 steps" or insysmsg "(5 spaces to target)"
@setvar! gate_now 1
elseif insysmsg "Distance to destination: 4 steps" or insysmsg "(4 spaces to target)"
@setvar! gate_now 1
elseif insysmsg "Distance to destination: 3 steps" or insysmsg "(3 spaces to target)"
@setvar! gate_now 1
elseif insysmsg "Distance to destination: 2 steps" or insysmsg "(2 spaces to target)"
@setvar! gate_now 1
elseif insysmsg "Distance to destination: 1 steps" or insysmsg "(1 spaces to target)"
@setvar! gate_now 1
endif
if gate_now = 1
overhead "HOSTILES TOO CLOSE" 33
overhead "HOSTILES TOO CLOSE" 33
overhead "HOSTILES TOO CLOSE" 33
overhead "■■ GATING HOME ■■" 88
say "[RecallCharge HOME RUNE NAME"
endif
endif
if automatically_gate_when_detecting_hostile_any_distance = 1
if insysmsg "Now tracking:"
overhead "HOSTILES TOO CLOSE" 33
overhead "HOSTILES TOO CLOSE" 33
overhead "HOSTILES TOO CLOSE" 33
overhead "■■ GATING HOME ■■" 88
say "[RecallCharge HOME RUNE NAME"
endif
endif
if insysmsg "Now tracking:" or insysmsg "Distance to destination:"
if timer "tracking_hostile_overhead_alert" >= tracking_hostile_overhead_alert_frequency
overhead "DISTANT HOSTILES DETECTED" 33
settimer "tracking_hostile_overhead_alert" 0
endif
endif
if rhandempty
while casting
wait 500
endwhile
wait 100
if findtype "pickaxe" backpack as found_pickaxe
dclick found_pickaxe
wait 600
dclick righthand
elseif timer "error_overhead_cooldown" >= error_message_frequency
overhead "OUT OF PICKAXES" 1288
overhead "OUT OF PICKAXES" 1288
overhead "OUT OF PICKAXES" 1288
overhead "OUT OF PICKAXES" 1288
overhead "OUT OF PICKAXES" 1288
settimer "error_overhead_cooldown" 0
endif
else
getlabel righthand righthand_description
if "pickaxe" in righthand_description
dclick righthand
if warmode
# Do nothing
elseif counttype "pickaxe" self <= 1
getlabel righthand righthand_description
if "(100 uses remaining)" in righthand_description
if timer "overhead_cooldown" >= overhead_message_frequency
overhead "PICKAXE LOW: 100" 63
settimer "overhead_cooldown" 0
endif
elseif "(50 uses remaining)" in righthand_description
if timer "overhead_cooldown" >= overhead_message_frequency
overhead "PICKAXE LOW: 50" 88
overhead "PICKAXE LOW: 50" 88
settimer "overhead_cooldown" 0
endif
elseif "(25 uses remaining)" in righthand_description
if timer "overhead_cooldown" >= overhead_message_frequency
overhead "PICKAXE LOW: 25" 53
overhead "PICKAXE LOW: 25" 53
overhead "PICKAXE LOW: 25" 53
settimer "overhead_cooldown" 0
endif
elseif "(10 uses remaining)" in righthand_description
if timer "overhead_cooldown" >= overhead_message_frequency
overhead "PICKAXE LOW: 10" 1257
overhead "PICKAXE LOW: 10" 1257
overhead "PICKAXE LOW: 10" 1257
overhead "PICKAXE LOW: 10" 1257
settimer "overhead_cooldown" 0
endif
elseif "(5 uses remaining)" in righthand_description
if timer "overhead_cooldown" >= overhead_message_frequency
overhead "PICKAXE LOW: 5" 1288
overhead "PICKAXE LOW: 5" 1288
overhead "PICKAXE LOW: 5" 1288
overhead "PICKAXE LOW: 5" 1288
overhead "PICKAXE LOW: 5" 1288
settimer "overhead_cooldown" 0
endif
endif
endif
elseif findtype "pickaxe" backpack as found_pickaxe
dclick found_pickaxe
wait 600
dclick righthand
elseif timer "error_overhead_cooldown" >= error_message_frequency
overhead "OUT OF PICKAXES" 1288
overhead "OUT OF PICKAXES" 1288
overhead "OUT OF PICKAXES" 1288
overhead "OUT OF PICKAXES" 1288
overhead "OUT OF PICKAXES" 1288
settimer "error_overhead_cooldown" 0
endif
endif
if insysmsg "Harvest double yield/loot triggered"
overhead "◆ HARVEST PROC ◆" 62
endif
if insysmsg "You loosen some rocks but fail to find any useable ore" or insysmsg "You dig some"
overhead "▼ MINING ▼" 1366
elseif insysmsg "You do not see any harvestable resources nearby"
overhead "▲ NEXT SPOT ▲" 53
elseif insysmsg "harvesting is not allowed"
overhead "LEAVE TOWN" 53
overhead "LEAVE TOWN" 53
overhead "LEAVE TOWN" 53
elseif insysmsg "You have recently traveled"
if timer "error_overhead_cooldown" >= error_message_frequency
overhead "Waiting on travel cooldown"
overhead "▼ MINING ▼" 1366
settimer "error_overhead_cooldown" 0
endif
endif
if findtype 6585 backpack as found_ore
@getlabel found_ore ore_description
if "iron" in ore_description
if "shadow" in ore_description
overhead "SHADOW IRON" 2406
else
overhead "IRON" 0
endif
elseif "copper" in ore_description
if "dull copper" in ore_description
overhead "DULL COPPER" 2419
else
overhead "COPPER" 2413
endif
elseif "bronze" in ore_description
overhead "BRONZE" 2418
elseif "gold" in ore_description
overhead "GOLD" 2213
elseif "agapite" in ore_description
overhead "AGAPITE" 2425
elseif "verite" in ore_description
overhead "VERITE" 2207
elseif "valorite" in ore_description
overhead "VALORITE" 2219
elseif "avarite" in ore_description
overhead "AVARITE" 1763
endif
if findtype storage_container_id_number backpack as storage_container
@drop backpack -1 -1 -1
getlabel backpack ping
wait 500
lift found_ore 9999
getlabel backpack ping
drop storage_container -1 -1 -1
wait 500
@ignore found_ore
endif
endif
if findtype 4017|47190 ground any any 2 as found_forge
if timer "forge_ping" >= forge_overhead_ping_frequency
overhead "▼▼ FORGE ▼▼" 88 found_forge
settimer "forge_ping" 0
endif
if automatically_smelt_ore = 1
@clearignore
if findtype storage_container_id_number backpack as storage_container
while findtype 7154 storage_container as found_ingots
@ignore found_ingots
endwhile
endif
while findtype 6585 backpack as found_ore
overhead "◆ SMELTING ORE ◆"
dclick found_ore
@ignore found_ore
wait 500
endwhile
endif
endif
if findtype 7154 backpack as found_ingots
@getlabel found_ingots ingot_description
if "iron" in ore_description
if "shadow" in ore_description
overhead "SHADOW IRON" 2406
else
overhead "IRON" 0
endif
elseif "copper" in ore_description
if "dull copper" in ore_description
overhead "DULL COPPER" 2419
else
overhead "COPPER" 2413
endif
elseif "bronze" in ore_description
overhead "BRONZE" 2418
elseif "gold" in ore_description
overhead "GOLD" 2213
elseif "agapite" in ore_description
overhead "AGAPITE" 2425
elseif "verite" in ore_description
overhead "VERITE" 2207
elseif "valorite" in ore_description
overhead "VALORITE" 2219
elseif "avarite" in ore_description
overhead "AVARITE" 1763
endif
if findtype storage_container_id_number backpack as storage_container
@drop backpack -1 -1 -1
getlabel backpack ping
wait 500
lift found_ingots 9999
getlabel backpack ping
drop storage_container -1 -1 -1
wait 600
@ignore found_ingots
endif
endif
if findtype 4017|47190 ground any any 6 as found_forge
if timer "forge_ping" >= forge_overhead_ping_frequency
overhead "▼▼ FORGE ▼▼" 88 found_forge
settimer "forge_ping" 0
endif
elseif findtype 4017|47190 ground any any 12 as found_forge
if timer "forge_ping" >= forge_overhead_ping_frequency
overhead "▼▼ FORGE ▼▼" 88 found_forge
settimer "forge_ping" 0
endif
elseif findtype 4017|47190 ground any any 18 as found_forge
if timer "forge_ping" >= forge_overhead_ping_frequency
overhead "▼▼ FORGE ▼▼" 88 found_forge
settimer "forge_ping" 0
endif
endif
if automatically_restock_at_resource_stockpile = 1
if find resource_stockpile_serial_number ground any any 2 as my_resource_stockpile
@clearignore
if findtype 7154 backpack as found_ingots
overhead "RESTOCKING INGOTS" 88
menu resource_stockpile_serial_number 0
waitfortarget 1000
target self
wait 1000
endif
endif
endif
if diffweight <= weight_remaining_limit
overhead "OVERWEIGHT" 53
if automatically_gate_when_overweight = 1
overhead "■■ GATING HOME ■■" 88
say "[RecallCharge HOME RUNE NAME"
stop
endif
endif
if counttype 7154 backpack >= ingots_gate_amount
overhead "Too many ingots!" 53
if automatically_gate_when_large_amount_of_ingots = 1
overhead "■■ GATING HOME ■■" 88
say "[RecallCharge HOME RUNE NAME"
stop
endif
endif
if counttype 6585 backpack >= ore_gate_amount
overhead "Too much ore!" 53
if automatically_gate_when_large_amount_of_ore = 1
overhead "■■ GATING HOME ■■" 88
say "[RecallCharge HOME RUNE NAME"
stop
endif
endif
####################### BANDAGE PLAYER ########################
if automatically_bandage_player = 1
if findtype 3617 backpack as found_bandage
if not bandaging
if hp < maxhp or poisoned or findbuff "bleed" or findbuff "disease"
dclick found_bandage
getlabel backpack ping
waitfortarget 1000
target "self"
getlabel backpack ping
settimer "bandage_cooldown" 0
endif
endif
endif
endif
###############################################################
if automatically_drink_potions = 1
########## OPEN POTION SATCHEL ##########
if automatically_open_potion_satchel = 1
#Opens potion satchel to display potions on hotbar
if findtype 31262 self as alchemist_satchel
dclick alchemist_satchel
endif
endif
####################################
########## HEALING POTION ##########
if automatically_drink_healing_potion = 1 and hp <= health_value_to_drink_healing_potion
if findtype "Yellow Potion" self as healing_potion
getlabel healing_potion healing_potion_description
if "next usabel" in healing_potion_description
if timer "potion_error_message_cooldown" >= potion_error_message_frequency
overhead "Healing Potion On Cooldown!" 34
endif
else
overhead "Drinking Healing Potion" 53
dclick healing_potion
getlabel backpack ping
cooldown "Yellow Potion" 10000
endif
else
overhead "Out of Healing Potions!" 34
endif
endif
####################################
########## CURE POTION ##########
if automatically_drink_cure_potion = 1 and poisoned and hp <= health_value_to_drink_cure_potion
if findtype "Orange Potion" self as cure_potion
overhead "Drinking Cure Potion" 44
dclick cure_potion
getlabel backpack ping
endif
endif
#################################
endif
if paralyzed
if findtype 3705 backpack 38
yell "[Pouch"
getlabel backpack ping
else
overhead "Out of Pouches!" 34
endif
endif
if use_peacemaking = 1
if warmode on
target closest grey monster
if find lasttarget ground any any 18
@setvar! target_to_analyze lasttarget
getlabel target_to_analyze target_description
if inlist animalsIgnoreList target_description
@ignore target_to_analyze
elseif find target_to_analyze ground -1 -1 12
if timer "skill_cooldown_timer" >= 10000
skill "Peacemaking"
waitfortarget 1000
endif
if insysmsg "What instrument shall you play"
if findtype "standing harp|sackbut|bamboo flute|tambourine|drum|lute|lap harp|gemshorn|hurdy gurdy|psaltery|shawm|vielle" as instrument
target instrument
else
overhead "NO INSTRUMENT" 33
overhead "NO INSTRUMENT" 33
overhead "NO INSTRUMENT" 33
overhead "NO INSTRUMENT" 33
overhead "NO INSTRUMENT" 33
wait 100
target self
endif
elseif timer "skill_cooldown_timer" >= 10000
skill "Peacemaking"
waitfortarget 1000
target target_to_analyze
settimer "skill_cooldown_timer" 0
if insysmsg "You fail to pacify your opponent"
overhead "▼ PEACE FAILED ▼" 53 target_to_analyze
overhead "▼ PEACE FAILED ▼" 53 target_to_analyze
overhead "▼ PEACE FAILED ▼" 53 target_to_analyze
settimer "skill_cooldown_timer" 5000
elseif insysmsg "You play successfully, pacifying your target"
overhead "▼ PEACED ▼" 63 target_to_analyze
endif
getlabel target_to_analyze target_description
if "pacified" in target_description
overhead target_description 88 target_to_analyze
endif
endif
endif
endif
endif
endif
endif
#################### WORLD SAVE ######################
if insysmsg "world will save"
overhead "World save coming soon" 53
@setvar! world_save_cooldown 13500
removetimer "world_save_timer"
if not timerexists "world_save_timer"
createtimer "world_save_timer"
settimer "world_save_timer" 0
endif
clearsysmsg
getlabel backpack ping
endif
if timerexists "world_save_timer"
if timer "world_save_timer" >= world_save_cooldown
overhead "Waiting for world save..." 53
removetimer "world_save_timer"
endif
endif
if insysmsg "save complete"
overhead "World save complete!" 63
clearsysmsg
getlabel backpack ping
endif
######################################################
if automatically_close_house_door = 1
if findtype house_door_id_number_when_open ground any any 2
dclick house_door_serial_number
wait 500
endif
endif
endwhileScript Features:
* Display overhead messages when you are mining, the type of ore you harvest in it's natural hue and if you need to move to the next tile.
* Automatically set up tracking
* Automatically recall you to your designated rune if hostile targets are detected or only if they are within 40 tiles if configured.
* Automatically moves ore and ingots to the specified container type ID (use a boom box to be more thief resistant)
* Pings found forges with an overhead message
* Automatically smelts ore if within 2 tiles of a forge
* Restocks your ingots to your resource stockpile if configured and within 2 tiles of your specific resource stockpile