tenta esse \/
elseif spell == "Thunder Bolt" then
local eff = getSubName(cid, target) == "Shiny Electabuzz" and 90 or 41
local eff2 = getSubName(cid, target) == "Shiny Electabuzz" and 399 or 397
--alterado v1.7
local function doThunderFall(cid, frompos, target)
if not isCreature(target) or not isCreature(cid) then return true end
local pos = getThingPosWithDebug(target)
local ry = math.abs(frompos.y - pos.y)
local a = getThingPosWithDebug(target)
posi = {x = a.x+1, y = a.y+1, z = a.z}
addEvent(doSendMagicEffect, ry * 11, posi, eff2)
doSendDistanceShoot(frompos, getThingPosWithDebug(target), eff)
addEvent(doDanoInTarget, ry * 11, cid, target, ELECTRICDAMAGE, min, max, 0) --alterado v1.7
end
local function doThunderUp(cid, target)
if not isCreature(target) or not isCreature(cid) then return true end
local pos = getThingPosWithDebug(target)
local mps = getThingPosWithDebug(cid)
local xrg = math.floor((pos.x - mps.x) / 2)
local topos = mps
topos.x = topos.x + xrg
local rd = 7
topos.y = topos.y - rd
doSendDistanceShoot(getThingPosWithDebug(cid), topos, eff)
addEvent(doThunderFall, rd * 49, cid, topos, target)
end
setPlayerStorageValue(cid, 3644587, 1)
addEvent(setPlayerStorageValue, 350, cid, 3644587, -1)
for thnds = 1, 2 do
addEvent(doThunderUp, thnds * 155, cid, target)
end






info
Grupo: Infante
Registrado: 28/01/12
Posts: 1.6k
Reputação: +262
Gênero: Masculino
Bom, estou quebrando a cabeça para poder deixar o efeito de uma spell do jeito que quero.
Quero que o efeito aonde eu mostrei na GIF, fique em cima do inimigo. (Eff 399/397, "efeito que cai")
Código da Spell:
elseif spell == "Thunder Bolt" then
local eff = getSubName(cid, target) == "Shiny Electabuzz" and 90 or 41
local eff2 = getSubName(cid, target) == "Shiny Electabuzz" and 399 or 397
--alterado v1.7
local function doThunderFall(cid, frompos, target)
if not isCreature(target) or not isCreature(cid) then return true end
local pos = getThingPosWithDebug(target)
local ry = math.abs(frompos.y - pos.y)
doSendDistanceShoot(frompos, getThingPosWithDebug(target), eff)
addEvent(doDanoInTarget, ry * 11, cid, target, ELECTRICDAMAGE, min, max, eff2) --alterado v1.7
end
local function doThunderUp(cid, target)
if not isCreature(target) or not isCreature(cid) then return true end
local pos = getThingPosWithDebug(target)
local mps = getThingPosWithDebug(cid)
local xrg = math.floor((pos.x - mps.x) / 2)
local topos = mps
topos.x = topos.x + xrg
local rd = 7
topos.y = topos.y - rd
doSendDistanceShoot(getThingPosWithDebug(cid), topos, eff)
addEvent(doThunderFall, rd * 49, cid, topos, target)
end
setPlayerStorageValue(cid, 3644587, 1)
addEvent(setPlayerStorageValue, 350, cid, 3644587, -1)
for thnds = 1, 2 do
addEvent(doThunderUp, thnds * 155, cid, target)
end