Postado Setembro 3, 2021 3 anos Autor 11 minutos atrás, Vodkart disse: testa o dano local from, to = {x=980, y=980, z=15}, {x=1050, y=1050, z=15} -- area total do kamui local teleport = {x=1000, y=1000, z=15} -- para onde vai local blocks = {"demon", "hydra"} -- defina o nome dos monstro em minusculo local storage = 753159 function isInKamuiArea(cid) return isInRange(getCreaturePosition(cid), from, to) and true or false end function TeleportToKamui(alvo, pos) if not isCreature(alvo) then return LUA_ERROR end doTeleportThing(alvo, pos) doSendMagicEffect(getThingPos(alvo), 40) -- effect target ao entrar no kamui end function onCastSpell(cid, var) local target = getCreatureTarget(cid) if target > 0 and isCreature(target) then -- se tiver target if isMonster(target) then if isInArray(blocks, getCreatureName(target):lower()) then doPlayerSendCancel(cid, "voce nao pode usar a spell neste monstro") return true end doSendMagicEffect(getCreaturePosition(cid), 4) -- cid doSendMagicEffect(getThingPos(target), 10) -- effect target ao usar kamui local min = (getPlayerLevel(cid) * 2 + getPlayerMagLevel(cid) * 20) * 5 local max = (getPlayerLevel(cid) * 5 + getPlayerMagLevel(cid) * 50) * 8 doTargetCombatHealth(cid, target, COMBAT_PHYSICALDAMAGE, -min, -max, CONST_ME_BLOCKHIT) -- defina combat e effect COMBAT_PHYSICALDAMAGE / CONST_ME_BLOCKHIT addEvent(TeleportToKamui, 300, target,teleport) elseif isPlayer(target) then if isInKamuiArea(target) then doPlayerSendCancel(cid, "voce nao pode usar a spell em um target dentro do kamui") return true end setPlayerStorageValue(target, storage, ":".. getCreaturePosition(target).x ..",:".. getCreaturePosition(target).y ..",:".. getCreaturePosition(target).z) doSendMagicEffect(getCreaturePosition(cid), 4) -- cid doSendMagicEffect(getThingPos(target), 10) -- effect target ao usar kamui local min = (getPlayerLevel(cid) * 2 + getPlayerMagLevel(cid) * 20) * 5 local max = (getPlayerLevel(cid) * 5 + getPlayerMagLevel(cid) * 50) * 8 doTargetCombatHealth(cid, target, COMBAT_PHYSICALDAMAGE, -min, -max, CONST_ME_BLOCKHIT) -- defina combat e effect COMBAT_PHYSICALDAMAGE / CONST_ME_BLOCKHIT addEvent(TeleportToKamui, 300, target, teleport) end else if isInKamuiArea(cid) then doPlayerSendCancel(cid, "voce nao pode usar a spell dentro do kamui") return true end setPlayerStorageValue(cid, storage, ":".. getCreaturePosition(cid).x ..",:".. getCreaturePosition(cid).y ..",:".. getCreaturePosition(cid).z) doSendMagicEffect(getCreaturePosition(cid), 4) -- cid addEvent(TeleportToKamui, 300, cid, teleport) doCreatureAddHealth(cid, -100) end return true end Show! funcionou certinho, agora so falta os effects no target e no player. Não querendo incomodar mas já incomodando, teria como adicionar o cooldown de 5 min na spell?
Postado Setembro 3, 2021 3 anos ok dps me manda seu discord que fazemos isso rapidinho [*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*] DISCORD: vodkart#6090
Postado Setembro 3, 2021 3 anos Autor Agora, Vodkart disse: ok dps me manda seu discord que fazemos isso rapidinho mandei mensagem la kkk, quando tiver ok eu posto aqui para o pessoal Ai galera, consegui editar o effect e o cooldown tbm, a spell ta muito boa, @Vodkart muito obrigado mesmo. Deixei o CD em 5 minutos. local from, to = {x=947, y=955, z=15}, {x=1055, y=1041, z=15} -- area total do kamui local from, arena = {x=900, y=895, z=7}, {x=921, y=915, z=7} -- area total da arena local teleport = {x=1000, y=1000, z=15} -- para onde vai local blocks = {"tronco"} -- defina o nome dos monstro em minusculo local storage = 753159 function isInKamuiArea(cid) return isInRange(getCreaturePosition(cid), from, to) and true or false end function isInKamuiArea(cid) return isInRange(getCreaturePosition(cid), from, arena) and true or false end function TeleportToKamui(alvo, pos) if not isCreature(alvo) then return LUA_ERROR end doTeleportThing(alvo, pos) local positionpk = {x=getThingPos(alvo).x+1, y=getThingPos(alvo).y+1, z=getThingPos(alvo).z} doSendMagicEffect(positionpk, 315) -- cid end function onCastSpell(cid, var) local tempo = 300 -- Tempo de exhaustion em segundos local sto = 545550 -- Storage de Spell, nunca usar a mesma em outra spell, a menos que não queira usar duas spell juntas! if exhaustion.check(cid, sto) then doPlayerSendCancel(cid, "Aguarde " .. exhaustion.get(cid, sto) .. " segundos para usar o kamui novamente.") return false end local target = getCreatureTarget(cid) if target > 0 and isCreature(target) then -- se tiver target if isMonster(target) then if isInArray(blocks, getCreatureName(target):lower()) then doPlayerSendCancel(cid, "voce nao pode usar o kamui neste alvo") return true end local positionp = {x=getCreaturePosition(cid).x+1, y=getCreaturePosition(cid).y+1, z=getCreaturePosition(cid).z} doSendMagicEffect(positionp, 315) -- effect que sai em voce local positiont = {x=getThingPosition(getCreatureTarget(cid)).x+1, y=getThingPosition(getCreatureTarget(cid)).y+1, z=getThingPosition(getCreatureTarget(cid)).z} doSendMagicEffect(positiont, 315) -- effect ao usar kamui em um player local min = ((30) * (getPlayerMagLevel(cid) + getPlayerLevel(cid))) local max = ((35) * (getPlayerMagLevel(cid) + getPlayerLevel(cid))) doTargetCombatHealth(cid, target, COMBAT_PHYSICALDAMAGE, -min, -max, CONST_ME_BLOCKHIT) -- defina combat e effect COMBAT_PHYSICALDAMAGE / CONST_ME_BLOCKHIT addEvent(TeleportToKamui, 700, target,teleport) elseif isPlayer(target) then if isInKamuiArea(target) then doPlayerSendCancel(cid, "voce nao pode usar o kamui em alguem nesta area") return true end setPlayerStorageValue(target, storage, ":".. getCreaturePosition(target).x ..",:".. getCreaturePosition(target).y ..",:".. getCreaturePosition(target).z) local positionp1 = {x=getCreaturePosition(cid).x+1, y=getCreaturePosition(cid).y+1, z=getCreaturePosition(cid).z} doSendMagicEffect(positionp1, 315) -- effect que sai em voce local positiont1 = {x=getThingPosition(getCreatureTarget(cid)).x+1, y=getThingPosition(getCreatureTarget(cid)).y+1, z=getThingPosition(getCreatureTarget(cid)).z} doSendMagicEffect(positiont1, 315) -- effect ao usar kamui em um monstro local min = ((30) * (getPlayerMagLevel(cid) + getPlayerLevel(cid))) local max = ((35) * (getPlayerMagLevel(cid) + getPlayerLevel(cid))) doTargetCombatHealth(cid, target, COMBAT_PHYSICALDAMAGE, -min, -max, CONST_ME_BLOCKHIT) -- defina combat e effect COMBAT_PHYSICALDAMAGE / CONST_ME_BLOCKHIT addEvent(TeleportToKamui, 700, target, teleport) end else if isInKamuiArea(cid) then doPlayerSendCancel(cid, "voce nao pode usar o kamui nesta area") return true end setPlayerStorageValue(cid, storage, ":".. getCreaturePosition(cid).x ..",:".. getCreaturePosition(cid).y ..",:".. getCreaturePosition(cid).z) local positionp2 = {x=getCreaturePosition(cid).x+1, y=getCreaturePosition(cid).y+1, z=getCreaturePosition(cid).z} doSendMagicEffect(positionp2, 315) -- effect ao usar o kamui em voce mesmo addEvent(TeleportToKamui, 700, cid, teleport) doCreatureAddHealth(cid, -100) end exhaustion.set(cid, sto, tempo) return true end O XML <instant name="Kamui" words="kamui in" lvl="300" mana="10000" prem="0" needtarget="0" range="4" exhaustion="0" blockwalls="1" needlearn="0" script="kakashi/kamui in.lua"> <vocation id="0"/> </instant> O movements do portal é aquele mesmo que ele passou no inicio da spell.
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.