Wandering Animal Taming

Anything and all.

Moderators: Murderator+, Murderator

Post Reply
knicholes
Posts: 9
Joined: 2004-05-16 00:08:59
Location: Utah
Contact:

Wandering Animal Taming

Post by knicholes »

This script makes you walk around until you allnames something. Once it allnames it, it walks over to it and tames it. Then it kills it.

When there is no animal on your screen, it keeps looking until it finds one. Here is the code.



sub HoMeSlIcEsTaMiNg()
var J, serial, finded
var ALL_NAMES_BUTTON = 77
while 1
uo.warmode(0)
uo.ignorereset()
uo.exec("ignore self")
findbody()
wait(100)
UO.Press(ALL_NAMES_BUTTON)
wait(200)
if UO.InJournal('a') OR UO.InJournal('e') OR UO.InJournal("i") OR UO.InJournal("o") OR UO.InJournal("u") then
uo.print("Found something?")
J = UO.Journal("You see")
uo.print("J is" +UO.GetName(UO.JournalSerial(J)))
;Serial = UO.JournalSerial(J)
serial = uo.JournalSerial(uo.Journal('You see'))
uo.print("walking to " + UO.GetName(UO.JournalSerial(J)))
superwalk(0,0,serial)
TameAnimal(Serial)
endif
wend
end sub

sub TameAnimal(Animal)
UO.Print('Taming '+UO.GetName(Animal)+'...')
repeat
UO.DeleteJournal()
superwalk(0,0,Animal)
Wait(100)
UO.WaitTargetObject(Animal)
wait(200)
UO.UseSkill('Animal Taming')
wait(200)
While not UO.InJournal("seems to accept") and not UO.InJournal("You fail to tame the") and not UO.InJournal("I am too far away") and not UO.InJournal("You are your own master") and not UO.InJournal("already tame") and not UO.InJournal("quantity taming skill") and not UO.InJournal("can't") and not UO.InJournal("creature very hungry") AND NOT UO.InJournal("taming ability") AND NOT UO.InJournal("can not see") AND NOT Uo.InJournal("already") AND NOT Uo.InJournal("You attempt to tame Body") AND NOT UO.InJournal("too far") and NOT UO.InJournal("cannot be tamed")
Wait(100)
Wend
Until UO.InJournal("accept you as its master") or UO.InJournal("You are your own master") or UO.InJournal("already tame") or UO.InJournal("quantity taming skill") or UO.InJournal("creature very hungry") or not uo.GetDistance(Animal) OR UO.InJournal("taming ability") OR Uo.InJournal("You attempt to tame Body") OR UO.InJournal("cannot be tamed")
UO.Print('Aminal tamed successfuly')
if not UO.InJournal("has be removed") and UO.GetDistance(Animal) OR UO.InJournal("already") OR UO.InJournal("taming ability") then
UO.Print('Kill '+UO.GetName(Animal)+'...');
UO.Attack(Animal)
while not UO.Countground("0x2006")
Superwalk(0,0,Animal)
Wait(1000)
wend
findbody()
UO.WarMode(0)
uo.deletejournal()
endif
end sub

sub findbody()
while 1
uo.deletejournal()
uo.exec("findtype 0x2006 -1 ground")
while UO.findcount()
uo.exec("findtype 0x2006 -1 ground")
wait(20)
UO.hide("finditem")
uo.ignore('finditem')
wait(20)
wend
end sub
Nmy
Expert!
Posts: 2152
Joined: 2005-09-14 15:31:58
Location: Latvia

Post by Nmy »

Please use [code][code/.] for scripts

Nnnice script :wink:
Skazi69
Posts: 42
Joined: 2006-07-25 14:10:53

Post by Skazi69 »

:D

Code: Select all

sub HoMeSlIcEsTaMiNg() 
var J, serial, finded
var ALL_NAMES_BUTTON = 77
while 1
uo.warmode(0)
uo.ignorereset()
uo.exec("ignore self")
findbody()
wait(100)
UO.Press(ALL_NAMES_BUTTON)
wait(200)
if UO.InJournal('a') OR UO.InJournal('e') OR UO.InJournal("i") OR UO.InJournal("o") OR UO.InJournal("u") then
uo.print("Found something?")
J = UO.Journal("You see")
uo.print("J is" +UO.GetName(UO.JournalSerial(J)))
;Serial = UO.JournalSerial(J)
serial = uo.JournalSerial(uo.Journal('You see'))
uo.print("walking to " + UO.GetName(UO.JournalSerial(J)))
superwalk(0,0,serial)
TameAnimal(Serial)
endif
wend
end sub

sub TameAnimal(Animal)
UO.Print('Taming '+UO.GetName(Animal)+'...')
repeat
UO.DeleteJournal()
superwalk(0,0,Animal)
Wait(100)
UO.WaitTargetObject(Animal)
wait(200)
UO.UseSkill('Animal Taming')
wait(200)
While not UO.InJournal("seems to accept") and not UO.InJournal("You fail to tame the") and not UO.InJournal("I am too far away") and not UO.InJournal("You are your own master") and not UO.InJournal("already tame") and not UO.InJournal("quantity taming skill") and not UO.InJournal("can't") and not UO.InJournal("creature very hungry") AND NOT UO.InJournal("taming ability") AND NOT UO.InJournal("can not see") AND NOT Uo.InJournal("already") AND NOT Uo.InJournal("You attempt to tame Body") AND NOT UO.InJournal("too far") and NOT UO.InJournal("cannot be tamed")
Wait(100)
Wend
Until UO.InJournal("accept you as its master") or UO.InJournal("You are your own master") or UO.InJournal("already tame") or UO.InJournal("quantity taming skill") or UO.InJournal("creature very hungry") or not uo.GetDistance(Animal) OR UO.InJournal("taming ability") OR Uo.InJournal("You attempt to tame Body") OR UO.InJournal("cannot be tamed")
UO.Print('Aminal tamed successfuly')
if not UO.InJournal("has be removed") and UO.GetDistance(Animal) OR UO.InJournal("already") OR UO.InJournal("taming ability") then
UO.Print('Kill '+UO.GetName(Animal)+'...');
UO.Attack(Animal)
while not UO.Countground("0x2006")
Superwalk(0,0,Animal)
Wait(1000)
wend
findbody()
UO.WarMode(0)
uo.deletejournal()
endif
end sub

sub findbody()
while 1
uo.deletejournal()
uo.exec("findtype 0x2006 -1 ground")
while UO.findcount()
uo.exec("findtype 0x2006 -1 ground")
wait(20)
UO.hide("finditem")
uo.ignore('finditem')
wait(20)
wend
end sub
Post Reply