Ir para conteúdo
  • Cadastre-se

Codex NG

Membro
  • Total de itens

    11
  • Registro em

  • Última visita

Sobre Codex NG

  • Rank
    Retired

Informação de Perfil

  • Eu sou
    Scripter
    Programmer

Últimos Visitantes

1809 visualizações
  1. 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());
  2. Not completely tested and not all features are working but I am releasing this so that it is considered to be fixed and merged with the official branch. Sql INSERT INTO `players` (`id`, `name`, `group_id`, `account_id`, `level`, `vocation`, `health`, `healthmax`, `experience`, `lookbody`, `lookfeet`, `lookhead`, `looklegs`, `looktype`, `lookaddons`, `maglevel`, `mana`, `manamax`, `manaspent`, `soul`, `town_id`, `posx`, `posy`, `posz`, `conditions`, `cap`, `sex`, `lastlogin`, `lastip`, `save`, `skull`, `skulltime`, `lastlogout`, `blessings`, `onlinetime`, `deletion`, `balance`,
  3. If it works on otx2 then yes it will work on otx3, it also works on TFS 1.2/1.3 Some aspects of the sources haven't changed since 0.3, so you might even be able to use this code as far back as then of course you will need to make code adjustments. But i don't see why it can't be done.
  4. data/creaturescripts/scripts/deathbroadcast.lua:39: bad argument #2 to 'max' (number expected, got string) The error is quite clear it is telling you the line number, what the error is, the function which is causing the error, what is expect, what it received instead. This is the code on line 39 local targetKills = math.max(0, getPlayerStorageValue(cid, config.killStorageValue)) + 1 The error is telling us the 2nd argument which is passed to math.max is returning a string rather than a number. This is the 2nd argument. getPlayerStorageValue(cid, config.k
  5. You can also create a global table in globals and then check the ip of the player when they login to that of the table and if the ip is blocked not allow them to login. There are a number of simplified ways you can handle this without worrying if a tfs function works or not, of course using a global table is only persistent for the duration of the server being online.
  6. Sorry I don't speak spanish so you will have to bare with me. This is a new way for people to create npc's which use different types of currency, rather than a coming up with different items to trade with the npc or trying to edit the npc modules this method simplifies everything by providing the npc with a npc currency id. All this npc currency id is, is a storage value.. pretty simple eh? If the npc doesn't have a currency id then it will use the normal currency e.g. gold, plat, cc etc.. I originally posted this on otland, but fuck them xD
  7. local item = { id = 3058, count = 1 } local G = { set = function(s, v) Game.setStorage(s, v) end, get = function(s) return Game.getStorage(s) end } broadcast = Game.broadcastMessage function deathMessage(name, attacker) return "You recognize " .. name .. ". He was killed by ".. (attacker:isCreature() and "a "..attacker:getName():lower() or "a field item") end function setTextOfItem(item, attr, str) if not item:isItem() then return end if type(attr) == 'table' then for attribute, text in pairs(attr) do item:setAttribute(attribute, text) end else item:setAttribute(attribu
×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo