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

lua

  1. Noupz

    macOS compiling lua error

    Error: I followed the compiling guide of edubart, everything was fine until I'm on Ventura 13.6 (22G120)
  2. R

    [TFS 1.2] Daily Rewards Script

    Hey everyone, I've been developing some features for my server and I've put together a little something that might interest some of you. It's a daily rewards system designed to give players a nice little boost for logging in each day. I thought it might be something worth sharing. Daily...
  3. R

    [TFS 1.2] Coin Conversion Scripts

    Hey everyone, I've been working on some enhancements for my server, Tibia.nu, and developed a couple of scripts that convert coins. There's one for converting gold coins to platinum and another for converting platinum coins to crystal. Thought it could be useful for others here. Scripts...
  4. L

    C++ Calling variable(c++) from LUA

    I use OTCv8 for my small project. I have a module for otclientv8 written in C++. The module generates numbers every second into a variable. I would like to have access to this variable from lua to use this variable in a lua script. I'm wondering and slowly eating my mustache on this code(my...
  5. D

    Lua [TFS 0.3.6]Script Party Exp

    Hello everybody! I need help with a script... I have this talkaction: <talkaction words="!partyexp" event="script" value="partyexp.lua"/> What calls this script: function onSay(cid, words, param, channel) if isInParty(cid) then local party = getPartyMembers(cid) local...
  6. Colandus

    TalkAction [GM] /stalk player

    This command will allow GM's to easier follow other players as they walk around the map. Usage: /stalk Colandus (enable stalking on player Colandus) /stalk stop (stop stalking) In data/talkactions/talkactions.xml add: <talkaction words="/stalk" script="stalk.lua" separator=" " /> In...
  7. E

    TFS 1.X+ Promotion errors after upgrading to tfs 1.5.

    Merged 1.3 alk custom rlmap together with the tfs 1.5 and this pops up in the enginelog when I attempt to buy promotion; Lua Script Error: [Npc interface] Data/npc/scripts/Queen Eloise.lua:eek:nCreatureSay data/lib/core/player.lua:59: attempt to call method 'getPremiumDays' (a nil value)...
  8. Curb

    TFS 1.X+ Issue with Item Description not being Recognized in Script

    TFS 1.4.2 I have a script that involves modifying item descriptions and interacting with specific items (a bucket of water and a sack of feed, with IDs 26415 and 26414, respectively. The script is intended to read the item description, extract a quantity value from it, and then perform certain...
  9. P

    [Canary 13.21] manage_storage.lua usage doesn't seem to find proper key-values.

    Hey there, Info: Canary 13.21 No general changes to code or scripts. Sometimes I'm having some issues with quest states, which seems perfectly natural, bugs do occur. I tend to troubleshoot these in order to find what path works and what doesn't in terms of the quest and if I can fix it in...
  10. D

    [Custom] ChestReward on Map

    I'm trying to create a script that generates some loot boxes on the map in pre-determined or random pixels, so that the player who uses it gets some pre-defined rewards. The reward system works, but I can't make the boxes appear on the map automatically when the server starts. , I also tried to...
  11. Travisani

    TFS 1.X+ How to declare an summons counter for my spells?

    I tryied to do a script for make a random summon. But i got this error: [error] Lua script error: error... boss_summon.lua:14: attempt to compare nil with number stack traceback: [C]: in function '__lt' ...boss_summon.lua:14: in function boss_summon.lua:10 local combat =...
  12. potinho

    Lua [TFS 0.X] Auction System (Trade OFF) - Bug charges

    Good afternoon folks,I have a trade off system that is connected to a web page but I saw a bug: if I try to sell an item with charges (stone skin amulet for example), if I put the item up for sale and remove it from the list, it just comes back with a charge, the same happens if a player buys an...
  13. P

    OTClient Lua Documentation

    hello, people of the forum. I've come here to share some of my resource with you all. I've just started doing modding for the client and I was a little bogged down because there is not much documentation easily found about the lua API given to us. So I've made these simple lua files with...
  14. potinho

    Lua [TFS 0.X] NPC - Correct doRemoveMoney

    Good evening guys, how are you? I have this NPC that I copied from Ralke to sell some items with charge, but he takes the item and its quantity (2160 for crystal coin and 2148 for platinum) and its real value is not included. As I added a new currency in the game, I would like to adjust this NPC...
  15. Paulix

    TFS 1.X+ Convert Flag value to enum from getSlotPosition()

    Hello, I'm trying to check if an item can be use on slots 1, 4, 7, 8, 12 (Head, Armor, Legs, Feet or Hands) Enums on src looks like this... enum slots_t : uint8_t { CONST_SLOT_WHEREEVER = 0, CONST_SLOT_HEAD = 1, CONST_SLOT_NECKLACE = 2, CONST_SLOT_BACKPACK = 3...
  16. monfik

    Lua error: attempt to call global 'require' (a nil value)

    Hello. I have a problem with lua script on my local server. I added a command for GameMaster in talkactions.xml. And when I call a command in game I receive an error in console Lua Script Error: [TalkAction Interface] data/talkactions/scripts/eqSpawn.lua:onSay...
  17. potinho

    Lua [TFS 0.X] Svarground Arena - Bug sometimes

    Hello everyone, everything good? I'm using this @Gesior.pl Arena system, but I had a bug sometimes after player try to jump in arena. https://otland.net/threads/real-tibia-svargrond-arena-for-tfs-0-3-4-ver-3.33938/ After some players do arena, i have followed errors on console: 2023-07-20...
  18. aqubjukr

    TFS 1.X+ Get a value by showTextDialog

    Does anyone know how to tell me the correct way to get the text value typed by the player inside the showTextDialog? I know that the function is structured in the following way: showTextDialog(id, text, canWrite, length), but I couldn't do it at all. local function processValue(cid) local...
  19. potinho

    Lua [TFS 0.X] NPC Responds to "instant buy"

    Hello guys, how are you? I saw this in another retro OTs a very interesting thing. How to NPC answer a player without put it in a queue, like some servers have "bring me to" in boaters NPC without need to say "hi". I want the same thing for my sellers and buyers NPCs. If u want to buy a SD just...
  20. MrUnFantastic

    How to change weapon level?

    So, as the title states, I am trying to figure out how to change a weapon's level. I wanted to lower the level requirement for a snakebite rod. However, after chaging it from 7 to 5: <wand id="2182" level="7" mana="2" min="8" max="18" type="earth"> <!-- Snakebit Rod --> <vocation...
Back
Top