по кнопкам себя и пета
codice:
set %PetId FPZD
set %jindex #jindex
set %dlpc 1000
set %flpc 10000
set %d 11
set #lpc %dlpc
gosub init
loop:
onhotkey r
gosub telefar
onhotkey z alt
gosub telesitpet
onhotkey q
gosub healself
onhotkey f1 alt
gosub healpet
onhotkey f2 alt
gosub curepet
sleep 1
goto loop
sub healpet
set #lpc %flpc
set %ltarget #ltargetid
set %lkind #LTARGETKIND
set #targcurs 0
set #targcurs 0
event macro 15 3
target 8
set #ltargetid %petid
event macro 22 0
set #ltargetid %ltarget
set #LTARGETKIND %lkind
set #lpc %dlpc
return
sub curepet
set #lpc %flpc
set %ltarget #ltargetid
set %lkind #LTARGETKIND
set #targcurs 0
set #targcurs 0
event macro 15 10
target 15
set #ltargetid %petid
event macro 22 0
set #ltargetid %ltarget
set #LTARGETKIND %lkind
set #lpc %dlpc
return
sub healself
set #lpc %flpc
_healselfStart:
if C in #CHARSTATUS
{
set #targcurs 0
event macro 15 10
target 15
event macro 23 0
goto _healselfExit
}
if #hits < #maxhits
{
set #targcurs 0
event macro 15 3
target 8
event macro 23 0
goto _healselfExit
}
_healselfExit:
set #lpc %dlpc
return
