• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

actionid door ask for lvl tfs 1.3

Thorn

Spriting since 2013
Joined
Sep 24, 2012
Messages
2,203
Solutions
1
Reaction score
923
Location
Chile
Hello guys, im having a problem with the doors, i have an actionid for the vocation permission to use the door, but when i use this in a lvl door, it says this
c683aa701336232af02923eb279c9d9d.png


so low lvl players cant enter the door, they are asked for some lvl wich i dont know exactly what lvl, with my gm im not lvl 4002, only 704 and i can enter without trouble

Also i have tried to use quest doors and locked doors, none of them work :/
So how can i use the actionid without the lvl requirement? any ideas??

Thanks!
 
Solution
thanks, the thing is if i use unique id i will get duplicates, cos i have many of those doors in game, also that glowing door i tried before and didnt work :S

Option 1: register the script with several uniqueids
Option 2: Like xikini said add a vocation check into the doors script.

The magic door should work tho, but as far as i know it's also used by the basic doors script, action OR uniqueid triggers onto it (by checking storagevalue).
Try to use uniqueid then instead of actionid. As some doors needs/triggers on a value from its action or unique id. (do not know which one from my head).
or try to use a another door, with the glowing door handle?

You could also edit the doors script or the script of yours. but i think this would be easiest/fastest solution.
 
Try to use uniqueid then instead of actionid. As some doors needs/triggers on a value from its action or unique id. (do not know which one from my head).
or try to use a another door, with the glowing door handle?

You could also edit the doors script or the script of yours. but i think this would be easiest/fastest solution.
thanks, the thing is if i use unique id i will get duplicates, cos i have many of those doors in game, also that glowing door i tried before and didnt work :S
 
Those doors are scripted specifically for that purpose in mind.
You can check actions.xml to find the doors lua file, then just add the vocation check into it, using AID's you'll never want to use for level requirements.

Code:
level_required = item.actionid - 1000
 
thanks, the thing is if i use unique id i will get duplicates, cos i have many of those doors in game, also that glowing door i tried before and didnt work :S

Option 1: register the script with several uniqueids
Option 2: Like xikini said add a vocation check into the doors script.

The magic door should work tho, but as far as i know it's also used by the basic doors script, action OR uniqueid triggers onto it (by checking storagevalue).
 
Solution
Hello guys, im having a problem with the doors, i have an actionid for the vocation permission to use the door, but when i use this in a lvl door, it says this
c683aa701336232af02923eb279c9d9d.png


so low lvl players cant enter the door, they are asked for some lvl wich i dont know exactly what lvl, with my gm im not lvl 4002, only 704 and i can enter without trouble

Also i have tried to use quest doors and locked doors, none of them work :/
So how can i use the actionid without the lvl requirement? any ideas??

Thanks!
Lots of good advice given, but lets not make this more complicated than it needs to be, if its a level door then add an or to this if statement.
LUA:
    if item.actionid > 0 and player:getLevel() >= item.actionid - 1000 then

Something like this
LUA:
-- put this somewhere outside of onUse
local passable = {
   -- the index of this table is the door's action id
   [123456] = true
}

       -- this is line 12 of doors.lua modified with an or clause
       if (item.actionid > 0 and player:getLevel() >= item.actionid - 1000) or passable[item.actionid] then

This method will allow you to bypass multiple doors based on its action id, when level is a factor, by changing the value of the index to false from true you can turn off this feature and the doors will work just as they use to.
 
Thanks guys, i will actually go with the registering several uniqueids, i think that's the best way for me, thank you all!
 
Back
Top