- Joined
- Aug 5, 2008
- Messages
- 1,581
- Reaction score
- 81
Code:
-- remade script by frankfarmer
-- creator wellis
-- tested 0.3.6+
-- made for bright sword quest
function onUse(cid, item, frompos, item2, topos)
-- start of configuration
local t = {
switchUniqueID = 64164, -- uniqueID of switch
switchID = 1945, -- id of the switch
switch2ID = 1946, -- id of switch after pulled
interval = 2, -- how many minutes until the wall creates
itemID = 2166, -- item that you need
itempos = {x=32594, y=32214, z=9, stackpos=1}, -- position where you put the item
wallpos = {x=32604, y=32216, z=9, stackpos=1}, -- where the wall is located
wallnewID = 1103, -- id of the wall that will return after interval
msg = "There is something missing", -- message players see when pulling lever and it don't work
-- don't touch anything here!
getitem = getThingfromPos(itempos),
wallchk = getThingfromPos(wallpos)
}
if item.uid == t.switchUniqueID and t.item.itemid == switchID and t.getitem.itemid == itemID and t.wallchk.itemid == 1025 then
doSendMagicEffect(t.itempos,10)
doSendMagicEffect(t.wallchk,10)
doRemoveItem(t.getitem.uid,1)
doRemoveItem(t.wallchk.uid,1)
doTransformItem(t.item.uid,t.item.itemid+1)
addEvent(onTimer5, t.interval*60*1000)
elseif item.uid == t.switchUniqueID and t.item.itemid == t.switch2ID then
doTransformItem(item.uid,t.item.itemid-1)
else
doPlayerSendCancel(cid, t.msg, TALKTYPE_ORANGE_1)
end
return 1
end
function onTimer5()
wallnewpos = {t.wallpos}
doCreateItem(t.wallnewid,1,t.wallpos)
end
Im getting the error
Anyone have a solution? Thanks