надо что бы в killer="" записывалось имя нападающего.
т.е. я хочу узнать, кто именно убивает меня на макросе.
достаточно последние 20 строк журнала даже перед смертью
sub kill()
var killer
while not uo.dead()
wait(100)
wend
killer=""
uo.textprint(killer)
end sub
перерыл хелп, перерыл форум, не нашёл -(
помогите ско скриптом, плз. в поиске не нашёл -(
Moderators: Murderator+, Murderator
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
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
так?
так возвращает собственное имя, а не нападающего
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