• TibiaFace

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

    .
    demo menumenu

    Afiliados



    Votar:

    [Sistema] Addon Doll en Modal Window (Tfs 1.1/1.2)

    Compartir:

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

    [Admin] God Maya

    [Admin] God Maya
    Administrador
    Administrador
    hola usuarios de tibiaface

    hoy le traigo el addon doll en modal windows para tfs 1.1/1.2


    instalacion:

    en su login.lua registran esto:

    Código:
    'modalAD',
    data/creaturescripts/creaturescripts.xml
    añadimos esta tag:

    Código:
    <event type="modalwindow" name="modalAD" script="modalAD.lua"/>

    luego nos vamos a:

    /data/creaturescripts/scripts
    copiamos cualquier archivo y renombramos por modalAD.lua y pegamos esto dentro

    Código:
    function onModalWindow(player, modalWindowId, buttonId, choiceId)
        player:unregisterEvent("modalad")
        local maleOutfits = {128, 129, 130, 131, 132, 133, 134, 147, 148, 149, 150, 151, 152, 153, 154, 251, 268, 273, 278, 289, 325, 328, 335, 367, 430, 432, 463, 465, 472, 512, 516, 541, 574, 577, 610, 619, 633, 634, 637, 664, 667, 684, 695, 697, 699}
        local femaleOutfits = {136, 137, 141, 139, 140, 138, 142, 143, 144, 145, 146, 155, 156, 157, 158, 252, 269, 270, 279, 288, 324, 329, 336, 431, 433, 464, 466, 471, 513, 514, 542, 575, 578, 618, 620, 632, 578, 636, 665, 578, 683, 694, 696, 698}

        if modalWindowId == 1000 then
            if buttonId == 100 then
                 if player:hasOutfit(femaleOutfits[choiceId], 3) or  player:hasOutfit(maleOutfits[choiceId], 3) then
                    player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'You already have these addons.')
                    return false
                 end
                 player:addOutfitAddon(maleOutfits[choiceId], 3)
                 player:addOutfitAddon(femaleOutfits[choiceId], 3)
                 player:removeItem(8982, 1)
                 player:getPosition():sendMagicEffect(CONST_ME_FIREWORK_YELLOW)
            end
        end
    end


    Ahora nos vamos a:


    data/actions/actions.xml
    y añadimos esta tag:

    Código:
    <action itemid="8982" script="modalAD.lua"/>


    luego nos vamos a:

    data/actions/scripts
    copiamos cualquier archivo y renombramos por modalAD.lua y pegamos esto dentro:

    Código:
    function onUse(player, item, fromPosition, itemEx, toPosition, isHotkey)
        player:registerEvent("ModalAD")

        local title = "Choose your outfit!"
        local message = "You will receive the outfit and both addons!"

        local window = ModalWindow(1000, title, message)

        window:addButton(100, "Confirm")
        window:addButton(101, "Cancel")

        window:addChoice(1, "Citizen")
        window:addChoice(2, "Hunter")
        window:addChoice(3, "Mage")
        window:addChoice(4, "Knight")
        window:addChoice(5, "Noble")
        window:addChoice(6, "Summoner")
        window:addChoice(7, "Warrior")
        window:addChoice(8, "Barbarian")
        window:addChoice(9, "Druid")
        window:addChoice(10, "Wizard")
        window:addChoice(11, "Oriental")
        window:addChoice(12, "Pirate")
        window:addChoice(13, "Assassin")
        window:addChoice(14, "Beggar")
        window:addChoice(15, "Shaman")
        window:addChoice(16, "Norse")
        window:addChoice(17, "Nightmare")
        window:addChoice(18, "Jester")
        window:addChoice(19, "Brotherhood")
        window:addChoice(20, "Demon Hunter")
        window:addChoice(21, "Yalaharian")
        window:addChoice(22, "Wedding")
        window:addChoice(23, "Warmaster")
        window:addChoice(24, "Wayfarer")
        window:addChoice(25, "Afflicted")
        window:addChoice(26, "Elementalist")
        window:addChoice(27, "Deepling")
        window:addChoice(28, "Insectoid")
        window:addChoice(29, "Entrepreneur")
        window:addChoice(30, "Crystal Warlord")
        window:addChoice(31, "Soil Guardian")
        window:addChoice(32, "Demon")
        window:addChoice(33, "Cave Explorer")
        window:addChoice(34, "Dream Warden")
        window:addChoice(35, "Glooth Engineer")
        window:addChoice(36, "Jersey")
        window:addChoice(37, "Champion")
        window:addChoice(38, "Conjurer")
        window:addChoice(39, "Beast Master")
        window:addChoice(40, "Chaos Acolyte")
        window:addChoice(41, "Death Herald")
        window:addChoice(42, "Ranger")
        window:addChoice(43, "Ceremonial")
        window:addChoice(44, "Puppeteer")
        window:addChoice(45, "Spirit Caller")
      

        window:setDefaultEnterButton(100)
        window:setDefaultEscapeButton(101)

        window:sendToPlayer(player)
        return true
    end


    creditos:

    Regards,
    Beastn.



    [Sistema] Addon Doll en  Modal Window (Tfs 1.1/1.2) YNU5B25
    3 participantes
    http://www.tibiaface.com

    Buitax

    Buitax
    Miembro
    Miembro
    Falta la parte de talkactions bro, esto me esta trayendo problemas, porque el de mount es igual a este, usa el mismo modal id y todo y se me superponen los script!

    3 participantes
    http://www.google.com

    [Admin] God Maya

    [Admin] God Maya
    Administrador
    Administrador
    Buitax escribió:Falta la parte de talkactions bro, esto me esta trayendo problemas, porque el de mount es igual a este, usa el mismo modal id y todo y se me superponen los script!
    No te logre entender a que te refieres con el mis modalid



    [Sistema] Addon Doll en  Modal Window (Tfs 1.1/1.2) YNU5B25
    3 participantes
    http://www.tibiaface.com

    josuefersh

    josuefersh
    Miembro
    Miembro
    si lo pones en el piso y le picas click y lo usa no se quita

    3 participantes

    [Admin] God Maya

    [Admin] God Maya
    Administrador
    Administrador
    josuefersh escribió:si lo pones en el piso y le picas click y lo usa no se quita

    aqui lo remarke amigo y lo puse fixe

    [Tienes que estar registrado y conectado para ver este vínculo]



    [Sistema] Addon Doll en  Modal Window (Tfs 1.1/1.2) YNU5B25
    3 participantes
    http://www.tibiaface.com

    Contenido patrocinado


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