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

Support with .lua Script!

ond

Veteran OT User
Joined
Mar 24, 2008
Messages
2,782
Solutions
25
Reaction score
491
Location
Sweden
LUA:
function onUse(cid, item, frompos, item2, topos)

ground1 = {x=32225, y=32276, z=8, stackpos=0}

if item.itemid == 1945 and item.uid == 1001 then
doTransformItem(item.uid,item.itemid+1)
doCreateItem(369,1,ground1)

elseif item.itemid == 1946 and item.uid == 1001 then
doTransformItem(item.uid,item.itemid-1)
doCreateItem(351,1,ground1)
else
doPlayerSendCancel(cid,"Sorry, not possible.")
end

return 1
end

369 = Traphole
351 = Dirtground

Problem: The dirtground falls down the existing traphole
Should be like: trapholes appears, but after pulling the lever a second time, the traphole should dissapear and id 351 come back again.
 
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	doTransformItem(getThingfromPos({x=32225, y=32276, z=8, stackpos=0}).uid, item.itemid == 1945 and 369 or 351)
	return doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945)
end
 
for "avesta":
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	doTransformItem(getThingfromPos({x=32225, y=32276, z=8, stackpos=0}).uid, item.itemid == 1945 and 369 or 351)
	return 1, doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945)
end
 
Back
Top