• TibiaFace

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

    .
    demo menumenu

    Afiliados



    Votar:

    Special Food TFS 1.x pasar a 0.4

    Compartir:

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

    1default Special Food TFS 1.x pasar a 0.4 Mar Ago 10, 2021 3:55 am

    ioke

    ioke
    Miembro
    Miembro
    Descripcion escribió:hola me gustaria que me ayudaran con este script, lo necesito para 0.4 pongo action entero, el script funciona para TFS 1.x. espero puedan ayudarme.

    en carpeta actions > lib > actions.lua

    Código:
    SPECIAL_FOODS = {
        [9992] = {"Gulp."}, [9993] = {"Chomp."}, [9994] = {"Chomp."}, [9995] = {"Chomp."}, [9997] = {"Yum."},
        [9998] = {"Munch."}, [9999] = {"Chomp."}, [10000] = {"Mmmm."}, [10001] = {"Smack."}
    }

    en action.xml

    Código:
        <!-- Special Foods -->
        <action itemid="9992" script="special_foods/rotworm_stew.lua"/>
        <action itemid="9993" script="special_foods/hydra_tongue_salad.lua"/>
        <action itemid="9994" script="special_foods/roasted_dragon_wings.lua"/>
        <action itemid="9995" script="special_foods/fried_tropical_terrorbird.lua"/>
        <action itemid="9997" script="special_foods/veggie_casserole.lua"/>
        <action itemid="9998" script="special_foods/filled_jalapeno_peppers.lua"/>
        <action itemid="9999" script="special_foods/blessed_steak.lua"/>
        <action itemid="10000" script="special_foods/carrot_cake.lua"/>
        <action itemid="10001" script="special_foods/northern_fishburger.lua"/>

    blessed_steak.lua

    Código:
    local exhaust = Condition(CONDITION_EXHAUST_HEAL)
    exhaust:setParameter(CONDITION_PARAM_TICKS, getConfigInfo('timeBetweenActions'))

    function onUse(player, item, fromPosition, target, toPosition, isHotkey)
        if SPECIAL_FOODS[item.itemid] == nil then
            return false
        end

        local sound = SPECIAL_FOODS[item.itemid][1]

        local playerMaxMana = player:getMaxMana()
        local playerMana = player:getMana()

        if not (player:addCondition(exhaust)) then
            return false
        end

        player:addManaSpent(playerMaxMana - playerMana)
        item:remove(1)
        player:say(sound, TALKTYPE_MONSTER_SAY)
        return true
    end

    carrot_cake.lua

    Código:
    local condition = Condition(CONDITION_ATTRIBUTES)
    condition:setParameter(CONDITION_PARAM_TICKS, 60 * 60 * 1000)
    condition:setParameter(CONDITION_PARAM_SKILL_DISTANCE, 10)

    local exhaust = Condition(CONDITION_EXHAUST_HEAL)
    exhaust:setParameter(CONDITION_PARAM_TICKS, getConfigInfo('timeBetweenActions'))

    function onUse(player, item, fromPosition, target, toPosition, isHotkey)
        if SPECIAL_FOODS[item.itemid] == nil then
            return false
        end

        local sound = SPECIAL_FOODS[item.itemid][1]

        if not (player:addCondition(condition) or player:addCondition(exhaust)) then
            return false
        end

        item:remove(1)
        player:say(sound, TALKTYPE_MONSTER_SAY)
        return true
    end

    filled_jalapeno_peppers.lua

    Código:
    local condition = Condition(CONDITION_HASTE)
    condition:setParameter(CONDITION_PARAM_TICKS, 60 * 60 * 1000)
    condition:setParameter(CONDITION_PARAM_SPEED, 40)

    local exhaust = Condition(CONDITION_EXHAUST_HEAL)
    exhaust:setParameter(CONDITION_PARAM_TICKS, getConfigInfo('timeBetweenActions'))

    function onUse(player, item, fromPosition, target, toPosition, isHotkey)
        if SPECIAL_FOODS[item.itemid] == nil then
            return false
        end

        local sound = SPECIAL_FOODS[item.itemid][1]

        if not (player:addCondition(condition) or player:addCondition(exhaust)) then
            return false
        end

        item:remove(1)
        player:say(sound, TALKTYPE_MONSTER_SAY)
        return true
    end

    hydra_tongue_salad.lua

    Código:
    local conditions = {CONDITION_POISON, CONDITION_FIRE, CONDITION_ENERGY, CONDITION_PARALYZE, CONDITION_DRUNK, CONDITION_DROWN, CONDITION_FREEZING, CONDITION_DAZZLED, CONDITION_CURSED}
    local exhaust = Condition(CONDITION_EXHAUST_HEAL)
    exhaust:setParameter(CONDITION_PARAM_TICKS, getConfigInfo('timeBetweenActions'))

    function onUse(player, item, fromPosition, target, toPosition, isHotkey)
        if SPECIAL_FOODS[item.itemid] == nil then
            return false
        end

        local sound = SPECIAL_FOODS[item.itemid][1]

        if not (player:addCondition(exhaust)) then
            return false
        end

        for i, v in ipairs(conditions) do
            if (player:hasCondition(v) ) then
                player:removeCondition(v)
            end
        end

        item:remove(1)
        player:say(sound, TALKTYPE_MONSTER_SAY)
        return true
    end

    fried_tropical_terrorbird.lua

    Código:
    local condition = Condition(CONDITION_ATTRIBUTES)
    condition:setParameter(CONDITION_PARAM_TICKS, 60 * 60 * 1000)
    condition:setParameter(CONDITION_PARAM_STAT_MAGICPOINTS, 5)

    local exhaust = Condition(CONDITION_EXHAUST_HEAL)
    exhaust:setParameter(CONDITION_PARAM_TICKS, getConfigInfo('timeBetweenActions'))

    function onUse(player, item, fromPosition, target, toPosition, isHotkey)
        if SPECIAL_FOODS[item.itemid] == nil then
            return false
        end

        local sound = SPECIAL_FOODS[item.itemid][1]

        if not (player:addCondition(condition) or player:addCondition(exhaust)) then
            return false
        end

        item:remove(1)
        player:say(sound, TALKTYPE_MONSTER_SAY)
        return true
    end

    northem_fishburguer.lua

    Código:
    local condition = Condition(CONDITION_ATTRIBUTES)
    condition:setParameter(CONDITION_PARAM_TICKS, 60 * 60 * 1000)
    condition:setParameter(CONDITION_PARAM_SKILL_FISHING, 50)

    local exhaust = Condition(CONDITION_EXHAUST_HEAL)
    exhaust:setParameter(CONDITION_PARAM_TICKS, getConfigInfo('timeBetweenActions'))

    function onUse(player, item, fromPosition, target, toPosition, isHotkey)
        if SPECIAL_FOODS[item.itemid] == nil then
            return false
        end

        local sound = SPECIAL_FOODS[item.itemid][1]

        if not (player:addCondition(condition) or player:addCondition(exhaust)) then
            return false
        end

        item:remove(1)
        player:say(sound, TALKTYPE_MONSTER_SAY)
        return true
    end

    roasted_dragon_wings.lua

    Código:
    local condition = Condition(CONDITION_ATTRIBUTES)
    condition:setParameter(CONDITION_PARAM_TICKS, 60 * 60 * 1000)
    condition:setParameter(CONDITION_PARAM_SKILL_SHIELD, 10)

    local exhaust = Condition(CONDITION_EXHAUST_HEAL)
    exhaust:setParameter(CONDITION_PARAM_TICKS, getConfigInfo('timeBetweenActions'))

    function onUse(player, item, fromPosition, target, toPosition, isHotkey)
        if SPECIAL_FOODS[item.itemid] == nil then
            return false
        end

        local sound = SPECIAL_FOODS[item.itemid][1]

        if not (player:addCondition(condition) or player:addCondition(exhaust)) then
            return false
        end

        item:remove(1)
        player:say(sound, TALKTYPE_MONSTER_SAY)
        return true
    end

    rotworm_stew.lua

    Código:
    local exhaust = Condition(CONDITION_EXHAUST_HEAL)
    exhaust:setParameter(CONDITION_PARAM_TICKS, getConfigInfo('timeBetweenActions'))

    function onUse(player, item, fromPosition, target, toPosition, isHotkey)
        if SPECIAL_FOODS[item.itemid] == nil then
            return false
        end

        local sound = SPECIAL_FOODS[item.itemid][1]

        local playerMaxHealth = player:getMaxHealth()
        local playerHealth = player:getHealth()

        if not (player:addCondition(exhaust)) then
            return false
        end

        player:addHealth(playerMaxHealth - playerHealth)
        item:remove(1)
        player:say(sound, TALKTYPE_MONSTER_SAY)
        return true
    end

    veggie_casserole.lua

    Código:
    local condition = Condition(CONDITION_ATTRIBUTES)
    condition:setParameter(CONDITION_PARAM_TICKS, 60 * 60 * 1000)
    condition:setParameter(CONDITION_PARAM_SKILL_MELEEPERCENT, 150)

    local exhaust = Condition(CONDITION_EXHAUST_HEAL)
    exhaust:setParameter(CONDITION_PARAM_TICKS, getConfigInfo('timeBetweenActions'))

    function onUse(player, item, fromPosition, target, toPosition, isHotkey)
        if SPECIAL_FOODS[item.itemid] == nil then
            return false
        end

        local sound = SPECIAL_FOODS[item.itemid][1]

        if not (player:addCondition(condition) or player:addCondition(exhaust)) then
            return false
        end

        item:remove(1)
        player:say(sound, TALKTYPE_MONSTER_SAY)
        return true
    end
    Imagen Explicativa escribió:Imagen Explicativa: Special Food TFS 1.x pasar a 0.4 Tibiaf10
    Version del Scripts: TFs 0.4.0

    2 participantes
    http://baiakciteron.sytes.net

    2default Re: Special Food TFS 1.x pasar a 0.4 Mar Ago 10, 2021 11:06 am

    [Admin] God Maya

    [Admin] God Maya
    Administrador
    Administrador
    O.O

    hay que tranforma todos tu scripts de reverscripts a scripts simple luego cambiar el lenguaje a lua tfs 0.4



    Special Food TFS 1.x pasar a 0.4 YNU5B25
    2 participantes
    https://www.tibiaface.com

    3default Re: Special Food TFS 1.x pasar a 0.4 Mar Ago 10, 2021 11:43 am

    ioke

    ioke
    Miembro
    Miembro
    Vamos un follón :s

    2 participantes
    http://baiakciteron.sytes.net

    4default Re: Special Food TFS 1.x pasar a 0.4 Jue Ago 12, 2021 2:34 pm

    [Admin] God Maya

    [Admin] God Maya
    Administrador
    Administrador
    prueba este

    Código:


    local exhaust = createConditionObject(CONDITION_EXHAUST)
    setConditionParam(exhaust, CONDITION_PARAM_TICKS, getConfigInfo('timeBetweenExActions') - 1)

    function onUse(cid, item, fromPosition, itemEx, toPosition)
        local level, mlevel = getPlayerLevel(cid), getPlayerMagLevel(cid)
        local mana_minimum = level * 1 + mlevel * 1 - 50
        local mana_maximum = level * 1.2 + mlevel * 1
        doPlayerAddMana(cid, math.random(mana_minimum, mana_maximum))
        doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
        doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)
    if item.type > 1 then
        doChangeTypeItem(item.uid, item.type - 0)
    end
        return TRUE
    end



    Special Food TFS 1.x pasar a 0.4 YNU5B25
    2 participantes
    https://www.tibiaface.com

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