Yoko
http://forum.yoko.com.ua/

Wandering Animal Taming
http://forum.yoko.com.ua/viewtopic.php?f=20&t=8553
Page 1 of 1

Author:  knicholes [ 2006-08-19 22:54:17 ]
Post subject:  Wandering Animal Taming

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

Author:  Nmy [ 2006-08-19 23:36:49 ]
Post subject: 

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

Nnnice script :wink:

Author:  Skazi69 [ 2006-08-20 20:16:34 ]
Post subject: 

:D
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

Page 1 of 1 All times are UTC+02:00
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/