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

Lua Hello search a lever script When i use lever the stone disappear

Byllan

Member
Joined
Dec 29, 2009
Messages
1,079
Reaction score
12
Location
SWEDEN
Like title says

When i click on the lever i want the stone disappear then you click on lever again the stone come back

//Byllan
 
LUA:
local stonePos = {x=100, y=100, z=7, stackpos=1}
local getThing = getThingFromPos(stonePos)
local stoneId = xxxx -- put your stone id here

function onUse(cid, item, fromPosition, itemEx, toPosition)
	if item.itemid == 1945 and getThing.itemid == stoneId then
		doRemoveItem(getThing.uid, 1)
		doTransformItem(item.uid, item.itemid+1)
	elseif item.itemid == 1946 and getThing.itemid ~= stoneId then
		doCreateItem(stoneId, 1, stonePos)
	else
		return FALSE
	end
	return TRUE
end
 
Back
Top