Ir para conteúdo

Featured Replies

Resolvido por Wise

Ir para solução
  • Respostas 9
  • Visualizações 2.3k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • pulltarget.lua (data/spells/scripts): function onCastSpell(cid, var)     local pos = getClosestFreeTile(cid, getCreaturePosition(cid), false)         if not pos then             doPlayerSendCancel(c

Posted Images

Postado
  • Solução
eu quero que quando o player estiver atacando um target, e usa a magia o target será puxado pra o lado do player

pulltarget.lua (data/spells/scripts):

function onCastSpell(cid, var)
    local pos = getClosestFreeTile(cid, getCreaturePosition(cid), false)
        if not pos then
            doPlayerSendCancel(cid, "There's no room to pull the target.")
        end
        
    doTeleportThing(variantToNumber(var), pos)
    doSendMagicEffect(variantToNumber(var), CONST_ME_TELEPORT)
    return true
end

Tag - spells.xml (data/scripts):

<instant name="INSTANTSPELLNAME" words="SPELLNAME" lvl="100" mana="1000" aggressive="1" range="7" blockwalls="1" needtarget="1" exhaustion="1500" needlearn="0" event="script" value="pulltarget.lua">
	<vocation id="1"/>
	<vocation id="2"/>
	<vocation id="3"/>
	<vocation id="4"/>                                                                     
</instant>

Editado por Suicide (veja o histórico de edições)

The corrupt fear us.

The honest support us.

The heroic join us.

Postado

Conteúdos Tragos Por Mim ao Fórum:

Venda de Vocações [Modern Aac] •

• Comando !Saga 

• [Modern Aac] DragonBall 

• Esconder •

• Naruto 2018

• • •

• •

'NtoProject - Breve'

[Show OFF] Disponível

Postado

Essas spells foram muito bem feitas, mas não coincidem com o pedido. As que você citou são spells de área, ele pediu uma spell própria pra um target.

Editado por Suicide (veja o histórico de edições)

The corrupt fear us.

The honest support us.

The heroic join us.

  • 2 years later...
Postado

@Wise Consegue mudar para pucha somente player e puchar na frente não no mesmo sqm que vc esta ???

 

function onCastSpell(cid, var)
    local pos = getClosestFreeTile(cid, getCreaturePosition(cid), false)
        if not pos then
            doPlayerSendCancel(cid, "There's no room to pull the target.")
        end
        
    doTeleportThing(variantToNumber(var), pos)
    doSendMagicEffect(variantToNumber(var), CONST_ME_TELEPORT)
    return true
end

@xWhiteWolf

Em 15/11/2014 ás 22:53, Wise disse:

 

 

pulltarget.lua (data/spells/scripts):


function onCastSpell(cid, var)
    local pos = getClosestFreeTile(cid, getCreaturePosition(cid), false)
        if not pos then
            doPlayerSendCancel(cid, "There's no room to pull the target.")
        end
        
    doTeleportThing(variantToNumber(var), pos)
    doSendMagicEffect(variantToNumber(var), CONST_ME_TELEPORT)
    return true
end

 

 

Tag - spells.xml (data/scripts):


<instant name="INSTANTSPELLNAME" words="SPELLNAME" lvl="100" mana="1000" aggressive="1" range="7" blockwalls="1" needtarget="1" exhaustion="1500" needlearn="0" event="script" value="pulltarget.lua">
	<vocation id="1"/>
	<vocation id="2"/>
	<vocation id="3"/>
	<vocation id="4"/>                                                                     
</instant>

pra mim ta dando este errinho

Capturar.JPG

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.

Conteúdo Similar

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo