Ir para conteúdo

goalod

Membro
  • Registro em

  • Última visita

Histórico de Curtidas

  1. Gostei
    goalod deu reputação a Deep house em [10.90] LKing OT {Reward Chest, Battlefield Event, 3 VIP}   
    Ai mano Adciona essa tag no Glovalevents
        <globalevent name="shop" interval="5000" script="shop.lua"/>
     
    Depois dentro da pasta globalevents Cria um aquivo.lua  com nome shop.lua Depois Abre ele e coloca esse script \/ 
     
    -- ### CONFIG ###
    -- message send to player by script "type" (types you can check in "global.lua")
    SHOP_MSG_TYPE = 18
    -- time (in seconds) between connections to SQL database by shop script
    SQL_interval = 30
    -- ### END OF CONFIG ###
    function onThink(interval, lastExecution)
        local result_plr = db.storeQuery("SELECT * FROM z_ots_comunication")
        if(result_plr ~= false) then
            repeat
                local id = tonumber(result.getDataInt(result_plr, "id"))
                local action = tostring(result.getDataString(result_plr, "action"))
                local delete = tonumber(result.getDataInt(result_plr, "delete_it"))
                local cid = getPlayerByName(tostring(result.getDataString(result_plr, "name")))
                if(cid) then
                    local itemtogive_id = tonumber(result.getDataInt(result_plr, "param1"))
                    local itemtogive_count = tonumber(result.getDataInt(result_plr, "param2"))
                    local container_id = tonumber(result.getDataInt(result_plr, "param3"))
                    local container_count = tonumber(result.getDataInt(result_plr, "param4"))
                    local add_item_type = tostring(result.getDataString(result_plr, "param5"))
                    local add_item_name = tostring(result.getDataString(result_plr, "param6"))
                    local storage = tostring(result.getDataString(result_plr, "param7"))
                    local received_item = 0
                    local full_weight = 0
                    if(add_item_type == 'container') then
                        container_weight = getItemWeight(container_id, 1)
                        if(isItemRune(itemtogive_id)) then
                            items_weight = container_count * getItemWeight(itemtogive_id, 1)
                        else
                            items_weight = container_count * getItemWeight(itemtogive_id, itemtogive_count)
                        end
                        full_weight = items_weight + container_weight
                    else
                        full_weight = getItemWeight(itemtogive_id, itemtogive_count)
                        if(isItemRune(itemtogive_id)) then
                            full_weight = getItemWeight(itemtogive_id, 1)
                        else
                            full_weight = getItemWeight(itemtogive_id, itemtogive_count)
                        end
                    end
                    local free_cap = getPlayerFreeCap(cid)
                    if(full_weight <= free_cap) then
                        if(add_item_type == 'container') then
                            local new_container = doCreateItemEx(container_id, 1)
                            local iter = 0
                            while(iter ~= container_count) do
                                doAddContainerItem(new_container, itemtogive_id, itemtogive_count)
                                iter = iter + 1
                            end
                            received_item = doPlayerAddItemEx(cid, new_container)
                        else
                            local new_item = doCreateItemEx(itemtogive_id, itemtogive_count)
                            received_item = doPlayerAddItemEx(cid, new_item)
                        end
                        if(type(received_item) == "number" and received_item == RETURNVALUE_NOERROR) then
                            doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, 'You received '.. add_item_name ..' from Uniwar Shop.')
                            setPlayerStorageValue(cid,storage+555884621212,1)
                            db.query("DELETE FROM `z_ots_comunication` WHERE `id` = " .. id .. ";")
                            db.query("UPDATE `z_shop_history_item` SET `trans_state`='realized', `trans_real`=" .. os.time() .. " WHERE id = " .. id .. ";")
                        else
                            doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, ' '.. add_item_name ..' from ArenaTibia Shop is waiting for you. Please make place for this item in your backpack/hands and wait about '.. SQL_interval ..' seconds to get it.')
                        end
                    else
                        doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, ' '.. add_item_name ..' ArenaTibia Shop is waiting for you. It weight is '.. full_weight ..' oz., you have only '.. free_cap ..' oz. free capacity. Put some items in depot and wait about '.. SQL_interval ..' seconds to get it.')
                    end
                end
            until not result.next(result_plr)
            result.free(result_plr)
        end
        return true
    end
  2. Gostei
    goalod deu reputação a TheSource em [NPC] NPC de viajem [CONFIGURAVEL]   
    Bom, percebi que muitos servers usam teleport por não tem um npc digamos assim que teleport para determinado local, então resolvi posta aqui um código de um NPC totalmente configuravel até se o player sem premium account viaja ou não.

    Primeiro crie um arquivo xml com o nome que você deseja dentro de DATA/NPC




    <?xml version="1.0" encoding="UTF-8"?> <npc name="John" script="viajador.lua" walkinterval="350000" floorchange="0" speed="0"> <health now="100" max="100"/> <look type="662" head="114" body="94" legs="57" feet="0"/> <parameters> <parameter key="message_greet" value="Ola. Para mais informacoes de meus servicos diga {travel}." /> <parameter key="message_farewell" value="Tchau." /> <parameter key="message_walkaway" value="Tchau." /> </parameters> </npc>


    Entendendo o script:

    Ali em NPC Name é o nome do NPC, no caso ali está john, você pode modificalo para o nome que você deseja.

    Script é o nome do arquivo que você irá criar na pasta scripts, é o nosso proximo passo

    looktype é o outfit que ele vai usar, Head é a cor do cabelo dele, body é a cor da camisa, legs é a cor d a calça e feet a cor da bota.


    Proximo passo vai na pasta scripts dentro da NPC e crie um arquivo chamado viajar.lua ou o nome que você escolheuem script ali em cima || Npc/Scripts



    Entendendo o script:

    PREMIUM: Ali em amarelo onde tem "premium" ta assim premium = true, no caso "true" é sim e "false" é não ali o script pergunta se precisa de premium para viajar, se sim você deixa true se não coloque false.

    LEVEL: Level necessario para poder usar o NPC.

    COST: È quanto custará os serviços do NPC, lembrando que o preço está em golds.

    DESTINATION: é as coordenadas para onde o npc deverá teleporta o player.


    Gostou ?? da um REP++
  3. Gostei
    goalod deu reputação a Pedro. em O server não fica ON   
    poste aqui sua config.lua em spoiler pfv.
  4. Gostei
    goalod,   SEGUI esse topico que voce a prende a compilar >>http://www.tibiaking.com/forum/topic/43705-tfs-10-sources-revis%C3%A3o-1643-cast-system/ setiver com dificuldades fala ai a versao que vc quer que eu compilo aqui pra vc, 
  5. Gostei
    goalod deu reputação a LeoTK em [Video-Aula] Configurando Xampp,Roteador,Firewall, Etc...   
    fala ae galera bom como prometido fiz uma video-aula encinando a configurar o seu
    xampp versão (1.7.3), abrir porta no roteador, abrir portas no firewall, configurar o config.lua, o config do site (modern acc), rápida explicação de como criar ip no, no-ip. acho que é isso bom espero que ajude vocês fiquem com o video:
     
    DOWNLOAD: Xampp 1.7.3
     
     
    ASSISTA EM HD
     
    https://www.youtube.com/watch?v=Z2r2wGWpVWU
     
     
    tópico para configurar root, do seu xampp Clique Aqui
     
    o tópico é bem explicativo para se algum passo que você não entender da video aula pode também olhar no tópico.
     
    se gostou da +rep
     
    créditos
     
    Brunds (pelo video)
    alissonfgp (pelo tópico)
  6. Gostei
    goalod deu reputação a luanluciano93 em Ajuda para criar server 10.xx   
    Dá uma olhada aqui, pode ter algo pra te ajudar ...
     
    • http://www.tibiaking.com/forum/forum/143-tutoriais-de-websites/

Informação Importante

Confirmação de Termo