• 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!

Search results

  1. Infernum

    Updated TFS resources

    https://infernum.sh/tfs/luascript/ https://infernum.sh/tfs/enums/ will add caching later, pls dont abuse my site i am no security expert :(
  2. Infernum

    [TFS 1.3] Item Abilities via Lua V2

    Utilizes revscripts and custom attributes unlike my last one, way less source code involved. Somewhat tested. https://github.com/otland/forgottenserver/compare/master...infernumx:item-abilities-updated Functions: item:setAbility(key, value) item:getAbility(key) item:getAbilities()...
  3. Infernum

    [TFS 1.X] safeAddEvent

    This provides a safe way to use addEvent with userdata without having to manually reconstruct the object yourself in order to avoid crashes. If the object can't automatically be reconstructed at the time of execution, it will not execute at all. The usage is the same as the normal addEvent...
  4. Infernum

    TFS Guide & Documentation

    Work in progress, but I'm happy with the current state of it and the pace I'm keeping with updates. I'm looking for genuine feedback as well on what I should improve or if any of my examples should simplified or rewritten. I'm also looking for other things that should be explained that aren't...
  5. Infernum

    [Suggestion] Lua-Generated Item Descriptions

    Code: infernumx/forgottenserver (https://github.com/infernumx/forgottenserver/compare/master...infernumx:lua-item-desc) There's still some room for improvement. I'm thinking about combining the "hasX" functions into one that returns the table with all the item type "flags" on it (boolean...
  6. Infernum

    Streaming for boredom

    https://www.twitch.tv/pregnancytest/ Join in if you'd like to see how I work on things, going to be transferring Item::getDescription from sources to Lua for attribute flexibility.
  7. Infernum

    Lua Function Game.loadMapChunk(path, position, remove)

    Loads/unloads an OTBM file live into your server by using an offset. File must be mapped starting from x:0 y:0 coordinates to make offset work properly. Params: Path: The path to the OTBM file (with the .otbm extension in it, example "data/world/test.otbm") Position: The position offset...
  8. Infernum

    Lua Function [TFS 1.3] creature:getEmblem() | creature:setEmblem(emblem)

    Since this won't be merged to master branch and I haven't seen any code that does this since 8.6, I'll just release this here. Code: creature:getEmblem(), creature:setEmblem(emblem) · infernumx/[email protected]
  9. Infernum

    OpenTibia Python Tibia<->Discord bot

    Self-hosted Discord bot to communicate to and from your server. Automatically inserts tables needed to database on first-time setup. Git repo: delusionx/Serpent (https://github.com/delusionx/Serpent/) Pre-implemented commands: online, uptime Command prefix: ; Example on how to add a new...
  10. Infernum

    Benchmarking your code in Lua

    Core code: do local units = { ['seconds'] = 1, ['milliseconds'] = 1000, ['microseconds'] = 1000000, ['nanoseconds'] = 1000000000 } function benchmark(unit, decPlaces, n, f, ...) local elapsed = 0 local multiplier = units[unit]...
  11. Infernum

    Guide to scripting with Lua

    I've been working on a book which aims to provide a way to learn for anybody looking to learn Lua. The end goal is to have a book that lets anybody go from zero knowledge to being experienced, and to provide even just 1 thing that somebody could learn, even if the reader is experienced...
  12. Infernum


    I've completely lost interest in Tibia in the past month. I don't get the same feeling I used to by helping and creating things, all it is now is just annoying alerts which I have an obligation to answer due to this position. My motivation has been completely drained, so I think it's time for me...
  13. Infernum

    [ANY TFS] Catch scripts that freeze server

    put this code in a lib file (global.lua if tfs 1.x): local start = os.time() local linecount = 0 debug.sethook(function(event, line) linecount = linecount + 1 if os.time() - start >= 1 then if linecount >= 30000 then print(string.format("possible infinite loop in...
  14. Infernum

    OpenTibia Server Console Logger

    For users that don't have Python 3.6 installed on their system, I provided a rar file with a Python executable that will be able to run without Python being installed. It is by no means required to use the executable, if you have Python installed all you need to do is use this script (this is...
  15. Infernum

    Documenting luascript.cpp functions

    Script (Run with lua binary) example command to run it (you must have your Lua directory added in PATH environment variable): lua "C:\Users\user\Desktop\script.lua" Input luascript.cpp directory: C:\Users\user\Desktop\luascript.cpp Input your output directory: C:\Users\user\Desktop I've...
  16. Infernum

    [TFS 1.X] Give player items by table

    inspired by @Xikini, his code for 0.x linked here function Player.giveItems(self, t) local cap = (ItemType(1988):getWeight() / 100) * (math.floor(#t / 20) + 1) for i = 1, #t do local v = t[i] cap = cap + ((ItemType(v[1]):getWeight() / 100) * v[2]) end local...
  17. Infernum

    Feature [TFS 1.3] Monster Levels

    code: aasfdfdasfdafdasf · infernumx/[email protected] config.lua: monsterBonusHealth = 0.5 monsterBonusSpeed = 0.02 monsterBonusDamage = 0.02 how to add to monsters (monster xml file): <level min="5" max="100" /> for tfs 1.2 users, configmanager is changed in 1.3, so ignore the...
  18. Infernum

    Lua Function [TFS 1.3] Item abilities via Lua

    SQL needed to execute in db: ALTER TABLE player_items ADD abilities BLOB NOT NULL; ALTER TABLE player_depotitems ADD abilities BLOB NOT NULL; ALTER TABLE player_inboxitems ADD abilities BLOB NOT NULL; C++ Code: infernumx/forgottenserver...
  19. Infernum

    OpenTibia [Windows] Server auto restarter

    Requirements: Python 3.5, psutil package (use pip install psutil to install) Instructions: Copy the below code into a new python script and save it to the same directory where your server executable is located import psutil # DEPENDENCY: pip install psutil import os import time from threading...
  20. Infernum

    Lua Function [TFS 1.2/1.3] player:setAttackSpeed(ms) | player:getAttackSpeed()

    player.h above uint32_t inventoryWeight; add uint32_t attackSpeed = 0; replace getAttackSpeed() with this uint32_t getAttackSpeed() const { if (attackSpeed > 0) { return attackSpeed; } return vocation->getAttackSpeed(); } add...