local value_shield
if (getPlayerSkill(cid, SKILL_SHIELD) >= 1 and getPlayerSkill(cid, SKILL_SHIELD) <= 20 ) then
value_shield = 0
elseif (getPlayerSkill(cid, SKILL_SHIELD) >= 21 and getPlayerSkill(cid, SKILL_SHIELD) <= 40 ) then
value_shield = 1
elseif (getPlayerSkill(cid, SKILL_SHIELD) >= 41 and getPlayerSkill(cid, SKILL_SHIELD) <= 50 ) then
value_shield = 2
elseif (getPlayerSkill(cid, SKILL_SHIELD) >= 51 and getPlayerSkill(cid, SKILL_SHIELD) <= 70 ) then
value_shield = 3
elseif (getPlayerSkill(cid, SKILL_SHIELD) >= 71 and getPlayerSkill(cid, SKILL_SHIELD) <= 80 ) then
value_shield = 4
elseif (getPlayerSkill(cid, SKILL_SHIELD) >= 81 and getPlayerSkill(cid, SKILL_SHIELD) <= 99 ) then
value_shield = 5
elseif (getPlayerSkill(cid, SKILL_SHIELD) >= 100 ) then
value_shield = 6
end
local value_sword
if (getPlayerSkill(cid, SKILL_SWORD) >= 1 and getPlayerSkill(cid, SKILL_SWORD) <= 20 ) then
value_sword = 0
elseif (getPlayerSkill(cid, SKILL_SWORD) >= 21 and getPlayerSkill(cid, SKILL_SWORD) <= 40 ) then
value_sword = 1
elseif (getPlayerSkill(cid, SKILL_SWORD) >= 41 and getPlayerSkill(cid, SKILL_SWORD) <= 50 ) then
value_sword = 2
elseif (getPlayerSkill(cid, SKILL_SWORD) >= 51 and getPlayerSkill(cid, SKILL_SWORD) <= 70 ) then
value_sword = 3
elseif (getPlayerSkill(cid, SKILL_SWORD) >= 71 and getPlayerSkill(cid, SKILL_SWORD) <= 80 ) then
value_sword = 4
elseif (getPlayerSkill(cid, SKILL_SWORD) >= 81 and getPlayerSkill(cid, SKILL_SWORD) <= 99 ) then
value_sword = 5
elseif (getPlayerSkill(cid, SKILL_SWORD) >= 100 ) then
value_sword = 6
end
local value_axe
if (getPlayerSkill(cid, SKILL_AXE) >= 1 and getPlayerSkill(cid, SKILL_AXE) <= 20 ) then
value_axe = 0
elseif (getPlayerSkill(cid, SKILL_AXE) >= 21 and getPlayerSkill(cid, SKILL_AXE) <= 40 ) then
value_axe = 1
elseif (getPlayerSkill(cid, SKILL_AXE) >= 41 and getPlayerSkill(cid, SKILL_AXE) <= 50 ) then
value_axe = 2
elseif (getPlayerSkill(cid, SKILL_AXE) >= 51 and getPlayerSkill(cid, SKILL_AXE) <= 70 ) then
value_axe = 3
elseif (getPlayerSkill(cid, SKILL_AXE) >= 71 and getPlayerSkill(cid, SKILL_AXE) <= 80 ) then
value_axe = 4
elseif (getPlayerSkill(cid, SKILL_AXE) >= 81 and getPlayerSkill(cid, SKILL_AXE) <= 99 ) then
value_axe = 5
elseif (getPlayerSkill(cid, SKILL_AXE) >= 100 ) then
value_axe = 6
end
local value_axe
if (getPlayerSkill(cid, SKILL_CLUB) >= 1 and getPlayerSkill(cid, SKILL_CLUB) <= 20 ) then
value_club = 0
elseif (getPlayerSkill(cid, SKILL_CLUB) >= 21 and getPlayerSkill(cid, SKILL_CLUB) <= 40 ) then
value_club = 1
elseif (getPlayerSkill(cid, SKILL_CLUB) >= 41 and getPlayerSkill(cid, SKILL_CLUB) <= 50 ) then
value_club = 2
elseif (getPlayerSkill(cid, SKILL_CLUB) >= 51 and getPlayerSkill(cid, SKILL_CLUB) <= 70 ) then
value_club = 3
elseif (getPlayerSkill(cid, SKILL_CLUB) >= 71 and getPlayerSkill(cid, SKILL_CLUB) <= 80 ) then
value_club = 4
elseif (getPlayerSkill(cid, SKILL_CLUB) >= 81 and getPlayerSkill(cid, SKILL_CLUB) <= 99 ) then
value_club = 5
elseif (getPlayerSkill(cid, SKILL_CLUB) >= 100 ) then
value_club = 6
end
local value_lvl
local value_ml
local bless = {1, 2, 3, 4, 5}
for i = 1, table.maxn(bless) do
if(getPlayerBlessing(cid, bless[i])) then
value_shield = value_shield / 2
value_sword = value_sword / 2
value_club = value_club / 2
value_axe = value_axe / 2
-- value_ml
-- value_lvl
end
end
function onDeath(cid, corpse)
if isPlayer(cid) then
doPlayerAddSkillTry(cid, SKILL_SHIELD, -value_shield)
doPlayerAddSkillTry(cid, SKILL_SWORD,-value_sword)
doPlayerAddSkillTry(cid, SKILL_CLUB, -value_club)
doPlayerAddSkillTry(cid, SKILL_AXE, -value_axe)
-- value_ml
-- value_lvl
end
return true
end