Olá!
1° script.
function onSay(cid, words, param) premmy = getPlayerPremiumDays(cid) preco = 5 -- no caso, 5 dias de premmy account id = 2160 -- crystal coin item = getItemNameById(id) -- nao mudar if isPlayer(cid) == TRUE and premmy >= preco then if doPlayerRemovePremiumDays(cid, preco) == TRUE then doPlayerAddItem(cid, id, 1) doPlayerSendTextMessage(cid, 25, "You've bought a "..item.." with the price of "..preco.." premium days.") end else doPlayerSendTextMessage(cid, 25, "Sorry, you need to have "..preco.." premium days to buy this.") end return TRUE end
XML:
<talkaction words="!buycrystal" script="nomedoscript.lua"/>
Nesse script, no caso, ao cara falar !buycrystal, ele perde 5 dias de premmy e ganha 1 ![]()
Não estou podendo testar, qualquer erro poste aqui.
Segundo script:
function onUse(cid, item, frompos, item2, topos)
if item.actionid == 21000 and item.itemid == 1945 then
doBroadcastMessage("MENSAGEMMM", MESSAGE_EVENT_ADVANCE) -- só mudar onde ta MENSAGEMM pela mensagem que quizer
doTransformItem(item.uid, 1946)
elseif item.actionid == 21000 and item.itemid == 1946 then
doTransformItem(item.uid, 1945)
end
return TRUE
end
XML:
<action actionid="21000" script="other/nomedoscript.lua"/>
Espero que funcione, novamente, qualquer erro reporte aqui para eu poder arrumar ![]()
Abraços,
Wiltry :button_ok:







info
Group: Campones
Joined: 15/05/08
Posts: 30
Reputation: +3
Tibia Character: Secret ......
Olá ...
Queria pedir 2 escripts ...
1º Queria um comando que vendece itens por dias de p.a ...
2º Queria uma alavanca que quando puxada manda uma msg para todo o servidor ...
------------------------------------------------------------------------------------------------------------
So isso tudo =D ....
Da uma ajuda aew ... preciso muito ...
Grande abrasso a todos e vlw :smile_positivo: