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

Action Remove 2 walls with lever

Erikas Kontenis

Board Moderator
Staff member
Board Moderator
Joined
Jul 3, 2009
Messages
1,859
Reaction score
557
Location
Lithuania
Hello Its My First Hard Created Script I Hope I Helped For Somebody :p

Lua:
function onUse(cid, item, frompos, item2, topos)
	wall1 = {x=1496, y=1488, z=5, stackpos=1}
	wall2 = {x=1497, y=1488, z=5, stackpos=1}
	getwall1 = getThingfromPos(wall1)
	getwall2 = getThingfromPos(wall2)

	if item.uid == 7002 and item.itemid == 1945 then
		doRemoveItem(getwall1.uid,1)
		doRemoveItem(getwall2.uid,1)
		doTransformItem(item.uid,item.itemid+1)
	elseif item.uid == 7002 and item.itemid == 1946 then
		doCreateItem(1052,1,wall1)
		doCreateItem(1052,1,wall2)
		doTransformItem(item.uid,item.itemid-1)		
	else
		doPlayerSendCancel(cid,"Sorry, not possible.")
	end

	return 1
end

If i helped for u please rep ++ me :)

P.s. Im Just Learning Lua :)
 
remove from script.

doTransformItem(item.uid,item.itemid+1) -- not necessary
doTransformItem(item.uid,item.itemid-1) -- not necessary
return 1 -- remove
 
Back
Top