Hello, I was trying to create a command "@pet", before I put this script:
with this I have learned that the command works fine.
But then I switch to this script:
and the command "@pet" stopped work...
PS: I tested the same script and an NPC works.
Anyone know why?
Regards,
Code:
[@Mir3G_1]
{
#IF
#SAY
@pet works!\
}
But then I switch to this script:
Code:
[@Mir3G_1]
{
#IF
#ACT
FormatStr "FLD_PJ='%s'" %USERNAME
ReadValueSql "TBL_PET" %A9 "FLD_PJ,FLD_PET,FLD_ENERGIA" [@sigue]
[@sigue()]
#ACT
Mov A4 %ARG(2)
Mov D9 %ARG(3)
Mov A3 %ARG(1)
goto @invocar
[@invocar]
#IF
Equal D9 0
#ACT
goto @invocar2
#ELSEACT
Sysmsg "Tu mascota no dispone energia, alimentala!"
[@invocar2]
#IF
Checkmonrecall
#ACT
MONRECALL %A4 3 15
SysMsg "Mascota invocada!"
goto @quitarenergia
break
[@quitarenergia]
#IF
#ACT
Dec D9 10
FormatStr "FLD_PJ='%s'" %USERNAME
Mov A8 %A9
FormatStr "FLD_ENERGIA='%s'" %D9
UPDATEVALUESQL "TBL_PET" %A8 %A9
break
}
PS: I tested the same script and an NPC works.
Anyone know why?
Regards,