Official ScriptUO EasyUO Scripts > Script Debug
Animal Taming 0.1 for Public Testing
VicVega:
What this script does?
1. Scans the zone for tame animals acording to your skill at the moment.
2. Tames an animal, releases it and then kills it with your steed, till there is no more animals left on the zone.
3. If no more animals available on the zone, returns to the starting point.
Only tested with Great Harts at the moment, but it should work with all the other animals supported I hope.
This informative table is extracted from the UDTaming script, only works with the animals listed here, but if you want to add animals types it's easy to do so:
--- Quote ---; The following table was generated from data gathered off the UO Stratics
; taming page. Analysing their results produces a success rate calculation
; based upon the character's Animal Taming skill only. Modifying the Animal
; Lore did not produce any noticable changes in the success rates.
;
; The formula determined for calculating success rate is R = (S - B) * 2 where
; R is the success rate, S is the character's taming skill, and B is the
; minumum skill required to tame minus 0.1 (this is the base skill
; requirement). Using basic algebra and solving for S provides a formula that
; can can be used calculate the skill required to achieve a specific success
; rate (S = R / 2 + B). This formula is used in the table below to determine
; which creatures will provide the best chances to recieve a gain while
; taming.
; Column descriptions:
;
; ANIMAL The name of the animal to tame
; REQ SKILL The minimum skill required to tame
; MIN GAIN The skill level that has a 10% success rate
; MAX GAIN The skill level that has an 90% success rate
; C/M Monster (Yes/No)
; TYPE EasyUO FindItem type for animal
;
; REQ MIN MAX
; ANIMAL SKILL GAIN GAIN C/M TYPE
; Sheep 11.1 16 56 N TF_PF
; Cow 11.1 16 56 N IG_NG
; Hind 23.1 28 68 N TG
; Timber Wolf 23.1 28 68 N PG
; Great Hart 59.1 64 104 N AH
; Bull 71.1 76 116 N YG_XG
; Ridgeback 83.1 88 128 N BK
--- End quote ---
--- Code: ---;=================================================================
; Script Name: Animal Taming
; Author: VicVega
; Version: 0.3
; Shard OSI / FS: UO Legends
; Revision Date: 26/5/2009
; Purpose: Trains Animal Taming to GM
; Globals: None
;=================================================================
; Instructions: You need to setup your steed ID in %steedID
; variable on setup
;************************ Setup **********************************
gosub setup
repeat
gosub chooseTamingAnimal
gosub findClosestAnimal %tameable
gosub tamingMonitor
until #charGhost = yes
halt
;************************* Subs **********************************
sub tamingMonitor
if %findDist <> N/A
{
if %findtype in %tameable
gosub Taming %findid
}
if %findDist = N/A
{
event sysmessage no more animals around
event pathfind %charstartx %charstarty %charstartz
wait 10s
}
return
sub setup
set %steedID OFWC
set %charstartx #charposx
set %charstarty #charposy
set %charstartz #charposz
return
sub Taming
set %oldTameFollowers #followers
set %tameID %1
gosub checkParagon %tameID
finditem %tameID G_16
while #findkind <> -1
{
set %tameid #findid
if %tameid <> #ltargetid
event exmsg %tameid 3 30 target!
gosub TameAnimal
if #followers > %oldTameFollowers
gosub tamingRelease
finditem %tameID G_16
}
return
sub checkParagon
event property %1
if Paragon in #property
{
event sysmessage killing paragon!
gosub killPet
}
return
sub TameAnimal
set #ltargetid %tameid
set #ltargetkind 1
while #findDist > 2
{
event pathfind #findX #findY #findZ
wait 1s
finditem %tameID G_16
}
event macro 13 35 ; animal taming
target 3s
event macro 22 0 ; last target
gosub scan seems_to_accept anger_the_beast fail_to_tame
+ too_far clear_path too_many_followers can't_see_that
+ too_angry distracted someone_else tame_already
+ cannot_be_tamed can't_tame_that no_chance
set %ignore someone_else in #result || tame_already in #result
if %ignore = #true
ignoreitem %tameID
return
sub scan
set %maxTimeOutScan 15
set %timeout #scnt + %maxTimeOutScan
set %jrnl #jindex
scanjournal %jrnl
while #scnt < %timeout
{
finditem %tameID G_16
if #finddist > 2
event pathfind #findX #findY #findZ
if %jrnl < #jindex
{
set %jrnl %jrnl + 1
scanjournal %jrnl
}
for %journalCounter 1 %0
{
if % . %journalCounter in #journal
return % . %journalCounter
}
}
return
sub TamingRelease
msg all follow me $
gosub releasePet
gosub killPet
return
sub releasePet
set %releaseGumpSize 270_120
set %maxTimeOut 15
set %timeOut #scnt + %maxTimeOut
set %waitForGump #true
exevent popup %tameID 10
while %waitForGump = #true
{
wait 1s
set %waitForGump #contSize <> %releaseGumpSize && #scnt < %timeOut
}
set %releaseGumpX #contposx + 35
set %releaseGumpY #contposy + 90
click %releaseGumpX %releaseGumpY
wait 15
return
sub killPet
gosub dismount
gosub atackTamedPet %tameID
finditem %steedID
while #findKind <> -1
{
gosub mount
finditem %steedID
}
return
sub dismount
set #lObjectID #charID
event macro 17
wait 1s
return
sub atackTamedPet
set %victimID %1
set #lTargetKind 1
SET #lTargetID %victimID
event exmsg %tameid 3 30 kill this!
gosub atack
finditem %victimID
set %maxTimeOut 10
set %timeOut #scnt + %maxTimeOut
while #findKind <> -1
{
wait 1s
finditem %victimID
event exmsg %tameid 3 30 kill this!
gosub checkAtackTimeOut
}
return
sub atack
msg all kill $
target 25s
event macro 22 0
return
sub checkAtackTimeOut
if #scnt > %timeOut
{
gosub atack
set %timeOut #scnt + %maxTimeOut
}
return
sub mount
finditem %steedID
set #lObjectID %steedID
while #findDist > 1
{
msg all follow me $
wait 1s
finditem %steedID
}
event macro 17
wait 1s
return
sub findClosestAnimal
finditem %1 G_16
set %findid #findid
set %findtype #findtype
set %finddist #findDist
if #findcnt > 1
{
for #findIndex 1 #findcnt
{
if #findkind <> -1 && #findDist < %findDist
{
set %findid #findid
set %findtype #findtype
set %finddist #findDist
}
}
}
return
sub chooseTamingAnimal
chooseskill anim
if #skill = #skillcap
{
display ok Taming skillcap reached
halt
}
if #skill >= 300 && #skill < 450
set %tameable TF_PF_IG_NG_TG
if #skill >= 450 && #skill < 600
set %tameable TG_PG
if #skill >= 600 && #skill < 750
set %tameable AH
if #skill >= 750 && #skill < 900
set %tameable YG_XG_AH
if #skill >= 900 && #skill < 1200
set %tameable BK
return
--- End code ---
VicVega:
New version, some fixes, improved stability and code readbility.
Version 0.3 published, fixed problem with RidgeBacks and now kills RidgeBack Paragons (wich are not tamable)
Ultima:
I finally got around to testing this script. I got my butt thrown in jail the other day for using Maddog's Jhelom Bull Pen Trainer so some other method to get gains is urgently needed. 8)
I added Gamans to the list which are great for gains I really don't understand why more people don't tame gaman's to 120 instead of Bulls. I 120'd my first tamer off Gamans. Totally secluded and virtually danger free....
Anyways...I couldn't get the script to work for me. After taming the Gaman it would give the All Follow Me command but wouldn't release newly tamed pet and dismount and kill it. When I manually released the pet it killed it but then the script just sat there idle.
Not quite sure where the problem lay. It could be my end with my client. There are quite a few scripts that won't run on my main computer but will on my computer which runs Windows Vista. I'll try it on my 2nd computer as well and see if the results are any different.
Hopefully someone else also gives this a try because we really do need more taming scripts. ;)
12TimesOver:
Vic, compliments to you on such well organized code. It's refreshing to get neat code, makes it so much more readable and yours is laid out very well.
I want to give this a test for you since the timing is perfect (training a tamer as we speak but, like Ultima, am having issues with griefers using Maddog's). My only issue is that I will need to modify your "Killpet" sub to mage-kill the tame instead of mount-kill it. If that's no problem for you from the testing perspective I'll give it a whirl later today when my son goes down for a nap. If you don't want me to mod it I'll probably do it anyway but I just won't tell you how it goes ;)
Would be REALLY easy to integrate a kill option into the setup routine then just sub out to "Sub Magekill" or "Sub Mountkill" based on the setup option. Just a thought :P
XII
VicVega:
Feel free to modify the script, I don't mind.
I know I could support other methods of killing, but I don't have a tamer with the skills to do so and I prefer to test the script in order to know if it works fine at least for me.
I'm glad you like the code.
Navigation
[0] Message Index
[#] Next page
Go to full version