Ir para conteúdo

Featured Replies

Postado

Olá, tenho um pequeno problema com algumas coisas e um pedido para escrever um novo feitiço viz

1. Hiraishin no Jutsu Seal
Tenho um script no servidor do xWhiteWolf para hiraishin no jutsu mas não tem exaustão para teletransporte + depois de sair do jogo você pode se teletransportar indefinidamente. meus arquivos
Creaturescript/scripts/Login.lua
 

Spojler

 if getPlayerStorageValue(cid, 49607) == -1 then
        setPlayerStorageValue(cid, 49607, 0)
    end
 if getPlayerStorageValue(cid, 49609) == -1 then
        setPlayerStorageValue(cid, 49607, 0)
    end
 if getPlayerStorageValue(cid, 49610) == -1 then
        setPlayerStorageValue(cid, 49607, 0)
    end

spells/spells.xml (eles são todos iguais, então eu adiciono um para que não haja letras desnecessárias)

Spojler

<instant name="Hiraishin no Jutsu Seal 1" words="Hiraishin no Jutsu Seal 1" lvl="200" mana="700" magiclevel="80" soul="8" prem="0" exhaustion="60000" range="4" needtarget="0" needlearn="0" event="script" value="minato/seal1.lua">
<instant name="Hiraishin no Jutsu Seal 2" words="Hiraishin no Jutsu Seal 2" lvl="200" mana="700" magiclevel="80" soul="8" prem="0" exhaustion="60000" range="4" needtarget="0" needlearn="0" event="script" value="minato/seal2.lua">
<instant name="Hiraishin no Jutsu Seal 3" words="Hiraishin no Jutsu Seal 3" lvl="200" mana="700" magiclevel="80" soul="8" prem="0" exhaustion="60000" range="4" needtarget="0" needlearn="0" event="script" value="minato/seal3.lua">


spells/scripts/minato/seal1

Spojler

local config = {
storage = 49607,
tempo = 30
}


local positions = {}


function onCastSpell(cid, var)


local itemid = math.random (12690, 12691)


if getPlayerStorageValue(cid, config.storage) <= 0 then
table.insert(positions, getThingPos(cid))
doPlayerSetStorageValue(cid, config.storage, #positions)
doDecayItem(doCreateItem(itemid, getThingPos(cid)))
doSendMagicEffect(getThingPos(cid), 153)
addEvent(function()
  if isCreature(cid) then
   doPlayerSendTextMessage(cid, 22, "Your seal has expired.")
  doPlayerSetStorageValue(cid, config.storage, 0)
  table.remove(positions, getPlayerStorageValue(cid, config.storage))
  end
 end, 1000*config.tempo)
elseif getPlayerStorageValue (cid, config.storage) > 0 then
doTeleportThing(cid, positions[getPlayerStorageValue(cid, config.storage)])
doSendMagicEffect(getThingPos(cid), 83)
end
return true
end

2. Crie um feitiço como no vídeo


3. Goshun Mawashi no Jutsu meu feitiço salta para o alvo e pergunta dmg e eu gostaria de trocar de lugar, claro, quero dizer um jogador com um jogador

Spoiler


local config = {
    effectTarget = 128, -- efeito que dá no target ao acertá-lo
    effectFinal = 26, -- efeito que aparece na posição final onde vc será teleportado
    jumpMax = 1 -- número máximo de quadrados que irá pular
}

function onCastSpell(cid, var)

local maglevel, level, mana = getPlayerMagLevel(cid), getPlayerLevel(cid), getCreatureMana(cid)
local axe, sword, club, distance = getPlayerSkillLevel(cid, 3), getPlayerSkillLevel(cid, 2), getPlayerSkillLevel(cid, 1), getPlayerSkillLevel(cid, 4)
local shield, health = getPlayerSkillLevel(cid, 5), getCreatureHealth(cid)

    local formula = {
    min = ((level + maglevel)/5 + axe + sword + club + shield + (mana/1000)), --- formula de dano minimo
    max = ((level + maglevel)/5 + axe + sword + club + shield + ((mana + health)/1000)) --- formula de dano maximo
    }

    local pos = getMirroredPos(cid, variantToNumber(var), config.jumpMax)
    local position = getCreaturePosition(cid)
    if pos.x ~= position.x or pos.y ~= position.y then
        doTeleportThing(cid, pos)
        doTargetCombatHealth(cid, variantToNumber(var), 1, -formula.min, -formula.max, config.effectTarget)
        doSendMagicEffect(pos, config.effectFinal)
    else
        doPlayerSendCancel(cid, "Sorry, not possible.")
    return false
    end
return true
end

 

obrigado pela sua resposta e por favor ajude pelas melhores respostas rep+

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.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.8k

Informação Importante

Confirmação de Termo