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

[TFS 1.2+] Kill Monster & Create Portal

Thank you for sharing the fixes. I “re-coded” this on my phone, apologies for the typos.


The main post is still outdated. I’m unable to edit it.
 
Weird, my portal doesn’t seem to disappear until server save, is there a 5 min or something i should add?
 
--bossKill.lua:51: attempt to call method 'sendMagicEffect' (a nil value)
removed line 51
it did spawn a tp but
--/bossKill.lua:59: attempt to compare nil with number
teleport still stays forever
 
--bossKill.lua:51: attempt to call method 'sendMagicEffect' (a nil value)
removed line 51
it did spawn a tp but
--/bossKill.lua:59: attempt to compare nil with number
teleport still stays forever

Try the script once more for me.

For some reason it is the magic effects that are causing errors. You can remove those lines and it should work, if this attempt fails.
 
I removed line 51 (magic) and it worked, but the teleport stays forever
 
I removed line 51 (magic) and it worked, but the teleport stays forever

There’s another magic effect within function that removes the portal. This script worked fine on my server. Not sure why it isn’t now. Something must’ve changed in 1.3.
 
Last edited:
Hm true, I’ll take a look at it when I get home tomorrow, thanks for the reply!
 
Hi everyone!

I have a problem with this script, and that is, that I get no errors and the teleport does not create, therefor can't fix it...any ideas why it doesn't work? I am using TFS 1.3 and allready used both scripts; @J.Dre script and @ElefanteAfrican script just in case too...

If I don't get any error might be because it doesn't detect the files right? But I revised all things, the "addEvent" on login.lua and creaturescripts.xml too, and everything is right...so if you can lend me a hand please

Thanks in advance!
 
the "addEvent" on login.lua

You mean "registerEvent" in login.lua right?

What you can do is add print statements inside the script. One directly below the function line to see if it's even being called, and then one after each return true to see where it stops.
 
Hi guys, Im using TFS 1.2 and the following happens:

  • Teleport does not disappear
  • Text doesn't show

Console is printing this:

Lua:
Lua Script Error: [CreatureScript Interface]
data/creaturescripts/scripts/bossKill.lua:onKill
data/creaturescripts/scripts/bossKill.lua:58: attempt to compare nil with number
stack traceback:
        [C]: in function '__lt'
        data/creaturescripts/scripts/bossKill.lua:58: in function <data/creaturescripts/scripts/bossKill.lua:30>
 

Similar threads

Back
Top