Jump to content
  1. Tyrisfall

    Tyrisfall

  • Recently Browsing   0 members

    No registered users viewing this page.


  • Similar Content

    • By Codex NG
      Not tested but I wrote them anyway... this is a means of adding the missing stat information in TFS 1.3 & OTX 3 for 10.98 & up.
       
      This is the previous code protocolgame.cpp in TFS 1.3
      void ProtocolGame::AddPlayerStats(NetworkMessage& msg) { msg.addByte(0xA0); msg.add<uint16_t>(std::min<int32_t>(player->getHealth(), std::numeric_limits<uint16_t>::max())); msg.add<uint16_t>(std::min<int32_t>(player->getMaxHealth(), std::numeric_limits<uint16_t>::max())); msg.add<uint32_t>(player->getFreeCapacity()); msg.add<uint32_t>(player->getCapacity()); msg.add<uint64_t>(player->getExperience()); msg.add<uint16_t>(player->getLevel()); msg.addByte(player->getLevelPercent()); msg.add<uint16_t>(100); // base xp gain rate msg.add<uint16_t>(0); // xp voucher msg.add<uint16_t>(0); // low level bonus msg.add<uint16_t>(0); // xp boost msg.add<uint16_t>(100); // stamina multiplier (100 = x1.0) msg.add<uint16_t>(std::min<int32_t>(player->getMana(), std::numeric_limits<uint16_t>::max())); msg.add<uint16_t>(std::min<int32_t>(player->getMaxMana(), std::numeric_limits<uint16_t>::max())); msg.addByte(std::min<uint32_t>(player->getMagicLevel(), std::numeric_limits<uint8_t>::max())); msg.addByte(std::min<uint32_t>(player->getBaseMagicLevel(), std::numeric_limits<uint8_t>::max())); msg.addByte(player->getMagicLevelPercent()); msg.addByte(player->getSoul()); msg.add<uint16_t>(player->getStaminaMinutes()); msg.add<uint16_t>(player->getBaseSpeed() / 2); Condition* condition = player->getCondition(CONDITION_REGENERATION); msg.add<uint16_t>(condition ? condition->getTicks() / 1000 : 0x00); msg.add<uint16_t>(player->getOfflineTrainingTime() / 60 / 1000); msg.add<uint16_t>(0); // xp boost time (seconds) msg.addByte(0); // enables exp boost in the store } The focus of what we want to change here is this
      msg.add<uint16_t>(100); // base xp gain rate msg.add<uint16_t>(0); // xp voucher msg.add<uint16_t>(0); // low level bonus msg.add<uint16_t>(0); // xp boost msg.add<uint16_t>(100); // stamina multiplier (100 = x1.0) and this
      msg.add<uint16_t>(0); // xp boost time (seconds) msg.addByte(0); // enables exp boost in the store  
       
      To do this we'll use storage values that are referenced via methods of the player class.
      Our new code will look something like this.
      // base xp gain rate msg.add<uint16_t>(player->getBaseXpGain()); // xp voucher msg.add<uint16_t>(player->getVoucherXpBoost()); // low level bonus msg.add<uint16_t>(player->getGrindingXpBoost()); // xp boost msg.add<uint16_t>(player->getStoreXpBoost()); // stamina multiplier (100 = x1.0) msg.add<uint16_t>(player->getStaminaXpBoost()); and this
      // xp boost time (seconds) msg.add<uint16_t>(player->getExpBoostStamina()); // enables exp boost in the store msg.addByte(1);  
      In player.h
      Under
      #include "mounts.h" place this
      #include "configmanager.h"  
       
      Under
      class Guild; place this
      extern ConfigManager g_config;  
       
      Under
      bool hasLearnedInstantSpell(const std::string& spellName) const; place this
      uint16_t getBaseXpGain() const { uint32_t key = g_config.getNumber(ConfigManager::BASEXPGAIN_STORAGE); int32_t value; getStorageValue(key, value); return (value < 0 ? 100 : (uint16_t)value); } uint16_t getVoucherXpBoost() const { uint32_t key = g_config.getNumber(ConfigManager::VOUCHERXPBOOST_STORAGE); int32_t value; getStorageValue(key, value); return (value < 0 ? 100 : (uint16_t)value); } uint16_t getGrindingXpBoost() const { uint32_t key = g_config.getNumber(ConfigManager::GRINDINGXPBOOST_STORAGE); int32_t value; getStorageValue(key, value); return (value < 0 ? 100 : (uint16_t)value); } uint16_t getStoreXpBoost() const { uint32_t key = g_config.getNumber(ConfigManager::STOREXPBOOST_STORAGE); int32_t value; getStorageValue(key, value); return (value < 0 ? 100 : (uint16_t)value); } uint16_t getStaminaXpBoost() const { uint32_t key = g_config.getNumber(ConfigManager::STATMINAXPBOOST_STORAGE); int32_t value; getStorageValue(key, value); return (value < 0 ? 100 : (uint16_t)value); } uint16_t getExpBoostStamina() { uint32_t key = g_config.getNumber(ConfigManager::EXPBOOSTSTAMINA_STORAGE); int32_t value; getStorageValue(key, value); return (value < 0 ? 100 : (uint16_t)value); }  
       
      Next we'll go into configmanger.cpp and find
      integer[MAX_PACKETS_PER_SECOND] = getGlobalNumber(L, "maxPacketsPerSecond", 25); and place this under it
      integer[BASEXPGAIN_STORAGE] = getGlobalNumber(L, "baseXpGain", 18000); integer[VOUCHERXPBOOST_STORAGE] = getGlobalNumber(L, "voucherXpBoost", 18001); integer[GRINDINGXPBOOST_STORAGE] = getGlobalNumber(L, "grindingXpBoost", 18002); integer[STOREXPBOOST_STORAGE] = getGlobalNumber(L, "storeXpBoost", 18003); integer[STATMINAXPBOOST_STORAGE] = getGlobalNumber(L, "staminaXpBoost", 18004); integer[EXPBOOSTSTAMINA_STORAGE] = getGlobalNumber(L, "expBoostStamina", 18005);  
      Then open up configmanager.h and find
      MAX_PACKETS_PER_SECOND, and place these under it
      BASEXPGAIN_STORAGE, VOUCHERXPBOOST_STORAGE, GRINDINGXPBOOST_STORAGE, STOREXPBOOST_STORAGE, STATMINAXPBOOST_STORAGE, EXPBOOSTSTAMINA_STORAGE,  
      Then add this to your config.lua
      -- storages for player stats baseXpGain = 18000 voucherXpBoost = 18001 grindingXpBoost = 18002 storeXpBoost = 18003 staminaXpBoost = 18004 expBoostStamina = 18005  
      Since it is just storage values then its just a matter of setting the correct storages to set the bonuses. if no value is set then it is set to a default of 100.
      Here is a screen shot to show you that this works

       
      This code is incomplete I will update it when I have time. :)
    • By Vodkart
      Descrição:
       

       

       
       
       
       
      Execute no banco de dados:
       
      CREATE TABLE resgate_codes ( id INTEGER NOT NULL, code VARCHAR( 255 ) NOT NULL, items VARCHAR( 500 ) NOT NULL, premium_points INT NOT NULL DEFAULT 0, premium_days INT NOT NULL DEFAULT 0, PRIMARY KEY ( id ) );  
       
      Adicione na sua lib:
       
      function getPremiumPoints(cid) local query = db.getResult("SELECT `premium_points` FROM `accounts` WHERE `id` = "..getPlayerAccountId(cid)) return query:getDataInt("premium_points") <= 0 and 0 or query:getDataInt("premium_points") end function setPremiumPoints(cid, amount) return db.executeQuery("UPDATE `accounts` SET `premium_points` = "..amount.." WHERE `id` = "..getPlayerAccountId(cid)) end function getCodesFromServe(p) local ret = db.getResult("SELECT `id` FROM `resgate_codes` WHERE `code` = "..db.escapeString(p)) return ret:getID() ~= -1 and ret:getDataInt("id") or 0 end  
       
      Data/Talkactions
       
      createcode.lua
      function onSay(cid, words, param, channel) local param = param:lower() if param == "" or not param then doPlayerSendCancel(cid, "insira um codigo novo.") return true end local code = getCodesFromServe(param) if code ~= 0 then doPlayerSendCancel(cid, "Your code ["..param.."] already exist.") return true end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Your code ["..param.."] create sucefull, now you can add items, premium days or premium points.") return db.executeQuery("INSERT INTO `resgate_codes` (`code`, `items`, `premium_points`, `premium_days`) VALUES ('".. param .."', '{}', '0', '0');") end  
      addcode.lua
      function onSay(cid, words, param, channel) local t = string.explode(param:lower(), ",") if (param == "") then doPlayerPopupFYI(cid, "[Redeem Code System]\n\nHow Use Command?\n\nTo add rewards from code enter: /addcode,type\n\n[Types:]\n\nItems\nPremium\nPoints\n\n\Exemples:\n\n/addcode items,crystal coin, 100 --To add item from code, use item name, amount.\n\n/addcode premium,10 -- To set 10 premium days in code\n\n/addcode points,20 -- To set 20 premium points in code") return true end local code = getCodesFromServe(t[1]) if code == 0 then doPlayerSendCancel(cid, "Code ["..t[1].."] does exist.") return true end if isInArray({"items","item","itens","iten"}, t[2]) then if tonumber(t[4]) ~= nil and tostring(t[3]) ~= nil then local itemid, amount = getItemIdByName(t[3], false), tonumber(t[4]) if not itemid then doPlayerSendCancel(cid, "Sorry, this item does not exist.") return true end local d = db.getResult("SELECT `items` FROM `resgate_codes` WHERE `id` = "..code):getDataString("items") local y,n = {},0 for a,b in d:gmatch("(%d+),(%d+)") do n = n + 1 y[n] = {a,b} end table.insert(y, {itemid, amount}) local str = "{" for i, x in pairs(y) do str = str.."{".. x[1] .. "," .. x[2] .. "}" if i ~= table.maxn(y) then str = str .. ',' else str = str .. '}' end end db.executeQuery("UPDATE `resgate_codes` SET `items` = "..db.escapeString(str).." WHERE `id` = "..code) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "You Added "..amount.." "..t[3].." from code ["..t[1].."].") return true else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You need to enter the item name, amount.")return true end elseif isInArray({"pa","premium","premmy","premiun"}, t[2]) then local min, max = 1, 999 if not tonumber(t[3]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry, only number.") return true elseif tonumber(t[3]) < min or tonumber(t[3]) > max then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry, Min "..min.." and Max "..max.." points.") return true end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Now the code receives total "..t[3].." premium days.") db.executeQuery("UPDATE `resgate_codes` SET `premium_days` = "..t[3].." WHERE `id` = "..code) return true elseif isInArray({"points","pp","point","pontos"}, t[2]) then local min, max = 1, 999 if not tonumber(t[3]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry, only number.") return true elseif tonumber(t[3]) < min or tonumber(t[3]) > max then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry, Min "..min.." and Max "..max.." points.") return true end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Now the code receives total "..t[3].." premium days.") db.executeQuery("UPDATE `resgate_codes` SET `premium_points` = "..t[3].." WHERE `id` = "..code) return true end return true end  
      codes.lua
      function onSay(cid, words, param, channel) local param,str = param:lower(),'' if not param then return true end local code = getCodesFromServe(param) if code == 0 then doPlayerSendCancel(cid, "Your code ["..param.."] does exist or Already used.") return true end local info = db.getResult("SELECT * FROM `resgate_codes` WHERE `id` = "..code) local d,k,p = info:getDataString("items"),info:getDataInt("premium_points"),info:getDataInt("premium_days") local t,n = {},0 for a,b in d:gmatch("(%d+),(%d+)") do n = n + 1 t[n] = {a,b} end if #t > 0 then local backpack = doPlayerAddItem(cid, 1999, 1) for _, i_i in ipairs(t) do local item, amount = i_i[1],i_i[2] if isItemStackable(item) or amount == 1 then doAddContainerItem(backpack, item, amount) else for i = 1, amount do doAddContainerItem(backpack, item, 1) end end end str = str.."".. (str == "" and "" or ", ") ..""..getItemsFromList(t) end if p > 0 then doPlayerAddPremiumDays(cid, p) str = str.."".. (str == "" and "" or ", ") .." "..p.." premium days" end if k > 0 then local total = (getPremiumPoints(cid)+k) setPremiumPoints(cid, total) str = str.."".. (str == "" and "" or ", ") .." "..k.." premium points" end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You successfully redeemed the code ["..param.."]! Reward(s):\n"..str) return db.executeQuery("DELETE FROM `resgate_codes` WHERE `id` = "..code) end  
      talkactions.xml
      <talkaction words="/resgatecode;!resgatecode" event="script" value="codes.lua"/> <talkaction words="!createcode;/createcode" access="5" event="script" value="createcode.lua"/> <talkaction words="!addcode;/addcode" access="5" event="script" value="addcode.lua"/>  
       
      Observações:
       
      * Testado somente em servidores com SQLITE
      * Futuramente estarei acrescentando e modificando o código para melhorias
      * Em breve um comando especial "/generate codes" para gerar códigos com itens randômicos(com chances)
      * Quem tiver alguma ideia ou querer passar para servidores com site estarei dando auxilia no tópico.
    • By bkhere
      Atualizações sobre , encontrei um grande amigo aqui no forum , então vamos fechar junto com o novo projeto 
      Atulizado dia 10/09/2021
       
      www.real-age.online
       
       
       
       
       
       
      OLD POST
      salve meus queridos tibiakinganus
      venho apresentar meu projeto vou , dar continuidade num projeto de 8 anos trabalhados e 12 anos retocando , isso mesmo 12 anos , retocando o projeto 
       
      estou precisando de membros na equipe , quem estiver interessado , a base do servidor é 8.60 - porém ele é 95% antibot , e o não tem HOTKEYS usando a base do 7.4 
      Rookgaard full graficos 7.4 + customs 
       
      emfim projeto é top , quem estiver interessado me CHAMA ! estarei postando em breve fotos 
       
      ROOKGAARD BEFORE EDITS

       
      Bridge

       
      Open 

       
      Doublet BEFORE EDIT 

       
      ----
      Segunda EDIÇÃO DOUBLET

       
      Quest

       
       You see a enchanted doublet (Arm:3).
      It weighs 24.00 oz.

       
       
       
       
       
      SEGUNDA EDIÇÃO DO TEMPLO DE ROOK 

      TEST LEVEL 130 - ML 35 
      SD COMUN "ADORI GRAN MORT" pensando ainda se venderemos ela no npc 

       
       
      TEST LEVEL 130 - ML 35 - COM ML MAIOR DANO MAIOR, PORÉM TAMBÉM CONTA LVL
      SD ANTIGA DANO 7.4 "ADORI VITA VIS" NÃO VAI VENDER NO NPC SÓMENTE PLAYERS

       
       
    • By realage
      Site pra account
      WWW.REAL-AGE.ONLINE
      Apresentamos um servidor criado para PVP e PVP Enforced, com o mapa do Global Full totalmente refumlado, com mais 30 cidades custom usando a versão 10.90 Porem com Hotkey desativado seguindo como tibia 7.4 traga a sua GUILD e nos ajude a permanecer online!
      Recompensas
      Características do servidor
      • Aumentamos a quantidade de monstros no mapa
      • Adicionamos monstros em hunts que não são aproveitadas no GAME
      • UH e SD refinada Usado a sd e ud do tibia 7.4
      • Novas quests
      • Novos Itens
      • novos bosses
      • Monstros novos (x)
      • Itens de quests reformulados
      • Munições infinitas
      • Ao matar ganha Exp
      • Cast System quando aberto sem senha = +10% de experiência
      • Mais de 500 task
      • Addon
      • Novos Addons
      • Raids todos os dias
      • Sistema de Assassinato
      • Castle 24% (10% Exp)
      REAL-AGE.ONLINE

      Serverinfo
      rateExp = 20
      rateSkill = 10
      rateLoot = 3
      rateMagic = 7
      rateSpawn = 2
      www.real-age.online
    • By Cat
      Pack disponibilizado por:

      Clique Aqui para entrar!
       
      Object Builder (Editor de dat e Sprites) para 10x.
      ObjectBuilder.rar
       
       
      Object Builder para 8.X (0.4.8) com Adobe AIR (13 MB).
      https://www.mediafire.com/file/dq994i3fia7fckk/ObjectBuilder_0_4_8.rar/file
      scan
       
       
      Tibia 12 SPR funciona com Object Builder 10.X (0.3.3)
      https://www.mediafire.com/file/fvuf28xh0zej859/Tibia_12_SPR.rar/file
       
       
      Assets Editor (12+ para pasta assets)
      https://github.com/Arch-Mina/Assets-Editor
       
      Como usar:
       
       
      Remere's Map Editor 3.7 + fixed brushes:
      https://github.com/hampusborgos/rme/releases
      RME_3.7_fixed_brushes.rar
       
      10.98 com sprites 12.70, OTB:
      https://github.com/EPuncker/1098extended
      10.98_12.70_sprites_OTB.rar
       
      10.98 com sprites 12.70 TIBIA KING OTBR
      10.98_12.70_sprites_OTBR.rar
       
      12.70 mounts and outfits
      12.70_mounts_and_outfits.rar
       
      Paleta com itens mágicos (v 12) 
      Disponibilizado por: Zbizu (Zbizu#7420)
      trickery_zbizu.xml
          
       
      Este pack utiliza recursos do projeto oficial TFS (The Forgotten Server), projetos paralelos como OtservBR, Object Builder, outros, e demais colaboradores.    
       
       
       
       
       
×
×
  • Create New...

Important Information

Confirmação de Termo