Hello guys, i'm doing my own Pet System and i can't pick the informations of CONST_SLOT_ARMOR, i don't know why... Any one can help me ?
Sorry for my english...
Code:
function onDeath(player)
local pokeball = player:getSlotItem(CONST_SLOT_ARMOR)
local description = pokeball:getDescription(distance)
local pokename, health, maxhp, dead = string.match(description, "(%a+)/(%d+)/(%d+)/(%a+)")
if #player:getSummons() == 0 then
player:say("Your pokemon are fainted.", TALKTYPE_MONSTER_SAY)
pokeball:setAttribute("description", ""..pokename.."/"..healthdead.."/"..maxhp.."/Dead/ Pertece a "..player:getName()..".")
end
end
Sorry for my english...