Nem testei:
function onUse(cid, item)
local config = {
conditionRemoves = {1, 2, 4, 8, 32, 1024, 2048, 32768, 262144, 524288, 1048576}, -- don't modifique
timeToUse = 30, -- in seconds
loseHealth = 500 -- quanto de vida perder se n usa em pz
}
if getPlayerStorageValue(cid, 83128) - os.time() < 1 and getTilePzInfo(getPlayerPosition(cid)) == false then
doPlayerSendTextMessage(cid, 27, "Conditions removed.")
setPlayerStorageValue(cid, 83128, os.time() + config.timeToUse * 1000)
for a = 1, #config.conditionRemoves do
doRemoveCondition(cid, config.conditionRemoves[a])
end
doPlayerSendTextMessage(cid, 28, "You need wait ".. getPlayerStorageValue(cid, 83128) - os.time() .. " to use again.")
end
if getTilePzInfo(getPlayerPosition(cid)) == true then
doPlayerSendTextMessage(cid, 28, "You only use this in protection zone.")
doCreatureAddHealth(cid, - config.loseHealth)
end
return true
end




info
Grupo: Barão
Registrado: 23/03/08
Posts: 205
Reputação: +4
Bem sabe esse item, aquele que ganha do BOSS da serpent spawn.
Entao eu uso ele mesmo se tiver poison ele nao remove o poison e sim ao contrario ele tira dano do char diretamente...
eu queria colocar para remover todos os elementais
ou so poison e cursed igual ta no script abaixo
REP ++