Possible fix for crashing: add a delay after
Code:
CSelectNearestTarget( )
PHP Code:
--[[ LUA SIMPLE EXAMPLE ]]
function myWaitSecond( lpVal )
lpVal = lpVal or 1
local dwWait = os.time( ) + lpVal
while os.time( ) < dwWait do end
end
IsTarget = CGetPlayerTarget( )
if IsTarget == 0 then
CSelectNearestTarget( )
myWaitSecond(0.3)
else
CSendSlotBarSkill( 1 )
myWaitSecond( 1 )
CSendSlotBarSkill( 2 )
myWaitSecond( 1 )
CSendSlotBarSkill( 3 )
end