• 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

    What's the function to replace getContainerCap

    You could do something along these lines to check whether the player has enough capacity or room before adding the item. local tmpContainer = Game.createItem(potion.backpack) if not tmpContainer then return true end tmpContainer:addItem(potion.item, potion.ammount) --...
  2. Ninja

    Solved Bug house door tfs 1.0

    The door id has most likely been serialized in the database. Truncate the table tile_store while the server is offline.
  3. Ninja

    Compiling MVS 2015

    You can find precompiled binaries here.
  4. Ninja

    Solved Which solution is better?

    You shouldn't have to worry about performance while doing minimal tasks. One method might be slower than the other, but it's a matter of nanoseconds, so it shouldn't matter that much. onThink is available for creatures as well, and Creature userdata object is passed as argument.
  5. Ninja

    Compiling MVS 2015

    Update your boost libraries.
  6. Ninja

    OtLand Merry Christmas & Happy New Year!

    Greetings OTLand! We, the OTLand staff, would like to wish everyone a Merry Christmas and a Happy New Year! May it bring you joy, happiness, and everything else you deserve. Happy Holidays, and thank you all for the year we have had together! Let's hope that we still have many more years to...
  7. Ninja

    onKill TFS 1.2

    The boss names (has to be in lowercase letters) are being used as keys to access elements in the table config. As for debugging, the usual method is to add print on various places within the script to see where it stops.
  8. Ninja

    onKill TFS 1.2

    Have you even tried to debug the script? The registered event name might be incorrect, or the keys for the table config might not be in lowercase et cetera.
  9. Ninja

    Solved Ring of ending //

    You should probably check the equipped ring's item id as well, unless you want players to have their crystal rings (or other rings) transformed into a ring of ending.
  10. Ninja

    Solved (tfs 1.1) fluids not working

    Replace local fluidType = {3, 4, 5, 7, 10, 11, 13, 15, 19} local fluidMessage = {"Aah...", "Urgh!", "Mmmh.", "Aaaah...", "Aaaah...", "Urgh!", "Urgh!", "Aah...", "Urgh!"} with local fluidMessage = { [3] = 'Aah...', [4] = 'Urgh!', [5] = 'Mmmh.', [7] = 'Aaaah...', [10] =...
  11. Ninja

    [TFS 1.2] Add item in locker

    Ops, sorry.. You have to use Item::CreateItem. depotLocker->internalAddThing(Item::CreateItem(2195)); -- Too slow :p
  12. Ninja

    [TFS 1.2] Add item in locker

    Yes, that's correct. :p
  13. Ninja

    [TFS 1.2] Add item in locker

    You would have to edit the function Player::getDepotLocker to add a new item: https://github.com/otland/forgottenserver/blob/master/src/player.cpp#L911-L926 (don't forget to increase the depot locker size in depotlocker.cpp). Teleporting a player to a new position, can be written in Lua.
  14. Ninja

    Anime Talk

    I would like to recommend Monster.
  15. Ninja

    Lua Skinning with checking corpse owner TFS [1.2]

    local owner = target:hasAttribute(ITEM_ATTRIBUTE_CORPSEOWNER) and target:getAttribute(ITEM_ATTRIBUTE_CORPSEOWNER) or 0 Edit: You should check whether the target is an item or not before checking the corpse owner.
  16. Ninja

    Compiling MSVC 15 Error

    Sorry, the settings images didn't pop up on my phone. The boost library path you've set under 'Additional Library Directories' is pointed towards the wrong directory. Change D:\boost to D:\boost\lib64-msvc-14.0
  17. Ninja

    Compiling MSVC 15 Error

    You need to update the paths to the boost libraries in settings.props which you can find in the vc14 directory. See the following commit: https://github.com/otland/forgottenserver/commit/e1ffcf5278b9bb1a902d219e2d296d446b88a359
  18. Ninja

    Solved Function when remove all items remove the container

    You can add items to reward chests, and containers through Lua but you are doing it wrong. Container.addItemEx requires Item userdata where as Container.addItem uses itemId, and count. So all you have to do is change addItemEx to addItem.
  19. Ninja

    Lua Get Sql raw count.

    SELECT id FROM players LIMIT 30, 1 There is no such aggregate function in MySQL. SELECT id FROM players ORDER BY id DESC LIMIT 1
  20. Ninja

    Lua Get Sql raw count.

    local resultId = db.storeQuery("SELECT COUNT(1) AS count FROM ld_sql.players") if resultId then local count = result.getDataInt(resultId, "count") result.free(resultId) return count end
Back
Top