I have the following in the L50 profile
Code: Select all
<onSkillCast><![CDATA[
-- Additional Lua code to execute when casting a skill
-- Note: arg1 contains the skill being used.
-- i.e. arg1.Name will be the name of the skill being cast
-- e.g.:
--if( 15 > player.HP/player.MaxHP*100 ) then
-- player:cast("PRIEST_SOUL_SOURCE");
--elseif( 25 > player.HP/player.MaxHP*100 ) then
-- player:cast("PRIEST_HOLY_AURA");
-- player:cast("PRIEST_URGENT_HEAL");
-- player:cast("PRIEST_URGENT_HEAL");
if( target.HP == target.MaxHP and target.MaxHP > player.MaxHP * settings.profile.options.AUTO_ELITE_FACTOR ) then
RoMScript("SetCameraPosition (0,0,1000000)");
end;
]]></onSkillCast>Code: Select all
D:/micromacro/scripts/rom/classes/player.lua:669: onSkillCast error: [string "..
."]:13: attempt to index global 'target' (a nil value)Code: Select all
<onSkillCast><![CDATA[
-- Additional Lua code to execute when casting a skill
-- Note: arg1 contains the skill being used.
-- i.e. arg1.Name will be the name of the skill being cast
-- e.g.:
--if( 15 > player.HP/player.MaxHP*100 ) then
-- player:cast("PRIEST_SOUL_SOURCE");
--elseif( 25 > player.HP/player.MaxHP*100 ) then
-- player:cast("PRIEST_HOLY_AURA");
-- player:cast("PRIEST_URGENT_HEAL");
-- player:cast("PRIEST_URGENT_HEAL");
local target = player:getTarget();
if( target.HP == target.MaxHP and target.MaxHP > player.MaxHP * settings.profile.options.AUTO_ELITE_FACTOR ) then
player:logout();
end;
]]>
</onSkillCast>What am I missing or have wrong in my insta-death-no-debt version? Thanks.