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

Katana room = door - lever

breadmaker

New Member
Joined
Jul 16, 2010
Messages
160
Reaction score
3
Hello.
Anyone can make for me script like RL Katana Room quest ?
If i pull the lever, the door opens and i can move in, if i put second time lever, the door closed.
And if they closed and im trying to open it manually ("USE" door) the message on green color appear: "Some mechanism block it."

Thanks alot!
Rep++
 
LUA:
local doorPos = {x=32177, y=32148, z=11}

function onUse(cid, item, fromPosition, itemEx, toPosition)
	if item.itemid == 1945 then
		local v = getTileItemById(doorPos, 5109)
		if v.itemid == 5109 then
			doRelocate(doorPos, {x=doorPos.x+1, y=doorPos.y, z=doorPos.z})
			doTransformItem(v.uid, 5107)
		end
	else
		local v = getTileItemByType(doorPos, ITEM_TYPE_DOOR)
		if v.itemid == 5107 or v.itemid == 5108 then
			doTransformItem(v.uid, 5109)
		end
	end
	return doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945)
end
 
Back
Top