• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

Search results

  1. L

    storage outfit

    Try get rid of this config and use it like: function defaultOutfitBuyAction(player, offer) local config = offer['outfit'] if not config then print('Wrong offer config!') return false end if player:getStorageValue(config.storage) > 0 then...
  2. L

    storage outfit

    First: - redefinition of properties with same key in one object: config: local config = { -- Nordic Chieftain storage = 535923, looktype = 1500, -- Ghost Blade storage = 535924, looktype = 1489, -- Formal Dress storage = 535925, looktype = 1460 } You end up...
  3. L

    Compiling TFS 1.5 Downgraded Ubuntu 20.04

    dofile('data/lib/lib.lua') Go with the flow, try to comment out the code to find the cause Try with commenting dofile's in these: data/lib/lib.lua data/lib/core/core.lua data/lib/compat/compat.lua Or do some logging with print('test')
  4. L

    C++ Does not show the Text when the value is 0

    You have a simple “truthy” check, zero is “falsy” so it won’t pass that check, try changing to (if “no value” is equal null): if (value != nullptr) { ... } But in this case it’s uint32_t that is 0 in this case. Or if it’s as posted above that no value is always -1 change check to: if...
  5. L

    TFS 1.X+ Summing up the damage received

    local cEvent = CreatureEvent("HpChange") function cEvent.onHealthChange(creature, attacker, primaryDamage, primaryType, secondaryDamage, secondaryType, origin) local totalDamage = primaryDamage + secondaryDamage print(totalDamage) return primaryDamage, primaryType, secondaryDamage...
  6. L

    shop block

    No need to perform additional separate queries, we could use "secure" PDO for that. Noob solution would be to modify filter criteria in getPlayersList. $filter = new OTS_SQLFilter(); $filter->compareField('account_id', $account_logged->getId()); $filter->compareField('vocation', 0...
  7. L

    Which is the best tfs 1.5 - 8.6 repository?

    There's nothing like official TFS 1.5 for 8.6. 1.5 is simply master branch of official TFS (under development) that's currently for version 12.80 - 12.88. There are some downgrades of TFS to older protocols, just look for some downgrade that's actively developed or make a fork of some and...
  8. L

    TFS 1.X+ Leech bug again, using mana potion returns health and additional mana

    From what I see TFS default potions add mana with use of doTargetCombat: doTargetCombat(player, target, COMBAT_MANADRAIN, potion.mana[1], potion.mana[2]) Which results in all these leech logic to be aplied as for regular attacks. This PR seems to fixed this for healing (COMBAT_HEALING)...
  9. L

    TFS 1.X+ Summing up the damage received

    When it comes to HP dmg you could use event: onHealthChange(creature, attacker, primaryDamage, primaryType, secondaryDamage, secondaryType, origin) Maybe an option not to save it every single time into DB would be to store these dmgs in some map (player guid => dmg) and persist it into DB every...
  10. L

    TFS 0.X Storage on EXIT.

    On newer protocols there's a communication with client so you check such cases by checking player lastPong time against current OTSYS_TIME to check whether diff is greater than ping interval (+ some additional seconds as a grace period) or not. It's used to prevent deaths by disconnect (client...
  11. L

    TFS 1.X+ I want to learn basic TFS 1X functions

    Or you can do that so it's not necessary + 4, in case you'd like to have more than 4 base vocations, but you need to make sure all vocations are correctly configured in vocation.xml (code not tested): local player = Player(cid) local vocation = player:getVocation() local baseVocation =...
  12. L

    TFS 1.X+ [Error - mysql_real_query] Query: INSERT INTO `players_online` VALUES (1)

    Adjust these queries https://github.com/nekiro/TFS-1.5-Downgrades/blob/fc9157b919405ecde6f30e471255be4e2746884e/src/iologindata.cpp#L164 uint16_t worldId = g_gameworld.getWorldId(); if (login) { Database::getInstance().executeQuery(fmt::format("INSERT INTO `players_online` VALUES ({:d}...
  13. L

    TFS 1.X+ [Error - mysql_real_query] Query: INSERT INTO `players_online` VALUES (1)

    It's not about column named count. Check your table columns, it should have only one column player_id, easiest to do is to remove it and re-add: CREATE TABLE IF NOT EXISTS `players_online` ( `player_id` int NOT NULL, PRIMARY KEY (`player_id`) ) ENGINE=MEMORY DEFAULT CHARACTER SET=utf8;
  14. L

    TFS 1.X+ IOLoginData::loginserverAuthentication

    @ForgottenNot escapeString already wraps strings with 'value' so you can remove additionall ': = " << db.escapeString(name);
  15. L

    TFS 1.X+ IOLoginData::loginserverAuthentication

    Just use FMT to format these queries like: fmt::format("SELECT `id`, `name`, `password`, `secret`, `type`, `premium_ends_at` FROM `accounts` WHERE `name` = {:s}", db.escapeString(name)) fmt::format( "SELECT `name`, `deletion`, `world_id` FROM `players` WHERE `account_id` = {:d} AND `deletion` =...
  16. L

    Does anyone know how to put this exhaust?

    @Jpstafe You're also missing very important part which is aggressive attribute: <instant aggressive="1" groups=""> Groups are defined as a attribute of <instant>
  17. L

    Does anyone know how to put this exhaust?

    For your server there's no XML param like: group & groupcooldown secondarygroup & secondarygroupcooldown Instead there's a groups attribute: <instant name="Light Healing" words="exura" lvl="9" mana="20" aggressive="0" selftarget="1" exhaustion="2000" groups="2,2000" icon="1" needlearn="0"...
  18. L

    [TFS 1.2] How to make delay to stack stairs if you have pz

    Maybe not exactly as you want but you can try to adjust the code to your needs: config.lua stairJumpExhaustion = 2000 https://github.com/otland/forgottenserver/blob/1.2/config.lua#L12 https://github.com/otland/forgottenserver/blob/1.2/src/player.cpp#L1277
  19. L

    TFS 1.X+ [looking for help]log in problem nekiro's multiworld system [source and commit included]

    DBResult_ptr result = db.storeQuery(fmt::format( "SELECT `id`, `name`, `password`, `secret`, `type`, `premium_ends_at` FROM `accounts` WHERE `name` = {:s}", db.escapeString(name)));
Back
Top