Queria saber se da para diminuir algo neste script ou remover alguma coisa inútil:
local id = { ["club"] = SKILL_CLUB, ["sword"]= SKILL_SWORD, ["axe"] = SKILL_AXE, ["distance"] = SKILL_DISTANCE, ["shielding"] = SKILL_SHIELD } local limit = 350 local voc = { ["club"] = {4, 8}, ["sword"] = {4, 8}, ["axe"] = {4, 8}, ["distance"] = {3, 7}, ["shielding"] = {4, 8} } local items = { itr = 9971, itr_amount = 10, ask = 10 } local msg = { "Command param required.", "You don't have required item.", "You can't buy this skill.", "You've reached the limit of this skill.", "Unknown skill." } function onSay(cid, words, param) if (param == '') then return doPlayerSendCancel(cid, msg[1]) end if (id[param]) then if (getPlayerSkill(cid, id[param]) < limit) then if isInArray(voc[param], getPlayerVocation(cid)) == true then if doPlayerRemoveItem(cid, items.itr, items.itr_amount) then for a = 1, items.ask do doPlayerAddSkill(cid, id[param], 1, true) end else doPlayerSendCancel(cid, msg[2]) end else doPlayerSendCancel(cid, msg[3]) end else doPlayerSendCancel(cid, msg[4]) end else doPlayerSendCancel(cid, msg[5]) end return true end