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

push lever, remove 2 stones

xexam

New Member
Joined
Aug 3, 2010
Messages
172
Reaction score
1
function onUse(cid, item, fromPosition, itemEx, toPosition)
local stone_id = 1355
local pos = {x = 776, y = 831, z = 8}
local stone = getTileItemById(pos, stone_id)
if stone.uid > 0 then
doRemoveItem(stone.uid)
doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945)
addEvent(function() doCreateItem(stone_id, 1, pos) end, 240*1000)
doCreatureSay(cid, "You have removed the stone.", TALKTYPE_ORANGE_1)
return true
else
return doPlayerSendCancel(cid,"The stone is already removed.")
end
end

when i push lever 1(one) stone disappear. how to make 2(two) stones disappear at the same time?
 
Lua:
local t, f = {
	{x=776, y=831, z=8},
	{x=777, y=831, z=8}
}, function(p)
	for i = 1, #t do
		doCreateItem(1355, 1, t[i])
	end
	doTransformItem(getTileItemById(p, 1946).uid, 1945)
end


function onUse(cid, item, fromPosition, itemEx, toPosition)
	if item.itemid == 1945 then
		for i = 1, #t do
			doRemoveItem(getTileItemById(t[i], 1355).uid)
		end
		doTransformItem(item.uid, 1946)
		doCreatureSay(cid, 'You have removed the stone.', TALKTYPE_ORANGE_1)
		addEvent(f, 4 * 60 * 1000, fromPosition)
	else
		doPlayerSendCancel(cid, 'The stone is already removed.')
	end
	return true
end
 
and may remove 5 walls and make them appear in other Cities?
and return to old pos again after 5 minutes

No,... it should remove the whole city and then create 5 walls in the lost city and after 5 minutes the server should get bugged in a professional way ! o_O
 
Back
Top