AddSkill() & RemoveSkill() do not maintain changes after a player re-logs or zones.
Partial example used in our Subclass to Commoner Script:
function SkillSwitch(NPC,player)
if HasSkill(player, 609880714) then -- Defense
RemoveSkill(player, 609880714)
end
if HasSkill(player, 540022425) then -- Parry
RemoveSkill(player, 540022425)
end
if HasSkill(player, 2897193374) then -- Light Armor
RemoveSkill(player, 2897193374)
end
if HasSkill(player, 2246237129) then -- Medium Armor
RemoveSkill(player, 2246237129)
end
if HasSkill(player, 241174330) then -- Heavy Armor
RemoveSkill(player, 241174330)
end
--COMMONER GAINED SKILLS
if not HasSkill(player, 2072844078) then -- Magic Affinity
AddSkill(player, 2072844078,1,5)
end
if not HasSkill(player, 3539032716) then -- Very Light Armor
AddSkill(player, 3539032716,1,5)
end
if not HasSkill(player, 2383540775) then -- Spell Avoidance
AddSkill(player, 2383540775,30,30)
end
if not HasSkill(player, 609880714) then -- Defense
AddSkill(player, 609880714,30,30)
end
AddSkill() & RemoveSkill() do not maintain changes after a player re-logs or zones.
Partial example used in our Subclass to Commoner Script:
function SkillSwitch(NPC,player)
if HasSkill(player, 609880714) then -- Defense
RemoveSkill(player, 609880714)
end
if HasSkill(player, 540022425) then -- Parry
RemoveSkill(player, 540022425)
end
if HasSkill(player, 2897193374) then -- Light Armor
RemoveSkill(player, 2897193374)
end
if HasSkill(player, 2246237129) then -- Medium Armor
RemoveSkill(player, 2246237129)
end
if HasSkill(player, 241174330) then -- Heavy Armor
RemoveSkill(player, 241174330)
end
--COMMONER GAINED SKILLS
if not HasSkill(player, 2072844078) then -- Magic Affinity
AddSkill(player, 2072844078,1,5)
end
if not HasSkill(player, 3539032716) then -- Very Light Armor
AddSkill(player, 3539032716,1,5)
end
if not HasSkill(player, 2383540775) then -- Spell Avoidance
AddSkill(player, 2383540775,30,30)
end
if not HasSkill(player, 609880714) then -- Defense
AddSkill(player, 609880714,30,30)
end
AddSkill() & RemoveSkill() do not maintain changes after a player re-logs or zones.
Partial example used in our Subclass to Commoner Script:
function SkillSwitch(NPC,player) if HasSkill(player, 609880714) then -- Defense
end
if HasSkill(player, 540022425) then -- Parry
end
if HasSkill(player, 2897193374) then -- Light Armor
end
if HasSkill(player, 2246237129) then -- Medium Armor
end
if HasSkill(player, 241174330) then -- Heavy Armor
end
--COMMONER GAINED SKILLS
if not HasSkill(player, 2072844078) then -- Magic Affinity
end
if not HasSkill(player, 3539032716) then -- Very Light Armor
end
if not HasSkill(player, 2383540775) then -- Spell Avoidance
end
if not HasSkill(player, 609880714) then -- Defense
end
Fixed by
716f9affa3