• TibiaFace

    Tibiaface | Una comunidad Open Tibia donde encontras : mapas, scripts, Otserver, npc y amigos etc ...

    .
    demo menumenu

    Afiliados



    Votar:

    Spells no funciona en monster

    Ver el tema anterior Ver el tema siguiente Ir abajo  Mensaje (Página 1 de 1.)

    1default Spells no funciona en monster el Mar Abr 18, 2017 12:31 pm

    Mi Problema:
    Hola buenas, tengo el sgnte problema:
    Tengo una spells que funciona bien en la vocacion pero la momento de agregarla en un monster no me funciona, la spells es de un wodbo y es la sgnte:
    Código:
    local combat1 = createCombatObject()
    setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
    setCombatParam(combat1, COMBAT_PARAM_EFFECT, CONST_ME_GALIKHO_F)
    --setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 0, 5, 10, 0)

    function onGetFormulaValues(cid, level, maglevel)
            min = (level * -2.5 + maglevel * -4) * 3.0
            max = (level * -2.5 + maglevel * -4) * 3.5
           
            return min, max
    end

    local arr1 = {
    {0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0},
    {1, 2, 0, 0, 0},
    {0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0},
    }

    local area1 = createCombatArea(arr1)

    setCombatArea(combat1, area1)

    local combat10 = createCombatObject()
    setCombatParam(combat10, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
    setCombatParam(combat10, COMBAT_PARAM_EFFECT, CONST_ME_GALIKHO_E)
    --setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 0, 5, 10, 0)

    function onGetFormulaValues(cid, level, maglevel)
            min = (level * -2.5 + maglevel * -4) * 3.0
            max = (level * -2.5 + maglevel * -4) * 3.5
           
            return min, max
    end

    local arr10 = {
    {0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0},
    {0, 1, 1, 1, 0, 2},
    {0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0},
    }

    local area10 = createCombatArea(arr10)

    setCombatArea(combat10, area10)

    local combat100 = createCombatObject()
    setCombatParam(combat100, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
    setCombatParam(combat100, COMBAT_PARAM_EFFECT, CONST_ME_GALIKHO_D)
    --setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 0, 5, 10, 0)

    function onGetFormulaValues(cid, level, maglevel)
            min = (level * -2.5 + maglevel * -4) * 3.0
            max = (level * -2.5 + maglevel * -4) * 3.5
           
            return min, max
    end

    local arr100 = {
    {0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0},
    {1, 0, 0, 0, 0, 2},
    {0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0},
    }

    local area100 = createCombatArea(arr100)

    setCombatArea(combat100, area100)

    local combat2 = createCombatObject()
    setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
    setCombatParam(combat2, COMBAT_PARAM_EFFECT, CONST_ME_GALIKHO_D)
    --setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 0, 5, 10, 0)

    function onGetFormulaValues(cid, level, maglevel)
            min = (level * -2.5 + maglevel * -4) * 3.0
            max = (level * -2.5 + maglevel * -4) * 3.5
           
            return min, max
    end
    local arr2 = {
    {0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0},
    {2, 1, 0, 0, 0},
    {0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0},
    }

    local area2 = createCombatArea(arr2)

    setCombatArea(combat2, area2)

    local combat20 = createCombatObject()
    setCombatParam(combat20, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
    setCombatParam(combat20, COMBAT_PARAM_EFFECT, CONST_ME_GALIKHO_E)
    --setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 0, 5, 10, 0)

    function onGetFormulaValues(cid, level, maglevel)
            min = (level * -2.5 + maglevel * -4) * 3.0
            max = (level * -2.5 + maglevel * -4) * 3.5
           
            return min, max
    end

    local arr20 = {
    {0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0},
    {0, 2, 0, 1, 1, 1},
    {0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0},
    }

    local area20 = createCombatArea(arr20)

    setCombatArea(combat20, area20)

    local combat200 = createCombatObject()
    setCombatParam(combat200, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
    setCombatParam(combat200, COMBAT_PARAM_EFFECT, CONST_ME_GALIKHO_F)
    --setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 0, 5, 10, 0)

    function onGetFormulaValues(cid, level, maglevel)
            min = (level * -2.5 + maglevel * -4) * 3.0
            max = (level * -2.5 + maglevel * -4) * 3.5
           
            return min, max
    end

    local arr200 = {
    {0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0},
    {2, 0, 0, 0, 0, 1},
    {0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0},
    }

    local area200 = createCombatArea(arr200)

    setCombatArea(combat200, area200)

    local combat3 = createCombatObject()
    setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
    setCombatParam(combat3, COMBAT_PARAM_EFFECT, CONST_ME_GALIKHO_A)
    --setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 0, 5, 10, 0)

    function onGetFormulaValues(cid, level, maglevel)
            min = (level * -2.5 + maglevel * -4) * 3.0
            max = (level * -2.5 + maglevel * -4) * 3.5
           
            return min, max
    end


    local arr3 = {
    {0, 0, 0, 0, 0},
    {0, 0, 0, 2, 0},
    {0, 0, 0, 1, 0},
    {0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0},
    }

    local area3 = createCombatArea(arr3)

    setCombatArea(combat3, area3)

    local combat30 = createCombatObject()
    setCombatParam(combat30, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
    setCombatParam(combat30, COMBAT_PARAM_EFFECT, CONST_ME_GALIKHO_B)
    --setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 0, 5, 10, 0)

    function onGetFormulaValues(cid, level, maglevel)
            min = (level * -2.5 + maglevel * -4) * 3.0
            max = (level * -2.5 + maglevel * -4) * 3.5
           
            return min, max
    end

    local arr30 = {
    {0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0},
    {0, 0, 2, 0, 0},
    {0, 0, 0, 0, 0},
    {0, 0, 1, 0, 0},
    {0, 0, 1, 0, 0},
    {0, 0, 1, 0, 0},
    {0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0},
    }

    local area30 = createCombatArea(arr30)

    setCombatArea(combat30, area30)

    local combat300 = createCombatObject()
    setCombatParam(combat300, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
    setCombatParam(combat300, COMBAT_PARAM_EFFECT, CONST_ME_GALIKHO_C)
    --setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 0, 5, 10, 0)

    function onGetFormulaValues(cid, level, maglevel)
            min = (level * -2.5 + maglevel * -4) * 3.0
            max = (level * -2.5 + maglevel * -4) * 3.5
           
            return min, max
    end

    local arr300 = {
    {0, 0, 2, 0, 0, 0},
    {0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0},
    {0, 0, 1, 0, 0, 0},
    {0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0},
    }

    local area300 = createCombatArea(arr300)

    setCombatArea(combat300, area300)

    local combat4 = createCombatObject()
    setCombatParam(combat4, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
    setCombatParam(combat4, COMBAT_PARAM_EFFECT, CONST_ME_GALIKHO_C)
    --setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 0, 5, 10, 0)

    function onGetFormulaValues(cid, level, maglevel)
            min = (level * -2.5 + maglevel * -4) * 3.0
            max = (level * -2.5 + maglevel * -4) * 3.5
           
            return min, max
    end

    local arr4 = {
    {0, 0, 0, 0, 0},
    {0, 0, 0, 1, 0},
    {0, 0, 0, 2, 0},
    {0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0},
    }

    local area4 = createCombatArea(arr4)

    setCombatArea(combat4, area4)

    local combat40 = createCombatObject()
    setCombatParam(combat40, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
    setCombatParam(combat40, COMBAT_PARAM_EFFECT, CONST_ME_GALIKHO_B)
    --setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 0, 5, 10, 0)

    function onGetFormulaValues(cid, level, maglevel)
            min = (level * -2.5 + maglevel * -4) * 3.0
            max = (level * -2.5 + maglevel * -4) * 3.5
           
            return min, max
    end

    local arr40 = {
    {0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0},
    {0, 0, 1, 0, 0},
    {0, 0, 1, 0, 0},
    {0, 0, 1, 0, 0},
    {0, 0, 0, 0, 0},
    {0, 0, 2, 0, 0},
    {0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0},
    }

    local area40 = createCombatArea(arr40)

    setCombatArea(combat40, area40)

    local combat400 = createCombatObject()
    setCombatParam(combat400, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
    setCombatParam(combat400, COMBAT_PARAM_EFFECT, CONST_ME_GALIKHO_A)
    --setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 0, 5, 10, 0)

    function onGetFormulaValues(cid, level, maglevel)
            min = (level * -2.5 + maglevel * -4) * 3.0
            max = (level * -2.5 + maglevel * -4) * 3.5
           
            return min, max
    end

    local arr400 = {
    {0, 0, 1, 0, 0, 0},
    {0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0},
    {0, 0, 2, 0, 0, 0},
    {0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0},
    }

    local area400 = createCombatArea(arr400)

    setCombatArea(combat400, area400)

    function ghsha(cid)
    if isPlayer(cid) == TRUE and
    getPlayerLookDir(cid) == 1 then 
                 
    doCombat(cid, combat1, numberToVariant(cid))
    doCombat(cid, combat10, numberToVariant(cid))
    doCombat(cid, combat100, numberToVariant(cid))
    doPlayerSay(cid, 'Haaaa!', TALKTYPE_ORANGE_1)

    elseif isPlayer(cid) == TRUE and
    getPlayerLookDir(cid) == 2 then 
                 
            doCombat(cid, combat4, numberToVariant(cid))
    doCombat(cid, combat40, numberToVariant(cid))
    doCombat(cid, combat400, numberToVariant(cid))
    doPlayerSay(cid, 'Haaaa!', TALKTYPE_ORANGE_1)

    elseif isPlayer(cid) == TRUE and
    getPlayerLookDir(cid) == 3 then 
                   
            doCombat(cid, combat2, numberToVariant(cid))
    doCombat(cid, combat20, numberToVariant(cid))
    doCombat(cid, combat200, numberToVariant(cid))
    doPlayerSay(cid, 'Haaaa!', TALKTYPE_ORANGE_1)

    elseif isPlayer(cid) == TRUE and
    getPlayerLookDir(cid) == 0 then 
                   
            doCombat(cid, combat3, numberToVariant(cid))
    doCombat(cid, combat30, numberToVariant(cid))
    doCombat(cid, combat300, numberToVariant(cid))
     doPlayerSay(cid, 'Haaaa!', TALKTYPE_ORANGE_1)
        end
    end

    function gh2(cid) 
    if isPlayer(cid) == TRUE then   
          doPlayerSay(cid, 'Ho...!', TALKTYPE_ORANGE_1)               
              addEvent(ghsha,420,cid)
        end
    end
    function gh1(cid)     
    if isPlayer(cid) == TRUE then
          doPlayerSay(cid, 'Galik...!', TALKTYPE_ORANGE_1)               
              addEvent(gh2,450,cid)
        end
    end
    function onCastSpell(cid, var)
    if isPlayer(cid) == TRUE then
        addEvent(gh1,0,cid)
    return TRUE
    end
    end
    en el .xml del monster no tendria problemas ya que probe intentadolo con exori y resulto, de todas manera lo dejo:
    Código:
    <attack name="Galik ho" interval="2000" chance="100"/>


    Imagen de mi error:


    Esta en:
    Spells

    Ver perfil de usuario

    2default Re: Spells no funciona en monster el Mar Abr 18, 2017 12:35 pm

    [Admin] God Maya

    avatar
    Administrador
    Administrador
    no funcionara hace referencia

    function gh1(cid)
    if isPlayer(cid) == TRUE then
    doPlayerSay(cid, 'Galik...!', TALKTYPE_ORANGE_1)
    addEvent(gh2,450,cid)
    end
    end



    Ver perfil de usuario http://www.tibiaface.com

    3default Re: Spells no funciona en monster el Mar Abr 18, 2017 2:14 pm

    [Admin] God Maya escribió:no funcionara hace referencia

    function gh1(cid)
    if isPlayer(cid) == TRUE then
    doPlayerSay(cid, 'Galik...!', TALKTYPE_ORANGE_1)
    addEvent(gh2,450,cid)
    end
    end
    y hay alguna mamera de adaptarla al otx 2?

    Ver perfil de usuario

    4default Re: Spells no funciona en monster el Mar Abr 18, 2017 3:56 pm

    [Admin] God Maya

    avatar
    Administrador
    Administrador
    queee???? me estas diciendo que no lo lee tu moustro obviamente ese spells no es para un moustro



    Ver perfil de usuario http://www.tibiaface.com

    Contenido patrocinado


    Ver el tema anterior Ver el tema siguiente Volver arriba  Mensaje (Página 1 de 1.)

    Permisos de este foro:
    No puedes responder a temas en este foro.

     

    BienvenidosTibiaFace es una comunidad de Open Tibia. Para participar debes estar registrado (click para Regístrate).