Yoko

All sides of Injection
It is currently 2025-12-10 14:44:08

All times are UTC+02:00




Post new topic  Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Wandering Animal Taming
PostPosted: 2006-08-19 22:54:17 
Offline

Joined: 2004-05-16 00:08:59
Posts: 9
Location: Utah
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


Top
   
 Post subject:
PostPosted: 2006-08-19 23:36:49 
Offline
Expert!
User avatar

Joined: 2005-09-14 15:31:58
Posts: 2152
Location: Latvia
Please use [code][code/.] for scripts

Nnnice script :wink:

_________________
Уроки языка Injection
Основные команды языка Injection
Yoko Injection Code Sweeper
Drw (2009) скрипты
2017 Начал играть на Uorpg.net


Top
   
 Post subject:
PostPosted: 2006-08-20 20:16:34 
Offline

Joined: 2006-07-25 14:10:53
Posts: 42
: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


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 3 posts ] 

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited