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

Help with a lever script.

Eraxley

New Member
Joined
Mar 2, 2009
Messages
24
Reaction score
0
Why isn't this working?

PHP:
function onUse(cid, item, frompos, item2, topos) 
local gatepos = {x=(item.x+2), y=(item.y+1), z=(item.z), stackpos=1} 
local corpsepos = {x=(item.x), y=(item.y+1), z=(item.z), stackpos=1} 
local newstone = 0
	local getgate = getThingfromPos(gatepos)  
	local getcorpse = getThingfromPos(corpsepos)
	if(item.actionid == 13000) then
		if(item.itemid == 1945 and getcorpse.itemid == 5527) then 
			doRemoveItem(getcorpse.uid, 1) 
			doRemoveItem(getgate.uid, 1) 
			doTransformItem(item.uid, 1946)
			newstone = addEvent(recreateStone, 1000*30, {pos = gatepos})
		elseif(item.itemid == 1946) then 
			doTransformItem(item.uid, 1945)
		end
	else 
		doPlayerSendCancel(cid,"Sorry, not possible.") 
	end
	return TRUE
end 
function recreateStone(param)
	doCreateItem(1285, 1, param.pos)
	newstone = 0
end

What i want this to do is to:

o,x,z,t,z,o
o,c,z,d,z,o

x= lever
t= teleport
d= stone that will be removed
c= position of corpse

The one who helps me will have som REP++ waiting for 'em.

(I'm using TFS 0.3.5)
 
Back
Top