Grehy
Killroy
I have a script I found on here, but the post was kind of old, so I'm guessing it needs fixed or I need a new one. I get no console errors, the script just doesn't do anything.
I'll rep, thanks!
Code:
function createWall()
local wallPos = {x=1001, y=406, z=8, stackpos=1} -- Position of the wall
doCreateItem(1304, 1, wallPos) -- Replace 1112 to the ID of your wall
end
function onUse(cid, item, frompos, item2, topos)
local config = {
removeMessage = "Think it worked?", -- Message when you remove the wall
createMessage = "Think it worked?", -- Message when you create the wall
wallPos = {x=1001, y=406, z=8, stackpos=1}, -- Position of the wall
switchUID = 2300, -- Unique ID of the switch
timer = 1*60*1000 -- After how long time the wall should be created again after using the switch
}
local getWall = getThingFromPos(config.wallPos)
if item.uid == switchUID then
doRemoveItem(getWall.uid, 1)
doPlayerSendTextMessage(cid, 19, config.removeMessage)
doTransformItem(item.uid, item.itemid+1)
addEvent(createWall, config.timer)
end
end
I'll rep, thanks!