Page 1 of 1

помогите ско скриптом, плз. в поиске не нашёл -(

Posted: 2005-08-03 10:31:48
by zzpsmzz
надо что бы в killer="" записывалось имя нападающего.
т.е. я хочу узнать, кто именно убивает меня на макросе.
достаточно последние 20 строк журнала даже перед смертью

sub kill()
var killer
while not uo.dead()
wait(100)
wend
killer=""
uo.textprint(killer)
end sub

перерыл хелп, перерыл форум, не нашёл -(

Posted: 2005-08-03 11:02:09
by omi4

Posted: 2005-08-03 11:42:58
by zzpsmzz
слишком сложно, нифига не понял -(

Posted: 2005-08-03 11:47:59
by omi4

Code: Select all

############################################################ 
#   Контроль за опасностью 
############################################################ 
sub Visor() 
VAR asd 
while 1 
UO.deletejournal() 
while not UO.InJournal(":") 
wait(100) 
wend 
if UO.InJournal("Elemental") then 
uo.SetGlobal("timeelem",time()) 
uo.textopen() 
uo.textprint("Будет бой с элементалем") 
UO.Exec("exec ElemKill") 
UO.Exec("terminate Visor") 
endif 
if UO.InJournal("attacking you") then 
UO.GetStatus("UO.JournalSerial(0)") 
uo.SetGlobal("name",UO.GetName(UO.JournalSerial(0))) 
log(9,uo.GetGlobal("name"),"") 
uo.textopen() 
uo.textprint("Эта крыса "+UO.GetName(UO.JournalSerial(0))+" внезапно атаковала!" ) 
UO.Exec("exec Escape") 
UO.Exec("terminate Visor") 
endif 
asd=UO.GetNotoriety(UO.JournalSerial(0)) 
if asd==6 then 
UO.GetStatus("UO.JournalSerial(0)") 
uo.SetGlobal("name",UO.GetName(UO.JournalSerial(0))) 
log(6,uo.GetGlobal("name"),"") 
uo.textopen() 
uo.textprint("В шахте оказался ПК - "+UO.GetName(UO.JournalSerial(0))) 
UO.Exec("exec Escape") 
UO.Exec("terminate Visor") 
endif 
if asd==5 then 
UO.GetStatus("UO.JournalSerial(0)") 
uo.SetGlobal("name",UO.GetName(UO.JournalSerial(0))) 
log(8,uo.GetGlobal("name"),"") 
uo.textopen() 
uo.textprint("В шахте вражеский гильдмэн - "+UO.GetName(UO.JournalSerial(0))) 
UO.Exec("exec Escape") 
UO.Exec("terminate Visor") 
endif 
if asd==4 then 
UO.GetStatus("UO.JournalSerial(0)") 
uo.SetGlobal("name",UO.GetName(UO.JournalSerial(0))) 
log(7,uo.GetGlobal("name"),"") 
uo.textopen() 
uo.textprint("В шахте оказался криминал - "+UO.GetName(UO.JournalSerial(0))) 
UO.Exec("exec Escape") 
UO.Exec("terminate Visor") 
endif 
wend 
end sub 

Posted: 2005-08-03 13:09:12
by zzpsmzz

Code: Select all

sub kiler_log()
start:
uo.deletejournal()
while not UO.InJournal(":") 
wait(100)
wend
if UO.InJournal("attacking you") then 
UO.GetStatus("UO.JournalSerial(0)") 
uo.textopen() 
uo.textprint("Эта крыса "+UO.GetName(UO.JournalSerial(0))+" напала на меня! *ужс*" )
endif
goto start
end sub
так?

так возвращает собственное имя, а не нападающего

Posted: 2005-08-03 15:42:34
by flake

Code: Select all

sub kiler_log() 
VAR name
start: 
uo.deletejournal() 
while not UO.InJournal(":") 
wait(100) 
wend 
if UO.InJournal("attacking you") then 
name = UO.GeName( UO.JournalSerial( UO.InJournal( 'attacking you' )-1 ) )
uo.textopen() 
uo.textprint("Эта крыса "+ name +" напала на меня! *ужс*" ) 
endif 
goto start 
end sub

Posted: 2005-08-04 09:49:39
by I'm
Люблю я этот мининг :lol: