Hello, I'm trying to make a script that would check journal for constant messages of "DEAD: Guild Player Name was killed in" and then would try to auto res the player(by ID) and if succeded, write the name of the player and that he is ressurected in guild chat.
I want this to be used in all guild so closest people would ressurect.
Sub ResGuild()
UO.Print("Guild Ress - ON")
repeat
UO.DeleteJournal()
wait(1000)
if UO.InJournal('DEAD: Player Name was killed in') then
repeat
UO.Exec('usetype 0x0E21')
UO.waittargetobject('Player ID')
UO.DeleteJournal()
uo.getstatus('Player ID')
if uo.gethp('laststatus') == 0 then
wait(500)
else
UO.Say(".gsay "+ uo.getname('laststatus') +" ressurected")
endif
until UO.InJournal("Player Name ressurected")
endif
until false
end sub
Sub ResGuild()
UO.Print("Guild Ress - ON")
repeat
UO.DeleteJournal()
wait(1000)
if UO.InJournal('DEAD: Ryza Lenke was killed in') then
repeat
UO.Exec('usetype 0x0E21')
UO.waittargetobject('0x0001F906')
uo.getstatus('0x0001F906')
if uo.gethp('laststatus') == 0 then
wait(500)
else
UO.Say(".gsay "+ uo.getname('laststatus') +" ressurected")
wait(1000)
endif
until UO.InJournal("Ryza Lenke")
endif
until false
end sub
Got this(first time I was next to the dead player, it ressed, but no .gsay. Second time I was far away. It didn't repeat itself) :
If Char<>0 Then
UO.SetArm('CWeapon')
uo.cast('название каста',Char)
wait(5000) ; пауза для каста заклинания
UO.WaitTargetObject(Char)
UO.UseType('0x0E21')
UO.Print("?anno?aeo!!!")
wait(500)
uo.cast('название каста','self')
wait(500)
UO.Arm('CWeapon')
Else
That doesn't look right. Maybe it's resurrection magic and bandages, both at the same time. or resurrection and heal. the second cast might be self buff
While UO.GetHP('Player ID')<UO.GetMaxHP('PlayerID') And UO.Count('0x0E21')>0 And UO.GetDistance('Player ID')<=??? ; change ??? for the maximum healing distance! And to stop healing, just get away from the player ;) ;
UO.WaitTargetObject('Player ID)
UO.UseType('0x0E21')
Wait(1000) ; Or as much as you think is better ;
WEnd