Em data/talkactions/scripts crie um arquivo.lua e cole isto dentro:
function onSay(cid, words, param)
local t = string.explode(param, ",")
if(not t[2]) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid param specified.")
return true
end
local tid = getPlayerByNameWildcard(t[1])
if(not tid or (isPlayerGhost(tid) and getPlayerGhostAccess(tid) > getPlayerGhostAccess(cid))) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. param .. " not found.")
return true
end
if(not t[3]) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, " [" .. t[1] .. " - " .. t[2] .. "] = " .. getPlayerStorageValue(tid, t[2]))
else
setPlayerStorageValue(tid, t[2], t[3])
end
return true
end
Em talkactions.xml cole a tag:
<talkaction log="yes" words="/addsto" access="4" event="script" value="NOMEDOSEUARQUIVO.lua"/>
Não precisa falar "/removesto" já que o script vai setar uma storage com o value que quiser. Então, para "remover" é só colocar o value que você quer que o player tenha.
Exemplo:
Dando a storage 3121, value = 10
/addsto Leoxtibia,3121,10
Caso eu queira "remover" é só dar a mesma storage com o value que quero (Supondo que irei "remover" 4)
/addsto Leoxtibia,3121,6
O player ficará com o value 6.
Espero ter ajudado.



info
Grupo: Artesão
Registrado: 22/01/12
Posts: 121
Reputação: +23
Char no Tibia: Not...
queria pedir uma talkaction, /addsto e /removesto, tpo assim queria q essa talk funcionasse assim ela adiciona value da storage 2310, ai queria tipo /addsto player name, value de storage, ex n tenho essa storage em um char ai falo /addsto char, 50 ai o char fica com storage 2310 e com a value 50,e e o removesto so remove o value dela tipo /removesto char, 10 só isso obg