• 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

    Possibile to change day/night ?

    Okay I guess that part is hardcoded: static constexpr uint8_t LIGHT_DAY = 250; static constexpr uint8_t LIGHT_NIGHT = 40; https://github.com/otland/forgottenserver/blob/9dc86d0c0e156417edf725b9a68c89d182511e3b/src/game.h#L557 Or you could do it on your own with custom day/night cycle...
  2. L

    Possibile to change day/night ?

    Who's he? Is he with us right now? ;) Because I don't get it at all, so it has to be constant 60% of light but at the other hand not all the time :eek: So maybe you want to reduce max brightness with keeping day-night cycle?
  3. L

    Possibile to change day/night ?

    setWorldLight(level, color) Check this file ;) https://github.com/otland/forgottenserver/blob/master/src/luascript.cpp#L1090 config.lua -- World Light -- NOTE: if defaultWorldLight is set to true the world light algorithm will -- be handled in the sources. set it to false to avoid conflicts if...
  4. L

    Windows batch not executing exe

    Sounds like Windows service (never tried to use for server but should work): sc create <servicename> binpath= "<pathtobinaryexecutable>" [option1] [option2] [optionN] https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/sc-create
  5. L

    Lua TFS [1.4.X] onLook (creatureScript)

    data\scripts\eventcallbacks\player\player_onLook.lua local titles = { [0] = "Private", [10] = "Huntsman", [20] = "Ranger", [40] = "Big Game Hunter", [70] = "Trophy Hunter", [100] = "Elite Hunter" } local rankStorage = 2500 local ec = EventCallback ec.onLook =...
  6. L

    Lua TFS [1.4.X] onLook (creatureScript)

    event callback like: https://github.com/otland/forgottenserver/blob/v1.4.2/data/scripts/eventcallbacks/player/default_onLook.lua
  7. L

    TFS 0.X Unexpected Crash

    I'd tell it's some concurrent acces to std::_Hashtable. Title suggests it's a TFS 0.x. I noticed Scheduler::threadMain() in backtrace. It looks like something added at the time of TFS ~1.2...
  8. L

    mysql problem with new skill

    Most likely you're mixing grawis wit apostrophe. Do it exactly as on PR you linked to.
  9. L

    Storage tfs 1.5 error

    @nefinoo Yes it's just a warning, exactly as @Evil Puncker said, look: https://github.com/otland/forgottenserver/blob/954bb014ee3a5320fa2cd291922ff178c5b7a0a5/data/lib/compat/compat.lua#L585 It's some legacy concept to return -1 instead of nil in case player has no storage set. Dev's are about...
  10. L

    Storage tfs 1.5 error

    Yea it's acutally very nice change, in the future we'd be able to perform boolean checks (either with storageProxy or player:getStorageValue) local questState = player.storage[PlayerStorageKeys.annihilatorReward] if not questState then -- do something end
  11. L

    Solved Optimize elseif script.

    Well I thought a bit about that and just realized it could be done without getItems: local checkPrice = function(tile, items) local countMap = {} for _, item in ipairs(items) do local tileCount = countMap[item.id] or tile:getItemCountById(item.id) local count =...
  12. L

    Solved Optimize elseif script.

    Hmm not sure but maybe something like that (as anyway separate item count won't be grater that max possible): local removePrice = function (pos, items) local tile = Tile(pos) for _, item in ipairs(items) do local remainingCount = item.count or 1 repeat local...
  13. L

    Solved Optimize elseif script.

    @Mateus Robeerto Cool that you managed to make it work ;) few remarks: once some revscript is registered to single aid/uid you could get rid of the check in onUse as item.actionid == 18563 would always be true consts such as config can be defined outside onUse also removing items of same ID in...
  14. L

    Solved Optimize elseif script.

    @NvSo It's not a problem with check, if it's configured correctly it would work. Problem is that arrays in lua are indexed from 1 and player sex is 0/1. Thus it has to be changed to either work like: outfit = { [PLAYERSEX_FEMALE] = 136, [PLAYERSEX_MALE] = 128 } local outfit =...
  15. L

    [Request] NPC should respond from statement from player

    @mastermaster Describe that in english, maybe then someone will suggest solution.
  16. L

    Solved Optimize elseif script.

    How did you even managed to add there something without formatting that properly :) Just an idea (need some adjustments): local config = { pricePos = Position({ x=1918, y=1232, z=5 }), addonName = { "first", "second" } } local outfits = { [50001] = { items = { {...
  17. L

    Cant log in my sample

    Is there by any change your site configured to use different password encyption than your server? Do you store your password as sha1/ms5 hashes or plain text? Make sure both server and www are setup to treat password same way. I kind of don’t get what you mean with “sample”. Do you mean...
  18. L

    Raid on tfs 1.2 system

    @Piifafa Yes you need to register raid to execute it, thought that's obvious part. Just try and see, I didn't even tried to run that script, it's POC. Set some high interval2 and margin to make sure it won't be called via raids logic. There's some attribute repeat to prevent it being called more...
  19. L

    otclient v8 compile problem

    @Dran Ryszard Apply the fix that I sent, on this repo oen fixed it the same way https://github.com/OTAcademy/otclientv8/commit/c76fddec4993c18c433aff77bf6f4bcabfee4623
  20. L

    otclient v8 compile problem

    @Dran Ryszard These are warnings only, if you don't have any modifications to the source code just pull latest changes from that repository as you're probably few commits behind the latest version. You anyway should release x86 version so players with 32 bit system could run it. Looking at the...
Back
Top