• 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. Ninja

    Solved C++// MONSTERS THAT CAN'T BE BLOCKED THE SPAWN

    You must pass a Monster object to the function checkSpawn if you added an argument for it (I suggest that you remove this). Why aren't you just accessing the data member through sb.mType? if (!sb.mType->someName || findPlayer(sb.pos)) {
  2. Ninja

    how to use addExperience?

    Let me guess, you haven't checked what Game.getExperienceStage returns in this case? :p
  3. Ninja

    Downgrading TFS to 8.1

    Hey there, I'm currently in the process of downgrading TFS 1.2 to 8.0, and hopefully it might be to some help. I guess changing the client version in definitions.h to 8.1 should suffice. If you decide to test it, please don't freak out due to all spell/monster errors, it will be fixed...
  4. Ninja

    Solved Changegold issues. 1.2

    You have to register the item ID in actions.xml.
  5. Ninja

    Xikini's Free Scripting Service. [0.3.7 & (0.3.6/0.4)]

    That method is available for TFS 1.0 as well. See: https://github.com/otland/forgottenserver/blob/1.0/src/luascript.cpp#L9579-L9596 I can't seem to recall doing so before, so I wouldn't say that I love correcting your code(s). :p
  6. Ninja

    Xikini's Free Scripting Service. [0.3.7 & (0.3.6/0.4)]

    FYI, you can access House meta methods by using Player.getHouse. local house = player:getHouse() if not house then player:sendCancelMessage("Sorry, but you do not own a house.") return false end player:teleportTo(house:getExitPosition())
  7. Ninja

    Solved Old TFS 0.3 talkaction !party update for TFS 1.2

    Try this: local config = { sexChangeable = false, copyOutfitAndAddonsEverytime = false } function onSay(player, words, param) local party = player:getParty() if not party then player:sendTextMessage(MESSAGE_STATUS_CONSOLE_ORANGE, "You must be in a party!") return...
  8. Ninja

    msg.addString/byte - Compiling 1.2

    You have to declare the identifier g_config in protocolgamebase.cpp. extern ConfigManager g_config;
  9. Ninja

    Lua Lua Loop Issue

    Replace the function loopHealStamina with this: local function loopHealStamina(playerId) local player = Player(playerId) if not player or player:getExhaustion(EXHAUST_STORAGE) < 1 or player:getStorageValue(STORAGE) ~= 1 then return end local stamina = player:getStamina()...
  10. Ninja

    Compiling Does anyone have working TFS 1.2 sources?

    The solution has already been provided in this thread (sudo apt-get install libpugixml-dev). The second image indicates that the package Pugixml cannot be found, and thus result in an error while trying to generate CMake build files.
  11. Ninja

    Unrealized tfs 1.2 request

    Here is something you can work on. local config = { fromPosition = Position(1000, 1000, 7), toPosition = Position(1100, 1100, 7), rewards = { {chance = {from = 0, to = 30.5}, message = 'You try to concentrate and your dream comes true. You wished for something cool.', itemId...
  12. Ninja

    TFS 1.2 - Simple Magic Effects Function

    Nope! The function(s) will not even execute now due to a non-existent userdata object (player is not defined anywhere, and you shouldn't use isPlayer). When you use addEvent, pass player ID as an argument, and construct the Player userdata object inside the function, e.g: local function...
  13. Ninja

    [TFS 1.2] Kill monster

    Change local storage = player:getStorageValue(Storage.bossSlayer) if storage >= 0 and storage < 3 then player:setStorageValue(Storage.bossSlayer, math.max(1, storage) + 1) player:addAchievement('Boss Slayer') end to local storage = math.max(0...
  14. Ninja

    Solved Bug when try tame certain types

    Change the value for TYPE_ITEM to 1.
  15. Ninja

    [TFS 1.2] Cast website

    SUM returns NULL when there are no rows in a table. However you can use IFNULL or COALESCE around SUM to return 0 instead of NULL. IFNULL(SUM(`spectators`), 0) -- Returns the first expression if it's a non-NULL value, otherwise it will return the second expression. COALESCE(SUM(`spectators`)...
  16. Ninja

    Lua Little Help in Player.lua

    Okay. Check if this fixes your issue then.
  17. Ninja

    Lua Little Help in Player.lua

    It seems like you have already received an answer in the Premium Support Board.
  18. Ninja

    Solved TFS 1.2 db.query for changing player storage value

    It's not a bug. Storage keys are saved to the database when the player either dies or logs out. You have to kick the player from game before you play around with MySQL queries.
  19. Ninja

    [TFS 1.2] addExperience

    getExpForLevel(player:getLevel() + 250) -> getExpForLevel(250)
  20. Ninja

    Compiling Downgrade Server Version (TFS 1.1 1077 to 1041)

    You need to revert protocol changes as well. See this patch: https://gist.github.com/ninjalulz/53d1b402e710a83eacb1
Back
Top