Addskill

ScythePhantom
em Scripts

joadson

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 09/02/09Posts: 26

Simples vá no seu talkaction.xml e mude sua linha que deve está mais ou menos assim

<talkaction log="yes" words="/addskill" access="5" event="function" value="ALGUMACOISA.lua"/> e coloque esse no lugar

<talkaction log="yes" words="/addskill" access="5" event="function" value="addSkill"/>, desse jeito já pega as funções da sourcer(executável)

murilo103

Só Jesus Salva!
avatar
Cavaleiro
Cavaleiro

INFOS

Grupo: CavaleiroRegistrado: 20/09/07Posts: 196Char no Tibia: Programadorfp

Teste esse :)

 

 

function onSay(cid, words, param, channel)

if(param == '') then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.")

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

 

uXme5bR.png

Feito por Gears!

 

Que todos fiquem com Deus, um grande abraço meu :) Murilo Loureiro.

Stigal

don't ever stop...
avatar
Herói
Herói

INFOS

Grupo: HeróiRegistrado: 28/11/10Posts: 3402Gênero: Masculino

Tópico movido para a seção de dúvidas e pedidos resolvidos.

VI6MDIG.png

 

"O fracasso é a oportunidade de se começar de novo inteligentemente"

Minhas Redes Sociais: Youtube | Página & Grupo | Steam  | Discord Xtibia | Skype: @mrooger

 

OTpanel