Elmo's R3v3ng3
Member
i told it i needed a script to train taming and magery at the same time while also incorporating meditation and healing. it ran, but i dont think this is an efficiant way to raise skills LOL
# Replace this with the serial of the animal you want to tame
targetSerial = 0x0000624A # Serial for the horse
# Define healing thresholds
greaterHealMana = 11 # Mana cost for Greater Heal
# Function to determine the appropriate spell based on skill level
def get_spell_to_cast():
magerySkill = Player.GetSkillValue("Magery")
if 30 <= magerySkill < 45:
return "Fireball"
elif 45 <= magerySkill < 55:
return "Lightning"
elif 55 <= magerySkill < 65:
return "Bless"
elif 65 <= magerySkill < 75:
return "Reveal"
elif 75 <= magerySkill < 90:
return "Flamestrike"
elif 90 <= magerySkill <= 120:
return "Earthquake"
else:
return None
# Main training loop
while True:
# Step 1: Heal if health is below 80%
if Player.Hits < Player.HitsMax * 0.8:
if Player.Mana >= greaterHealMana:
Misc.SendMessage("Health is low. Casting Greater Heal.", 65)
Spells.Cast("Greater Heal")
Target.WaitForTarget(2000, True)
Target.TargetExecute(Player.Serial) # Always target yourself
Misc.Pause(2000)
else:
bandage = Items.FindByID(0x0E21, -1, Player.Backpack.Serial) # Bandage item ID
if bandage:
Misc.SendMessage("Health is low. Applying bandages.", 65)
Items.UseItem(bandage)
Target.WaitForTarget(2000, True)
Target.TargetExecute(Player.Serial) # Always target yourself
Misc.Pause(6000)
else:
Misc.SendMessage("No bandages left! Be careful.", 33)
# Step 2: Continuous meditation until full mana
if Player.Mana < Player.ManaMax:
Misc.SendMessage("Mana is low. Activating Meditation.", 33)
Player.UseSkill("Meditation")
previousMana = Player.Mana # Track initial mana
while Player.Mana < Player.ManaMax:
if Player.Mana >= previousMana + 5: # Announce every 5 mana gained
Misc.SendMessage(f"Mana increased to: {Player.Mana}", 55)
previousMana = Player.Mana # Update for the next announcement
Misc.Pause(2000) # Continue Meditation until mana fully recovers
Misc.SendMessage(f"Meditation complete. Mana fully restored: {Player.Mana}/{Player.ManaMax}", 65)
continue # Restart the loop
# Step 3: Use Animal Taming and target the horse
Misc.SendMessage("Using Animal Taming skill...", 55)
Player.UseSkill("Animal Taming")
if Target.WaitForTarget(2000, True): # Wait for the targeting cursor
Target.TargetExecute(targetSerial) # Target the horse
Misc.Pause(8000) # Wait for the taming process
# Step 4: Cast a Magery spell
spellToCast = get_spell_to_cast()
if not spellToCast:
Misc.SendMessage("Magery training complete or invalid skill level!", 65)
break
if Player.Mana >= greaterHealMana:
Misc.SendMessage(f"Casting {spellToCast} for Magery training.", 55)
Spells.Cast(spellToCast)
if spellToCast in ["Fireball", "Lightning", "Bless", "Flamestrike"]: # Targeted spells
Target.WaitForTarget(2000, True)
Target.TargetExecute(Player.Serial) # Always target yourself
Misc.Pause(3000) # Pause for spell cooldown
else:
Misc.SendMessage("Low mana. Skipping Magery this cycle.", 33)
# Short delay before restarting the loop
Misc.Pause(1000)
# Replace this with the serial of the animal you want to tame
targetSerial = 0x0000624A # Serial for the horse
# Define healing thresholds
greaterHealMana = 11 # Mana cost for Greater Heal
# Function to determine the appropriate spell based on skill level
def get_spell_to_cast():
magerySkill = Player.GetSkillValue("Magery")
if 30 <= magerySkill < 45:
return "Fireball"
elif 45 <= magerySkill < 55:
return "Lightning"
elif 55 <= magerySkill < 65:
return "Bless"
elif 65 <= magerySkill < 75:
return "Reveal"
elif 75 <= magerySkill < 90:
return "Flamestrike"
elif 90 <= magerySkill <= 120:
return "Earthquake"
else:
return None
# Main training loop
while True:
# Step 1: Heal if health is below 80%
if Player.Hits < Player.HitsMax * 0.8:
if Player.Mana >= greaterHealMana:
Misc.SendMessage("Health is low. Casting Greater Heal.", 65)
Spells.Cast("Greater Heal")
Target.WaitForTarget(2000, True)
Target.TargetExecute(Player.Serial) # Always target yourself
Misc.Pause(2000)
else:
bandage = Items.FindByID(0x0E21, -1, Player.Backpack.Serial) # Bandage item ID
if bandage:
Misc.SendMessage("Health is low. Applying bandages.", 65)
Items.UseItem(bandage)
Target.WaitForTarget(2000, True)
Target.TargetExecute(Player.Serial) # Always target yourself
Misc.Pause(6000)
else:
Misc.SendMessage("No bandages left! Be careful.", 33)
# Step 2: Continuous meditation until full mana
if Player.Mana < Player.ManaMax:
Misc.SendMessage("Mana is low. Activating Meditation.", 33)
Player.UseSkill("Meditation")
previousMana = Player.Mana # Track initial mana
while Player.Mana < Player.ManaMax:
if Player.Mana >= previousMana + 5: # Announce every 5 mana gained
Misc.SendMessage(f"Mana increased to: {Player.Mana}", 55)
previousMana = Player.Mana # Update for the next announcement
Misc.Pause(2000) # Continue Meditation until mana fully recovers
Misc.SendMessage(f"Meditation complete. Mana fully restored: {Player.Mana}/{Player.ManaMax}", 65)
continue # Restart the loop
# Step 3: Use Animal Taming and target the horse
Misc.SendMessage("Using Animal Taming skill...", 55)
Player.UseSkill("Animal Taming")
if Target.WaitForTarget(2000, True): # Wait for the targeting cursor
Target.TargetExecute(targetSerial) # Target the horse
Misc.Pause(8000) # Wait for the taming process
# Step 4: Cast a Magery spell
spellToCast = get_spell_to_cast()
if not spellToCast:
Misc.SendMessage("Magery training complete or invalid skill level!", 65)
break
if Player.Mana >= greaterHealMana:
Misc.SendMessage(f"Casting {spellToCast} for Magery training.", 55)
Spells.Cast(spellToCast)
if spellToCast in ["Fireball", "Lightning", "Bless", "Flamestrike"]: # Targeted spells
Target.WaitForTarget(2000, True)
Target.TargetExecute(Player.Serial) # Always target yourself
Misc.Pause(3000) # Pause for spell cooldown
else:
Misc.SendMessage("Low mana. Skipping Magery this cycle.", 33)
# Short delay before restarting the loop
Misc.Pause(1000)