• 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. Non Sequitur

    Problem With Lua

    Try something like this: function GetInfo(id) local query = db.storeQuery('SELECT `started`, `guild`, `breaker`, `time` FROM `tmpwoe` WHERE `id` = ' .. id) if not query then return nil end local resultado = { [1] = result.getDataInt(query, 'started')...
  2. Non Sequitur

    Solved Comparing numbers problem

    local skillAxe = getPlayerSkillLevel(player, SKILL_AXE) local skillSword = getPlayerSkillLevel(player, SKILL_SWORD) local skillClub = getPlayerSkillLevel(player, SKILL_CLUB) local higherSkill = math.max(skillAxe, skillSword, skillClub) if higherSkill == skillAxe then doPlayerAddItem(player...
  3. Non Sequitur

    Lua Convert old script to 1.0

    local player = Player(creature)
  4. Non Sequitur

    Skill Quest

    function doPlayerAddMagLevel(cid, n) if n <= 0 then return false end local magLevel = getPlayerMagLevel(cid, true) local percent = getPlayerSpentMana(cid) / getPlayerRequiredMana(cid, magLevel + 1) for i = 1, n do doPlayerAddSpentMana(cid...
  5. Non Sequitur

    Lua Problem to get a Lua Table in LuaScript C++ Function.

    You're passing this table to the function: {2144, 10} When it expects a table of tables, like this: { {2144, 10} } You should take a better look at the example in my last post.
  6. Non Sequitur

    Solved Function when remove all items remove the container

    Hmm, alright then, good luck in your endeavor.
  7. Non Sequitur

    Solved Function when remove all items remove the container

    @silveralol If you're using my reward system and want to procedurally give players rewards all you have to do is this: local reward = player:getReward(os.time(), true) reward:addItem(itemId, count) And a reward container will appear in the reward chest with the items you added. About the reward...
  8. Non Sequitur

    Solved Ring of ending //

    Though you still can't inspect a table, maybe you will be so humble as to follow your own advice you so lividly give others and "learn the language". In this snippet you will find both recursive and non-recursive ways of inspecting every object of a table. local ex = { hey = {...
  9. Non Sequitur

    Solved Ring of ending //

    What is wrong with you? Do you get off when you try to appear smarter than everyone else? "there is a thing called recursion" - I don't think you know what that means, and I don't believe you know how to use it either, otherwise you would've used it in this function of yours (and no, recursion...
  10. Non Sequitur

    Lua Problem to get a Lua Table in LuaScript C++ Function.

    Try this: int LuaScriptInterface::luaRecipeSetRecipeItem(lua_State* L) { RecipeHandler* recipe = getUserdata<RecipeHandler>(L, 1); if (!recipe) { lua_pushnil(L); return 1; } std::map<uint16_t, uint16_t> items; //push first key for next() lua_pushnil(L)...
  11. Non Sequitur

    [TFS 1.2] Modal Window Helper Lib

    That is just a sample code, and it's on the button callback, so the player may choose the wrong option and choice.correct will be nil, not true.
  12. Non Sequitur

    Lua Switch function :)

    Switch statements (on languages that support it) are only better than if/else statements when you have a lot of clauses. That is because the switch creates a hash map with the address it should jump to for each expression, instead of the if/else flow control, that is, to jump to each clause at...
  13. Non Sequitur

    [TFS 1.2] Modal Window Helper Lib

    What verification?
  14. Non Sequitur

    [Error - MoveEvent::executeStep] Call stack overflor

    For the same reason, the script (for quest chests it's walkback.lua) teleports the player to a unsafe position. This should fix it: local function isQuestChest(item) local itemid = item:getId() if itemid == 1738 or itemid == 1740 or (itemid >= 1746 and itemid <= 1749) then...
  15. Non Sequitur

    TalkAction [TFS 1.2] In game ranking

    Features Modal Windows - enables the player to browse through multiple ranking pages; Live Ranking - players that are online have their stats updated as well; Vocation Filter - inspired by @zbizu's script; Help Window - help window with examples the player can try - even more newbie friendly...
  16. Non Sequitur

    [TFS 1.2] Modal Window Helper Lib

    Reasoning The current way we can implement modal windows is quite cumbersome in my opinion, having to create it somewhere, register an event, add buttons in some weird order to make it work and having to take account of window ids, button ids, choice ids in a complete different file than the one...
  17. Non Sequitur

    [Error - MoveEvent::executeStep] Call stack overflor

    I helped him solve it yesterday. It is not a TFS bug, it can happen whenever your script sends the player to a position that will fire another move event, in this case the invisible tile sends the player to another invisible tile, both fire the same move event and that will start an infinite...
  18. Non Sequitur

    [HowTo] "Close Source" your .lua scripts.

    It should, it is Lua bytecode, that is why it will still work the same way it would in plain text. It is not encryption nor encoding, its practical use - other than the original one, that is, to make the program lighter and slightly faster to run in embedded systems - is at most obfuscation of a...
  19. Non Sequitur

    Solved TFS [1.x] Is there a networkmessage byte code for opening container in game?

    It works, however simply copy-pasting my example won't. I would help you if you weren't so hypocritical by asking a brazilian for help when you display such prejudice against my country:
  20. Non Sequitur

    Windows compiling tfs 1.2

    Open any .cpp file (e.g actions.cpp) and after all includes insert: extern "C" { FILE __iob_func[3] = { *stdin,*stdout,*stderr }; } Hope it helps, Non Sequitur
Back
Top