Ir para conteúdo

Dudu Ruller

Membro
  • Registro em

  • Última visita

Tudo que Dudu Ruller postou

  1. Dudu Ruller respondeu ao post em um tópico de Dudu Ruller 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:
  2. 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
  3. Dudu Ruller respondeu ao post em um tópico de Augusto em Ferramentas OpenTibia
    Oo, Perfect Certeza vai ajuda muita gente que nao sabe
  4. Dudu Ruller respondeu ao post em um tópico de Dudu Ruller 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.
  5. Humm, Otimo Script, Isso ajuda muito para quer nao tiver mais opçoes de items
  6. 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.
  7. Dudu Ruller respondeu ao post em um tópico de Dudu Ruller 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.
  8. 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!
  9. Dudu Ruller respondeu ao post em um tópico de Dudu Ruller em Ouvidoria
    Eu estaria me referindo a um ACC, Exemplo Gesior acc, ou Modern, um WEBSITE ACC Proprio do Tibiaking.
  10. @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.
  11. 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!
  12. 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!
  13. Dudu Ruller respondeu ao post em um tópico de Augusto em Portal
    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.
  14. Para Falar a verdade esse Cara e maluco, o mlk começo a apara a barba com fogo, e tinha horas que ele quase se queima ahusuhauhsh Olhem ai: http://www.youtube.com/watch?v=Bfa0lwh_1a4 Ele deve ta muito chapado
  15. Boa-Tarde a Todos, esse sistema e aquele sistema de Conquistas do tibia global, bom, Vamos la. Crie um arquivo chamado Achivements.lua dento de data/lib e Ponha isso dentro: -- Achievements "INFO" By Renusek, functions by Darkhaos. ACHIEVEMENTS = { -- tag 'secret' is used by Cipsoft Tibia on website to show image 'SECRET' next to the achievement name. There are 45 secret achievements. -- EXAMPLE: [0] = {name = "Test Achievement", storage = 20000, value = 3, message = "You are lucker! You win the lottery 3 times!", grade = 2, points = 5, secret = true} -- Grade 1: 1-3 points, Grade 2: 4-6 points, Grade 3: 7-9 points, Grade 4: 10 points -- At the moment, Real Tibia don't have Achievements with Grade 4, they will be added in next updates. -- YOU NEED TO EDIT MANY 'value' TAGS, and also I'm not sure about 'secret' tag correctness. [1] = {name = "Allow Cookies?", value = 1, message = "With a perfectly harmless smile you fooled all of those wisecrackers into eating your Exploding Cookies. Consider a boy or girl scout outfit next time to make the trick even better.", grade = 1, points = 1, secret = false}, [2] = {name = "Backpack Tourist", value = 1, message = "If someone lost a random thing in a random place, you're probably a good person to ask and go find it, even if you don't know what and where.", grade = 1, points = 1, secret = true}, [3] = {name = "Bearhugger", value = 1, message = "Warm, furry and cuddly - though that same bear you just hugged would probably rip you into pieces if he had been conscious, he reminded you of that old teddy bear which always slept in your bed when you were still small.", grade = 1, points = 1, secret = false}, [4] = {name = "Bone Brother", value = 1, message = "You've joined the undead bone brothers - making death your enemy and your weapon as well. Devouring what's weak and leaving space for what's strong is your primary goal.", grade = 1, points = 1, secret = false}, [5] = {name = "Chorister", value = 4, message = "Lalalala... you now know the cult's hymn sung in Liberty Bay by heart. Not that hard, considering that it mainly consists of two notes and repetitive lyrics.", grade = 1, points = 1, secret = false}, [6] = {name = "Fountain of Life", value = 1, message = "You found and took a sip from the Fountain of Life. Thought it didn't grant you eternal life, you feel changed and somehow at peace.", grade = 1, points = 1, secret = true}, [7] = {name = "Here, Fishy Fishy!", value = 1000, message = "Ah, the smell of the sea! Standing at the shore and casting a line is one of your favourite activities. For you, fishing is relaxing - and at the same time, providing easy food. Perfect!", grade = 1, points = 1, secret = true}, [8] = {name = "Honorary Barbarian", value = 1, message = "You've hugged bears, pushed mammoths and proved your drinking skills. And even though you have a slight hangover, a partially fractured rib and some greasy hair on your tongue, you're quite proud to call yourself a honorary barbarian from now on.", grade = 1, points = 1, secret = false}, [9] = {name = "Huntsman", value = 1, message = "You're familiar with hunting tasks and have carried out quite a few already. A bright career as hunter for the Paw & Fur society lies ahead!", grade = 1, points = 1, secret = false}, [10] = {name = "Just in Time", value = 1, message = "You're a fast runner and are good at delivering wares which are bound to decay just in the nick of time, even if you can't use any means of transportation or if your hands get cold or smelly in the process.", grade = 1, points = 1, secret = false}, [11] = {name = "Matchmaker", value = 1, message = "You don't believe in romance to be a coincidence or in love at first sight. In fact - love potions, bouquets of flowers and cheesy poems do the trick much better than ever could. Keep those hormones flowing!", grade = 1, points = 1, secret = false}, [12] = {name = "Nightmare Knight", value = 1, message = "You follow the path of dreams and that of responsibility without self-centered power. Free from greed and selfishness, you help others without expecting a reward.", grade = 1, points = 1, secret = false}, [13] = {name = "Party Animal", value = 200, message = "Oh my god, it's a paaaaaaaaaaaarty! You're always in for fun, friends and booze and love being the center of attention. There's endless reasons to celebrate! Woohoo!", grade = 1, points = 1, secret = true}, [14] = {name = "Secret Agent", value = 1, message = "Pack your spy gear and get ready for some dangerous missions in service of a secret agency. You've shown you want to - but can you really do it? Time will tell.", grade = 1, points = 1, secret = false}, [15] = {name = "Talented Dancer", value = 1, message = "You're a lord or lady of the dance - and not afraid to use your skills to impress tribal gods. One step to the left, one jump to the right, twist and shout!", grade = 1, points = 1, secret = false}, [16] = {name = "Territorial", value = 1, message = "Your map is your friend - always in your back pocket and covered with countless marks of interesting and useful locations. One could say that you might be lost without it - but luckily there's no way to take it from you.", grade = 1, points = 1, secret = true}, [17] = {name = "Worm Whacker", value = 1, message = "Weehee! Whack those worms! You sure know how to handle a big hammer.", grade = 1, points = 1, secret = true}, [18] = {name = "Allowance Collector", value = 50, message = "You certainly have your ways when it comes to acquiring money. Many of them are pink and paved with broken fragments of porcelain.", grade = 1, points = 2, secret = true}, [19] = {name = "Amateur Actor", value = 1, message = "You helped bringing Princess Buttercup, Doctor Dumbness and Lucky the Wonder Dog to life - and will probably dream of them tonight, since you memorised your lines perfectly. What a .. special piece of.. screenplay.", grade = 1, points = 2, secret = false}, [20] = {name = "Animal Activist", value = 1, message = "You have a soft spot for little, weak animals, and you do everything in your power to protect them - even if you probably eat dragons for breakfast.", grade = 1, points = 2, secret = false}, [21] = {name = "Beach Tamer", value = 1, message = "You re-enacted the Taming of the Shrew on a beach setting and proved that you can handle capricious girls quite well. With or without fish tails.", grade = 1, points = 2, secret = false}, [22] = {name = "Blessed!", value = 1, message = "You travelled the world for an almost meaningless prayer - but at least you don't have to do that again and can get a new blessed stake in the blink of an eye.", grade = 1, points = 2, secret = false}, [23] = {name = "Exquisite Taste", value = 250, message = "You love fish - but preferably those caught in the cold north. Even though they're hard to come by you never get tired of picking holes in ice sheets and hanging your fishing rod in.", grade = 1, points = 2, secret = true}, [24] = {name = "Fireworks in the Sky", value = 250, message = "You love the moment right before your rocket takes off and explodes into beautiful colours - not only on new year's eve!", grade = 1, points = 2, secret = true}, [25] = {name = "Greenhorn", value = 1, message = "You wiped out Orcus the Cruel in the Arena of Svargrond. You're still a bit green behind the ears, but there's some great potential.", grade = 1, points = 2, secret = false}, [26] = {name = "Jinx", value = 500, message = "Sometimes you feel there's a gremlin in there. So many lottery tickets, so many blanks? That's just not fair! Share your misery with the world.", grade = 1, points = 2, secret = true}, [27] = {name = "Lucid Dreamer", value = 1, message = "Dreams - are your reality? Strange visions, ticking clocks, going to bed and waking up somewhere completely else - that was some trip, but you're almost sure you actually did enjoy it.", grade = 1, points = 2, secret = false}, [28] = {name = "Mathemagician", value = 1, message = "Sometimes the biggest secrets of life can have a simple solution.", grade = 1, points = 2, secret = false}, [29] = {name = "Masquerader", value = 100, message = "You probably don't know anymore how you really look like - usually when you look into a mirror, some kind of monster stares back at you. On the other hand - maybe that's an improvement?", grade = 1, points = 2, secret = true}, [30] = {name = "Ministrel", value = 1, message = "You can handle any music instrument you're given - and actually manage to produce a pleasant sound with it. You're a welcome guest and entertainer in most taverns.", grade = 1, points = 2, secret = true}, [31] = {name = "Poet Laureate", value = 1, message = "Poems, verses, songs and rhymes you've recited many times. You have passed the cryptic door, raconteur of ancient lore. Even elves you've left impressed, so it seems you're truly blessed.", grade = 1, points = 2, secret = true}, [32] = {name = "Quick as a Turtle", value = 2000, message = "There... is... simply... no... better... way - than to travel on the back of a turtle. At least you get to enjoy the beautiful surroundings of Laguna.", grade = 1, points = 2, secret = true}, [33] = {name = "Sea Scout", value = 1, message = "Not even the hostile underwater environment stops you from doing your duty for the Explorer Society. Scouting the Quara realm is a piece of cake for you.", grade = 1, points = 2, secret = false}, [34] = {name = "Steampunked", value = 100, message = "Travelling with the dwarven steamboats through the underground rivers is your preferred way of crossing the lands. No pesky seagulls, and good beer on board!", grade = 1, points = 2, secret = true}, [35] = {name = "Superstitios", value = 100, message = "Fortune tellers and horoscopes guide you through your life. And you probably wouldn't dare going on a big game hunt without your trusty voodoo skull giving you his approval for the day.", grade = 1, points = 2, secret = true}, [36] = {name = "The Milkman", value = 1, message = "Who's the milkman? You are!", grade = 1, points = 2, secret = false}, [37] = {name = "Turncoat", value = 1, message = "You served Yalahar - but you didn't seem so sure whom to believe on the way. Both Azerus and Palimuth had good reasons for their actions, and thus you followed your gut instinct in the end, even if you helped either of them. May Yalahar prosper!", grade = 1, points = 2, secret = true}, [38] = {name = "Vive la Resistance", value = 1, message = "You've always been a rebel - admit it! Supplying prisoners, caring for outcasts, stealing from the rich and giving to the poor - no wait, that was another story.", grade = 1, points = 2, secret = false}, [39] = {name = "Archpostman", value = 1, message = "Delivering letters and parcels has always been a secret passion of yours, and now you can officially put on your blue hat, blow your Post Horn and do what you like to do most. Beware of dogs!", grade = 1, points = 3, secret = false}, [40] = {name = "Clay Fighter", value = 1, message = "Sculpting Brog, the raging Titan, is your secret passion. Numerous perfect little clay statues with your name on them can be found everywhere around Tibia.", grade = 1, points = 3, secret = true}, [41] = {name = "Efreet Ally", value = 1, message = "Even though the Efreet welcomed you only reluctantly and viewed you as \"only a human\" for quite some time, you managed to impress Malor and gained his respect and trade options with the green djinns.", grade = 1, points = 3, secret = false}, [42] = {name = "Ghostwisperer", value = 1, message = "You don't hunt them, you talk to them. You know that ghosts might keep secrets that have been long lost among the living, and you're skilled at talking them into revealing them to you.", grade = 1, points = 3, secret = false}, [43] = {name = "His True Face", value = 1, message = "You're one of the few Tibians who Armenius chose to actually show his true face to - and he made you fight him. Either that means you're very lucky or very unlucky, but one thing's for sure - it's extremely rare.", grade = 1, points = 3, secret = true}, [44] = {name = "Ice Sculptor", value = 1, message = "You love to hang out in cold surroundings and consider ice the best material to be shaped. What a waste to use ice cubes for drinks when you can create a beautiful mammoth statue from it!", grade = 1, points = 3, secret = true}, [45] = {name = "King Tibanus Fan", value = 1, message = "You're not sure what it is, but you feel drawn to royalty. Your knees are always a bit grazed from crawling around in front of thrones and you love hanging out in castles. Maybe you should consider applying as a guard?", grade = 1, points = 3, secret = false}, [46] = {name = "Marblelous", value = 1, message = "Your little statues of Tibiasula have become quite famous around Tibia and there's few people with similar skills when it comes to shaping marble.", grade = 1, points = 3, secret = true}, [47] = {name = "Marid Ally", value = 1, message = "You've proven to be a valuable ally to the Marid, and Gabel welcomed you to trade with Haroun and Nah'Bob whenever you want to. Though the Djinn war has still not ended, the Marid can't fail with you on their side.", grade = 1, points = 3, secret = false}, [48] = {name = "Passionate Kisser", value = 1, message = "For you, a kiss is more than a simple touch of lips. You kiss maidens and deadbeats alike with unmatched affection and faced death and rebirth through the kiss of the banshee queen. Lucky are those who get to share such an intimate moment with you!", grade = 1, points = 3, secret = false}, [49] = {name = "Perfect Fool", value = 1, message = "You love playing jokes on others and tricking them into looking a little silly. Wagging tongues say that the moment of realisation in your victims' eyes is the reward you feed on, but you're probably just kidding and having fun with them... right??", grade = 1, points = 3, secret = false}, [50] = {name = "Recognised Trader", value = 1, message = "You're a talented merchant who's able to handle wares with care, finds good offers and digs up rares every now and then. Never late to complete an order, you're a reliable trader - at least in Rashid's eyes.", grade = 1, points = 3, secret = false}, [51] = {name = "Rockstar", value = 10000, message = "Music just comes to you naturally. You feel comfortable on any stage, at any time, and secretly hope that someday you will be able to defeat your foes by playing music only. Rock on!", grade = 1, points = 3, secret = true}, [52] = {name = "Scrapper", value = 1, message = "You put out the Spirit of Fire's flames in the arena of Svargrond. Arena fights are for you - fair, square, with simple rules and one-on-one battles.", grade = 1, points = 3, secret = false}, [53] = {name = "Vanity", value = 300, message = "Aren't you just perfectly, wonderfully, beautifully gorgeous? You can't pass a mirror without admiring your looks. Or maybe doing a quick check whether something's stuck in your teeth, perhaps?", grade = 1, points = 3, secret = true}, [54] = {name = "Wayfarer", value = 1, message = "Dragon dreams are golden.", grade = 1, points = 3, secret = true}, [55] = {name = "Champion of Chazorai", value = 1, message = "You won the merciless 2 vs. 2 team tournament on the Isle of Strife and wiped out wave after wave of fearsome opponents. Death or victory - you certainly chose the latter.", grade = 2, points = 4, secret = false}, [56] = {name = "Culinary Master", value = 1, message = "Simple hams and bread merely make you laugh. You're the master of the extra-ordinaire, melter of cheese, fryer of bat wings and shaker of shakes. Delicious!", grade = 2, points = 4, secret = false}, [57] = {name = "Explorer", value = 1, message = "You've been to places most people don't even know the names of. Collecting botanic, zoologic and ectoplasmic samples is your daily business and you're always prepared to discover new horizons.", grade = 2, points = 4, secret = false}, [58] = {name = "Follower of Azerus", value = 1, message = "When you do something, you do it right. You have an opinion and you stand by it - and no one will be able to convince you otherwise. On a sidenote, you're a bit on the brutal and war-oriented side, but that's not a bad thing, is it?", grade = 2, points = 4, secret = false}, [59] = {name = "Follower of Palimuth", value = 1, message = "You're a peacekeeper and listen to what the small people have to say. You've made up your mind and know who to help and for which reasons - and you do it consistently. Your war is fought with reason rather than weapons.", grade = 2, points = 4, secret = false}, [60] = {name = "Friend of the Apes", value = 1, message = "You know Banuta like the back of your hand and are good at destroying caskets and urns. The sight of giant footprints doesn't keep you from exploring unknown areas either.", grade = 2, points = 4, secret = false}, [61] = {name = "Golem in the Gears", value = 1, message = "You're an aspiring mago-mechanic. Science and magic work well together in your eyes - and even though you probably delivered countless wrong charges while working for Telas, you might just have enough knowledge to build your own golem now.", grade = 2, points = 4, secret = false}, [62] = {name = "High-Flyer", value = 1000, message = "The breeze in your hair, your fingers clutching the rim of your Carpet - that's how you like to travel. Faster! Higher! And a looping every now and then.", grade = 2, points = 4, secret = true}, [63] = {name = "Interior Decorator", value = 1000, message = "Your home is your castle - and the furniture in it is just as important. Your friends ask for your advice when decorating their Houses and your probably own every statue, rack and bed there is.", grade = 2, points = 4, secret = true}, [64] = {name = "Master Thief", value = 1, message = "Robbing, inviting yourself to VIP parties, faking contracts and pretending to be someone else - you're a jack of all trades when it comes to illegal activities. You take no prisoners, except for the occasional goldfish now and then.", grade = 2, points = 4, secret = false}, [65] = {name = "Polisher", value = 1, message = "If you see a rusty item, you can't resist polishing it. There's always a little flask of rust remover in your inventory - who knows, there might be a golden armor beneath all that dirt!", grade = 2, points = 4, secret = true}, [66] = {name = "Potion Addict", value = 1, message = "Your local magic trader considers you one of his best customers - you usually buy large stocks of potions so you won't wake up in the middle of the night craving for more. Yet, you always seem to run out of them too fast. Cheers!", grade = 2, points = 4, secret = true}, [67] = {name = "Ruthless", value = 1, message = "You've touched all thrones of the Ruthless Seven and absorbed some of their evil spirit. It may have changed you forever.", grade = 2, points = 5, secret = false}, [68] = {name = "Ship's Kobold", value = 1000, message = "You've probably never gotten seasick in your life - you love spending your free time on the ocean and covered quite a lot of miles with ships. Aren't you glad you didn't have to swim all that?", grade = 2, points = 4, secret = true}, [69] = {name = "Top AVIN Agent", value = 1, message = "You've proven yourself as a worthy member of the 'family' and successfully carried out numerous spy missions for your 'uncle' to support the Venorean traders and their goals.", grade = 2, points = 4, secret = false}, [70] = {name = "Top CGB Agent", value = 1, message = "Girl power! Whether you're female or not, you've proven absolute loyalty and the willingness to put your life at stake for the girls brigade of Carlin.", grade = 2, points = 4, secret = false}, [71] = {name = "Top TBI Agent", value = 1, message = "Conspiracies and open secrets are your daily bread. You've shown loyalty to the Thaian crown through your courage when facing enemies and completing spy missions. You're an excellent field agent of the TBI.", grade = 2, points = 4, secret = false}, [72] = {name = "Annihilator", value = 1, message = "You've daringly jumped into the infamous Annihilator and survived - taking home fame, glory and your reward.", grade = 2, points = 5, secret = false}, [73] = {name = "Castlemania", value = 1, message = "You have an eye for suspicious places and love to read other people's diaries, especially those with vampire stories in it. You're also a dedicated token collector and explorer. Respect!", grade = 2, points = 5, secret = true}, [74] = {name = "Elite Hunter", value = 1, message = "You jump at every opportunity for a hunting challenge that's offered to you and carry out those tasks with deadly precision. You're a hunter at heart and a valuable member of the Paw & Fur Society.", grade = 2, points = 5, secret = false}, [75] = {name = "High Inquisitor", value = 1, message = "You're the one who poses the questions around here, and you know how to get the answers you want to hear. Besides, you're a famous exorcist and slay a few vampires and demons here and there. You and your stake are a perfect team.", grade = 2, points = 5, secret = false}, [76] = {name = "Jamjam", value = 1, message = "When it comes to interracial understanding, you're an expert. You've mastered the language of the Chakoya and made someone really happy with your generosity. Achuq!", grade = 2, points = 5, secret = false}, [77] = {name = "Lord of the Elements", value = 1, message = "You travelled the surreal realm of the elemental spheres, summoned and slayed the Lord of the Elements, all in order to retrieve neutral matter. And as brave as you were, you couldn't have done it without your team!", grade = 2, points = 5, secret = false}, [78] = {name = "Warlord of Svargrond", value = 1, message = "You sent the Obliverator into oblivion in the arena of Svargrond and defeated nine other dangerous enemies on the way. All hail the Warlord of Svargrond!", grade = 2, points = 5, secret = false}, [79] = {name = "Master of the Nexus", value = 1, message = "You were able to fight your way through the countless hordes in the Demon Forge. Once more you proved that nothing is impossible.", grade = 2, points = 6, secret = false}, [80] = {name = "Razing!", value = 1, message = "People with sharp canine teeth better beware of you, especially at nighttime, or they might find a stake between their ribs. You're a merciless vampire hunter and have gathered numerous tokens as proof.", grade = 3, points = 7, secret = true}, [81] = {name = "Dread Lord", value = 1, message = "You don't care for rules that others set up and shape the world to your liking. Having left behind meaningless conventions and morals, you prize only the power you wield. You're a master of your fate and battle to cleanse the world.", grade = 3, points = 8, secret = true}, [82] = {name = "Lord Protector", value = 1, message = "You proved yourself - not only in your dreams - and possess a strong and spiritual mind. Your valorous fight against demons and the undead plague has granted you the highest and most respected rank among the Nightmare Knights.", grade = 3, points = 8, secret = true}, [83] = {name = "Herbicide", value = 1, message = "You're one of the brave heroes to face and defeat the mysterious demon oak and all the critters it threw in your face. Wielding your blessed axe no tree dares stand in your way - demonic or not.", grade = 3, points = 7, secret = true} } -- Storages ACHIEVEMENT_BASE = 20000 ACHIEVEMENT_FIRST = 1 ACHIEVEMENT_LAST = #ACHIEVEMENTS ACHIEVEMENT_POINTS = 15200 -- Functions by Darkhaos function getAchievementInfo(id) local ach = ACHIEVEMENTS[id] return ach and { id = id, name = ach.name, storage = ACHIEVEMENT_BASE + id, value = ach.value, message = ach.message, grade = ach.grade, points = ach.points, secret = ach.secret or false } or false end function getAchievementInfoByName(name) name = name:lower() local info for k, v in pairs(ACHIEVEMENTS) do if v.name:lower() == name then local ach = v info = { id = k, name = ach.name, storage = ACHIEVEMENT_BASE + k, value = ach.value, message = ach.message, grade = ach.grade, points = ach.points, secret = ach.secret or false } break end end return info ~= nil and info or false end function isAchievementSecret(ach) --ach = achievement name or id local ach = type(ach) == "string" and getAchievementInfoByName(ach) or getAchievementInfo(tonumber(ach)) return ach.secret or false end function getPlayerAchievements(cid, name) --if name then return achievements names instead of achievements ids local done = {} local name = name or false for i = ACHIEVEMENT_FIRST, ACHIEVEMENT_LAST do if getCreatureStorage(cid, ACHIEVEMENT_BASE + i) >= getAchievementInfo(i).value then if name then table.insert(done, getAchievementInfo(i).name) else table.insert(done, i) end end end return done end function playerHasAchievement(cid, ach) --ach = achievement name or id local ach = type(ach) == "string" and getAchievementInfoByName(ach) or getAchievementInfo(tonumber(ach)) if getCreatureStorage(cid, ach.storage) >= ach.value then return true end return false end function getPlayerSecretAchievements(cid, name) --if name then return achievements names instead of achievements ids local done = {} local name = name or false for i = ACHIEVEMENT_FIRST, ACHIEVEMENT_LAST do if getCreatureStorage(cid, ACHIEVEMENT_BASE + i) >= getAchievementInfo(i).value then if isAchievementSecret(i) then if name then table.insert(done, getAchievementInfo(i).name) else table.insert(done, i) end end end end return done end function doPlayerAddAchievement(cid, ach, showMsg) --ach = achievement name or id local ach = type(ach) == "string" and getAchievementInfoByName(ach) or getAchievementInfo(ach) if getCreatureStorage(cid, ACHIEVEMENT_POINTS) < 0 then doCreatureSetStorage(cid, ACHIEVEMENT_POINTS, 0) end if ach then if getCreatureStorage(cid, ach.storage) < ach.value then if showMsg then doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Congratulations! You earned the achievement \"" .. ach.name .. "\".") end return doCreatureSetStorage(cid, ach.storage, ach.value) and doCreatureSetStorage(cid, ACHIEVEMENT_POINTS, getCreatureStorage(cid, ACHIEVEMENT_POINTS) + ach.points) end end return false end function doPlayerAddAllAchievements(cid) if getCreatureStorage(cid, ACHIEVEMENT_POINTS) < 0 then doCreatureSetStorage(cid, ACHIEVEMENT_POINTS, 0) end for i = ACHIEVEMENT_FIRST, ACHIEVEMENT_LAST do local ach = getAchievementInfo(i) if ach then if getCreatureStorage(cid, ach.storage) < ach.value then doCreatureSetStorage(cid, ach.storage, ach.value) doCreatureSetStorage(cid, ACHIEVEMENT_POINTS, getCreatureStorage(cid, ACHIEVEMENT_POINTS) + ach.points) end end end return true end function doPlayerRemoveAchievement(cid, ach) --ach = achievement name or id local ach = type(ach) == "string" and getAchievementInfoByName(ach) or getAchievementInfo(ach) if getCreatureStorage(cid, ACHIEVEMENT_POINTS) < 0 then doCreatureSetStorage(cid, ACHIEVEMENT_POINTS, 0) end if ach then if getCreatureStorage(cid, ach.storage) >= ach.value then return doCreatureSetStorage(cid, ach.storage, 0) and doCreatureSetStorage(cid, ACHIEVEMENT_POINTS, getCreatureStorage(cid, ACHIEVEMENT_POINTS) - ach.points) end end return false end function doPlayerRemoveAllAchievements(cid) if getCreatureStorage(cid, ACHIEVEMENT_POINTS) < 0 then doCreatureSetStorage(cid, ACHIEVEMENT_POINTS, 0) end for i = ACHIEVEMENT_FIRST, ACHIEVEMENT_LAST do local ach = getAchievementInfo(i) if ach then if getCreatureStorage(cid, ach.storage) >= ach.value then doCreatureSetStorage(cid, ach.storage, 0) doCreatureSetStorage(cid, ACHIEVEMENT_POINTS, getCreatureStorage(cid, ACHIEVEMENT_POINTS) - ach.points) end end end return true end Pronto, Agora crie um arquivo chamado achievements.lua Dentro da Pasta data/talkactions/scripts e Ponha isso dentro: function onSay(cid, words, param, channel) if(param == "") then return true end local player, ach local DESCR = MESSAGE_INFO_DESCR if words == "/addach" then param = string.explode(param, ",") if not param[2] then return doPlayerSendCancel(cid, "Invalid achievement id/name.") end if not getPlayerByNameWildcard(param[1]) or getPlayerByNameWildcard(param[1]) == "" then return doPlayerSendCancel(cid, "Invalid player name.") end player, ach = getPlayerByNameWildcard(param[1]), param[2] ach = type(ach) == "string" and getAchievementInfoByName(ach) or getAchievementInfo(tonumber(ach)) if ach then if playerHasAchievement(cid, ach.id) then doPlayerSendCancel(cid, "That player already has that achievement.") else doPlayerAddAchievement(player, ach.id) doPlayerSendTextMessage(cid, DESCR, "You added achievement " .. ach.id .. " (" .. ach.name .. ") to " .. param[1] .. ".") doPlayerSendTextMessage(player, DESCR, "You received the achievement: " .. ach.name) doSendMagicEffect(getCreaturePosition(player), CONST_ME_MAGIC_RED) return true end else return doPlayerSendCancel(cid, "Invaled achievement.") end elseif words == "/addallach" then player = getPlayerByNameWildcard(param) if not player or player == "" then return doPlayerSendCancel(cid, "Invalid player name.") end doPlayerAddAllAchievements(player) doPlayerSendTextMessage(cid, DESCR, "You added all achievements to " .. param .. ".") doPlayerSendTextMessage(player, DESCR, "You received all achievements.") doSendMagicEffect(getCreaturePosition(player), CONST_ME_MAGIC_RED) return true elseif words == "/removeach" then param = string.explode(param, ",") if not param[2] then return doPlayerSendCancel(cid, "Invalid achievement id/name.") end if not getPlayerByNameWildcard(param[1]) or getPlayerByNameWildcard(param[1]) == "" then return doPlayerSendCancel(cid, "Invalid player name.") end player, ach = getPlayerByNameWildcard(param[1]), tonumber(param[2]) ach = type(ach) == "string" and getAchievementInfoByName(ach) or getAchievementInfo(tonumber(ach)) if ach then if playerHasAchievement(cid, ach.id) then doPlayerRemoveAchievement(player, ach.id) doPlayerSendTextMessage(cid, DESCR, "You removed achievement " .. ach.id .. " (" .. ach.name .. ") to " .. param[1] .. ".") doPlayerSendTextMessage(player, DESCR, "You lost the achievement: " .. ach.name) return true else return doPlayerSendCancel(cid, "That player doest not has that achievement.") end else return doPlayerSendCancel(cid, "Invaled achievement.") end elseif words == "/removeallach" then player = getPlayerByNameWildcard(param) if not player or player == "" then return doPlayerSendCancel(cid, "Invalid player name.") end doPlayerRemoveAllAchievements(player) doPlayerSendTextMessage(cid, DESCR, "You removed all achievements to " .. getCreatureName(player) .. ".") doPlayerSendTextMessage(player, DESCR, "You lost all achievements.") return true elseif words == "/getach" then player = getPlayerByNameWildcard(param) if not player or player == "" then return doPlayerSendCancel(cid, "Invalid player name.") end local ach = getPlayerAchievements(player) if #ach > 0 then local text = "" for i = 1, #ach do text = text .. getAchievementInfo(tonumber(ach[i])).id .. " - " .. getAchievementInfo(tonumber(ach[i])).name .. "\n" end return doShowTextDialog(cid, 2195, "Player " .. param .. " has the following achievements...\n\n" .. text) else return doPlayerSendTextMessage(cid, DESCR, "Player " .. param .. " does not have any achievements.") end elseif words == "/getsecretach" then player = getPlayerByNameWildcard(param) if not player or player == "" then return doPlayerSendCancel(cid, "Invalid player name.") end local ach = getPlayerSecretAchievements(player) if #ach > 0 then local text = "" for i = 1, #ach do text = text .. getAchievementInfo(tonumber(ach[i])).id .. " - " .. getAchievementInfo(tonumber(ach[i])).name .. "\n" end return doShowTextDialog(cid, 2195, "Player " .. param .. " has the following secret achievements...\n\n" .. text) else return doPlayerSendTextMessage(cid, DESCR, "Player " .. param .. " does not have any secret achievements.") end end return true end Pronto, Agora Adicione essa a seguinte linha em data/talkactions/talkactions.xml: <talkaction words="/addach;/addallach;/removeach;/removeallach;/getach;/getsecretach" event="script" value="achievements.lua"/> Comandos: * /addach -- add achievement Para um Player (/addach Darkhaos, 5 - /addach Darkhaos, Chorister) * /addallach --add todos achievements Para um player (/addallach Darkhaos) * /removeach --Remove achievement De um player (/removeach Darkhaos, 5 - /removeach Darkhaos, Chorister) * /removeallach --Remove todos achievements de um player (/removeallach Darkhaos) * /getach --get achievements Para um Player (/getach Darkhaos) * /getsecretach --get secret achievements Para um Player player (/getsecretach Darkhaos) Pronto, e Isso ae, Comentem!
  16. Dudu Ruller respondeu ao post em um tópico de Augusto em Ferramentas OpenTibia
    Otimo Programa!
  17. Boa Noite Galera, Trago a voces Hoje o sistema Auction System (Vender items mesmo estando offline), Espero que Gostem. Informaçoes deste Script: *Visualizaçao de Items na Pagina do Gesior. *Outros Jogadores podem comprar usando o AuctionID. *Lembrese de Bloquear todos os Items com tempo de Duraçao. Changelog: v1.0 - Primeiro Relase v1.1 - Corrigido falhas de memória, acrescentou levelRequiredToAdd v1.1a - Fixed bug crítico com maxOffersPerPlayer verificação V1.1B - Corrigido o erro com números negativos v1.2 - Novo comando "retirar", correções para 0.3.6pl1 v1.2a - Fixed bug clone itens Fotos: Database Querys: Va Na sua database e depois clique em SQL, e Execute essa Query: ALTER TABLE `players` ADD `auction_balance` INT( 11 ) NOT NULL DEFAULT '0'; e Depois essa: CREATE TABLE `auction_system` ( `id` int(11) NOT NULL auto_increment, `player` int(11), `item_id` int(11), `item_name` varchar(255), `count` int(11), `cost` int(11), `date` int(11), PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; e Depois va ate a pasta onde fica seu website e crie a seguinte pagina para o Gesior ACC: <?PHP $auctions = $SQL->query('SELECT `auction_system`.`player`, `auction_system`.`id`, `auction_system`.`item_name`, `auction_system`.`item_id`, `auction_system`.`count`, `auction_system`.`cost`, `auction_system`.`date`, `players`.`name` FROM `auction_system`, `players` WHERE `players`.`id` = `auction_system`.`player` ORDER BY `auction_system`.`id` DESC')->fetchAll(); $players = 0; $main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR="'.$config['site']['vdarkborder'].'"><TD CLASS=white><b>Instruction<b></TD></TR><TR BGCOLOR='.$config['site']['darkborder'].'><TD><center><h2>Commands</h2><b>!offer add, itemName, itemPrice, itemCount</b><br /><small>example: !offer add, plate armor, 500, 1</small><br /><br /><B>!offer buy, AuctionID</b><br /><small>example: !offer buy, 1943</small><br /><br /><b>!offer remove, AuctionID</b><br /><small>example: !offer remove, 1943</small><br /><br /><b>!offer withdraw</b><br /><small>Use this command to get money for sold items.</small></center></TR></TD></TABLE><br />'; if(empty($auctions)) { $main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR="'.$config['site']['vdarkborder'].'"><TD CLASS=white><b>Auctions</b></td></TR><TR BGCOLOR='.$config['site']['darkborder'].'><TD>Currently is no one active Auction.</TD></TR></TABLE>'; $main_content .= '<br /><p align="right"><small>System created by <a href="http://otland.net/members/vDk/">vDk</a>.</small></p>'; } else { foreach($auctions as $auction) { $players++; if(is_int($players / 2)) $bgcolor = $config['site']['lightborder']; else $bgcolor = $config['site']['darkborder']; $cost = round($auction['cost']/1000, 2); $content .= '<TR BGCOLOR='.$bgcolor.'><TD><center>'.$auction['id'].'</center></TD><TD><center><img src="http://otland.net/images/items/'.$auction['item_id'].'.gif"/></center></TD><TD><center>'.$auction['item_name'].'</center></TD><TD><center><a href="?subtopic=characters&name='.urlencode($auction['name']).'">'.$auction['name'].'</a></center></TD><TD><center>'.$auction['count'].'</center></TD><TD><center>'.$cost.'k<br /><small>'.$auction['cost'].'gp</small></center></TD><TD><center>!offer buy, '.$auction['id'].'</center></TR>'; } $main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR="'.$config['site']['vdarkborder'].'"><TD CLASS=white><b><center>ID</center></b></TD><TD class="white"><b><center>#</center></b></TD><TD class="white"><b><center>Item Name</center></b></TD><TD class="white"><b><center>Player</center></b></TD><TD class="white"><b><center>Count</center></b></TD><TD class="white"><b><center>Cost</center></b></td><TD class="white"><b><center>Buy</center></b></td></TR>'.$content.'</TABLE>'; $main_content .= '<br /><p align="right"><small>System created by <a href="http://otland.net/members/vDk/">vDk</a>.</small></p>'; } ?> Agora va ate pasta do seu ot/data/talkactions/talkactions.xml e abra: Adicione a seguinte tinha: <talkaction words="!offer" event="script" value="auctionsystem.lua"/> Agora crie um arquivo .lua chamado auctionsystem.lua e adicione isso dentro, depois salve e largue dentro do data/talkactions/scripts: --[[ Offline player to player item trader (Auction System) by vDk Script version: 1.2a [ -- FIXED CLONE ITEMS BUG -- ] ]]-- local config = { levelRequiredToAdd = 20, maxOffersPerPlayer = 5, SendOffersOnlyInPZ = true, blocked_items = {2165, 2152, 2148, 2160, 2166, 2167, 2168, 2169, 2202, 2203, 2204, 2205, 2206, 2207, 2208, 2209, 2210, 2211, 2212, 2213, 2214, 2215, 2343, 2433, 2640, 6132, 6300, 6301, 9932, 9933} } function onSay(cid, words, param, channel) if(param == '') then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param.") return true end local t = string.explode(param, ",") if(t[1] == "add") then if((not t[2]) or (not t[3]) or (not t[4])) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param.") return true end if(not tonumber(t[3]) or (not tonumber(t[4]))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You don't set valid price or items count.") return true end if(string.len(t[3]) > 7 or (string.len(t[4]) > 3)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "This price or item count is too high.") return true end local item = getItemIdByName(t[2], false) if(not item) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Item wich such name does not exists.") return true end if(getPlayerLevel(cid) < config.levelRequiredToAdd) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You don't have required (" .. config.levelRequiredToAdd .. ") level.") return true end if(isInArray(config.blocked_items, item)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "This item is blocked.") return true end if(getPlayerItemCount(cid, item) < (tonumber(t[4]))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry, you don't have this item(s).") return true end local check = db.getResult("SELECT `id` FROM `auction_system` WHERE `player` = " .. getPlayerGUID(cid) .. ";") if(check:getID() == -1) then elseif(check:getRows(true) >= config.maxOffersPerPlayer) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry you can't add more offers (max. " .. config.maxOffersPerPlayer .. ")") return true end if(config.SendOffersOnlyInPZ) then if(not getTilePzInfo(getPlayerPosition(cid))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You must be in PZ area when you add offert to database.") return true end end if(tonumber(t[4]) < 1 or (tonumber(t[3]) < 1)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have to type a number higher than 0.") return true end local itemcount, costgp = math.floor(t[4]), math.floor(t[3]) doPlayerRemoveItem(cid, item, itemcount) db.executeQuery("INSERT INTO `auction_system` (`player`, `item_name`, `item_id`, `count`, `cost`, `date`) VALUES (" .. getPlayerGUID(cid) .. ", \"" .. t[2] .. "\", " .. getItemIdByName(t[2]) .. ", " .. itemcount .. ", " .. costgp ..", " .. os.time() .. ")") doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You successfully add " .. itemcount .." " .. t[2] .." for " .. costgp .. " gps to offerts database.") end if(t[1] == "buy") then if(not tonumber(t[2])) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Wrong ID.") return true end local buy = db.getResult("SELECT * FROM `auction_system` WHERE `id` = " .. (tonumber(t[2])) .. ";") if(buy:getID() ~= -1) then if(getPlayerMoney(cid) < buy:getDataInt("cost")) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You don't have enoguh GP.") buy:free() return true end if(getPlayerName(cid) == getPlayerNameByGUID(buy:getDataInt("player"))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry, you can't buy your own items.") buy:free() return true end if(getPlayerFreeCap(cid) < getItemWeightById(buy:getDataInt("item_id"), buy:getDataInt("count")))then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You try to buy a " .. buy:getDataString("item_name") .. ". It weight " .. getItemWeightById(buy:getDataInt("item_id"), buy:getDataInt("count")) .. " cap oz. and you have only " .. getPlayerFreeCap(cid) .. " oz. free capacity. Put some items to depot and try again.") buy:free() return true end if(isItemStackable((buy:getDataString("item_id")))) then doPlayerAddItem(cid, buy:getDataString("item_id"), buy:getDataInt("count")) else for i = 1, buy:getDataInt("count") do doPlayerAddItem(cid, buy:getDataString("item_id"), 1) end end doPlayerRemoveMoney(cid, buy:getDataInt("cost")) db.executeQuery("DELETE FROM `auction_system` WHERE `id` = " .. t[2] .. ";") doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You bought " .. buy:getDataInt("count") .. " ".. buy:getDataString("item_name") .. " for " .. buy:getDataInt("cost") .. " gps!") db.executeQuery("UPDATE `players` SET `auction_balance` = `auction_balance` + " .. buy:getDataInt("cost") .. " WHERE `id` = " .. buy:getDataInt("player") .. ";") buy:free() else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Wrong ID.") end end if(t[1] == "remove") then if((not tonumber(t[2]))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Wrong ID.") return true end if(config.SendOffersOnlyInPZ) then if(not getTilePzInfo(getPlayerPosition(cid))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You must be in PZ area when you remove offerts from database.") return true end end local delete = db.getResult("SELECT * FROM `auction_system` WHERE `id` = " .. (tonumber(t[2])) .. ";") if(delete:getID() ~= -1) then if(getPlayerGUID(cid) == delete:getDataInt("player")) then db.executeQuery("DELETE FROM `auction_system` WHERE `id` = " .. t[2] .. ";") if(isItemStackable(delete:getDataString("item_id"))) then doPlayerAddItem(cid, delete:getDataString("item_id"), delete:getDataInt("count")) else for i = 1, delete:getDataInt("count") do doPlayerAddItem(cid, delete:getDataString("item_id"), 1) end end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Your offert has been deleted from offerts database.") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "This is not your offert!") end delete:free() else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Wrong ID.") end end if(t[1] == "withdraw") then local balance = db.getResult("SELECT `auction_balance` FROM `players` WHERE `id` = " .. getPlayerGUID(cid) .. ";") if(balance:getDataInt("auction_balance") < 1) then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You don't have money on your auction balance.") balance:free() return true end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You got " .. balance:getDataInt("auction_balance") .. " gps from auction system!") doPlayerAddMoney(cid, balance:getDataInt("auction_balance")) db.executeQuery("UPDATE `players` SET `auction_balance` = '0' WHERE `id` = " .. getPlayerGUID(cid) .. ";") balance:free() end return true end Bem e isso, Comentem!
  18. Voce precisa criar uma conta, e automaticamente criando, vc ira fazer um pedido de website, depois de 3 dias mais ou menos, o site fica online, eles ti mandao os dados do CPanel, senha e etc. Voce loga e joga o Gesior dentro da Pasta WWW

Informação Importante

Confirmação de Termo