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

function

  1. Colandus

    Multi Quest

    Class for "multi quests" :) Note: The code is untested (cookie for whoever tests it for me!) missionQuest = {} missionQuest.__index = missionQuest function missionQuest.new(doneStorage, confirmedStorage) if(type(doneStorage) ~= 'number') then return FALSE, error("missionQuest...
  2. Colandus

    Simple VIP system

    function getPlayerLastLogin(cid) local lastLogin = getPlayerStorageValue(cid, 45345) if(lastLogin < 0) then doPlayerUpdateLastLogin(cid) return os.time() end return lastLogin end function doPlayerUpdateLastLogin(cid) setPlayerStorageValue(cid, 45345...
  3. Colandus

    timeString(timeDiff) - "23 hours, 30 minutes and 10 seconds"

    Hey there ;) I made this for a script :p It's very simple to add more date formats, currently its only days, hours, minutes and seconds. UPDATED 2017-02-15 Place this function in data/lib/functions.lua: function timeString(timeDiff, roundVal, roundUpVal) if roundVal and roundVal <= timeDiff...
  4. Colandus

    Lua SLEEP implementation

    This is like addEvent, but easier :) It exit when receiving errors, so you don't need "if isPlayer(cid) == TRUE then return FALSE end" because it exit itself when errors :p TFS 0.3+ put in data/lib/functions.lua TFS 0.2 or other put in data/global.lua sleep = coroutine.yield function...
  5. Colandus

    Some table functions!

    Alright, now it's time for me to release my table functions! :) Here they are (explanation below): -- ~##TABLE::FUNCTIONS::BY::COLANDUS##~ -- FIND_NOCASE = 0 FIND_PATTERN = 1 FIND_PATTERN_NOCASE = 2 function table.find(t, v, c) -- function 100% by Colandus! if type(t) ~= "table" then...
  6. Colandus

    isInArea, loops not needed!

    Hello, I've noticed alot of people use loops to check if someone's in an area. Sure it's needed sometimes, but not as often as you use it. When shall you use loops for checking areas? Well, never because you shall use my mapArea heuaheuah xD But well that's classed as looping too! But...
  7. Colandus

    Saving text to files!

    Hello, have you ever made your own command or any other kind of script and you wanted to save some information in a text file? Okay, here we go; your dream has just became true! :thumbup: Code for saving to files: local saveFile = {folder="logs/", filename="saves.txt", saveLog=true...
Back
Top