Cole na pasta DATA/BUUFFS/VOCAÇÃO DESEJADA um script.lua e dentro dele cole isso:
function onUse(cid, item, frompos, item2, topos)
local level = getPlayerLevel(cid)
local mlevel = getPlayerMagLevel(cid)
local exhausted_seconds = 0
local exhausted_storagevalue = 10
local mana_minimum = 70000
local mana_maximum = 70000
local mana_add = math.random(mana_minimum, mana_maximum)
if(item.type >= 1) then
if(os.time() > getPlayerStorageValue(cid, exhausted_storagevalue)) then
if(isPlayer(cid) == 1) then
doSendMagicEffect(topos,13)
doSendMagicEffect(topos,14)
doPlayerAddMana(cid, mana_add)
doPlayerAddHealth(cid, mana_add)
doPlayerSay(cid, 'Senzu Normal!', TALKTYPE_ORANGE_1)
setPlayerStorageValue(cid, exhausted_storagevalue, os.time() + exhausted_seconds)
doChangeTypeItem(item.uid, item.type - 0)
else
doSendMagicEffect(frompos, CONST_ME_POFF)
doPlayerSendCancel(cid, "You are exchausted.")
end
else
doSendMagicEffect(frompos, CONST_ME_POFF)
doPlayerSendCancel(cid, "You are exhausted.")
end
else
if(os.time() < getPlayerStorageValue(cid, exhausted_storagevalue)) then
doSendMagicEffect(frompos, CONST_ME_POFF)
doPlayerSendCancel(cid, "You are exhausted.")
else
if(isPlayer(cid) == 1) then
doSendMagicEffect(topos,13)
doSendMagicEffect(topos,14)
doPlayerAddMana(cid, mana_add)
doPlayerAddHealth(cid, mana_add*1.5)
doPlayerSay(cid,"Senzu Normal!",1)
setPlayerStorageValue(cid, exhausted_storagevalue, os.time() + exhausted_seconds)
doRemoveItem(item.uid, 1)
else
doSendMagicEffect(frompos, CONST_ME_POFF)
doPlayerSendCancel(cid, "You are exchausted.")
end
end
end
return 1
end
e em buffs.xml coloca isso
<buff name="NOME DESEJADO" src=" nome do arquivo que esta na pasta">
pronto AJUDEI PORRA? intao +REP ![]()
Ta ae o script cola qualquer outro arquivo.lua na pasta buffs e cole esse script:
function onUse(cid, item, frompos, item2, topos)
local level = getPlayerLevel(cid)
local mlevel = getPlayerMagLevel(cid)
local exhausted_seconds = 0
local exhausted_storagevalue = 10
local mana_minimum = 70000
local mana_maximum = 70000
local mana_add = math.random(mana_minimum, mana_maximum)
if(item.type >= 1) then
if(os.time() > getPlayerStorageValue(cid, exhausted_storagevalue)) then
if(isPlayer(cid) == 1) then
doSendMagicEffect(topos,13)
doSendMagicEffect(topos,14)
doPlayerAddMana(cid, mana_add)
doPlayerAddHealth(cid, mana_add)
doPlayerSay(cid, 'Senzu Normal!', TALKTYPE_ORANGE_1)
setPlayerStorageValue(cid, exhausted_storagevalue, os.time() + exhausted_seconds)
doChangeTypeItem(item.uid, item.type - 0)
else
doSendMagicEffect(frompos, CONST_ME_POFF)
doPlayerSendCancel(cid, "You are exchausted.")
end
else
doSendMagicEffect(frompos, CONST_ME_POFF)
doPlayerSendCancel(cid, "You are exhausted.")
end
else
if(os.time() < getPlayerStorageValue(cid, exhausted_storagevalue)) then
doSendMagicEffect(frompos, CONST_ME_POFF)
doPlayerSendCancel(cid, "You are exhausted.")
else
if(isPlayer(cid) == 1) then
doSendMagicEffect(topos,13)
doSendMagicEffect(topos,14)
doPlayerAddMana(cid, mana_add)
doPlayerAddHealth(cid, mana_add*1.5)
doPlayerSay(cid,"Senzu Normal!",1)
setPlayerStorageValue(cid, exhausted_storagevalue, os.time() + exhausted_seconds)
doRemoveItem(item.uid, 1)
else
doSendMagicEffect(frompos, CONST_ME_POFF)
doPlayerSendCancel(cid, "You are exchausted.")
end
end
end
return 1
end
e reinicia o server e pronto.










info
Grupo: Campones
Registrado: 29/12/11
Posts: 67
Reputação: +3
Char no Tibia: NOt
Quero uma Spell de Buff que não pare de sair efeito em quanto estiver o tempo do buff