• 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. Sarah Wesker

    Spell Mana Waste (exevo mana) - fixed

    What matters is to leave information for when someone is looking for something similar. I saw the thread live on the list, thanks to @Levi999x for reviving the thread 😅
  2. Sarah Wesker

    Spell Mana Waste (exevo mana) - fixed

    function onCastSpell(player, variant, isHotkey) local mana = player:getMana() if mana == 0 then player:sendCancelMessage("You must have at least 1 mana point.") player:getPosition():sendMagicEffect(CONST_ME_MAGIC_RED) return true end player:addMana(-mana)...
  3. Sarah Wesker

    Lua [TFS 0.4] block player to add item to certain container

    You can only tell if it's a container position, but if you block this, then all containers would be blocked. The idea is to block only a specific backpack, whether it has an actionId, or a specific itemId or uniqueId, ect...
  4. Sarah Wesker

    Lua [TFS 0.4] block player to add item to certain container

    I don't know of any TFS 0.4 where you can do this via lua, since no onMoveItem event exists, and if it does exist it surely doesn't have the value toCylinder, we also don't have a method to get the object in question based on the position on the client. so the fastest option would be to add an...
  5. Sarah Wesker

    Lua [TFS 0.3.7 / 0.4] Check and remove Item witch ActionID.

    1.) When the player uses an item with a specific actionID, this item is removed. 2.) When the player uses an item with the specified actionID on another item, the other item is removed. 3.) When the player uses some onUse event, all items in the player's inventory with the specified actionID are...
  6. Sarah Wesker

    Lua [TFS 0.3.7 / 0.4] Check and remove Item witch ActionID.

    function onUse(cid, item, fromPos, target, toPos, isHotkey) if item.actionid == xxxx then doRemoveItem(item.uid, 1) end return true end
  7. Sarah Wesker

    Welcome to new Staff Members!

    Congrats to all the new staff members
  8. Sarah Wesker

    TFS 1.2 exceeding packet limit when tp to pos

    What is it supposed to have in that exact position? Maybe some Tile with an onStepIn/onStepOut/Teleport/ect event? I assume you use OTClient right? You have to give more information, if you want a fast and exact answer
  9. Sarah Wesker

    TFS 1.X+ addevent error tfs 1.5

    local function Crystal2(cid) local player = Player(cid) if not player then return end -- Your code HERE end local function Crystal3(cid) local player = Player(cid) if not player then return end -- Your code HERE end local function Crystal4(cid) local player =...
  10. Sarah Wesker

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

    You can use the function that has been declared in another file by executing the code in that file and saving the function in a local or global variable so that you can use it later dofile("data/talkactions/scripts/createitembyname.lua") local myCustomFunc = onSay function onSay(cid, words...
  11. Sarah Wesker

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

    I don't know what function you want to require, but you should never require, I don't recommend using that function if you don't know exactly what you want to do Here is an example of TFS 0.3.6 code that will create the items and deliver them to the player who invokes the command...
  12. Sarah Wesker

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

    the name of the module you are trying to require makes me think that it is a talkaction to create items using the name... This already exists in TFS and almost every engine that has ever existed. Just delete that file and use the /i command For example: /i demon armor /i crystal coin in case...
  13. Sarah Wesker

    TFS 1.X+ Creaturescripts task count in party

    local function getObjs(creature) local objs = {} local timeNow = os.mtime() local inFightTicks = configManager.getNumber(configKeys.PZ_LOCKED) for uid, cb in pairs(creature:getDamageMap()) do local attacker = Player(uid) if attacker and timeNow - cb.ticks <=...
  14. Sarah Wesker

    Lua Please Help!!

    remember to leave the version you are using so they can help you directly.
  15. Sarah Wesker

    TFS 1.5 one dies, another is born xD

    ready, and thanks @Boy67
  16. Sarah Wesker

    TFS 1.5 one dies, another is born xD

    You can try: data/scripts/file.lua local config = { ["rat"] = {name = "Rotworm", count = 1, chance = 100}, ["cave rat"] = {name = "Rotworm Queen", count = 1, chance = 100} } local born = CreatureEvent("BornExample") function born.onDeath(monster) local bornConfig =...
  17. Sarah Wesker

    TFS 1.X+ [SOLVED] Can you make a spawned NPC stay in an owned house after restart?

    sure, you should only force it if necessary: Game.createNpc(param, position, extended, force)
  18. Sarah Wesker

    TFS 1.X+ [SOLVED] Can you make a spawned NPC stay in an owned house after restart?

    Those two methods convert a Lua table into a string, so that this string can be stored somewhere, like a file on a PC. Then we can retrieve this string and rebuild the same Lua table, and in this way we are simulating a type of database. These default functions do not exist in TFS, but you can...
  19. Sarah Wesker

    RME Map editor, how to make item unmovable? TFS 1.4.2

    If you read the EventCallback system this is called tiggerIndex, it is the execution index, this is similar to priority but in reverse The lower index will always be executed before the higher one. Thank you for teaching me something I created myself 🤣
  20. Sarah Wesker

    Lua Check if specified monster is in specified position

    If there are no spectators, what's the point of the monster being active doing some things? It's not just about performance, but rather about logic. In theory, if you use the function setIdle(false) you can keep the monster active. You also have another option, which is to add an aggressive...
Back
Top