Por mininoloko, 01 de fev. de 2011 em Actions e Talkactions
info
Grupo: Campones
Registrado: 04/12/10
Posts: 19
Reputação: +3
Char no Tibia: Secret
Ola Galerinha do :XTibia_smile: ,
Hoje Estou aki para Mostrar a Magic Level Scroll , Bem Simples :smile_positivo: .
Vamos la ...
Vá em data/actions/scripts Copie e cole qualquer arquivo , renomei-o para xitem , oq tem dentro e coloque :
local exp = 10000 -- Quanto de ML o player irá ganhar?!local exhaust = 60 -- Tempo para o player poder usar o item novamente! (tempo em segundos) local text = "Congratulations, you gained "..exp.." points of experience." local storage = 9811 -- Não mexa aqui. function onUse(cid, item, fromPosition, itemEx, toPosition) if (getPlayerStorageValue(cid, storage) <= os.time()) then doPlayerAddMagLevel(cid, exp) doCreatureSay(cid, text, 19) doSendMagicEffect(getCreaturePosition(cid), 14) doRemoveItem(cid, item.uid, 1) setPlayerStorageValue(cid, storage, os.time()+exhaust) else doPlayerSendCancel(cid, "Sorry, you only can again use this item after "..exhaust.." seconds.") end return TRUE end
local exhaust = 60 -- Tempo para o player poder usar o item novamente! (tempo em segundos)
local text = "Congratulations, you gained "..exp.." points of experience."
local storage = 9811 -- Não mexa aqui.
function onUse(cid, item, fromPosition, itemEx, toPosition)
if (getPlayerStorageValue(cid, storage) <= os.time()) then
doPlayerAddMagLevel(cid, exp)
doCreatureSay(cid, text, 19)
doSendMagicEffect(getCreaturePosition(cid), 14)
doRemoveItem(cid, item.uid, 1)
setPlayerStorageValue(cid, storage, os.time()+exhaust)
else
doPlayerSendCancel(cid, "Sorry, you only can again use this item after "..exhaust.." seconds.")
end
return TRUE
Depois em Data/actions/actions.xml adicione a tag :
<action itemid="7722" event="script" value="xpitem.lua"/>
Vermelho: ID da Scroll.
Pronto !!
Abraço .
Não se esqueça de dar um Rep +
info
Grupo: Campones
Registrado: 04/12/10
Posts: 19
Reputação: +3
Char no Tibia: Secret
Ola Galerinha do :XTibia_smile: ,
Hoje Estou aki para Mostrar a Magic Level Scroll , Bem Simples :smile_positivo: .
Vamos la ...
Vá em data/actions/scripts Copie e cole qualquer arquivo , renomei-o para xitem , oq tem dentro e coloque :
Depois em Data/actions/actions.xml adicione a tag :
Vermelho: ID da Scroll.
Pronto !!
Abraço .
Não se esqueça de dar um Rep +