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

    Lua Get list of item by item id, then get item uid of items in list

    You say that you only have access to the function getPlayerItemCount(), may I ask why this is the case? Or is it possible there are other functions/methods you are unaware of? It would be handy to know which server you are using, and in what function/callback this script will be executed it...
  2. F

    Lua Help, Food Script

    Not sure if you wrote this or not. If so, I have a few questions: 1. Why? Is this something in real tibia? 2. Please learn to tab your code correctly. Most IDE's will even do it for you if you are unable to figure it out. 3. Why are you "correcting" 11 year old thread/code?
  3. F

    attempt to call global 'getCreatureCondition' (a nil value)

    Have you tried recompiling? Or are there any startup errors at all? Could possibly have overwritten the method in Lua or set it to nil by accident... I've briefly looked at the methods in the sources and they seem to be registered, I'm not actually sure what the issue is to be honest.
  4. F

    attempt to call global 'getCreatureCondition' (a nil value)

    No... because it wasn't in your original post. You edited it afterwards. And I assume he means the existing scripts aren't working, which all begin with a lowercase 'g'. That is also why I asked him to provide a script that doesn't work... just to make sure he hasn't edited them or made any typo...
  5. F

    attempt to call global 'getCreatureCondition' (a nil value)

    Seems that getCreatureCondition is the correct lua method... https://github.com/Fir3element/3777/blob/29eb7a67e6994950687967f5afb69c39b04dd622/src/luascript.cpp#L8660 So what is the error(if any), and provide any script that doesn't work... (I can only see 3 example scripts that include...
  6. F

    attempt to call global 'getCreatureCondition' (a nil value)

    First of all... what is the exact error (if any). And can you provide one on the scripts that uses it.. https://github.com/Fir3element/3777/blob/main/data/lib/100-compat.lua#L92
  7. F

    AAC How to create landing page for mobile browser?

    As El Bringy suggested, checking the User Agent is by far one of the best methods to detect a mobile device, but this should only really be used server side. We are not in 2005 anymore... for front-end, I would strongly suggest using media queries in CSS for viewport breakpoints: W3Schools...
  8. F

    the end of otservers

    yawn...
  9. F

    Gatekeeping

    Just wanna add a few things from my experiences: As a developer in 2024 (not 2007...), If you spend years creating unique client/server features and mechanics, or paying other people to create maps, sprites to make your server different from anyone else's. For me, I don't feel an obligation to...
  10. F

    RevScripts Add item decay to script TFS 1.3

    You just bumped an 18 month old thread that was already solved....
  11. F

    RevScripts A city for bosses to enter requires a specific item that you must use to enter

    Something like this (untested) local config = { itemId = 1234, --item id storage = 1234, --storage value to store the timestamp duration = 24, --duration(hours) teleportActionId = 1234...
  12. F

    RevScripts A city for bosses to enter requires a specific item that you must use to enter

    How exactly would they enter the city? Do they "use" the item and get teleported there? Do they click a door and it checks for the item? If they are in the city when the 24 hours expires, should they be kicked out? There are many questions, you really need to be more specific!
  13. F

    unique id for monsters

    getId() is just a running incremented id in memory... It is not persistent like player:getGuid() which is the static id from the players table.
  14. F

    Gatekeeping

    Boy oh boy... another one of these threads. Why not just ask ChatGPT to make you the same tool?
  15. F

    TFS 1.X+ How to make the summon still belong to the player after logging out in tfs 1.4?

    I guess you will have to introduce a Creature/Monster variable such as "wasSummon", and then add early returns to health changing methods if it was a summon etc.
  16. F

    Item shop

    I assume this was not empty? $paypals[0]['mail'] = '';
  17. F

    Item shop

    Let me get my crystal ball out and magically be able to see your code
  18. F

    Lua Remove item with actionid on my backpack

    Very true. But then it comes down to not allowing mis-use of the script, i.e adding exhausts etc. Remember that methods like getItemCountById use the same type of recursion (c++ is faster than lua, but the principles are the same)
  19. F

    Lua Remove item with actionid on my backpack

    what on earth are you talking about? This operation is sync... nothing else happens until the script is finished, and it all happens in milliseconds.
Back
Top