Bom tente usar este script :
--[[sKILL_FIST = 0SKILL_CLUB = 1
SKILL_SWORD = 2
SKILL_AXE = 3
SKILL_DISTANCE = 4
SKILL_SHIELD = 5
SKILL_FISHING = 6
SKILL__MAGLEVEL = 7
SKILL__LEVEL = 8]]
function onSay(cid, words, param)
-- configs--
local skill = 1 -- id do skill logo acima.
local money = 1000 -- preço por pontos de skill.
local maxbuy = 10 -- pontos maximo que pode comprar por vez.
local limite = 100 -- apartir de tantos pontos num pode mais comprar.
if getPlayerSkill(cid,skill) <= limite then
if getPlayerMoney(cid) >= param*money then
if tonumber(math.ceil(param)) <= maxbuy then
doPlayerAddSkillTry(cid,skill,param)
doPlayerRemoveMoney(cid,param*money)
end
else
doPlayerSendCancel(cid,"Você não tem dinheiro suficiente.")
end
else
doPlayerSendCancel(cid,"Nesse Skill não é mais possivel usar esse comando.")
end
return true
end
Creditos :
xotservx
Peguei o script que tava em um topico que eu achei.
Ajudei ? REP+ ![]()


info
Grupo: Campones
Registrado: 06/11/09
Posts: 17
Reputação: +3
Como está na descrição do tópico ali, eu uso uma talkaction que vende skills.
Que é está aqui logo abaixo:
local itemretirado = 9971
function onSay(cid, words, param, channel)
local alpha={}
confere(cid)
if doPlayerRemoveItem(cid,itemretirado,1) then
if words == "!fist" and alpha[1] ~= 0 then
doPlayerAddSkillTry(cid,0,1)
elseif words == "!club" and alpha[2] ~= 1 then
doPlayerAddSkillTry(cid,1,1)
elseif words == "!sword" and alpha[3] ~= 2 then
doPlayerAddSkillTry(cid,2,1)
elseif words == "!axe" and alpha[4] ~= 3 then
doPlayerAddSkillTry(cid,3,1)
elseif words == "!distance" and alpha[5] ~= 4 then
doPlayerAddSkillTry(cid,4,1)
elseif words == "!shield" and alpha[6] ~= 5 then
doPlayerAddSkillTry(cid,5,1)
else
doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE,'Você já atingiu o número máxido de skills para se poder comprar mais.')
end
doSendMagicEffect(getThingPos(cid),12)
doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE,'Skill comprado com sucesso.')
else
doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE,'Você não tem o necessário para comprar esta skill.')
end
end
function confere(cid)
for x=0,5 do
if getPlayerSkillLevel(cid,x) > 349 then
alpha[x+1] = x
end
end
end
Então até funciona mas eu quero que a cada vez que o player comprar o skill pelo item seja 1 skill por 1 item.
Exemplo:
O item 9971 = Golden Igot (No meu ot é Barra de Ouro;Cópia do RadBr)
e o player ao pronunciar !axe, !club... compra 1 skill do desejado por 1 Barra de Ouro.
Se alguém souber ajeitar posta aqui por favor.
Obrigado.