destroyer667
Member
- Joined
- Nov 21, 2007
- Messages
- 290
- Reaction score
- 6
How can i make this lever so that when you use it once you cant move it back and that it will reset on its own so ppl can redo the quest in 3 minutes? for some reason its not working for me
Thanks to Cykotitan this is a 100% working script for Avesta 7.6
LUA:
local m, n = {x=33382, y=31591, z=15, stackpos=1}, {x=33384, y=31593, z=15}
local f = function (p)
doCreateItem(1353, 1, n)
doTransformItem(getTileItemById(p, 1946).uid, 1945)
end
function onUse(cid, item, fromPosition, itemEx, toPosition)
if item.itemid == 1945 then
local a = getThingfromPos(m)
if a.itemid == 2916 then
doTransformItem(item.uid, 1946)
doRemoveItem(a.uid)
doRemoveItem(getTileItemById(n, 1353).uid)
doSendMagicEffect(m, CONST_ME_MAGIC_RED)
doSendMagicEffect(n, CONST_ME_MAGIC_RED)
addEvent(f, 3 * 60000, fromPosition)
else
doPlayerSendCancel(cid, 'You must figure out what you need to place on the tile!')
end
else
doPlayerSendCancel(cid, 'You must wait for the lever to reset.')
end
return 1
end
Thanks to Cykotitan this is a 100% working script for Avesta 7.6
Last edited: