• 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 Problem with fields, fields is not "under" level doors.

anyeor

Member
Joined
Jan 6, 2010
Messages
108
Solutions
2
Reaction score
16
Hello,

Can anyone tell me in what function in tfs need to be changed so that the fields are under level doors, or that the door and ladders are always above the objects so that if there are objects under the ladder, you could use it?

Thanks!
 
Not work :(

When click see door:
View attachment 35361

Use door action:

View attachment 35362
I tested it on TFS 1.2 with a 10.98 client before I posted and it worked. Idk what you're using here, it seems to be ninjas 8.6 rev or something else.

You should triple check to make sure you set it up right and the script is even executing, try putting a print('working') function at the very beginning of the onUse to see if it prints to console at all.

I pm'ed you my discord but if you don't want to reply I don't know what else to do for you and I'm doubting anyone else will write a source code for this.
 
This isn't the exact fix the OP was looking for, but you can always do what I did and add the following lines of code to your closingdoor.lua after
Code:
item:transform(item.itemid - 1)
and before the final "return true":

Lua:
local field = tile and tile:getItemByType(ITEM_TYPE_MAGICFIELD)

    if field and isInArray(FIELDS, field:getId()) then
        field:remove()
        position:sendMagicEffect(CONST_ME_POFF)
        return true
    end

This will make it so that when the player steps out of the quest/level door, the door will still shut and delete the magic field.
 
Back
Top