before start scripts delete journal text with destr by uo.deletejournal() or by deljournal() (custom func, find it in this forum, also find checklag())
...
if uo.injournal('des') then
...
check that Track world items is ON
find players (0x0190 and 0x0191) on the ground
click and get their names
use 2 funcs -
Code:
sub getnam(id)
var timez,t1="World save has been initiated"
deljournal(t1)
if uo.getname(id)=='' then
uo.click(id)
timez=uo.timer()+10
while timez>uo.timer() and uo.getname(id)==''
if uo.injournal(t1) then
deljournal(t1)
checklag()
timez=uo.timer()+10
endif
wait(100)
wend
if timez<uo.timer() then
return false
endif
endif
return uo.getname(id)
endsub
Code:
# finds one string in another
; int findentry( string, string )
; entry - what we seek for
; str - in which string
sub findentry(entry,str)
var i
for i=0 to strlen(str)-strlen(entry)
if mid(str,i,strlen(entry))==entry then
return i
endif
next
return -1
endsub
so if findentry() gives number bigger than -1 - there is des in name, than get it's serial
_________________
**Выставляем отступы в скриптах*** ©Destruction
Feel the Power of Dark Side