• TibiaFace

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

    .
    demo menumenu

    Afiliados



    Votar:

    [Weapons] weapon 4 en 1

    Compartir:

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

    1[Weapons] weapon 4 en 1 Empty [Weapons] weapon 4 en 1 Vie Sep 23, 2022 4:06 pm

    ioke

    ioke
    Miembro
    Miembro
    Descripcion escribió:necesito un script de un arma que sirva para todas las vocaciones, he encontrado un script parecido a lo que quiero pero es 1.3 alguien sabe pasarlo o si hay alguno del estilo?

    Código:
    local combat = Combat()
    combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
    combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA)
    combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WEAPONTYPE)

    function onGetFormulaValues(player, skill, attack, factor)
        local min = 100
        local max = 500
        return -min, -max
    end

    combat:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")

    local combat2 = Combat()
    combat2:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
    combat2:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONAREA)
    combat2:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WEAPONTYPE)

    function onGetFormulaValues(player, skill, attack, factor)
        local min = 500
        local max = 1000
        return -min, -max
    end

    combat2:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")

    local combat3 = Combat()
    combat3:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
    combat3:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA)

    function onGetFormulaValues(player, skill, attack, factor)
        local min = 2000
        local max = 3000
        return -min, -max
    end

    combat3:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")

    local combat4 = Combat()
    combat4:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
    combat4:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONAREA)

    function onGetFormulaValues(player, skill, attack, factor)
        local min = 4000
        local max = 5000
        return -min, -max
    end

    combat4:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")

    function onUseWeapon(player, variant)
    local item = player:getSlotItem(CONST_SLOT_LEFT):getId()
    local voc = player:getVocation()
    local weapon = (2000) // WEAPON ID <<<<<<

    if item == weapon and voc == 1 or voc == 5 then // Sorcerer, Master Sorcerer

    return combat:execute(player, variant)

    elseif item == weapon and voc == 2 or voc == 6 then // Druid, Elder Druid

    return combat2:execute(player, variant)

    elseif item == weapon and voc == 3 or voc == 7 then // Paladin, Royal Paladin

    return combat3:execute(player, variant)

    elseif item == weapon and voc == 4 or voc == 8 then // Knight, Elite Knight

    return combat4:execute(player, variant)

    end
    end

    Imagen Explicativa escribió:Imagen Explicativa: [Weapons] weapon 4 en 1 Tibiaf10
    Version del Scripts: TFs 0.4.0

    2 participantes
    http://baiakciteron.sytes.net

    2[Weapons] weapon 4 en 1 Empty Re: [Weapons] weapon 4 en 1 Miér Oct 05, 2022 4:17 pm

    shuyin

    shuyin
    Miembro
    Miembro
    local combat = Combat()
    combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
    combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA)
    combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WEAPONTYPE)

    function onGetFormulaValues(player, skill, attack, factor)
    local min = 100
    local max = 500
    return -min, -max
    end

    combat:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")

    local combat2 = Combat()
    combat2:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
    combat2:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONAREA)
    combat2:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WEAPONTYPE)

    function onGetFormulaValues(player, skill, attack, factor)
    local min = 500
    local max = 1000
    return -min, -max
    end

    combat2:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")

    local combat3 = Combat()
    combat3:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
    combat3:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA)

    function onGetFormulaValues(player, skill, attack, factor)
    local min = 2000
    local max = 3000
    return -min, -max
    end

    combat3:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")

    local combat4 = Combat()
    combat4:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
    combat4:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONAREA)

    function onGetFormulaValues(player, skill, attack, factor)
    local min = 4000
    local max = 5000
    return -min, -max
    end

    combat4:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")

    function onUseWeapon(player, variant)
    local item = player:getSlotItem(CONST_SLOT_LEFT):getId()
    local voc = player:getVocation()
    local weapon = (2000) // WEAPONTYPE

    if item == weapon and voc == 1 or voc == 5 then -- Sorcerer, Master Sorcerer

    return combat:execute(player, variant)

    elseif item == weapon and voc == 2 or voc == 6 then -- Druid, Elder Druid

    return combat2:execute(player, variant)

    elseif item == weapon and voc == 3 or voc == 7 then -- Paladin, Royal Paladin

    return combat3:execute(player, variant)

    elseif item == weapon and voc == 4 or voc == 8 then -- Knight, Elite Knight

    return combat4:execute(player, variant)

    end
    end



    Prueba esto asi, a ver si te va.

    2 participantes

    3[Weapons] weapon 4 en 1 Empty Re: [Weapons] weapon 4 en 1 Miér Oct 05, 2022 4:42 pm

    ioke

    ioke
    Miembro
    Miembro
    da error ese script es 1.3 hay que hacerlo 0.4

    2 participantes
    http://baiakciteron.sytes.net

    Contenido patrocinado


    2 participantes

    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).