Synchronoise = O poke faz uma cópia do proprio e o original fica invisivel. Codigo abaixo tem a mesma funçao
elseif spell == "Substitute" then
function sendEff(cid, master, t)
if isCreature(cid) and isCreature(master) and t > 0 and #getCreatureSummons(master) >= 2 then
doSendMagicEffect(getThingPos(cid), 86, master)
addEvent(sendEff, 1000, cid, master, t - 1)
end
end
if not isSummon(cid) then return true end
doSummonMonster(getCreatureMaster(cid), getCreatureName(cid))
local substitute = getCreatureSummons(getCreatureMaster(cid))[2]
doCreatureSetLookDir(substitute, getCreatureLookDir(cid))
adjustStatus(substitute, getPlayerSlotItem(getCreatureMaster(cid), 8).uid, true, true, true)
setPlayerStorageValue(cid, 9658783, 1)
doDisapear(cid)
sendEff(cid, getCreatureMaster(cid), 6)
addEvent(function()
if not isCreature(cid) then return true end
doAppear(cid)
setPlayerStorageValue(cid, 9658783, -1)
if isCreature(substitute) then
doRemoveCreature(substitute)
end
end, 6000)
Electro Web = Faz com que o target fique tomando pequeno dano em determinado tempo com stun/paralyze. ex: em 5 segundos ele ira receber 3x dano entre o tempo (1seg dano, 3seg dano e 5seg dano)
elseif spell == "Electroweb" then
local config = {
times = 6, --Quantos ataques.
interval = 1000, --Intervalo entre ataques.
stunTime = 1, --Duraçăo do stun.
distEffect = 37, --Distance effect.
effect = 207, --Effect.
stunEffect = 207 --Efeito do stun.
}
local function Electroweb(cid, times)
if not isCreature(cid) or not isCreature(target) or times <= 0 then return true end
local ret = {}
ret.id = target
ret.cd = config.stunTime
ret.check = getPlayerStorageValue(target, conds["Stun"])
ret.eff = config.stunEffect
ret.spell = spell
ret.cond = "Stun"
doSendDistanceShoot(getThingPos(cid), getThingPos(target), config.distEffect)
doSendMagicEffect(getThingPos(target), config.effect)
doMoveDano2(cid, target, ELECTRICDAMAGE, min, max, ret, spell)
addEvent(Electroweb, config.interval, cid, times - 1)
end
Electroweb(cid, config.times)
Rock Wrecker =
elseif spell == "Rock Wrecker" then
local p = getThingPosWithDebug(cid)
p.x = p.x+1
p.y = p.y+1
sendEffWithProtect(cid, p, 151) --send eff
local function doDano(cid)
local pos = getThingPosWithDebug(cid)
local function doSendBubble(cid, pos)
if not isCreature(cid) then return true end
doSendDistanceShoot(getThingPosWithDebug(cid), pos, 39)
doSendMagicEffect(pos, 239)
end
--alterado!!
for a = 1, 20 do
local r1 = math.random(-4, 4)
local r2 = r1 == 0 and choose(-3, -2, -1, 2, 3) or math.random(-3, 3)
--
local lugar = {x = pos.x + r1, y = pos.y + r2, z = pos.z}
addEvent(doSendBubble, a * 25, cid, lugar)
end
addEvent(doDanoWithProtect, 150, cid, ROCKDAMAGE, pos, waterarea, -min, -max, 0)
end
addEvent(doDano, 1250, cid)