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

~ request~

Rury

Member
Joined
Nov 25, 2012
Messages
74
Reaction score
7
Hello, otland

I need one thing more in this script.

It's possible when you open the door(need key) and stop by her close automatically? Like exp door.

:p

Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
		local chance = math.random (1,100)
		if item.itemid == 2088 and itemEx.itemid == 1213 then
			if itemEx.actionid == 1213 then
				if chance <= 99 then
					doTransformItem (itemEx.uid, 1214) ---Door Id
					doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "The door has been unlocked !")
					else
					doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You failed to pick the lock and broken your pick in the attempt.")
					doPlayerRemoveItem(cid, 2088, 1)
				end
			end
		end
		return true
	end
 
Back
Top