UO Sagas: All in one taming

Created: 13 days ago on 06/01/2025, 12:18:08 AMUpdated: 10 days ago on 06/04/2025, 02:24:51 AM
FileType: LUA
Size: 9988
Category: Animal Taming
Tags: pvm

Description: I wanted to create an all-in-one taming that encompasses the core of taming from start to finish and this is the results. The configuration variables should be easy enough to understand but there is a pitful to this when it comes to the small taming window. You may do actions inside the "You start to tame this creature" window but if you have a spell charged it will target the creature so if it's a dragon you will attempt to heal it. There isn't a way to target.cancel the cursor yet so just be mindful of that window otherwise it can mess the script sequence up "Personally I just stop all scripts if I think its going to happen". Hit me up on discord if you have any issues or bugs.

-

-

-

-

-

V3.1 Added some variables and script for an ignore creature cache to kill a mob that has exceeded the maximum tame attempts. The last tame of a mob is the best possible tame you can find so please kill it off

-

V3.2 Added a way to add custom names for people who have pets that follow them around so it doesn't spam "Already Tamed"

-

V3.3 Added control logic for "You can't tame that creature" and "That creature looks already tamed" Also cleaned up the logic loop for spamming multiple attempts of taming against those targets so should only show once

-

V3.3a changed a possible line error

Messages.Print("=================================", 60) Messages.Print("Tamer Assistant Script v3.3a", 68) Messages.Print("Status: Scanning for nearby creatures", 89) Messages.Print("=================================", 60) -- === Config === local renameAfterTame = true local renameSuffix = "Rab" local autoRelease = true local showAlreadyTamedOverhead = true local repeatAfterTame = true local showStatusMessages = true local statusMessageInterval = 5 local releaseGumpId = 3432224886 local releaseButtonId = 2 local ignoreScanRange = 10 local tameSkipMessageCooldown = 10 local killMeCooldown = 3 local cantTameCooldown = 5 local ignoreDuration = 15 local showCantTameOverhead = true local ignoreNoChanceTamesPermanently = true local customIgnoreNames = { "Muffin", "Baconator", "SirPoopsAlot" } local tamedShownCache = {} local tameSkipShownCache = {} local tooManyOwnersShownCache = {} local cantTameShownCache = {} local ignoreList = {} local lastStatusPrint = os.clock() local tamedCount = 0 Journal.Clear() while true do local now = os.clock() if showAlreadyTamedOverhead or showCantTameOverhead then local nearby = Mobiles.FindByFilter({ rangemax = ignoreScanRange, dead = false, human = false }) or {} if type(nearby) == "table" then for _, mob in ipairs(nearby) do if showAlreadyTamedOverhead and mob.Name and mob.Name ~= "" and mob.Name:find(renameSuffix) then local lastShown = tamedShownCache[mob.Serial] or 0 if now - lastShown >= 3 then Messages.Overhead("Already Tamed... Skipping", 38, mob.Serial) tamedShownCache[mob.Serial] = now end end if showCantTameOverhead and ignoreList[mob.Serial] == true then local lastShown = cantTameShownCache[mob.Serial] or 0 if now - lastShown >= cantTameCooldown then Messages.Overhead("Cant tame!", 53, mob.Serial) cantTameShownCache[mob.Serial] = now end end end end end -- === Main Taming Logic === local all = Mobiles.FindByFilter({ rangemax = 2, dead = false, human = false }) or {} local untamed = {} for _, mob in ipairs(all) do if mob.Name and mob.Name ~= "" and not mob.Name:find(renameSuffix) then local ignoredUntil = ignoreList[mob.Serial] local skip = false for _, name in ipairs(customIgnoreNames) do if mob.Name:lower() == name:lower() then skip = true break end end if not skip and (ignoredUntil ~= true and (not ignoredUntil or os.clock() > ignoredUntil)) then table.insert(untamed, mob) end end end table.sort(untamed, function(a, b) return a.Distance < b.Distance end) if #untamed == 0 then if showStatusMessages and now - lastStatusPrint >= statusMessageInterval then Messages.Print("...Still scanning for wild creatures...", 89) lastStatusPrint = now end Pause(200) else local target = untamed[1] local success = false Journal.Clear() Skills.Use("Animal Taming") if Targeting.WaitForTarget(2000) then Targeting.Target(target.Serial) else Messages.Print("Targeting failed. Skipping creature.", 38) end local timeout, elapsed = 15000, 0 while elapsed < timeout do if Journal.Contains("You have no chance of taming this creature.") or Journal.Contains("That animal looks tame already") then if showCantTameOverhead then local lastShown = cantTameShownCache[target.Serial] or 0 if os.clock() - lastShown >= cantTameCooldown then Messages.Overhead("Cant tame!", 53, target.Serial) cantTameShownCache[target.Serial] = os.clock() end end Messages.Print("No chance to tame — ignoring mob.", 38) if ignoreNoChanceTamesPermanently then ignoreList[target.Serial] = true else ignoreList[target.Serial] = os.clock() + ignoreDuration end break elseif Journal.Contains("It seems to accept you as master") or Journal.Contains("You tame the creature.") then tamedCount = tamedCount + 1 Messages.Print("Tamed successfully! (" .. tamedCount .. " total)", 68) local releaseName = target.Name if renameAfterTame then local originalName = target.Name or "Unknown" local newName if originalName:lower():match("^a%s") then newName = renameSuffix else originalName = originalName:gsub("%s+", "") newName = originalName .. renameSuffix end Mobiles.Rename(target.Serial, newName) releaseName = newName Messages.Print("Renamed to: " .. newName, 89) end if autoRelease then Messages.Print("Releasing tamed creature...", 20) Player.Say(releaseName .. " release") Pause(500) if Gumps.WaitForGump(releaseGumpId, 1000) then Gumps.PressButton(releaseGumpId, releaseButtonId) Messages.Print("Released successfully.", 68) else Messages.Print("Release gump not found. Skipping release.", 38) end end success = true break elseif Journal.Contains("You fail to tame the creature.") then Messages.Print("Taming failed. Trying again...", 20) break elseif Journal.Contains("You seem to anger the beast") then Messages.Print("The beast was angered.", 20) Pause(200) break elseif Journal.Contains("That is too far away.") then Messages.Print("Target too far. Skipping...", 38) break elseif Journal.Contains("This animal has had too many owners") then local lastShown = tooManyOwnersShownCache[target.Serial] or 0 if os.clock() - lastShown >= killMeCooldown then Messages.Overhead("Kill me", 33, target.Serial) tooManyOwnersShownCache[target.Serial] = os.clock() end Messages.Print("Too many owners — marked for death.", 38) ignoreList[target.Serial] = os.clock() + ignoreDuration break end Pause(50) elapsed = elapsed + 50 end if success then if repeatAfterTame then Pause(300) else Messages.Print("Ending script after successful tame.", 89) return end end end end
View list of scripts
Disclaimer: This is a fan made site and is not directly associated with Ultima Online or UO staff.