• 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 [Request] Lever script

ond

Veteran OT User
Joined
Mar 24, 2008
Messages
2,775
Solutions
25
Reaction score
483
Location
Sweden
Hello, I'm requesting a script that changes a ground tile into another. But this script is supposed to change 4 tiles at the same time.

Here is a failure edition example by me:

Lua:
function onUse(cid, item, frompos, item2, topos)
demonhelmetuniqueid = 5010
peopleposition = {x=rockposition.x, y=rockposition.y, z=rockposition.z, stackpos=253}
people = getThingfromPos(peopleposition)
ground1 = {x=1020, y=1003, z=7, stackpos=0}
ground2 = {x=1020, y=1004, z=7, stackpos=0}
ground3 = {x=1020, y=1005, z=7, stackpos=0}
ground4 = {x=1020, y=1006, z=7, stackpos=0}
if people.itemid == 0 then
doTransformItem(item.uid,item.itemid+1)
doCreateItem(511,1,ground1)
doCreateItem(515,1,ground2)
doCreateItem(493,1,ground3)
doCreateItem(507,1,ground4)
doTransformItem(item.uid,item.itemid-1)
doCreateItem(1284,1,ground1)
doCreateItem(1284,1,ground2)
doCreateItem(1284,1,ground3)
doCreateItem(1284,1,ground4)
else
doPlayerSendCancel(cid,"Sorry, not possible.")
end
else
peopleposition.x = rockposition.x+1
doTeleportThing(people.uid,peopleposition)
doTransformItem(item.uid,item.itemid-1)
removeTeleport(teleportcreateposition)
end
return 1
end
 
Last edited:
Back
Top Bottom