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

Key door

Hmpfot

New Member
Joined
Apr 19, 2009
Messages
72
Reaction score
0
Hello there mates,

I got a hunting place located behind a door, the thing is that i want that door to be opened with a KEY, or well not opened but i want it like this:

When u use the correct key (key 101) on the door you should be teleported behiond the door, so u cant open the door too lower players and you need the KEY to open it, and now i wonder, how i make this possible? would be very grateful if you could help me and i need a GUIDE so detailed as possible since im very new with this, i need to kno if i need to put anythin in Movements xml, and when i need to put this code, Please help me make this script and make a 1by1 guide so i know exactly what to do so it will succed:)


Thx alot

Yours hmpf~
 
Test this!

Code:
local door = 1209
local key = 1001

function onUse(cid, item, frompos, item2, topos)
if getPlayerItemCount(cid,key, 1) and isItemDoor(cid,door) then
doTeleportThing(cid, {x = 1000, y = 1000, z = 7})
doPlayerSendTextMessage(cid,18, "OMG, more to explore yeye")
else
doPlayerSendCancel(cid, "Sorry but that isn't the right key")
end
return true
end
 

Similar threads

Back
Top Bottom