Ir para conteúdo

Andreeyyy

Membro
  • Registro em

  • Última visita

Histórico de Curtidas

  1. Obrigado
    Andreeyyy recebeu reputação de Toca do Aranha em [LINUX] ERRO AO EXECUTAR TFS ( RESOLVIDO )   
    Olá, meu dedicado fez uma atualização de sistema, e agora me aparece o seguinte erro ao executar:

    ./tfs: error while loading shared libraries: liblua5.2.so.0: cannot open shared object file: No such file or directory
     
    EDIT:

    RESOLVIDO, SEGUE A SOLUÇÃO PARA PROBLEMAS SEMELHANTE SE ALGUEM TIVER

    apt-get install git cmake build-essential liblua5.2-dev libgmp3-dev libmysqlclient-dev libboost-system-dev libpugixml-dev libboost-iostreams-dev
  2. Gostei
    Andreeyyy recebeu reputação de Jhonjhon775 em [LINUX] ERRO AO EXECUTAR TFS ( RESOLVIDO )   
    Olá, meu dedicado fez uma atualização de sistema, e agora me aparece o seguinte erro ao executar:

    ./tfs: error while loading shared libraries: liblua5.2.so.0: cannot open shared object file: No such file or directory
     
    EDIT:

    RESOLVIDO, SEGUE A SOLUÇÃO PARA PROBLEMAS SEMELHANTE SE ALGUEM TIVER

    apt-get install git cmake build-essential liblua5.2-dev libgmp3-dev libmysqlclient-dev libboost-system-dev libpugixml-dev libboost-iostreams-dev
  3. Haha
    Andreeyyy recebeu reputação de KotZletY em [PEDIDO] COMANDO ATUALIZADO TFS 1.x   
    @KotZletY Mais isso é o obvio, basico não acha ? o.0 Não postei esperando uma explicação para tal, e sim uma resolução ou caminho para a mesma.
  4. Obrigado
    Andreeyyy deu reputação a Leohige em (Resolvido)[PEDIDO] ITENS EM TROCA DE LIBERAÇÃO   
    local config = { positions = { [0] = {x = 925, y = 818, z = 7}, -- Posição do item que bloqueia a passagem [1] = {x = 919, y = 819, z = 7}, -- Posição do item a ser removido [2] = {x = 920, y = 819, z = 7}, -- Posição do item a ser removido [3] = {x = 919, y = 820, z = 7}, -- Posição do item a ser removido [4] = {x = 920, y = 820, z = 7}, -- Posição do item a ser removido }, items = { [0] = 27486, -- Id do item que bloqueia a passagem [1] = 2681, -- Id do item a ser removido [2] = 2681, -- Id do item a ser removido [3] = 2681, -- Id do item a ser removido [4] = 2681, -- Id do item a ser removido }, addItemIn = 3 -- Tempo em minutos para a passagem se fechar } function onUse(player, item, fromPosition, target, toPosition, isHotkey) local obstacle = Tile(config.positions[0]):getItemById(config.items[0]) if obstacle == nil then player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "It is open.") return true end local items = {} for i=1, #config.positions do local item = Tile(config.positions[i]):getItemById(config.items[i]) if item ~= nil then items[i] = item else player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Missing items.") return true end end for i=1, #items do if items[i] ~= nil then items[i]:remove() end end if obstacle ~= nil then obstacle:remove() addEvent(Game.createItem, config.addItemIn * 60 * 1000, config.items[0], 1, config.positions[0]) end player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "The obstacle has been removed.") return true end  
  5. Obrigado
    Andreeyyy deu reputação a Leu em [TFS 1.1+] Limpar Characters Inativos / Accounts vazias   
    Usando o script do Cjaker como base (e a descrição do tópico dele, na cara dura mesmo!), otimizei as operações no banco de dados (tava muito zuado) e adicionei um range de accounts protegidas pra evitar apagar os gms/samples/contas de spoofers do otservlist/etc... ;
    Salve galera, mais um script para quem está precisando dar aquela limpada no banco de dados e otimizar o Servidor.
     
    -- Especificações --
    TFS 1.1+ Objetivo é limpar as contas inativas/vazias e os players Inativos assim removendo os usuários que estão inativos e ocupando espaço no banco de dados.
      -- Instruções --
     
    Em globalevents.xml insira essa linha <globalevent type="startup" name="CleanDatabases" script="cleandatabase.lua" />  
    Crie um script chamado cleandatabase.lua na pasta globalevents/scripts e cole isso dentro dele. --- --- Generated by EmmyLua(https://github.com/EmmyLua) --- Created by leu. --- DateTime: 04/04/18 18:42 --- --[[ Clean Database by Cjaker | Refactor and SQL Optimizations by Leu ]]-- local inactiveMonths = 1 --> Quantos meses o player ficou inativo local createdMonths = 1 --> Quantos meses a conta foi criada e não possui character criado. local protectedAccIdEnd = 20 --ignorar accounts com id <= 20 local function clearInactivePlayers() local inactiveTimestamp = os.time() - (86400 * (inactiveMonths*30)) local totalClear=0 local fromClause = "`players` WHERE `account_id` > ".. protectedAccIdEnd .." AND lastlogin <= "..inactiveTimestamp local resultId = db.storeQuery("SELECT COUNT(*) as num_inativos FROM "..fromClause) if resultId ~= false then totalClear = result.getDataInt(resultId, 'num_inativos') result.free(resultId) if totalClear > 0 then db.query("DELETE FROM "..fromClause) end end return totalClear end local function clearEmptyAccounts() local totalClear = 0 local createdTimestamp = os.time() - (86400 * (createdMonths*30)) local fromClause = "`accounts` ACCS WHERE `id` > ".. protectedAccIdEnd .." AND `creation` <= "..createdTimestamp.." AND (SELECT COUNT(*) from `players` WHERE `account_id` = ACCS.`id`) > 0" local resultId = db.storeQuery("SELECT COUNT(*) as num_inativas FROM "..fromClause) if resultId~= false then totalClear = result.getDataInt(resultId,'num_inativas') result.free(resultId) if totalClear > 0 then db.query("DELETE ACCS FROM "..fromClause) end end return totalClear end function onStartup() print('>> ' ..clearInactivePlayers().. " players inativos deletados.") print('>> ' ..clearEmptyAccounts().. " contas vazias deletadas.") end  
     
    é isso senhores, paganois, flw!
     
    EDIT 24-04-2018: correção DELETE accs QUERY
     
  6. Obrigado
    Andreeyyy deu reputação a Leohige em [TFS 1.x] Evento Loteria   
    Evento Loteria 
     
     
    Esse evento loteria é diferente dos demais que existem hoje nos servidores, é baseado em cima de um evento que ocorre no CraftLandia (um servidor de Minecraft).
    Quando o evento for iniciado o jogador poderá pagar um valor (configurável) para tentar acertar o número premiado (que vai de 1 até o número configurado). O evento tem um tempo de duração (configurável) e o primeiro jogador a acertar qual é o número premiado levará um premio em dinheiro (configurável) e o evento será encerrado.
     
    Demonstrações:
     
     
     
     
    Comandos:
     
     
    Configuração:
     
     
    Caso queira implementar este evento em seu servidor, crie os arquivos abaixo.
     
    data/lib/lottery/event.lua (as configurações ficam neste arquivo)
     
     
    data/globalevents/scripts/lottery.lua
     
     
    data/globalevents/globalevents.xml
     
    você pode por com um intervalo de tempo
     
     
    ou horário fixo
     
     
    data/talkactions/scripts/lottery.lua
     
     
    data/talkactions/talkactions.xml
     
     
    Tradução para PT-BR!
     
    Caso deseje traduzir o evento, substitua o Lottery.messages inteiro em data/lib/lottery/event.lua por este
     
     
    Qualquer problema, sugestão, bug ou dúvida utilize este tópico!!!
  7. Obrigado
    Andreeyyy deu reputação a smowking em [NPC] Yana 10.94   
    Nao tem muito o que dizer galera, é simplesmente o NPC Yana do Tibia global que eu fiz, as transcrições estão as mesmas, porém sem a chance de quebra do item! Aproveitem! Bora quebrar essa coisa de venda de otserv galera!
     
    Yana.xml
    <?xml version="1.0" encoding="UTF-8"?> <npc name="Yana" script="Yana.lua" walkinterval="1500" speed="100" walkradius="2" floorchange="0" > <health max="100" now="100"/> <look type="471" head="68" body="38" legs="0" feet="49" addons="2" mount="0"/> <parameters> <parameter key="message_greet" value="Blessings, Player!How may I help you? Do you wish to trade some {token}s, or do you need some {information}?" /> <parameter key="message_farewell" value="Charge all kind of weapons! For the cost of some tokens only!" /> <parameter key="message_walkaway" value="Farewell, Player." /> </parameters> </npc>  
    Yana.lua
    -------------------------------------------- --------- Script by Smowking --------------- ----- Plese, do not remove the credits ----- -------------------------------------------- local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end local IdToken = 25377 -- Configurar id do token local items = { ["mayhem"] = { ["wand"] = {itemId = 26261, tokens_cost = 50, charged = 26271, heavycharged = 26281, overcharged = 26291}, ["rod"] = {itemId = 26262, tokens_cost = 50, charged = 26272, heavycharged = 26282, overcharged = 26292}, ["sword"] = {itemId = 26253, tokens_cost = 50, charged = 26263, heavycharged = 26273, overcharged = 26283}, ["slayer"] = {itemId = 26254, tokens_cost = 50, charged = 26264, heavycharged = 26274, overcharged = 26284}, ["axe"] = {itemId = 26255, tokens_cost = 50, charged = 26265, heavycharged = 26275, overcharged = 26285}, ["chopper"] = {itemId = 26256, tokens_cost = 50, charged = 26266, heavycharged = 26276, overcharged = 26286}, ["club"] = {itemId = 26257, tokens_cost = 50, charged = 26267, heavycharged = 26277, overcharged = 26287}, ["hammer"] = {itemId = 26258, tokens_cost = 50, charged = 26268, heavycharged = 26278, overcharged = 26288}, ["bow"] = {itemId = 26259, tokens_cost = 50, charged = 26269, heavycharged = 26280, overcharged = 26289}, ["crossbow"] = {itemId = 26361, tokens_cost = 50, charged = 26362, heavycharged = 26363, overcharged = 26364}, }, ["carving"] = { ["wand"] = {itemId = 26365, tokens_cost = 50, charged = 26366, heavycharged = 26367, overcharged = 26367}, ["rod"] = {itemId = 26369, tokens_cost = 50, charged = 26370, heavycharged = 26371, overcharged = 26372}, ["sword"] = {itemId = 26333, tokens_cost = 50, charged = 26334, heavycharged = 26335, overcharged = 26336}, ["slayer"] = {itemId = 26337, tokens_cost = 50, charged = 26338, heavycharged = 26339, overcharged = 26340}, ["axe"] = {itemId = 26341, tokens_cost = 50, charged = 26342, heavycharged = 26343, overcharged = 26344}, ["chopper"] = {itemId = 26345, tokens_cost = 50, charged = 26346, heavycharged = 26347, overcharged = 26348}, ["club"] = {itemId = 26349, tokens_cost = 50, charged = 26350, heavycharged = 26351, overcharged = 26352}, ["hammer"] = {itemId = 26353, tokens_cost = 50, charged = 26354, heavycharged = 26355, overcharged = 26356}, ["bow"] = {itemId = 26357, tokens_cost = 50, charged = 26358, heavycharged = 26359, overcharged = 26360}, ["crossbow"] = {itemId = 26361, tokens_cost = 50, charged = 26362, heavycharged = 26363, overcharged = 26364}, }, ["remedy"] = { ["wand"] = {itemId = 26325, tokens_cost = 50, charged = 26326, heavycharged = 26327, overcharged = 26328}, ["rod"] = {itemId = 26329, tokens_cost = 50, charged = 26330, heavycharged = 26331, overcharged = 26332}, ["sword"] = {itemId = 26293, tokens_cost = 50, charged = 26294, heavycharged = 26295, overcharged = 26296}, ["slayer"] = {itemId = 26297, tokens_cost = 50, charged = 26298, heavycharged = 26299, overcharged = 26300}, ["axe"] = {itemId = 26301, tokens_cost = 50, charged = 26302, heavycharged = 26303, overcharged = 26304}, ["chopper"] = {itemId = 26305, tokens_cost = 50, charged = 26306, heavycharged = 26307, overcharged = 26308}, ["club"] = {itemId = 26309, tokens_cost = 50, charged = 26310, heavycharged = 26311, overcharged = 26312}, ["hammer"] = {itemId = 26313, tokens_cost = 50, charged = 26314, heavycharged = 26315, overcharged = 26316}, ["bow"] = {itemId = 26317, tokens_cost = 50, charged = 26318, heavycharged = 26319, overcharged = 26320}, ["crossbow"] = {itemId = 26321, tokens_cost = 50, charged = 26322, heavycharged = 26323, overcharged = 26324}, } } local function creatureSayCallback(cid, type, msg) local player = Player(cid) if not npcHandler:isFocused(cid) then return false end if npcHandler.topic[cid] == 1 then if msgcontains(msg, "mayhem") then npcHandler:say("Ah, very good. I can offer you a one-handed weapon: {sword}, {axe} or {club}. You may also take a two-handed weapon: {slayer}, {chopper} or {hammer}. I also can offer you a {bow}, {crossbow}, {wand} or {rod}. Which one do you choose?", cid) npcHandler.topic[cid] = 2 elseif msgcontains(msg, "carving") then npcHandler:say("Ah, very good. I can offer you a one-handed weapon: {sword}, {axe} or {club}. You may also take a two-handed weapon: {slayer}, {chopper} or {hammer}. I also can offer you a {bow}, {crossbow}, {wand} or {rod}. Which one do you choose?", cid) npcHandler.topic[cid] = 3 elseif msgcontains(msg, "remedy") then npcHandler:say("Ah, very good. I can offer you a one-handed weapon: {sword}, {axe} or {club}. You may also take a two-handed weapon: {slayer}, {chopper} or {hammer}. I also can offer you a {bow}, {crossbow}, {wand} or {rod}. Which one do you choose?", cid) npcHandler.topic[cid] = 4 end elseif npcHandler.topic[cid] == 2 then local itemsDisp = items["mayhem"] local finally = itemsDisp[msg] if finally then if player:removeItem(IdToken, finally.tokens_cost) then npcHandler:say("Ah, excellent. Here is your "..msg.." of mayhem.", cid) player:addItem(finally.itemId, 1) npcHandler.topic[cid] = 0 else npcHandler:say("You don't have enough of tokens.", cid) npcHandler.topic[cid] = 0 end else npcHandler:say("I\'m sorry but I did not understand what you said...", cid) end elseif npcHandler.topic[cid] == 3 then local itemsDisp = items["carving"] local finally = itemsDisp[msg] if finally then if player:removeItem(IdToken, finally.tokens_cost) then npcHandler:say("Ah, excellent. Here is your "..msg.." of carving.", cid) player:addItem(finally.itemId, 1) npcHandler.topic[cid] = 0 else npcHandler:say("You don't have enough of tokens.", cid) npcHandler.topic[cid] = 0 end else npcHandler:say("I\'m sorry but I did not understand what you said...", cid) end elseif npcHandler.topic[cid] == 4 then local itemsDisp = items["remedy"] local finally = itemsDisp[msg] if finally then if player:removeItem(IdToken, finally.tokens_cost) then npcHandler:say("Ah, excellent. Here is your "..msg.." of remedy.", cid) player:addItem(finally.itemId, 1) npcHandler.topic[cid] = 0 else npcHandler:say("You don't have enough of tokens.", cid) npcHandler.topic[cid] = 0 end else npcHandler:say("I\'m sorry but I did not understand what you said...", cid) end elseif npcHandler.topic[cid] == 5 then if msgcontains(msg, "risk") then npcHandler:say({ 'If I overcharge your weapon, there\'s a risk that the charging doesn\'t succeed. See, the complex process of charging a weapon with this kind of {energy} is very challenging. ...', 'It can make the weapon\'s substance very instable and in this case the charging won\'t succeed. Yet I\'d have to keep your tokens for my effort so they will be lost for you anyway. I hope you understand this. ...', 'Of course, if it works your weapon will be remarkably more powerful for a certain time. It\'s up to you, make your choice.' }, cid) elseif msgcontains(msg, "energy") then npcHandler:say({ 'I\'m sorry but I won\'t reveal the exact process of charging a weapon. It\'s about keeping business secrets, you know. All I can tell you is that I use a special kind of energetic-based enchantment magic. ...', 'It is consigned in my family for many generations. This is the reason why only special weapons, which I can offer you in exchange for {gold} tokens, can be charged with this method.' }, cid) npcHandler.topic[cid] = 0 elseif msgcontains(msg, "mayhem") then npcHandler:say("As you wish. Which kind of item do you want to charge: {sword}, {axe}, {club}, {slayer}, {chopper}, {hammer}, {bow}, {crossbow}, {wand} or {rod}?", cid) npcHandler.topic[cid] = 6 elseif msgcontains(msg, "carving") then npcHandler:say("As you wish. Which kind of item do you want to charge: {sword}, {axe}, {club}, {slayer}, {chopper}, {hammer}, {bow}, {crossbow}, {wand} or {rod}?", cid) npcHandler.topic[cid] = 7 elseif msgcontains(msg, "remedy") then npcHandler:say("As you wish. Which kind of item do you want to charge: {sword}, {axe}, {club}, {slayer}, {chopper}, {hammer}, {bow}, {crossbow}, {wand} or {rod}?", cid) npcHandler.topic[cid] = 8 end elseif npcHandler.topic[cid] == 6 then local itemsDisp = items["mayhem"] local finally = itemsDisp[msg] if finally then if player:getItemCount(IdToken) >= 5 and player:getItemCount(finally.itemId) >= 1 then player:removeItem(IdToken, 5) player:removeItem(finally.itemId, 1) player:addItem(finally.charged, 1) elseif player:getItemCount(IdToken) >= 5 and player:getItemCount(finally.charged) >= 1 then player:removeItem(IdToken, 5) player:removeItem(finally.charged, 1) player:addItem(finally.heavycharged, 1) elseif player:getItemCount(IdToken) >= 5 and player:getItemCount(finally.heavycharged) >= 1 then player:removeItem(IdToken, 5) player:removeItem(finally.heavycharged, 1) player:addItem(finally.overcharged, 1) else npcHandler:say("I'm sorry but you don't have the appropriate weapon. Come back if you're in the possession of a "..msg.." of mayhem.", cid) end else npcHandler:say("I\'m sorry but I did not understand what you said...", cid) end elseif npcHandler.topic[cid] == 7 then local itemsDisp = items["carving"] local finally = itemsDisp[msg] if finally then if player:getItemCount(IdToken) >= 5 and player:getItemCount(finally.itemId) >= 1 then player:removeItem(IdToken, 5) player:removeItem(finally.itemId, 1) player:addItem(finally.charged, 1) elseif player:getItemCount(IdToken) >= 5 and player:getItemCount(finally.charged) >= 1 then player:removeItem(IdToken, 5) player:removeItem(finally.charged, 1) player:addItem(finally.heavycharged, 1) elseif player:getItemCount(IdToken) >= 5 and player:getItemCount(finally.heavycharged) >= 1 then player:removeItem(IdToken, 5) player:removeItem(finally.heavycharged, 1) player:addItem(finally.overcharged, 1) else npcHandler:say("I'm sorry but you don't have the appropriate weapon. Come back if you're in the possession of a "..msg.." of carving.", cid) end else npcHandler:say("I\'m sorry but I did not understand what you said...", cid) end elseif npcHandler.topic[cid] == 8 then local itemsDisp = items["remedy"] local finally = itemsDisp[msg] if finally then if player:getItemCount(IdToken) >= 5 and player:getItemCount(finally.itemId) >= 1 then player:removeItem(IdToken, 5) player:removeItem(finally.itemId, 1) player:addItem(finally.charged, 1) elseif player:getItemCount(IdToken) >= 5 and player:getItemCount(finally.charged) >= 1 then player:removeItem(IdToken, 5) player:removeItem(finally.charged, 1) player:addItem(finally.heavycharged, 1) elseif player:getItemCount(IdToken) >= 5 and player:getItemCount(finally.heavycharged) >= 1 then player:removeItem(IdToken, 5) player:removeItem(finally.heavycharged, 1) player:addItem(finally.overcharged, 1) else npcHandler:say("I'm sorry but you don't have the appropriate weapon. Come back if you're in the possession of a "..msg.." of remedy.", cid) end else npcHandler:say("I\'m sorry but I did not understand what you said...", cid) end end if msgcontains(msg, "information") then npcHandler:say({ '{Token}s are small objects made of metal or other materials. You can use them to buy superior equipment from {token} traders like me. ...', 'There are several ways to obtain the tokens Im interested in - killing certain bosses, for example. In exchange for a certain amount of tokens, I can offer you some first-class items. ...' }, cid) elseif msgcontains(msg, "token") then npcHandler:say("If you have any {gold} tokens with you, let's have a look! Maybe I can offer you something in exchange.", cid) elseif msgcontains(msg, "gold") then npcHandler:say({ 'Here\'s the deal, Jess Leewyn. For 50 of your gold tokens, I can offer you some special equipment pieces which you can {charge} with a certain item type. I have the following item types to offer: {mayhem}, {remedy} or {carving}. ...', 'I may also give you a short {description} what these labels mean. So, which item type are you most interested in?' }, cid) npcHandler.topic[cid] = 1 elseif msgcontains(msg, "charge") then npcHandler:say({ 'I may charge your equipment in the exchange of {gold} tokens. This gives your weapon some temporary improvements. For five tokens you\'ll get a charged weapon and for ten tokens a heavily charged one. ...', 'For the cost of fifteen tokens I can also overcharge your weapon but that comes with a certain {risk}. There are three equipment types I can charge: {mayhem}, {remedy} or {carving}. What kind of weapon would you like to charge?' }, cid) npcHandler.topic[cid] = 5 elseif msgcontains(msg, "description") then npcHandler:say({ 'A weapon of mayhem increases your chance to hit harder and to enhance the damage you inflict. A weapon of remedy gives you a certain chance to gain a part of a creature\'s life energy for yourself. ...', 'And a weapon of carving does the same with a creature\'s mana.' }, cid) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())  
  8. Obrigado
    Andreeyyy deu reputação a gabrielzika em (Resolvido)Adicionar level para falar com NPC   
    local PRESENT_STORAGE = 29885 -- Storage ID local gifts = { {10, 6531, 1}, -- 1% to get Santa Hat [10] {30, 6512, 1}, -- 3% to get Santa Doll [30] {40, 2112, 1}, -- 4% to get Teddy Bear [40] {100, 2160, 10}, -- 10% to get 10 Crystal Coins [100] {150, 2688, 10}, -- 15% to get 10 Candy Canes [150] {150, 2152, 100}, -- 15% to get 100 Platinum Coins [150] {200, 2111, 5}, -- 20% to get 10 Snowballs [200] {250, 2675, 10}, -- 25% to get 10 Orange [250] {350, 2674, 15}, -- 35% to get 10 Red Apples [350] {500, 2687, 10} -- 50% to get 10 Cookies [500] } local level = 300 local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end function SantaNPC(cid, message, keywords, parameters, node) if(not npcHandler:isFocused(cid)) then return false end if getPlayerLevel(cid) < level then selfSay("you do not have the level you need...", cid) return true end if (parameters.present == true) then if (getPlayerStorageValue(cid, PRESENT_STORAGE) == 1) then selfSay("Do not try to trick me! You have already recieved your present...", cid) return true end local item = {} local reward = 0 local count = "" for i = 1, #gifts do item = gifts[i] if (math.random(0,999) < item[1]) then reward = item[2] subType = item[3] if subType > 1 then count = subType .. " " end break end end doPlayerAddItem(cid, reward, subType) setPlayerStorageValue(cid, PRESENT_STORAGE, 1) npcHandler:say('HO-HO-HO! I have ' .. count .. getItemNameById(reward) .. ' for you.', cid) else npcHandler:say('Come back when you start behaving.', cid) end npcHandler:resetNpc() return true end npcHandler:setMessage(MESSAGE_GREET, "HO-HO-HO, Merry Christmas |PLAYERNAME|. I have presents for the good children.") local noNode = KeywordNode:new({'no'}, SantaNPC, {present = false}) local yesNode = KeywordNode:new({'yes'}, SantaNPC, {present = true}) local node = keywordHandler:addKeyword({'present'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Have you been well behaved and good this year?...'}) node:addChildKeywordNode(yesNode) node:addChildKeywordNode(noNode) npcHandler:addModule(FocusModule:new()) @Andreeyyy ve se funciona não testei 
  9. Obrigado
    Andreeyyy deu reputação a Cjaker em Limpar database (otimização)   
    Salve galera, mais um script para quem está precisando dar aquela limpada no banco de dados e otimizar o Servidor.
    Crie um script chamado cleandatabase.lua na pasta globalevents/scripts e cole isso dentro dele.

    -- Especificações --
    -- TFS 1.1+
    -- Objetivo é limpar as contas inativas/vazias e os players juntamente, assim removendo os usuários que estão inativos e ocupando espaço no banco de dados, isso é útil pela questão do processamento e comunicação do Servidor com o banco de dados, quanto mais clean, mais rápido será as operações.
    --[[ Clean Database by Cjaker ]]-- local inactiveMonths = 3 local createdMonths = 1 local function clearInactivePlayers() local totalClear = 0 local inactiveTimestamp = os.time() - (86400 * (inactiveMonths*30)) local query = "SELECT * FROM accounts" local resultId = db.storeQuery(query) if resultId ~= false then repeat local haveActive = false local accId = result.getDataInt(resultId, "id") local players = db.storeQuery("SELECT * FROM `players` WHERE `account_id` = " ..accId) if players ~= false then repeat local lastLogin = result.getDataInt(players, "lastlogin") if lastLogin ~= 0 and lastLogin <= inactiveTimestamp then db.query("DELETE FROM `players` WHERE `id` = " ..result.getDataInt(players, "id")) totalClear = totalClear + 1 else haveActive = true end until not result.next(players) result.free(players) if not haveActive then db.query("DELETE FROM `accounts` WHERE `id` = " ..accId) end end until not result.next(resultId) end result.free(resultId) return totalClear end local function clearEmptyAccounts() local totalClear = 0 local createdTimestamp = os.time() - (86400 * (createdMonths*30)) local query = "SELECT * FROM `accounts`" local resultId = db.storeQuery(query) if resultId ~= false then repeat local accId = result.getDataInt(resultId, "id") local createDate = result.getDataInt(resultId, "creation") if createDate <= createdTimestamp and db.storeQuery("SELECT * FROM players WHERE account_id = " ..accId) == false then db.query("DELETE FROM `accounts` WHERE `id` = " ..accId) totalClear = totalClear + 1 end until not result.next(resultId) end result.free(resultId) return totalClear end function onStartup() print('>> ' ..clearEmptyAccounts().. " contas vazias deletadas.") print('>> ' ..clearInactivePlayers().. " players inativos deletados.") end Em globalevents.xml insira essa linha
     
    <globalevent type="startup" name="CleanDatabases" script="cleandatabase.lua" /> Deixe seu REP+ para incentivar meu trabalho e publicar mais scripts interessantes como esse, valeu e bom uso!
  10. Gostei
    Andreeyyy deu reputação a Bruno Carvalho em Nos ajude a melhorar com novos títulos   
    Seguindo a ideia do @xWhiteWolf fiz as mudanças, só Deus não entrou pois tenho outros planos pra ele...
  11. Gostei
    Vamos la, oque exatamente vocêr quer? Aquela linha " -- codificado e limitado para 7". Pode apagar, nada ver
  12. Gostei
    Vamos la, oque exatamente vocêr quer? Aquela linha " -- codificado e limitado para 7". Pode apagar, nada ver
  13. Gostei
    Andreeyyy recebeu reputação de grafit em [LINUX] ERRO AO EXECUTAR TFS ( RESOLVIDO )   
    Olá, meu dedicado fez uma atualização de sistema, e agora me aparece o seguinte erro ao executar:

    ./tfs: error while loading shared libraries: liblua5.2.so.0: cannot open shared object file: No such file or directory
     
    EDIT:

    RESOLVIDO, SEGUE A SOLUÇÃO PARA PROBLEMAS SEMELHANTE SE ALGUEM TIVER

    apt-get install git cmake build-essential liblua5.2-dev libgmp3-dev libmysqlclient-dev libboost-system-dev libpugixml-dev libboost-iostreams-dev
  14. Gostei
    Andreeyyy recebeu reputação de Tace em All bugs OTSERV - REVELADO ! -   
    Mais ngm disse pra retirar eles, apenas utilizar outro nome no char de base. E manter os Samples
  15. Gostei
    Andreeyyy deu reputação a igorlabanca em [Pedido] Scripts Tibia Coin   
    Vai em actions.xml e adiciona
    <action itemid="24774" script="other/tibiacoin.lua"/> Vai na pasta actions/scripts/other e cria um arquivo tibiacoin.lua
    function onUse(player, item, fromPosition, target, toPosition, isHotkey) local points = 10 --aqui você bota a quantidade de coins que o item vai dar db.query("UPDATE `accounts` SET `coins` = `coins` + '" .. points .. "' WHERE `id` = '" .. player:getAccountId() .. "';") player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Você recebeu "..points.." coins") item:remove(1) return true end Testei em tfs 1.2 e funcionou
     
  16. Gostei
    vai ser completo mesmo ou vai ter o tanto de bug que esse tem?
  17. Gostei
    Andreeyyy deu reputação a Absolute em [TFS 1.x] Mount Doll   
    Legal sua atitude, acho interessante sempre ficarmos de olho e atualizando pra facilitar :D
  18. Gostei
    Andreeyyy recebeu reputação de Absolute em [TFS 1.x] Mount Doll   
    Vou deixar minha contribuição pro script @luanluciano93
     
    Todos os mounts até a versão 10.96
    ["widow queen"] = {id = 1} ["racing bird"] = {id = 2} ["war bear"] = {id = 3} ["black sheep"] = {id = 4} ["midnight panther"] = {id = 5} ["draptor"] = {id = 6} ["titanica"] = {id = 7} ["tin tizzard"] = {id = 8} ["blazebringer"] = {id = 9} ["rapid boar"] = {id = 10} ["stampor"] = {id = 11} ["undead cavebear"] = {id = 12} ["donkey"] = {id = 13} ["tiger slug"] = {id = 14} ["uniwheel"] = {id = 15} ["crystal wolf"] = {id = 16} ["war horse"] = {id = 17} ["kingly deer"] = {id = 18} ["tamed panda"] = {id = 19} ["dromedary"] = {id = 20} ["scorpion king"] = {id = 21} ["rented horse"] = {id = 22} ["armoured war horse"] = {id = 23} ["shadow draptor"] = {id = 24} ["lady bug"] = {id = 27} ["manta ray"] = {id = 28} ["ironblight"] = {id = 29} ["magma crawler"] = {id = 30} ["dragonling"] = {id = 31} ["gnarlhound"] = {id = 32} ["crimson ray"] = {id = 33} ["steelbeak"] = {id = 34} ["water buffalo"] = {id = 35} ["armoured scorpion"] = {id = 36} ["armoured dragonling"] = {id = 37} ["ursagrodon"] = {id = 38} ["hellgrip"] = {id = 39} ["noble lion"] = {id = 40} ["desert king"] = {id = 41} ["shock head"] = {id = 42} ["walker"] = {id = 43} ["azudocus"] = {id = 44} ["carpacosaurus"] = {id = 45} ["death crawler"] = {id = 46} ["flamesteed"] = {id = 47} ["jade lion"] = {id = 48} ["jade pincer"] = {id = 49} ["nethersteed"] = {id = 50} ["tempest"] = {id = 51} ["winter king"] = {id = 52} ["doombringer"] = {id = 53} ["woodland prince"] = {id = 54} ["hailtorm fury"] = {id = 55} ["siegebreaker"] = {id = 56} ["poisonbane"] = {id = 57} ["blackpelt"] = {id = 58} ["golden dragonfly"] = {id = 59} ["steel bee"] = {id = 60} ["copper fly"] = {id = 61} ["tundra rambler"] = {id = 62} ["highland yak"] = {id = 63} ["glacier vagabond"] = {id = 64} ["flying divan"] = {id = 65} ["magic carpet"] = {id = 66} ["floating kashmir"] = {id = 67} ["ringtail waccoon"] = {id = 68} ["night waccoon"] = {id = 69} ["emerald waccoon"] = {id = 70} ["glooth glider"] = {id = 71} ["shadow hart"] = {id = 72} ["black stag"] = {id = 73} ["emperor Deer"] = {id = 74} ["flitterkatzen"] = {id = 75} ["venompaw"] = {id = 76} ["batcat"] = {id = 77} ["sea Devil"] = {id = 78} ["coralripper"] = {id = 79} ["plumfish"] = {id = 80} ["gorongra"] = {id = 81} ["noctungra"] = {id = 82} ["silverneck"] = {id = 83} ["slagsnare"] = {id = 84} ["nightstinger"] = {id = 85} ["razorcreep"] = {id = 86} ["rift Runner"] = {id = 87} ["nightdweller"] = {id = 88} ["frostflare"] = {id = 89} ["cinderhoof"] = {id = 90} ["mouldpincer"] = {id = 91} ["bloodcurl"] = {id = 92} ["leafscuttler"] = {id = 93} É só copiar e colar no script, todos funcionando.
  19. Gostei
    Andreeyyy deu reputação a keilost1 em Anunciar Newsticker   
    E aí galera do TK,
     
    Estou trazendo mais uma inovação para o Tibia King, é o sistema de anunciar as ultimas 5 newstickers postadas no site!
     
    Vamos ao código, em globalevents.xml adicione:
    <globalevent name="information" interval="1800000" event="script" value="autobroadcast.lua"/> Ele vai anunciar de 30 em 30 minutos as mensagens, lembrando que não anuncia todas de uma vez, ele sorteia uma das 5.
     
    Em globalevents/scripts adicione um arquivo lua com o nome de autobroadcast e coloque isso dentro do conteúdo:
    function onThink(interval, lastExecution) local result = db.getResult("SELECT text FROM `z_news_tickers` ORDER by date DESC LIMIT 0,5") local sorteado = math.random(1, 5) local news = {} if result:getID() == -1 then return false end repeat if result:getID() ~= -1 then table.insert(news, result:getDataString("text")) end until not result:next() if not news[sorteado] then return false end doBroadcastMessage("News: " .. string.sub(news[sorteado], 1, 150) .. "", MESSAGE_EVENT_ADVANCE) return TRUE end Pronto, já estará funcionando seu sistema (se sua tabela de newsticker não for z_news_tickers é só mudar.
     
     
    Créditos:
    Keilost
    Globalwar
     
  20. Gostei
    Andreeyyy deu reputação a tiroleivi em Global FULL 8.60 | Zao, War System, Cast System...   
    Source e Distro       ~~~       CLICK AKI    <<<< Link da Source
    *~ COMPILANDO ~*
     
    1. Instale as libs rodando os comandos:
     
    1- apt-get update
    2- apt-get upgrade
    3- apt-get install libboost-all-dev mysql-server libcrypto++-dev libcrypto++ php5 phpmyadmin cpp gcc g++ make automake autoconf pkg-config subversion zlib1g-dev zlib1g liblua5.1 libmysqlclient-dev libxml2-dev libpthread-stubs0-dev
     
    2. Vá até a pasta da source e execute os seguintes comandos:
    1- ./autogen.sh
    2- ./configure --enable-mysql
    3- ./build.sh
  21. Gostei
    Andreeyyy deu reputação a Danihcv em TK Clients Bugado   
    Amigo, a equipe já tem conhecimento do problema e a solução do mesmo está sendo providenciada.
     
     
    O tópico foi movido para a área correta, preste mais atenção da próxima vez!
    Leia as regras do fórum: http://tibiaking.com/forum/topic/1281-regras-gerais/?p=7680

    Este tópico foi movido:
    De: "OTServ → OTServ Geral"
    Para: "Tibia King → Atendimento Geral"
  22. Gostei
    Andreeyyy recebeu reputação de Guto1966 em Porque o novo TFS 1.0 não tem suporte para SQLITE?   
    Realmente o suporte para OT's 10.41 esta abandonada por aqui, os que postaram servidores na seção não dão suporte, abandonam o topico, não respondem MP, não vejo isso como uma conduta certa para o Fórum, e dificulta as pessoas a aprenderem a mexer em novos sistema.
    É muito facil você montar algo e jogar no forum. O problema é que esses caras que manjam das novidades parecem que não querem compartilhar com ninguem o funcionamento etc.
  23. Gostei
    Andreeyyy recebeu reputação de KillerWatts em Porque o novo TFS 1.0 não tem suporte para SQLITE?   
    Realmente o suporte para OT's 10.41 esta abandonada por aqui, os que postaram servidores na seção não dão suporte, abandonam o topico, não respondem MP, não vejo isso como uma conduta certa para o Fórum, e dificulta as pessoas a aprenderem a mexer em novos sistema.
    É muito facil você montar algo e jogar no forum. O problema é que esses caras que manjam das novidades parecem que não querem compartilhar com ninguem o funcionamento etc.
  24. Gostei
    Andreeyyy deu reputação a Adriano SwaTT em Gesior by Matk   
    Posso tentar te ajudar, já que uso este site e já corrigi os bugs dele várias vezes.
  25. Gostei
    Andreeyyy deu reputação a Victor Fasano Raful em 2015 GESIOR ACC 1.0 BY VICTORWEBMASTER   
    Bom, acho que não preciso falar muito!
    WEbsite gesior com compatibilidade a versões novas e recentes do tibia!
    Disponibilizado em primeira mão com qualidade e desempenho.
     
     
    Website comporta uma vasta gama de ferramentas de ultima geração para maior desempenho do servidor na maquina instalada e também na hora do acesso, diversos erros foram arrumados das versões anteriores, eu peguei uma base aqui do Tibia King para poder editar pois os modulos de injeção ao banco de dados eram completamente diferentes do que eu havia dos ultimos mais antigos. Então resolvi disponbilizar pois criei para venda e para uso exclusivo de meus clientes ja ativos, porém não vou mais dar procedimento a sistemas exclusivos pagos. Vocês do Tibia King terão em primeira mão e exclusivo com o conteudo extremamente bloqueado para outros foruns, portais, blogs etc. (É open source, porém tem as credenciais registradas em cartório!).
     
    Sem mais delongas, segue os links protegidos e exclusivos.
     
     
     
    DOWNLOAD
     
    PRINT



     
     
    DATABASE
    [DOWNLOAD]

Informação Importante

Confirmação de Termo