Tibia Dark

¿Quieres reaccionar a este mensaje? Regístrate en el foro con unos pocos clics o inicia sesión para continuar.
Tibia Dark

TibiaDark Aqui Podras Encontrar Todo Sobre OTXserver.


    PotionsPalancas

    Kroxos
    Kroxos


    Vocacion : Paladin

    Experiencia : LUA

    Mensajes : 7
    Reputación : 3
    Edad : 27
    Localización : Venezuela

    PotionsPalancas Empty PotionsPalancas

    Mensaje por Kroxos Mar Jun 17, 2014 11:07 am

    Hola a todos los usuarios de Tibia Dark Aqui les traigo potions por palancas primero vamos a actions/scripts crean un lua y llamado potionspalancas y agregan los siguiente:

    Código:
    --[[ Actions Potion And Rune v2 Made FerSorc BalckTibia.org]]--
        local fertable = {
        [8016] = {7620,1200,"Mana Potion",20},
        [8017] = {7589,2500,"Strong Mana Potion",20},
        [8018] = {7590,3200,"Great Mana Potion",20},
        [8019] = {7618,1200,"Health Potion",20},
        [8020] = {7588,2500,"Strong Health Potion",20},
        [8021] = {7591,2050,"Great Health Potion",20},
        [8022] = {8473,3000,"Ultimate Health Potion",20},
        [8023] = {8472,2500,"Great Spirit Potion",20},
        [8024] = {2268,2500,"Sudden Death Rune",20},
        [8025] = {2293,2500,"Magic Wall Rune",20},
        [8026] = {2278,3000,"Paralyze Rune",20},
        [8027] = {2313,1000,"Explosion Rune",20},
        [8028] = {2273,1500,"Ultimate Healing Rune",20},
        [8029] = {2274,1050,"Avalanche Rune",20},
        [8030] = {2260,1000,"Blank Rune",20},
        [8031] = {2304,1200,"Grat Fireball Rune",20},
        [8032] = {2305,1500,"Firebomb Rune",20}
        }

        function onUse(cid, item, fromPosition, itemEx, toPosition)
          local f = fertable[item.actionid]
            if f then
              if doPlayerRemoveMoney(cid,f[2]) and getPlayerFreeCap(cid) >= 50 then
                 doPlayerAddItem(cid,f[1],f[4])
                 doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Purchase ".. f[3] .."")
     elseif getPlayerFreeCap(cid) <= 50 then
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "No have capacity to buy")
     elseif doPlayerRemoveMoney(cid) <= f[2] then
     doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Dont have money")
     
    end
               return true
            end
        end

    Explicacion Breve

    ]el actionid que dessees] = {id de la potion,precio,"Mana Potion",cuantas potions dara}

    luego se van a actions.xml y agregan esto

    Código:
    <action actionid="8016-8032" event="script" value="potionspalanca.lua"/>

    dejen Rep+

    Credits Black Tibia

      Fecha y hora actual: Miér Mayo 08, 2024 4:11 pm