Page 1 of 1
Need help with script
Posted: 2007-12-18 06:45:57
by Mazer
any ideas how to improve it ?
Code: Select all
sub CheckingPlayers()
VAR a, b
uo.ignore('self', 'on')
DIM Chars[2]
Chars[0] = '0x0190' #boba
Chars[1] = '0x0191' #ciuvas
while not uo.dead()
for a = 0 to 1
while val(uo.getglobal('find')) == 1
wait(50)
wend
uo.set('finddistance', '20')
uo.findtype(Chars[a], '-1', '1')
if uo.findcount() > 0 then
uo.exec('exec recnamo')
return
else
wait(500)
endif
next
wend
end sub
Some times it dosent work.. and dont recall.. just stops..
and recnamo()
Code: Select all
sub recnamo()
var a
VAR d = uo.getx('self')
run()
uo.deletejournal()
repeat
uo.deletejournal()
uo.waittargetobject('0x4000465D')
uo.cast('Recall')
a = 0
repeat
wait(100)
a = a + 1
until a > 36 or d <> uo.getx('self') or uo.injournal('fizzles')
until not uo.injournal('fizzles')
end sub
Re: Need help with script
Posted: 2007-12-18 14:23:29
by CuHTpoH
Mazer wrote:any ideas how to improve it ?
Code: Select all
sub CheckingPlayers()
VAR a, b
uo.ignorereset # added
uo.ignore('self') # deleted ", 'on'"
DIM Chars[2]
Chars[0] = '0x0190' #boba
Chars[1] = '0x0191' #ciuvas
while not uo.dead()
for a = 0 to 1
while val(uo.getglobal('find')) == 1 # can't understand for what is needed
wait(50)
wend
uo.set('finddistance', '20')
uo.findtype(Chars[a], '-1', 'ground') #replaced '1' to 'ground'
if uo.findcount('finditem')>0 then
uo.exec('exec recnamo')
return
else
wait(50) #replaced 500 to 50
endif
next
wend
end sub
Some times it dosent work.. and dont recall.. just stops..
and recnamo()
Code: Select all
sub recnamo()
var timec
var myx = uo.getx('self')
var myy=uo.gety('self') #added
#run() #what is that?
repeat
uo.deletejournal()
uo.waittargetobject('0x4000465D')
uo.cast('Recall')
timec=uo.timer()+80
while not uo.injournal('fizzles') and not uo.injournal('reagents') and not timec<uo.timer() and (myx==uo.getx('self') and myy==uo.gety('self'))
wait(50)
wend
until myx<>uo.getx('self') and myy<>uo.gety('self') # I MADE A MISTAKE HERE! And now i fixed it - char recalls until both xpos and ypos changes
end sub
try that and tell me results
Posted: 2007-12-18 15:23:00
by Mazer
Code: Select all
sub run()
uo.exec('terminate CheckingPlayers')
uo.exec('terminate Checkinglife')
end sub
Posted: 2007-12-18 16:50:46
by CuHTpoH
Does it work or no?
Posted: 2007-12-18 17:04:40
by Mazer
recal dosent then it gets to other place it start to recal and recal and recal.. no pause.. 1 second 10 of all regents..
Posted: 2007-12-18 17:11:22
by Mazer
player serch works with some errors

fixed one mistake.. and then player recals near me and dont move script cant find it

Posted: 2007-12-18 20:09:42
by CuHTpoH
look at my comment about my mistake at the end of the recnamo() script
and about characters find - that is not an error of injection, as i heard UOServer does not send information about another client appeared nearby until its moved..
Posted: 2007-12-18 21:03:02
by Mazer
ok i understand about player serch

but another mistake with your skript

if i dont have regents script goes spamed
Posted: 2007-12-18 21:07:47
by Mazer
ok tryed to slove by my self is it right ?
Code: Select all
sub tt()
var timec
var myx = uo.getx('self')
var myy=uo.gety('self') #added
repeat
uo.deletejournal()
uo.waittargetobject('0x4000465D')
uo.cast('Recall')
timec=uo.timer()+80
uo.deletejournal()
while not uo.injournal('fizzles') and not uo.injournal('reagents') and not timec<uo.timer() and (myx==uo.getx('self') and myy==uo.gety('self'))
wait(50)
wend
until myx<>uo.getx('self') and myy<>uo.gety('self') or uo.injournal('reagents')
end sub
can you see this one ?
http://forum.yoko.com.ua/viewtopic.php?t=12925
Posted: 2007-12-19 02:45:10
by CuHTpoH
i'll look at the link.
And you, try to make smth. with "uo.injournal('reagents')" - play with that and it might stop repeating..
Posted: 2007-12-19 13:18:50
by Mazer
Maybe you can help me connect scripts?

Link i gaved and this serch player

?
Posted: 2007-12-20 17:53:18
by Mazer
why this serching players cant find animals ?