I'm using TFS 1.2 and RME 3.5.
I have my quest to the point where you right click on a tree, the tree gives you key 1501, you use the key on 1501 and it unlocks the door, but when you use the key on the open door it says, "The key does not match." However, when I right click the door it closes and re-locks itself.
I have the closed door set to 1501 - Imgur
I have the open door set to 1501 - Imgur
The code I used on the tree -
Inside actions.xml -
I appreciate your time and effort in helping me!
I have my quest to the point where you right click on a tree, the tree gives you key 1501, you use the key on 1501 and it unlocks the door, but when you use the key on the open door it says, "The key does not match." However, when I right click the door it closes and re-locks itself.
I have the closed door set to 1501 - Imgur
I have the open door set to 1501 - Imgur
The code I used on the tree -
Code:
function onUse(player, item, fromPosition, target, toPosition, isHotkey) --This is mostly used to state the script executes onUse (right-clicking an object)
if player:getStorageValue(storage) == -1 then --Here we just check if the Player has the storage value we mentioned before, -1 means that the player DOESN'T have the value
player:addItem(2087, 1):setActionId(1501)
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found a key hidden inside of the tree!") --This is just a message so the player knows something happened.
player:setStorageValue(storage, 1) --We set the storage value to 1
else --What happens if the value is already assigned to that player (He already received the reward)
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Aside from some squirming larvae, there's nothing of interest here.") --Only shows this message
end
return true
end
Inside actions.xml -
Code:
<action actionid="1500" script="quests/door1500.lua" />
I appreciate your time and effort in helping me!