Ir para conteúdo
Banner com Efeitos

Featured Replies

Postado

Olá, eu fiz uns scripts aqui coletando umas informações aqui do forum e usando o pouco conhecimento que tenho e montei um script para o monstro curar o player. O script está funcionando direitinho, porém o monstro em si, não se cura e eu não sei porque. Já tentei varias coisas e não consegui (OBS o monstro é meu summon). Segue abaixo os scripts:

 

Script na pasta spell:

 

local combat = createCombatObject()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HEALING)
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0)
combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)

function onCastSpell(cid, var)

if (  getCreatureMaster(cid) ) then
    doCreatureAddHealth(getCreatureMaster(cid), 1600)
    return doCombat(cid, combat, var)
end    

end

 

Parte do Spells.XML

 

    <instant group="healing" spellid="84"  name="Exura Play" words="exura player"  mana="40" prem="0" aggressive="0" blockwalls="1" needtarget="1" playernameparam="1" params="1" exhaustion="1000" groupcooldown="1000" needlearn="0" script="healing/heala_player.lua">
        <vocation name="Druid" />
        <vocation name="Elder Druid" />
</instant>

 

Script do monstro:

 

<?xml version="1.0" encoding="UTF-8"?>
<monster name="Sir Vladimir" nameDescription="a Sir Vladimir" race="blood" experience="5" speed="850" manacost="0">
    <health now="3605" max="3605"/>
    <look type="908" head="114" body="114" legs="114" feet="114" addons="3" mount="728" corpse="20367" />
    <targetchange interval="4000" chance="0"/>
    <flags>
        <flag summonable="1"/>
        <flag attackable="1"/>
        <flag hostile="1"/>
        <flag illusionable="1"/>
        <flag convinceable="1"/>
        <flag pushable="1"/>
        <flag canpushitems="1"/>
        <flag canpushcreatures="1"/>
        <flag targetdistance="1"/>
        <flag staticattack="90"/>
        <flag runonhealth="5"/>
    </flags>
    <attacks>
        <attack name="melee" interval="2000" skill="10" attack="10"/>
        <attack name="Exura Play" interval="3000" chance="75" range="7" target="1"/>
        <attack name="healing" interval="1000" chance="75" range="7" target="1"/>
    </attacks>
    <defenses armor="5" defense="5"/>
    <elements>
        <element earthPercent="25"/>
        <element holyPercent="20"/>
        <element icePercent="-10"/>
        <element deathPercent="-10"/>
    </elements>
    <voices interval="5000" chance="10">
        <voice sentence="Meep!"/>
    </voices>
    <loot>
        <item id="2148" countmax="4" chance="100000"/><!-- gold coin -->
        <item id="2696" chance="39410"/><!-- cheese -->
    </loot>
</monster>

 

 

OBS: já tentei colocar a parte de cura do monstro na defesa, mas mesmo assim não foi.

Citar

 

 

Você tem o código disponível? Se tiver publique-o aqui: 

 

 

Você tem alguma imagem que possa auxiliar no problema? Se sim, coloque-a aqui. 

 

  • Respostas 23
  • Visualizações 1.2k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • Eu fiz aqui rapidinho e não testei,testa ai:   local combat = createCombatObject() combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HEALING) combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_

  • local combat = createCombatObject() combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HEALING) combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0)

  • Da um "Voto positivo" para o pessoal, é só clicar na seta

Posted Images

Postado

Eu fiz aqui rapidinho e não testei,testa ai:
 

local combat = createCombatObject()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HEALING)
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0)
combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)

function onCastSpell(cid, var)
    local summon = getCreatureSummons(cid)[1]
    local health_summon = 2000 -- quantidade a ser curada

    if (getCreatureMaster(cid)) then
        summon:addHealth(health_summon)

        doCreatureAddHealth(getCreatureMaster(cid), 1600)
        return doCombat(cid, combat, var)
    end    

end

 

Contribuições:
 

=> Distribuições/Servidores

  1. [8.60] The Forgotten Server 1.3 (COMPILADO WIN x64)

 

=> Scripts/Códigos/Tutoriais

  1. Pokemon pescado aparece em volta do seu pokemon
  2. [Gesior]Dobrar pontos PagSeguro a partir de x valor doado

 

 Gostou de alguma contribuição? Rep +?

Postado
  • Autor
3 horas atrás, Rayo disse:

Eu fiz aqui rapidinho e não testei,testa ai:
 


local combat = createCombatObject()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HEALING)
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0)
combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)

function onCastSpell(cid, var)
    local summon = getCreatureSummons(cid)[1]
    local health_summon = 2000 -- quantidade a ser curada

    if (getCreatureMaster(cid)) then
        summon:addHealth(health_summon)

        doCreatureAddHealth(getCreatureMaster(cid), 1600)
        return doCombat(cid, combat, var)
    end    

end

 

 

Rayo, testei aqui e deu erro. Não curou nem o player, nem o monstro.

 

Lua Script Error: [Spell Interface]
data/spells/scripts/healing/heala_player.lua:onCastSpell
data/spells/scripts/healing/heala_player.lua:12: attempt to index local 'summon' (a nil value)
stack traceback:
        [C]: in function '__index'
        data/spells/scripts/healing/heala_player.lua:12: in function <data/spells/scripts/healing/heala_player.lua:7>

Lua Script Error: [Spell Interface]
data/spells/scripts/healing/heala_player.lua:onCastSpell
data/spells/scripts/healing/heala_player.lua:12: attempt to index local 'summon' (a nil value)
stack traceback:
        [C]: in function '__index'
        data/spells/scripts/healing/heala_player.lua:12: in function <data/spells/scripts/healing/heala_player.lua:7>

Lua Script Error: [Spell Interface]
data/spells/scripts/healing/heala_player.lua:onCastSpell
data/spells/scripts/healing/heala_player.lua:12: attempt to index local 'summon' (a nil value)
stack traceback:
        [C]: in function '__index'
        data/spells/scripts/healing/heala_player.lua:12: in function <data/spells/scripts/healing/heala_player.lua:7>

Lua Script Error: [Spell Interface]
data/spells/scripts/healing/heala_player.lua:onCastSpell
data/spells/scripts/healing/heala_player.lua:12: attempt to index local 'summon' (a nil value)
stack traceback:
        [C]: in function '__index'
        data/spells/scripts/healing/heala_player.lua:12: in function <data/spells/scripts/healing/heala_player.lua:7>

Lua Script Error: [Spell Interface]
data/spells/scripts/healing/heala_player.lua:onCastSpell
data/spells/scripts/healing/heala_player.lua:12: attempt to index local 'summon' (a nil value)
stack traceback:
        [C]: in function '__index'
        data/spells/scripts/healing/heala_player.lua:12: in function <data/spells/scripts/healing/heala_player.lua:7>

Lua Script Error: [Spell Interface]
data/spells/scripts/healing/heala_player.lua:onCastSpell
data/spells/scripts/healing/heala_player.lua:12: attempt to index local 'summon' (a nil value)
stack traceback:
        [C]: in function '__index'
        data/spells/scripts/healing/heala_player.lua:12: in function <data/spells/scripts/healing/heala_player.lua:7>

Lua Script Error: [Spell Interface]
data/spells/scripts/healing/heala_player.lua:onCastSpell
data/spells/scripts/healing/heala_player.lua:12: attempt to index local 'summon' (a nil value)
stack traceback:
        [C]: in function '__index'
        data/spells/scripts/healing/heala_player.lua:12: in function <data/spells/scripts/healing/heala_player.lua:7>

Lua Script Error: [Spell Interface]
data/spells/scripts/healing/heala_player.lua:onCastSpell
data/spells/scripts/healing/heala_player.lua:12: attempt to index local 'summon' (a nil value)
stack traceback:
        [C]: in function '__index'
        data/spells/scripts/healing/heala_player.lua:12: in function <data/spells/scripts/healing/heala_player.lua:7>

Lua Script Error: [Spell Interface]
data/spells/scripts/healing/heala_player.lua:onCastSpell
data/spells/scripts/healing/heala_player.lua:12: attempt to index local 'summon' (a nil value)
stack traceback:
        [C]: in function '__index'
        data/spells/scripts/healing/heala_player.lua:12: in function <data/spells/scripts/healing/heala_player.lua:7>

Lua Script Error: [Spell Interface]
data/spells/scripts/healing/heala_player.lua:onCastSpell
data/spells/scripts/healing/heala_player.lua:12: attempt to index local 'summon' (a nil value)
stack traceback:
        [C]: in function '__index'
        data/spells/scripts/healing/heala_player.lua:12: in function <data/spells/scripts/healing/heala_player.lua:7>

Lua Script Error: [Spell Interface]
data/spells/scripts/healing/heala_player.lua:onCastSpell
data/spells/scripts/healing/heala_player.lua:12: attempt to index local 'summon' (a nil value)
stack traceback:
        [C]: in function '__index'
        data/spells/scripts/healing/heala_player.lua:12: in function <data/spells/scripts/healing/heala_player.lua:7>

Lua Script Error: [Spell Interface]
data/spells/scripts/healing/heala_player.lua:onCastSpell
data/spells/scripts/healing/heala_player.lua:12: attempt to index local 'summon' (a nil value)
stack traceback:
        [C]: in function '__index'
        data/spells/scripts/healing/heala_player.lua:12: in function <data/spells/scripts/healing/heala_player.lua:7>

Se quiser algum arquivo do servidor para te ajudar é só falar.

Postado
1 hora atrás, Icaro Simoes disse:

Rayo, testei aqui e deu erro. Não curou nem o player, nem o monstro.

 

Lua Script Error: [Spell Interface]
data/spells/scripts/healing/heala_player.lua:onCastSpell
data/spells/scripts/healing/heala_player.lua:12: attempt to index local 'summon' (a nil value)
stack traceback:
        [C]: in function '__index'
        data/spells/scripts/healing/heala_player.lua:12: in function <data/spells/scripts/healing/heala_player.lua:7>

Lua Script Error: [Spell Interface]
data/spells/scripts/healing/heala_player.lua:onCastSpell
data/spells/scripts/healing/heala_player.lua:12: attempt to index local 'summon' (a nil value)
stack traceback:
        [C]: in function '__index'
        data/spells/scripts/healing/heala_player.lua:12: in function <data/spells/scripts/healing/heala_player.lua:7>

Lua Script Error: [Spell Interface]
data/spells/scripts/healing/heala_player.lua:onCastSpell
data/spells/scripts/healing/heala_player.lua:12: attempt to index local 'summon' (a nil value)
stack traceback:
        [C]: in function '__index'
        data/spells/scripts/healing/heala_player.lua:12: in function <data/spells/scripts/healing/heala_player.lua:7>

Lua Script Error: [Spell Interface]
data/spells/scripts/healing/heala_player.lua:onCastSpell
data/spells/scripts/healing/heala_player.lua:12: attempt to index local 'summon' (a nil value)
stack traceback:
        [C]: in function '__index'
        data/spells/scripts/healing/heala_player.lua:12: in function <data/spells/scripts/healing/heala_player.lua:7>

Lua Script Error: [Spell Interface]
data/spells/scripts/healing/heala_player.lua:onCastSpell
data/spells/scripts/healing/heala_player.lua:12: attempt to index local 'summon' (a nil value)
stack traceback:
        [C]: in function '__index'
        data/spells/scripts/healing/heala_player.lua:12: in function <data/spells/scripts/healing/heala_player.lua:7>

Lua Script Error: [Spell Interface]
data/spells/scripts/healing/heala_player.lua:onCastSpell
data/spells/scripts/healing/heala_player.lua:12: attempt to index local 'summon' (a nil value)
stack traceback:
        [C]: in function '__index'
        data/spells/scripts/healing/heala_player.lua:12: in function <data/spells/scripts/healing/heala_player.lua:7>

Lua Script Error: [Spell Interface]
data/spells/scripts/healing/heala_player.lua:onCastSpell
data/spells/scripts/healing/heala_player.lua:12: attempt to index local 'summon' (a nil value)
stack traceback:
        [C]: in function '__index'
        data/spells/scripts/healing/heala_player.lua:12: in function <data/spells/scripts/healing/heala_player.lua:7>

Lua Script Error: [Spell Interface]
data/spells/scripts/healing/heala_player.lua:onCastSpell
data/spells/scripts/healing/heala_player.lua:12: attempt to index local 'summon' (a nil value)
stack traceback:
        [C]: in function '__index'
        data/spells/scripts/healing/heala_player.lua:12: in function <data/spells/scripts/healing/heala_player.lua:7>

Lua Script Error: [Spell Interface]
data/spells/scripts/healing/heala_player.lua:onCastSpell
data/spells/scripts/healing/heala_player.lua:12: attempt to index local 'summon' (a nil value)
stack traceback:
        [C]: in function '__index'
        data/spells/scripts/healing/heala_player.lua:12: in function <data/spells/scripts/healing/heala_player.lua:7>

Lua Script Error: [Spell Interface]
data/spells/scripts/healing/heala_player.lua:onCastSpell
data/spells/scripts/healing/heala_player.lua:12: attempt to index local 'summon' (a nil value)
stack traceback:
        [C]: in function '__index'
        data/spells/scripts/healing/heala_player.lua:12: in function <data/spells/scripts/healing/heala_player.lua:7>

Lua Script Error: [Spell Interface]
data/spells/scripts/healing/heala_player.lua:onCastSpell
data/spells/scripts/healing/heala_player.lua:12: attempt to index local 'summon' (a nil value)
stack traceback:
        [C]: in function '__index'
        data/spells/scripts/healing/heala_player.lua:12: in function <data/spells/scripts/healing/heala_player.lua:7>

Lua Script Error: [Spell Interface]
data/spells/scripts/healing/heala_player.lua:onCastSpell
data/spells/scripts/healing/heala_player.lua:12: attempt to index local 'summon' (a nil value)
stack traceback:
        [C]: in function '__index'
        data/spells/scripts/healing/heala_player.lua:12: in function <data/spells/scripts/healing/heala_player.lua:7>

Se quiser algum arquivo do servidor para te ajudar é só falar.

 

Qual versão do TFS você usa? 

Contribuições:
 

=> Distribuições/Servidores

  1. [8.60] The Forgotten Server 1.3 (COMPILADO WIN x64)

 

=> Scripts/Códigos/Tutoriais

  1. Pokemon pescado aparece em volta do seu pokemon
  2. [Gesior]Dobrar pontos PagSeguro a partir de x valor doado

 

 Gostou de alguma contribuição? Rep +?

Postado
  • Autor
9 minutos atrás, Rayo disse:

Qual versão do TFS você usa? 

 

Como faço pra ver isso? Quando coloco em propriedades do TFS, não me diz a versão. O servidor é 11.49 que baixei dos comentários desse video

 

13 minutos atrás, Rayo disse:

Qual versão do TFS você usa? 

 

 

theforgottenserver32.exe theforgottenserver64.exe

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

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.6k

Informação Importante

Confirmação de Termo