Tenta assim, deixei indicado no código o quê você deve alterar.
function doBurn2(cid, cd, check, damage)
local stg = conds["Burn"]
if not isCreature(cid) then return true end --is creature?
if getPlayerStorageValue(cid, stg) >= 1 and cd ~= -1 then
setPlayerStorageValue(cid, stg, cd) --allterado v1.8
return true
end
if not check and getPlayerStorageValue(cid, stg) >= 1 then
setPlayerStorageValue(cid, stg, getPlayerStorageValue(cid, stg) + cd - 1)
else
setPlayerStorageValue(cid, stg, getPlayerStorageValue(cid, stg) + cd)
end
local a = getPlayerStorageValue(cid, stg)
if isSummon(cid) and getPlayerStorageValue(cid, 212123) <= 0 then
local owner = getCreatureMaster(cid)
local storage = xxx --Storage necessário para aumentar o damage - Burn.
local valor = xxx --Valor necessário da storage acima.
local multiplicador = 3 --O dano do Burn será multplicado por quanto?
if getPlayerStorageValue(owner, storage) >= valor then
damage = damage*multiplicador
end
end
if isSummon(cid) and getPlayerStorageValue(cid, 212123) <= 0 then
local item = getPlayerSlotItem(getCreatureMaster(cid), 8)
doItemSetAttribute(item.uid, "burn", a)
doItemSetAttribute(item.uid, "burndmg", damage)
end
if a <= -1 then
setPlayerStorageValue(cid, stg, -1)
return true
end
doCreatureAddHealth(cid, -damage, 15, COLOR_BURN)
addEvent(doBurn2, 3500, cid, -1, a, damage)
end
function doPoison2(cid, cd, check, damage)
local stg = conds["Poison"]
if not isCreature(cid) then return true end --is creature?
----------
if isSummon(cid) or ehMonstro(cid) and pokes[getCreatureName(cid)] then --alterado v1.6
local type = pokes[getCreatureName(cid)].type
local type2 = pokes[getCreatureName(cid)].type2
if isInArray({"poison", "steel"}, type) or isInArray({"poison", "steel"}, type2) then
return true
end
end
---------
if getPlayerStorageValue(cid, stg) >= 1 and cd ~= -1 then
setPlayerStorageValue(cid, stg, cd) --allterado v1.8
return true
end
if not check and getPlayerStorageValue(cid, stg) >= 1 then
setPlayerStorageValue(cid, stg, getPlayerStorageValue(cid, stg) + cd - 1)
else
setPlayerStorageValue(cid, stg, getPlayerStorageValue(cid, stg) + cd)
end
local a = getPlayerStorageValue(cid, stg)
if isSummon(cid) and getPlayerStorageValue(cid, 212123) <= 0 then
local owner = getCreatureMaster(cid)
local storage = xxx --Storage necessário para aumentar o damage - Poison.
local valor = xxx --Valor necessário da storage acima.
local multiplicador = 3 --O dano do Poison será multplicado por quanto?
if getPlayerStorageValue(owner, storage) >= valor then
damage = damage*multiplicador
end
end
if isSummon(cid) and getPlayerStorageValue(cid, 212123) <= 0 then
local item = getPlayerSlotItem(getCreatureMaster(cid), 8)
doItemSetAttribute(item.uid, "poison", a)
doItemSetAttribute(item.uid, "poisondmg", damage)
end
if a <= -1 or getCreatureHealth(cid) == 1 then
setPlayerStorageValue(cid, stg, -1)
return true
end
local dano = getCreatureHealth(cid)-damage <= 0 and getCreatureHealth(cid)-1 or damage
doCreatureAddHealth(cid, -dano, 8, COLOR_GRASS)
addEvent(doPoison2, 1500, cid, -1, a, damage)
end








info
Grupo: Campones
Registrado: 23/08/12
Posts: 67
Reputação: +1
Gênero: Masculino
alguem sabe como posso fazer para que se o player tiver xx storage, o dano do poison eh multiplicado por 2 ou 3?
segue a parte do dano no newStatusSys.lua
function doBurn2(cid, cd, check, damage)
local stg = conds["Burn"]
if not isCreature(cid) then return true end --is creature?
if getPlayerStorageValue(cid, stg) >= 1 and cd ~= -1 then
setPlayerStorageValue(cid, stg, cd) --allterado v1.8
return true
end
if not check and getPlayerStorageValue(cid, stg) >= 1 then
setPlayerStorageValue(cid, stg, getPlayerStorageValue(cid, stg) + cd - 1)
else
setPlayerStorageValue(cid, stg, getPlayerStorageValue(cid, stg) + cd)
end
local a = getPlayerStorageValue(cid, stg)
if isSummon(cid) and getPlayerStorageValue(cid, 212123) <= 0 then
local item = getPlayerSlotItem(getCreatureMaster(cid), 8)
doItemSetAttribute(item.uid, "burn", a)
doItemSetAttribute(item.uid, "burndmg", damage)
end
if a <= -1 then
setPlayerStorageValue(cid, stg, -1)
return true
end
doCreatureAddHealth(cid, -damage, 15, COLOR_BURN)
addEvent(doBurn2, 3500, cid, -1, a, damage)
end
function doPoison2(cid, cd, check, damage)
local stg = conds["Poison"]
if not isCreature(cid) then return true end --is creature?
----------
if isSummon(cid) or ehMonstro(cid) and pokes[getCreatureName(cid)] then --alterado v1.6
local type = pokes[getCreatureName(cid)].type
local type2 = pokes[getCreatureName(cid)].type2
if isInArray({"poison", "steel"}, type) or isInArray({"poison", "steel"}, type2) then
return true
end
end
---------
if getPlayerStorageValue(cid, stg) >= 1 and cd ~= -1 then
setPlayerStorageValue(cid, stg, cd) --allterado v1.8
return true
end
if not check and getPlayerStorageValue(cid, stg) >= 1 then
setPlayerStorageValue(cid, stg, getPlayerStorageValue(cid, stg) + cd - 1)
else
setPlayerStorageValue(cid, stg, getPlayerStorageValue(cid, stg) + cd)
end
local a = getPlayerStorageValue(cid, stg)
if isSummon(cid) and getPlayerStorageValue(cid, 212123) <= 0 then
local item = getPlayerSlotItem(getCreatureMaster(cid), 8)
doItemSetAttribute(item.uid, "poison", a)
doItemSetAttribute(item.uid, "poisondmg", damage)
end
if a <= -1 or getCreatureHealth(cid) == 1 then
setPlayerStorageValue(cid, stg, -1)
return true
end
local dano = getCreatureHealth(cid)-damage <= 0 and getCreatureHealth(cid)-1 or damage
doCreatureAddHealth(cid, -dano, 8, COLOR_GRASS)
addEvent(doPoison2, 1500, cid, -1, a, damage)
end