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

Parchment Room

Arkangel Nyx

Member
Joined
Feb 23, 2012
Messages
176
Reaction score
6
Location
U.S.A.
I have been working on this quest, i have figured out the whole move the scroll and 4 demons appear thing. However, i was wonddering how getting the key works? I guess you have to click on the coffin? If so can someone tell me how to make it so when you click the coffin you recieve a key? Thanks

REP++
 
put action id on door
and for key:

LUA:
local config = {
    storage = 16025, -- change to your own storage value :)
    item = 2088 -- THIS IS THE ITEM ID (KEY)
}
 
function onUse(cid, item, frompos, item2, topos)
	if getPlayerStorageValue(cid, config.storage) == 1 then
		doPlayerSendTextMessage(cid, 25, "The coffin is empty.")
		return true
	end
 
	setPlayerStorageValue(cid, config.storage, 1)
	doPlayerSendTextMessage(cid, 25, "You have found a key.")
	doItemSetAttribute(doPlayerAddItem(cid, config.item, 1), 'aid', 3701)
	return true
end
 
Set the action id of the key as the action id of the door you would like it to open. Example: (Key: 1001) would open a door with an actionid of 1001.
 
Ah ty, i will try this out. I have one question though, where does the action id come into play? Just with the key and the door? It has nothing to do with the coffin? If so..is the storage value in this script representing the coffin?
 
I guess i got answer to my question as well
doItemSetAttribute(doPlayerAddItem(cid, config.item, 1), 'aid', 3701)
 
Back
Top