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

addevent

  1. Fabi Marzan

    TFS 1.X+ Lever Wall in Addevent

    Good, here I have a problem that is simple but I still don't understand, how to use else or elseif. The fact is that when you hit the lever the wall appears and when you hit it again it disappears, here for now it's fine. My idea is that if the person hits the lever, the wall disappears, but...
  2. Z

    AddEvent issue

    0.4 Hello everyone, I'm doing some custom spells for my monsters, and one particular spell is: It begins to 'charge' and then hit the player (one target), but, if the player disappears (logout or die), it will return this error: It is this part (inside onCastSpell): addEvent(function()...
  3. Z

    Addevent error when logout

    0.4 Morning, I know there is a lot of threads talking about the same error, but I haven't found one that helped me. I made this spell, where after 2 seconds, deals damage on the target. Simple. The problem is: if the player (or creature) that used the spell cease to exist (logging out or...
  4. Jaki Maoh

    Lua Help with "Basic" .Lua (movements) Scripting

    Hello Community! I can't figure out what is wrong with the script. 😵‍💫 The idea is to add back (to the original tile) a small stone after x time with addEvent function. The problems: 1 when the item is created, it spawns without the aID needed to activate the onRemoveItem function. 2 when the...
  5. namco

    addEvent setStorageValue won't work when player logs out

    I need some help, please. When the player logs out, the Storage won't turn back to its normal state because the addEvent won't trigger. What should I do? showWayshrine = MoveEvent() local function cooldown(playerId) local player = Player(playerId) if not player then...
  6. E

    Lua [TFS 1.3] Addevent in raid script

    Hi everyone, I really tried doing it myself before asking here, but I got no success, I was trying to achieve two things in this raid script: making the NORMAL raid spawn in 3 waves with 10 minutes between each one (for example 3 waves of 50 feverish citizen with 10 minutes and a message...
  7. E

    [help] addEvent to remove Summons

    hello my friends, i'm working in a summon action script and I want to remove the summon after x time, and put exhaustion (y time) on this script .. i have tryed make this with "addEvent" but i dont know how to make it correctly... TFS 1.3, 10.98 version i'm using this script as a base...
  8. Sparkles

    How to cancel a started event?

    I think I might be blind, but eh. Im trying to kick players from the Demon Oak area after x amount of seconds, so they dont block it for others. Somehow, using the normal axe on the tree after entering doesn't stop the event, can someone please tell me what im doing wrong here? lua: function...
  9. Loremaster7

    How to create an item and then remove it with certain time? (using addEvent)

    I created a lever, and I need it to disappear after 3 seconds ... My code 1 : function onUse(cid, item, frompos, item2, topos) time = 3 lever = {x = 2892, y = 2687, z = 8, stackpos=1} getlever = getThingfromPos(lever) if item.uid == 60115 and item.itemid == 1945 then...
  10. donnyred

    TFS 1.X+ ERROR AddEvent() Argument # 3 is unsafe

    Hi everybody I need a simple help for this spells.... the truth is that I do not know much about... buy someone can explain me, I'll be grateful. this is my script.lua local combat = Combat() combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE) combat:setParameter(COMBAT_PARAM_EFFECT...
  11. M

    TFS 1.X+ addEvent with Spell Behaviour

    for the past few hours I was trying to figure out why my spells behave that way, here is an example video. Followed by the actual script. If anyone has solution, please let me know. Thank you :p <instant group="attack" name="testb" words="testb" lvl="0" mana="0" prem="0" direction="1"...
  12. B

    Linux TFS0.3.6/Ubuntu Inaccurate addEvents (ms)

    Hello! When I have my server hosted on my machine (Windows) or localy only, I can get high precision effects with addEvents. But I've noticed (it's been a while, actually) that while hosted on an Ubuntu 14.04, the precision is lost and most effects, some quests and this even causes me some...
  13. Karofel

    Lua Spell Problem

    Hello, i have a small problem there: local combat = Combat() combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_DRAWBLOOD) combat:setParameter(COMBAT_PARAM_BLOCKARMOR, 1) combat:setParameter(COMBAT_PARAM_BLOCKSHIELD, 1) local Crossbows = {2455, 5803, 8849, 8850, 8851, 8852, 8853, 18453, 16111...
  14. miens

    Help with referencing to items held by offline players

    Hi! In my ots I wanted to make a spell that would modify weapons attack value but only temporarily. So I Almost made it to work with weapon:setAttribute(ITEM_ATTRIBUTE_ATTACK, 100) but then I need to take the bonus back after some time. So I decided to use addEvent for this. local...
  15. lekods

    Lua I can not make StopEvent work

    I am having a problem in working with StopEvent on my 0.3.6 Server, I add the following command in a file in lib/myfile.lua Ex: function myFunc(cid, monster) EVENT_ID_28 = addEvent(myFuncWithAddEvent, 30 * 1000, monster) ... end function myFuncWithAddEvent(monster)...
  16. Colandus

    Repeating events EASIER

    ----------------- -- By Colandus -- _CONT = {} function continue(delay, n, ...) local func = debug.getinfo(2).func if(not _CONT[func]) then _CONT[func] = true addEvent(repeatContinue, delay, func, delay, n, ...) end end function repeatContinue(func, delay, n, ...)...
  17. 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...
Back
Top