function onSay(cid, words, param)
-- config
local item,quanty = 9971,20 -- item id e quantidade que serao removidos
local skill_amount = 1 -- numero de skill que vai ser dade
-- end config
local skill = {
["fist"] = 0,
["club"] = 1,
["sword"] = 2,
["axe"] = 3,
["distance"] = 4,
["shield"] = 5
}
if (param == "magic") then
if getPlayerMagLevel(cid) >= 200 then
return doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE,'Você já atingiu o número máxido de magic !.')
elseif doPlayerRemoveItem(cid,item, quanty) == FALSE then
return doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE,'Você não tem itens suficientes!.')
end
doPlayerAddMagLevel(cid, skill_amount)
doPlayerSendTextMessage(cid,18,"Você recebeu sua Skill Magic.")
doSendMagicEffect(getCreaturePosition(cid),49)
return TRUE
end
if getPlayerSkillLevel(cid,skill[param]) >= 200 then
return doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE,'Você já atingiu o número máxido de skills!.')
elseif doPlayerRemoveItem(cid,item, quanty) == FALSE then
return doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE,'Você não tem itens suficientes!.')
end
doPlayerAddSkill(cid,skill[param],skill_amount,true)
doPlayerSendTextMessage(cid,18,'Você recebeu seus pontos de skill.')
doSendMagicEffect(getCreaturePosition(cid),math.random(28,30))
return TRUE
end
- Fórum
- xTibia - Notícias e Suporte
- Soluções
- Archived
- Comando Skill
3
1.2k
info
Grupo: Herói
Registrado: 20/05/10
Posts: 3.4k
Reputação: +1.5k
Gênero: Masculino

06 de fevereiro de 2011 às 12:01
info
Grupo: Campones
Registrado: 05/02/11
Posts: 2
Reputação: 0
Char no Tibia: Love Halls Sv2

12 de fevereiro de 2011 às 15:19
Vodkart Simplifica para mim esse comando, tambem estou precissando.
Obg
@Edit
eu puis tudo certinho quando entro no meu otserv eu falo !comprar sword ai fala que eu comprei só que nao comprei se a barra de sword tav 5% ela vai pra 95% mais nao upa, da uma ajuda ai
Editado Fevereiro 12 por amonruiz


info
Grupo: Cavaleiro
Registrado: 30/09/08
Posts: 174
Reputação: +60
Char no Tibia: Knight do Momento
function onSay(cid, words, param, channel)
if(param == '') then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param.")
return true
end
local t = string.explode(param, ",")
if(not t[2]) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Not enough params.")
return true
end
local pid = getPlayerByNameWildcard(t[1])
if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. t[1] .. " not found.")
return true
end
t[2] = t[2]:lower()
local skill = SKILL_IDS[t[2]]
if(not skill) then
local tmp = t[2]:sub(1, 1)
if(tmp == 'l' or tmp == 'e') then
skill = SKILL__LEVEL
elseif(tmp == 'm') then
skill = SKILL__MAGLEVEL
else
skill = tonumber(t[2])
if(not skill or skill < SKILL_FIRST or SKILL > SKILL__LAST) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Such skill does not exists.")
return true
end
end
end
local amount = tonumber(t[3])
if(not amount or amount == 0) then
amount = 1
end
doPlayerAddSkill(pid, skill, amount, true)
return true
end
Comando /addskill adm, tem como transformar ele para isso aki.
/buyskill nome do skill
Cobrar 20 items id 9971 por 10 skills.
Com limite 200...
Se puderem agradeço.
Os que achei tavam com defeito e talz.