Ir para conteúdo

Dudu Ruller

Membro
  • Registro em

  • Última visita

  1. Bluetooth reagiu a uma resposta no tópico: [NPC] Mission
  2. glacialot reagiu a uma resposta no tópico: [NPC] Mission
  3. Chiitus reagiu a uma resposta no tópico: [NPC] Mission
  4. Dudu Ruller postou uma resposta no tópico em Suporte & Pedidos
    Um Novo sistema sera adicionado: Sistema Anti Bot: O Sistema so funciona se vc ta upando, quando vc tiver na hunt o sistema ira fazer uma pergunta com numeros, e se voce nao responder em um determinado tempo sera banido por cheat! Uma Nova Foto:
  5. Dudu Ruller postou uma resposta no tópico em Suporte & Pedidos
    Introduçao SkyBr é um Novo servidor Baseado no jogo Tibia, que esta sendo desenvolvido por mim, Meu objetivo é fazer do servidor, um jogo divertido, com bastante RPG. O Servidor contara com um map proprio, que esta sendo desenvolvido dia a dia, onde tera muitas quests escondidas, e muitos misterios. Sistemas O Servidor Contara com varios sistemas, vou citar alguns deles aqui: - Sistema de Lenhador. - Sistema de Mineração. -Sistema de Reset Level -Sistema de Forja. -Entre varios outros Sistemas. Mapa Como eu Ja disse, o Map sera Proprio, Terão muitas quests, items novos, monstros novos, alem de varios continentes e cidades, alem de ilhas para hunts, o jogo sera rpg, entao voce tera que caminhar para chegar a alguma hunt. Fotos Ajude-Nos Se Voce Gostou do Servidor, Ajude-nos na Divulgaçao, Curta nossa pagina do facebook: http://www.facebook.com/skybrserver
  6. Dudu Ruller postou uma resposta no tópico em Ferramentas OpenTibia
    Oo, Perfect Certeza vai ajuda muita gente que nao sabe
  7. Dudu Ruller postou uma resposta no tópico em Ouvidoria
    Sim, Um Bom Webmaster que saberia fazer as tabelas de conexçao com a database MYSQL. isso que eu tava me referindo. Porque nao existe website SQLITE.
  8. Humm, Otimo Script, Isso ajuda muito para quer nao tiver mais opçoes de items
  9. O Sistema em Si, Deleta players inativos da Database que nao logao mais de tantos dias e seus skills. OBS: O Sistema nao remove os Samples do GESIOR e nem o account manager. Exemplo de configuraçao: local childAttributeTables = { players = { [1] = {table = "`player_viplist`", idField = "`player_id`"}, [2] = {table = "`player_storage`", idField = "`player_id`"}, [3] = {table = "`player_spells`", idField = "`player_id`"}, [4] = {table = "`player_skills`", idField = "`player_id`"}, [5] = {table = "`player_namelocks`", idField = "`player_id`"}, [6] = {table = "`player_items`", idField = "`player_id`"}, [7] = {table = "`player_depotitems`", idField = "`player_id`"}, [8] = {table = "`houses`", idField = "`owner`"}, [9] = {table = "`house_auctions`", idField = "`player_id`"}, [10] = {table = "`players`", idField = "`id`"} -- Keep this as the last item in the array --Note: `houses` and `bans` are in the DB triggers for TFS so don't worry about them. --Also I did not want to put killers, or deaths on here because that is historic data, --do so at your ouwn risk. }, accounts = { [1] = {table = "`accounts`", idField = "`id`"}, [2] = {table = "`account_viplist`", idField = "`account_id`"} } } Exemplo do Log File: [26 April 2011 13:25:41 ] >> [DBCLEANUP] 3 inactive players and 2 empty accounts have been deleted from the database. [!] --> Dropped: 0 from `player_viplist` table [!] --> Dropped: 0 from `player_storage` table [!] --> Dropped: 0 from `player_spells` table [!] --> Dropped: 0 from `player_skills` table [!] --> Dropped: 0 from `player_namelocks` table [!] --> Dropped: 0 from `player_items` table [!] --> Dropped: 0 from `player_depotitems` table [!] --> Dropped: 3 from `players` table [!] --> Dropped: 2 from `accounts` table [!] --> Dropped: 0 from `account_viplist` table [26 April 2011 13:26:40 ] >> [DBCLEANUP] 73 inactive players and 36 empty accounts have been deleted from the database. [!] --> Dropped: 0 from `player_viplist` table [!] --> Dropped: 38 from `player_storage` table [!] --> Dropped: 0 from `player_spells` table [!] --> Dropped: 7 from `player_skills` table [!] --> Dropped: 0 from `player_namelocks` table [!] --> Dropped: 8 from `player_items` table [!] --> Dropped: 1 from `player_depotitems` table [!] --> Dropped: 73 from `players` table [!] --> Dropped: 36 from `accounts` table [!] --> Dropped: 2 from `account_viplist` table [26 April 2011 13:55:22 ] >> [DBCLEANUP] 1143 inactive players and 784 empty accounts have been deleted from the database. [!] --> Dropped: 0 from `player_viplist` table [!] --> Dropped: 860 from `player_storage` table [!] --> Dropped: 0 from `player_spells` table [!] --> Dropped: 991 from `player_skills` table [!] --> Dropped: 0 from `player_namelocks` table [!] --> Dropped: 389 from `player_items` table [!] --> Dropped: 627 from `player_depotitems` table [!] --> Dropped: 1143 from `players` table [!] --> Dropped: 784 from `accounts` table [!] --> Dropped: 153 from `account_viplist` table Vamos a Istalaçao do Script: adicione a seguinte linha em data/globalevents/globalevents.xml: <globalevent name="dbcleaner" type="startup" event="script" value="dbcleaner.lua"/> Agora crie um arquivo chamado dbcleaner.lua dentro da pasta data/globalevents/scripts e introduza o seguinte script: ------------------------------------------------------------------------------* ----- [[> Automated Database Cleanup 1.1 Structure //By Cybermaster <]] ------| -------------- [[> System 2.0 Revamped by Teh Maverick <3 <]] ----------------| ------------- [[> Removal of empty accounts by darkaos <]] ---------------| --------------- [[> Function getDBPlayersCount() by Elf <]] ------------------| ------------------------------------------------------------------------------| ------------------------------------------------------------------------------| --- ~!READ THIS!~ ------------------------------------------------------------| --- Be sure to back up your database and test this on your server first, -----| --- I(Teh Maverick) cannot guarantee it will work the same for every core. ---| --- It is very easy to test, with the log file and values that are printed ---| -----------------------------------Enjoy!-------------------------------------| ------------------------------------------------------------------------------* function countRowsWhereInTable(table, field, condition) local result = db.getResult("SELECT COUNT(" .. field .. ") as count FROM " .. table .. " WHERE " .. field .. " = '" .. condition .. "';") local tmp = result:getDataInt("count") result:free() return tmp end function getDBPlayersCount() local result = db.getResult("SELECT COUNT(id) as count FROM `players`;") local tmp = result:getDataInt("count") result:free() return tmp end function getDBAccountsCount() local result = db.getResult("SELECT COUNT(id) as count FROM `accounts`;") local tmp = result:getDataInt("count") result:free() return tmp end function onStartup() local DB_BEFORE = {players = getDBPlayersCount(), accounts = getDBAccountsCount()} local result,result1, ii, numPlayersToDelete, numAccountsDeleted, tmp = 0, 0, 0, 0, 0 local pid, aid = {}, {} local dropCount = {players={},accounts={}} local config = { deleteAccountWithNoPlayers = true, cleanChildTables = true, printResult = true, saveResultToFile = true, logFileName = 'db_cleanup.txt' } --In each table, players with below specified level, and days of inactivity will be deleted from db on server startup local cleanup = { [1] = {level = 11, time = 5 * 24 * 60 * 60}, [2] = {level = 20, time = 15 * 24 * 60 * 60}, [3] = {level = 50, time = 30 * 24 * 60 * 60}, [4] = {level = 100, time = 60 * 24 * 60 * 60}, [5] = {level = 130, time = 90 * 24 * 60 * 60} } local childAttributeTables = { players = { [1] = {table = "`player_viplist`", idField = "`player_id`"}, [2] = {table = "`player_storage`", idField = "`player_id`"}, [3] = {table = "`player_spells`", idField = "`player_id`"}, [4] = {table = "`player_skills`", idField = "`player_id`"}, [5] = {table = "`player_namelocks`", idField = "`player_id`"}, [6] = {table = "`player_items`", idField = "`player_id`"}, [7] = {table = "`player_depotitems`", idField = "`player_id`"}, [8] = {table = "`houses`", idField = "`owner`"}, [9] = {table = "`house_auctions`", idField = "`player_id`"}, [10] = {table = "`players`", idField = "`id`"} -- Keep this as the last item in the array --Note: `houses` and `bans` are in the DB triggers for TFS so don't worry about them. --Also I did not want to put killers, or deaths on here because that is historic data, --do so at your own risk. }, accounts = { [1] = {table = "`accounts`", idField = "`id`"}, [2] = {table = "`account_viplist`", idField = "`account_id`"} } } --Clean up all the players and player data for i = 1, #cleanup do result = db.getResult("SELECT `id`,`name`,`account_id` FROM `players` WHERE `level` < ".. cleanup[i].level .." AND `name` NOT IN('Account Manager', 'Sorcerer Sample', 'Druid Sample', 'Paladin Sample', 'Knight Sample', 'Rook Sample') AND `group_id` < 2 AND `lastlogin` < UNIX_TIMESTAMP() - ".. cleanup[i].time ..";") if(result:getID() ~= -1) then ii = 1 repeat pid[ii] = result:getDataInt("id") -- list the players id into an array aid[ii] = result:getDataInt("account_id") -- list the account id of each player being removed into an array ii = ii + 1 until not(result:next()) result:free() end numPlayersToDelete = ii - 1 --Drop players and their child table attribute data such as skills, items, etc. for j = 1, numPlayersToDelete do if(config.cleanChildTables) then for k = 1, #childAttributeTables.players do if childAttributeTables.players[k].table == "houses" then house = getHouseByPlayerGUID(pid[j]) if house ~= 0 or house ~= nil then doCleanHouse(house) doUpdateHouseAuctions() end else dropCount.players[k] = ((dropCount.players[k] or 0) + countRowsWhereInTable(childAttributeTables.players[k].table, childAttributeTables.players[k].idField, pid[j])) db.executeQuery("DELETE FROM " .. childAttributeTables.players[k].table .. " WHERE " .. childAttributeTables.players[k].idField .. " = '" .. pid[j] .. "';") end end else db.executeQuery("DELETE FROM `players` WHERE `id` = '" .. pid[j] .. "';") end end end --Drop all the accounts that have 0 players linked to them (at the moment its only checking from the list of players removed) if config.deleteAccountWithNoPlayers then --This part was scripted by Darkhaos, modified/fixed by Teh Maverick --[[ for acc = 1, #aid do result1 = db.getResult("SELECT `id` FROM `accounts` WHERE `id` = '" .. aid[acc] .. "';") if result1:getID() ~= -1 then -- check to make sure the account exists result1:free() for i = 1, #childAttributeTables.accounts do --Make sure there are no other players on the account result1 = db.getResult("SELECT COUNT(id) as count FROM `players` WHERE `account_id` = '" .. aid[acc] .. "';") tmp = result1:getDataInt("count") if(tmp <= 0) then --Remove accounts dropCount.accounts[i] = ((dropCount.accounts[i] or 0) + countRowsWhereInTable(childAttributeTables.accounts[i].table, childAttributeTables.accounts[i].idField, aid[acc])) db.executeQuery("DELETE FROM " .. childAttributeTables.accounts[i].table .. " WHERE " .. childAttributeTables.accounts[i].idField .. " = '" .. aid[acc] .. "';") end end end end end --]] --Print and Save results (configurable) local DB_NOW = {players = DB_BEFORE.players - getDBPlayersCount(), accounts = DB_BEFORE.accounts - getDBAccountsCount()} if DB_NOW.players > 0 or DB_NOW.accounts > 0 then local text = ">> [DBCLEANUP] " .. DB_NOW.players .. " inactive players" .. (config.deleteAccountWithNoPlayers and " and " .. DB_NOW.accounts .. " empty accounts" or "") .. " have been deleted from the database." --Write to console if config.printResult then print("") print(text) if config.cleanChildTables then --Write player info for i = 1,#dropCount.players do print("[!] --> Dropped: " .. dropCount.players[i] .. " from " .. childAttributeTables.players[i].table .. " table") end --Write account info if config.deleteAccountWithNoPlayers then for i = 1,#dropCount.accounts do print("[!] --> Dropped: " .. dropCount.accounts[i] .. " from " .. childAttributeTables.accounts[i].table .. " table") end end print("") end end --Write to file if config.saveResultToFile then local file = io.open("data/logs/"..config.logFileName, "a") file:write("[" .. os.date("%d %B %Y %X ", os.time()) .. "] " .. text .. "\n") if config.cleanChildTables then --Write player info for i = 1, #dropCount.players do file:write("[!] --> Dropped: " .. dropCount.players[i] .. " from " .. childAttributeTables.players[i].table .. " table\n") end --Write account info if config.deleteAccountWithNoPlayers then for i = 1, #dropCount.accounts do file:write("[!] --> Dropped: " .. dropCount.accounts[i] .. " from " .. childAttributeTables.accounts[i].table .. " table\n") end end file:write("\n") end file:close() end end return true end [/code] Bem é isso, Espero que ajude a todos.
  10. Dudu Ruller postou uma resposta no tópico em Ouvidoria
    Poisé, Mais se os ADMINS Do TK, Poderiao fazer um Concurso sobre Website, e os que melhor que se destaca em Mysql e tals, poderiao tenta começar o Projeto.
  11. Bom Dia, esse Sistema e muito Util para Procurar Cloners que clonarao items do shop, apos a compra o Nome do player vai para a description do Item, Se algum clono, fica mais facil achar o item clonado! Em data/globalevents/scripts/shop.lua Abra e subistitua por isso: -- ### CONFIG ### -- message send to player by script "type" (types you can check in "global.lua") SHOP_MSG_TYPE = 19 -- 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.getResult("SELECT * FROM z_ots_comunication WHERE `type` = 'login';") if(result_plr:getID() ~= -1) then while(true) do id = tonumber(result_plr:getDataInt("id")) action = tostring(result_plr:getDataString("action")) delete = tonumber(result_plr:getDataInt("delete_it")) cid = getCreatureByName(tostring(result_plr:getDataString("name"))) if isPlayer(cid) == TRUE then local itemtogive_id = tonumber(result_plr:getDataInt("param1")) local itemtogive_count = tonumber(result_plr:getDataInt("param2")) local container_id = tonumber(result_plr:getDataInt("param3")) local container_count = tonumber(result_plr:getDataInt("param4")) local add_item_type = tostring(result_plr:getDataString("param5")) local add_item_name = tostring(result_plr:getDataString("param6")) local received_item = 0 local full_weight = 0 if add_item_type == 'container' then container_weight = getItemWeightById(container_id, 1) if isItemRune(itemtogive_id) == TRUE then items_weight = container_count * getItemWeightById(itemtogive_id, 1) else items_weight = container_count * getItemWeightById(itemtogive_id, itemtogive_count) end full_weight = items_weight + container_weight else full_weight = getItemWeightById(itemtogive_id, itemtogive_count) if isItemRune(itemtogive_id) == TRUE then full_weight = getItemWeightById(itemtogive_id, 1) else full_weight = getItemWeightById(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) doItemSetAttribute(new_container, "description", 'Bought by ' .. getCreatureName(cid) .. ' [ID:' .. id .. '].') local iter = 0 while iter ~= container_count do local new_item = doCreateItemEx(itemtogive_id, itemtogive_count) doItemSetAttribute(new_item, "description", 'Bought by ' .. getCreatureName(cid) .. ' [ID:' .. id .. '].') doAddContainerItemEx(new_container, new_item) iter = iter + 1 end received_item = doPlayerAddItemEx(cid, new_container) else local new_item = doCreateItemEx(itemtogive_id, itemtogive_count) doItemSetAttribute(new_item, "description", 'Bought by ' .. getCreatureName(cid) .. ' [ID:' .. id .. '].') received_item = doPlayerAddItemEx(cid, new_item) end if received_item == RETURNVALUE_NOERROR then doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, 'You received >> '.. add_item_name ..' << from OTS shop.') doPlayerSave(cid) db.executeQuery("DELETE FROM `z_ots_comunication` WHERE `id` = " .. id .. ";") db.executeQuery("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 OTS 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 ..' << from OTS 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 if not(result_plr:next()) then break end end result_plr:free() end return TRUE end Espero que Ajude, Comentem!
  12. Dudu Ruller postou uma resposta no tópico em Ouvidoria
    Eu estaria me referindo a um ACC, Exemplo Gesior acc, ou Modern, um WEBSITE ACC Proprio do Tibiaking.
  13. @Toty Eu usei esse Host uma vez para testes, eles ti mandao um conta CPanel mesmo, so que ele e bom so pra quem começa, pq e bem lagado o site. Mais a Hospedagem, e como uma Hospedagem paga, Via CPanel.
  14. Boa Tarde, Trago a voces Hoje o NPC De missao, que a recompença e EXP, Voce presisa Catar tantos items, e a recompença é em EXP! Bem Vamos la: Crie um Arquivo Chamado Mission.xml dentro da pasta data/npc e Cole o seguinte codigo no NPC: <?xml version="1.0" encoding="UTF-8"?> <npc name="Mission" script="mission.lua" walkinterval="2000" floorchange="0"> <health now="100" max="100"/> <look type="325" head="29" body="4" legs="20" feet="96" addons="3" corpse="2212"/> <parameters> <parameter key="message_greet" value="Hello |PLAYERNAME|. What brings you to me? You want start the {quest}?"/> </parameters> </npc> Pronto, Agora crie um arquivo chamado mission.lua dentro da pasta data/npc/scripts e cole isso dentro: local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} 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 creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid if(msgcontains(msg, 'quest')) then selfSay('To start this quest tell {mission}', cid) --This is just an example, In this script added 4 mission for you end if(msgcontains(msg, 'mission')) then if(getPlayerStorageValue(cid,700) < 1) then selfSay('Your first mission will be to get 100 {tarantula egg}.', cid) talkState[talkUser] = 1 elseif (getPlayerStorageValue(cid,701) < 1) then selfSay('Your next mission will be to get 150 {strands of medusa hair}.', cid) talkState[talkUser] = 1 elseif (getPlayerStorageValue(cid,702) < 0) then selfSay('Your next mission will be to get 300 {red dragon scales}.', cid) talkState[talkUser] = 1 elseif (getPlayerStorageValue(cid,703) < 0) then selfSay('Your next mission will be to get 400 {green dragon scales}.', cid) talkState[talkUser] = 1 elseif (getPlayerStorageValue(cid,703) == 1) then --zmieniac w zaleznosci od ostatniego storage!! selfSay('You have done all missions.', cid) talkState[talkUser] = 1 end --------------------------------------- elseif(msgcontains(msg, 'tarantula egg') and talkState[talkUser] == 1 and (getPlayerStorageValue(cid,700) < 1)) then if(doPlayerRemoveItem(cid, 11198, 100) == TRUE) then setPlayerStorageValue(cid,700,1) doPlayerAddPercentLevel(cid, 5) selfSay('Thank you.', cid) talkState[talkUser] = 0 else selfSay('To end mission you need have 100 {tarantula egg}.', cid) end --------------------------------------- elseif(msgcontains(msg, 'strands of medusa hair') and talkState[talkUser] == 1 and (getPlayerStorageValue(cid,701) < 1) and (getPlayerStorageValue(cid,700) == 1)) then if(doPlayerRemoveItem(cid, 11226, 150) == TRUE) then setPlayerStorageValue(cid,701,1) doPlayerAddPercentLevel(cid, 7) selfSay('Thank you.', cid) talkState[talkUser] = 0 else selfSay('To end mission you need have 150 {strands of medusa hair}.', cid) end --------------------------------------- elseif(msgcontains(msg, 'red dragon scales') and talkState[talkUser] == 1 and (getPlayerStorageValue(cid,702) < 1) and (getPlayerStorageValue(cid,701) == 1)) then if(doPlayerRemoveItem(cid, 5882, 300) == TRUE) then setPlayerStorageValue(cid,702,1) doPlayerAddPercentLevel(cid, 6) selfSay('Thank you.', cid) talkState[talkUser] = 0 else selfSay('To end mission you need have 300 {red dragon scales}.', cid) end --------------------------------------- elseif(msgcontains(msg, 'green dragon scales') and talkState[talkUser] == 1 and (getPlayerStorageValue(cid,703) < 1) and (getPlayerStorageValue(cid,702) == 1)) then if(doPlayerRemoveItem(cid, 5920, 400) == TRUE) then setPlayerStorageValue(cid,703,1) doPlayerAddPercentLevel(cid, 5) selfSay('Thank you.', cid) talkState[talkUser] = 0 else selfSay('To end mission you need have 400 {green dragon scales}.', cid) end ------------------------------------------ end end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) [/code] Pronto, Agora Va em [b]data/lib/[/b] e abra o Arquivo [b]050-funcion.lua [/b]e cole a seguinte funçao:[b] [/b](function by Oskar1121 (Otland)) [code] function doPlayerAddPercentLevel(cid, percent) local player_lv, player_lv_1 = getExperienceForLevel(getPlayerLevel(cid)), getExperienceForLevel(getPlayerLevel(cid)+1) local percent_lv = ((player_lv_1 - player_lv) / 100) * percent doPlayerAddExperience(cid, percent_lv) end Bem é isso, Comentem!
  15. Dudu Ruller postou uma resposta no tópico em Ouvidoria
    Galera estava pensando aki, porque vcs da Equipe nao Fazem uma Equipe e montao um Website Proprio do Forum? Começaria do Basico, teria um Topico so pra sugestoes do Projeto, Com Webmaster Preparados e otimos Designs tambem. Talvez seria uma Boa Ideia!
  16. Ai Mano, acho que e um bug, as vezes quando eu vou editar algum post rapido, eu edito, salvo e ele continua como antes, nao muda nada, so no editor completo.

Informação Importante

Confirmação de Termo