Created: 13 days ago on 03/01/2025, 04:50:14 PMUpdated: 13 days ago on 03/01/2025, 04:52:13 PM
Note from JaseOwns:
Scripts will be leveraged on both UORazorscipts.com and this site. At the time of the launch (Feb 1st 2025), this isn't working right - but it will! Thanks for checking it out
FileType: No file type provided
Size: 18568
Category: No category provided
Skills: mining, magery
Hotkey: No hotkey provided
Tags: No tags provided
Description: Must have mining and magery to use
Uses 1 or 2 beetles and a fire beetle,
a drop box
home runebook home set to first rune (this is drop off location)
Organizers to beetles and drop off container
Restock from beetle when empty and restock from drop off box
currently set to 7 books +Home book
Uses pickaxe.
Also uses regs for recalling.
#Writen by Kerrigon for custom shards
#When starting this script you need 1 pickaxe in your backpack. 2 pack beetles 1 fire beetle. Setup your runebooks.
#in beetle 1 you need 2 bags. 1 for ingots and 1 for extra pickaxes. once you run out the script will make 10 everytime you go home.
#in beetle 2 you need 1 back. leftover ore and regs will go here
#in your home box. you need iron ingots and bag full of tinker tools (atleast 100)
# it is recomended that you run this script with an ancient miners pickaxe so you dont have to make pickaxes
Player.ChatSay(45, "All Follow Me")
import sys
import time
# this script uses organizers and restock
#ingots -add ingot change color to -1 for all
#ingots2 -add ingot and the small ore itemid 0x19B7 change color to -1 for all
#ingots3 -add iron ingot set amount 100
#pickaxe -add pickaxe set amount 1
#tinker -add a tinker tool kit itemid 0x1EB8 not the tinker tools. set amount 1
#restock agents
#regs -add black pearl blood moss and mandrake root. set amount 100
#regs2 - this is to get you back home. to reload up. set amount to 1 but up to 10
### for the regs you only need black pearl, Mandrake root, and sulfuric ash. but feel free to use them all
# Script for Razor Enhanced. everything in this section needs to be personalized
fire_beetle_serial = 0x000050CC # Fire Beetle Serial Number
# in your first beetle you need 2 bags 1 for ingots 1 for axes
sbeetle1= 0x000034A1 # storage beetle Serial
#sbeetle2= 0x00014253 # 2nd storage beetle Serial
playerbag= 0x401A6480 # your backpack Serial
beetlebag1= 0x400E6F09 # storage bag on beetle 1
beetlebag12= 0x400E6F0A # pickaxe bag on beetle 1
#beetlebag2= 0x40276959 # storage back on beetle 2
# This rune needs to be infront of your box to restock with at home. and drop off your ingots.
homebook= 0x400D50A3 # runebook for recalling home This uses recalls assuming you are out of regs. Your first rune in the book needs to be the home rune
homebox= 0x40114710 # this is the box at home to restock and drop off ingots also Needed to make more axes if you dont have rare mining axe
hometoolbag = 0x400830E1 #keep extra tinker tools in here.. You are going to need alot Just fill the bag with atleast 100
tinkertool_id= 0x1EB8 # tinker tool id
#Your Rune Book Serials
rune_book_ids = [0x402A48F2, 0x400D5B91, 0x40253EDE, 0x402A48A6, 0x402A48F7, 0x400D5D40, 0x400D5CB0 ]
#[ 0x4035BF0F, 0x40087ACF, 0x40087A14, 0x4035C044, 0x40109196, ]
#everything in this section does not need to be touched
tinkertool_id= 0x1EB8
ore_ids = [0x19B7, 0x19B9, 0x19BA, 0x19B8] # Ore item IDs
cave_floor_id = 0x053B # Cave Floor item ID
pickaxe_id = 0x0E86 # Pickaxe item ID The Scipt can Restock. But also Prefers to have the Rare Miners Pickaxe so you dont have to restock or make axes.
# Gump actions for all locations (assuming each rune book has 16 locations)
gump_action_ids = [
50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
]
# Index to keep track of the current recall location
current_location_index = 0
# Function to restock pickaxe
def restock_pickaxe():
# Run the restock agent (replace "pickaxes" with your actual restock agent name)
Misc.WaitForContext(sbeetle1, 10000)
Misc.ContextReply(sbeetle1, 12)
Misc.Pause(2000)
Restock.RunOnce("pickaxes", beetlebag12, playerbag, 300)
Misc.Pause(2000)
# Function to find the closest cave floor tile
def find_closest_cave_floor():
cave_floors = Items.FindAllByID(cave_floor_id, -1, -1, -1)
closest_tile = None
closest_distance = float('inf')
for tile in cave_floors:
distance = Misc.Distance(Player.Position.X, Player.Position.Y, tile.Position.X, tile.Position.Y)
if distance < closest_distance:
closest_distance = distance
closest_tile = tile
return closest_tile
def tinker():
Misc.SendMessage("Grabbing ingots...", 44) # Announce grabbing ingots
Organizer.RunOnce("ingots3", homebox, playerbag, 300)
Misc.Pause(2000)
tinkertool = Items.FindByID(tinkertool_id, -1, playerbag) # Check for tinkertool in player backpack
if not tinkertool:
Misc.SendMessage("No tinkertool found, restocking...", 44)
Organizer.RunOnce("tinker", hometoolbag, playerbag, 2000)
Misc.Pause(2000)
tinkertool = Items.FindByID(tinkertool_id, -1, playerbag) # Re-check for tinkertool after restocking
if not tinkertool:
Misc.SendMessage("Failed to restock tinkertool. Stopping script.", 33)
sys.exit() # Stop the script if no tinkertool is found
try:
Items.UseItemByID(tinkertool_id) # Use tinker tool by item ID
if Gumps.WaitForGump(0xa5a7df43, 10000):
Gumps.SendAction(0xa5a7df43, 114) # Perform initial gump action to create the first pickaxe
Misc.Pause(2000) # Pause to allow action to complete for the first pickaxe
else:
raise Exception("Failed to use tinkertool gump.")
for _ in range(9): # Run the following gump action 9 times
Gumps.SendAction(0xa5a7df43, 21) # Perform response action 21 to create additional pickaxes
Misc.Pause(2000) # Pause to allow action to complete for each pickaxe
except Exception as e:
Misc.SendMessage(f"Error: {e}", 33)
return
Gumps.SendAction(0xa5a7df43, 0)
Organizer.RunOnce("pickaxe", playerbag, beetlebag12, 300)
Misc.Pause(3000) # Pause for 3 seconds
Organizer.RunOnce("tinker", playerbag, hometoolbag, 300)
Misc.Pause(2000) # Pause for 3 seconds
# Return home to make axes and drop off ingots
def home():
Gumps.SendAction(0x59, 0)
Misc.SendMessage("Returning home to restock and drop off ingots...", 44)
Items.UseItem(homebook) # Use the runebook for recalling home
if Gumps.WaitForGump(0x59, 10000):
Gumps.SendAction(0x59, 50) # Perform the gump action to recall home
Misc.Pause(3000) # Allow time for recall to complete
Gumps.SendAction(0x59, 0)
Misc.SendMessage("Opening boxes and beetles, dropping off ingots...", 44)
Items.UseItem(homebox) # Use the box at home to restock and drop off ingots
Misc.Pause(1000)
Organizer.RunOnce("ingots2", playerbag, homebox, 300)
Misc.Pause(3000) # Pause for 2 seconds
Restock.RunOnce("regs", homebox, playerbag, 300)
Misc.Pause(4000)
# Open sbeetle1 and organize ingots1
Misc.WaitForContext(sbeetle1, 10000)
Misc.ContextReply(sbeetle1, 12)
Misc.Pause(1000)
Organizer.RunOnce("ingots2", beetlebag1, homebox, 300)
Misc.Pause(4000) # Pause for 2 seconds
Organizer.RunOnce("ingots2", beetlebag1, homebox, 300)
Misc.Pause(4000) # Pause for 2 seconds
Restock.RunOnce("regs2", homebox, beetlebag12, 300)
Misc.Pause(2000)
Restock.RunOnce("regs2", homebox, beetlebag12, 300)
Misc.Pause(3000)
# Open sbeetle2 and organize ingots1
# Misc.WaitForContext(sbeetle2, 10000)
# Misc.ContextReply(sbeetle2, 12)
# Misc.Pause(1000)
# Organizer.RunOnce("ingots2", beetlebag2, homebox, 300)
# Misc.Pause(4000) # Pause for 2 seconds
# Organizer.RunOnce("ingots2", beetlebag2, homebox, 300)
# Misc.Pause(4000) # Pause for 2 seconds
# Check for pickaxe in player backpack
pickaxe = Items.FindByID(pickaxe_id, -1, Player.Backpack.Serial)
if pickaxe:
Misc.SendMessage("Pickaxe found, returning to mining", 44)
recall_to_next_location() # Proceed to the next mining location
else:
Misc.SendMessage("No pickaxe found, crafting new pickaxes", 33)
tinker() # Craft pickaxes if none found in backpack
else:
Misc.SendMessage("Failed to open the gump for the home rune.", 33)
# Function to find and use pickaxe
def use_pickaxe():
pickaxe = Items.FindByID(pickaxe_id, -1, Player.Backpack.Serial)
if not pickaxe:
restock_pickaxe() # Restock from beetlebag12 if no pickaxes are found
pickaxe = Items.FindByID(pickaxe_id, -1, Player.Backpack.Serial)
if not pickaxe:
Misc.SendMessage("No pickaxe found even after restock. Returning home...", 33)
home() # Execute home() if no pickaxes are found even after restocking
return
Target.Cancel() # Cancel waiting for target to ensure it's clear before mining
Journal.Clear() # Clear the journal before mining
Items.UseItem(pickaxe)
Target.WaitForTarget(150)
# Find the closest cave floor
cave_floor = find_closest_cave_floor()
if cave_floor and Misc.Distance(Player.Position.X, Player.Position.Y, cave_floor.Position.X, cave_floor.Position.Y) <= 1:
Target.TargetExecute(cave_floor.Serial)
Misc.Pause(1000)
else:
# Target the ground in front of the player if no cave floor found
Target.TargetResource(pickaxe,0)
Misc.Pause(1000)
# Check for system message
if (Journal.SearchByType("There is no metal here to mine", "System") or
Journal.SearchByType('Target cannot be seen', 'System')):
recall_to_next_location()
# Function to check if rune books are present
def check_rune_books():
for rune_book_id in rune_book_ids:
rune_book = Items.FindBySerial(rune_book_id)
if not rune_book:
Misc.SendMessage(f"Rune book {rune_book_id:X} not found! Please ensure all rune books are in your backpack.", 33)
return False
return True
# Updated recall function that checks for rune books
def recall_to_next_location():
global current_location_index
if not check_rune_books():
return # If any rune book is missing, stop further execution
if current_location_index < len(gump_action_ids):
rune_book_id = rune_book_ids[current_location_index // 16] # 16 locations per rune book
gump_action_id = gump_action_ids[current_location_index]
Items.UseItem(rune_book_id) # Use the appropriate rune book
if Gumps.WaitForGump(0x59, 10000):
Gumps.SendAction(0x59, gump_action_id)
Gumps.CloseGump(0xfc2a) # Ensure the gump is closed after recalling
Misc.Pause(5000) # Pause for 5 seconds to allow recall to complete
current_location_index += 1
Gumps.SendAction(0x59, 0)
else:
Misc.SendMessage("Failed to open the gump for the rune book.", 33)
else:
Misc.SendMessage("All locations exhausted. Resetting to first location.", 33)
current_location_index = 0
# Function to smelt ore
def smelt_ore():
for _ in range(3): # Loop three times
for ore_id in ore_ids:
ores = Items.FindByID(ore_id, -1, Player.Backpack.Serial)
if ores:
if isinstance(ores, list):
for ore in ores:
Target.Cancel() # Cancel waiting for target to ensure it's clear before mining
Items.UseItem(ore)
Target.WaitForTarget(150)
Target.TargetExecute(fire_beetle_serial)
Misc.Pause(1000)
else: # If ores is a single item
Target.Cancel() # Cancel waiting for target to ensure it's clear before mining
Items.UseItem(ores)
Target.WaitForTarget(150)
Target.TargetExecute(fire_beetle_serial)
Misc.Pause(1000)
# Run the Organizer after smelting
Misc.WaitForContext(sbeetle1, 10000)
Misc.ContextReply(sbeetle1, 12)
Misc.Pause(1000)
Organizer.RunOnce("ingots2", playerbag, beetlebag1, 300)
Misc.Pause(3000)
# Misc.WaitForContext(sbeetle2, 10000)
# Misc.ContextReply(sbeetle2, 12)
# Misc.Pause(1000)
# Organizer.RunOnce("ingots2", playerbag, beetlebag2, 300)
# Misc.Pause(3000)
# Main function to execute the script
def main():
while True:
black_pearl = Items.FindByID(0x0F7A, -1, Player.Backpack.Serial) # Find Black Pearl in the backpack
mandrake_root = Items.FindByID(0x0F86, -1, Player.Backpack.Serial) # Find Mandrake Root in the backpack
blood_moss = Items.FindByID(0x0F7B, -1, Player.Backpack.Serial) # Find Blood Moss in the backpack
if Player.Weight < 390 and black_pearl and mandrake_root and blood_moss:
Misc.SendMessage(f"Player weight is {Player.Weight} and all reagents found, proceeding to mine", 33)
use_pickaxe() # Call function to use pickaxe
else:
if Player.Weight >= 390:
Misc.SendMessage(f"Player weight is {Player.Weight}, smelting ore", 33)
smelt_ore() # Smelt ore if player weight is too high
if not black_pearl or not mandrake_root or not blood_moss:
Misc.SendMessage("One or more reagents not found, returning home", 33)
Misc.WaitForContext(sbeetle1, 10000) # Wait for context for the beetle
Misc.ContextReply(sbeetle1, 12) # Contextual reply to the beetle
Misc.Pause(1000)
Restock.RunOnce("regs2", beetlebag12, playerbag, 300) # Restock items
Misc.Pause(2000)
home() # Return home if one or more reagents not found
Misc.Pause(2000) # Pause to allow time for any restocks
if __name__ == "__main__":
main()