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

DHQ lever doesnt work properlly

rxrob

Member
Joined
Feb 11, 2009
Messages
217
Reaction score
9
Location
texas
it works the first time you use it, but it doesnt work after. therefor players are stuck in the room.

PHP:
local stone = {x=757, y=590, z=7}
local tpDest = {x=15042, y=764, z=7}
local tpCreate = {x=756, y=589, z=7}
 
local function f(p)
	doRemoveItem(getTileItemById(tpCreate, 1387).uid)
	doSendMagicEffect(tpCreate, CONST_ME_POFF)
	doCreateItem(1355, 1, stone)
	doTransformItem(getTileItemById(p, 1946).uid, 1945)
end
 
function onUse(cid, item, frompos, item2, topos)
	if item.itemid == 1945 then
		doTransformItem(item.uid, 1946)
		doRemoveItem(getTileItemById(stone, 1355).uid)
		doCreateTeleport(1387, tpDest, tpCreate)
		doSendMagicEffect(tpCreate, CONST_ME_TELEPORT)
		doCreatureSay(cid, 'The stone is removed, get the reward before the time runs out!', TALKTYPE_ORANGE_1)
		addEvent(f, 60000, fromPosition)
	else
		doPlayerSendCancel(cid, 'Sorry, not possible.')
	end
	return true
end
 
Back
Top Bottom