• 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.X+ Quest Chest gives Key for special doors.

Alkenyx

Member
Joined
Jun 6, 2014
Messages
97
Solutions
1
Reaction score
16
Location
Germany
Good Morning everyone.

Somehow I can't figure out how to create a simple quest:
1. Open the chest, give a key.
2. Key opens door, other chest or something else.

Thats my actual not working setup:
1. Created a keychest_pergamon_graveyard.lua in my actions/scripts/quests folder.
Lua:
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
    if item.uid == 50005 then --key test--
        if player:getStorageValue(50005) == -1 then
            player:sendTextMessage(MESSAGE_INFO_DESCR, "You have found a bone key! A tiny paper close to it says, it can open some doors in the tombs of this graveyard.")
            local key = player:addItem(2092)
            key:setActionId(4600)
            player:setStorageValue(50005, 1)
        else
            player:sendTextMessage(MESSAGE_INFO_DESCR, "This one is empty.")
        end
    end
    return true
end

1.2 Added these lines in my actions.xml
XML:
<action actionid="4600" script="quests/keychest_pergamon_graveyard.lua" />
<action uniqueid="50005" script="quests/keychest_pergamon_graveyard.lua" />

2. Gave the doors (IDs: 5099, 5101, 5105) the action ID 4600. <-- Cuz of
Lua:
key:setActionId(4600)

(3.) Updated (#363) my walls.xml & items.xml in rme for the version 10.98 (thats my map version).

The search function here showed a lot of possibilities, but I didn't get anything really implemented. Does anyone have any idea to get it working for TFS 1.3?
 
Last edited:
Solution
But I can't use an quest door for my key idea didn't I?
Cuz when I open the (locked version) once, everyone can open it till i lock it with the key again.. Thats dumb for a questdoor. xD

20:46 You see a closed door.
It is locked.
Item ID: 5098, Action ID: 4600
Position: 608, 469, 8
20:46 It is locked.
20:46 You see a closed door.
Item ID: 5099, Action ID: 4600
Position: 608, 469, 8
Well, a locked door is meant to be unlocked, and locked with the same key.

A quest door, requires a storage value to be opened (and teleports the player into the door), and automatically closes when a person exits that position.

They are both useful for different situations. xP
So i'm guessing you're receiving the key but are unable to open the door? Remove

<action actionid="4600" script="quests/keychest_pergamon_graveyard.lua" />

from actions.xml.
 
I can still open it, even without the key. :/ Thats why I prefer basic scripts for ppl who dunno my code at work.
With those you can get pretty fast into it and don't need to read yaself in too deep. :D
 
5150 isn't even a door (atleast in in my version), is this the door you're testing it on? Could you post a picture of the door?
 
5150 isn't even a door (atleast in in my version), is this the door you're testing it on? Could you post a picture of the door?
Sure. Here you are.
~Right, it's 5105.^^ Correct it in the main post. Still all the other doors don't work too.
 

Attachments

  • Bild_2021-08-01_220916.png
    Bild_2021-08-01_220916.png
    98.6 KB · Views: 5 · VirusTotal
  • Bild_2021-08-01_220937.png
    Bild_2021-08-01_220937.png
    196.4 KB · Views: 4 · VirusTotal
Sure. Here you are.
~Right, it's 5105.^^ Correct it in the main post. Still all the other doors don't work too.
You should be using the locked version of the door. (5098)

But even then, the key should still be working.

When you use the key on the closed door, does it not turn into the locked version?

Use key on 5099 -> turns into 5098 (closed door to locked door)
Use key on 5100 -> turns into 5098 (open door to locked door)

Use key on 5098 -> turns into 5100 (locked door to open door)
 
You should be using the locked version of the door. (5098)

But even then, the key should still be working.

When you use the key on the closed door, does it not turn into the locked version?

Use key on 5099 -> turns into 5098 (closed door to locked door)
Use key on 5100 -> turns into 5098 (open door to locked door)

Use key on 5098 -> turns into 5100 (locked door to open door)
Yes, 5099 turns into 5098 but not back again. ~Not even with the key.^^
5100 is a special itemkid.. It opens up after using the key on it BUT it's a wall or so.. I can't pass as you see on the screenshot.

Maybe i'll better just go with some kind of non buggy quest like "if you carry item xy, you can use a teleporter X.". ^^
 

Attachments

  • Bild_2021-08-01_234507.png
    Bild_2021-08-01_234507.png
    221.2 KB · Views: 6 · VirusTotal
Yes, 5099 turns into 5098 but not back again. ~Not even with the key.^^
5100 is a special itemkid.. It opens up after using the key on it BUT it's a wall or so.. I can't pass as you see on the screenshot.

Maybe i'll better just go with some kind of non buggy quest like "if you carry item xy, you can use a teleporter X.". ^^
Screenshot looks like a mapping issue. xD

It looks like you have a solid wall in behind your doors
 
Screenshot looks like a mapping issue. xD

It looks like you have a solid wall in behind your doors
Yeah, found that mistake too. ^^"
But shouldn't that also work with a "normal" door with a lock? In my opinion, that's exactly what they are for. Or am I really wrong here?
By that I mean the very left door-type on the screenshot from my last post.
 
Yeah, found that mistake too. ^^"
But shouldn't that also work with a "normal" door with a lock? In my opinion, that's exactly what they are for. Or am I really wrong here?
By that I mean the very left door-type on the screenshot from my last post.
No, that door would not work.
That is classified as a house door. (padlock)

Only doors that have a set of 3 are lockable. (closed, closed, open)
If you go into raw, it will always be the first door in the set of 3.

And yes I agree, the padlock doors at first glance look like the best 'lockable' type of door.
But blame cipsoft for only using them as house doors. xD

Set of 3 are lockable. (closed, closed, open)
Set of 2 are regular doors. (closed, open)

Padlock doors (house doors) are only for houses.
Quest doors (blinking door knob) are self-closing, and pull the character into the door when used.
Level Doors (Brown with yellow stripes) are self-closing, and pull the character into the door when used.
 
But I can't use an quest door for my key idea didn't I?
Cuz when I open the (locked version) once, everyone can open it till i lock it with the key again.. Thats dumb for a questdoor. xD

20:46 You see a closed door.
It is locked.
Item ID: 5098, Action ID: 4600
Position: 608, 469, 8
20:46 It is locked.
20:46 You see a closed door.
Item ID: 5099, Action ID: 4600
Position: 608, 469, 8
 
Last edited:
But I can't use an quest door for my key idea didn't I?
Cuz when I open the (locked version) once, everyone can open it till i lock it with the key again.. Thats dumb for a questdoor. xD

20:46 You see a closed door.
It is locked.
Item ID: 5098, Action ID: 4600
Position: 608, 469, 8
20:46 It is locked.
20:46 You see a closed door.
Item ID: 5099, Action ID: 4600
Position: 608, 469, 8
Well, a locked door is meant to be unlocked, and locked with the same key.

A quest door, requires a storage value to be opened (and teleports the player into the door), and automatically closes when a person exits that position.

They are both useful for different situations. xP
 
Solution
Its done.. And it was sooo easy. All I had to do is to use a Quest Door with the Action ID 50005.
No Key needed. Get event XY and be able to open Door XY. xD
 
Back
Top