Exmortis
Member
- Joined
- Jun 27, 2008
- Messages
- 189
- Reaction score
- 5
I've been searching the forums for a good post about the demonhelmet scripts.
I found one that isn't working, it only says that docreateteleport is a nil value.
If someone could make me a simple script like this: you pull a lever, the pink stone disappears and then after 2 minutes, the stone goes back to the same place and the lever resets. maybe some flashing text that says, "you opened a passage."
I dont need any teleporter to be created since i already have one.
Rep+ for anyone who does this.
(im useing TFS 0.2.7)
This is the script so far, snagged a little from different scripts since im not a scripter at all.
I cant get this timer to work.
This is the error im getting:
attempt to index a nil value
stack traceback:
[C]: in function 'docreateitem'
data/actions/scripts/quests/demonhelmet2.lua:5: in function data/actions/scripts/quests/demonhelmet2.lua
I found one that isn't working, it only says that docreateteleport is a nil value.
If someone could make me a simple script like this: you pull a lever, the pink stone disappears and then after 2 minutes, the stone goes back to the same place and the lever resets. maybe some flashing text that says, "you opened a passage."
I dont need any teleporter to be created since i already have one.
Rep+ for anyone who does this.
(im useing TFS 0.2.7)
This is the script so far, snagged a little from different scripts since im not a scripter at all.
I cant get this timer to work.
Code:
local gatepos = {x=1327, y=1107, z=12, stackpos=1}
local leverPos = {x=1343, y=1106, z=12}
local function reset(leverPos)
doCreateItem(1355, 1, gatePos)
doTransformItem(getTileItemById(leverPos, 1946).uid, 1945)
end
function onUse(cid, item, frompos, item2, topos)
local getgate = getThingfromPos(gatepos)
if item.itemid == 1945 and getgate.itemid == 1355 then
doRemoveItem(getgate.uid, 1)
doTransformItem(item.uid, item.itemid+1)
addEvent(reset, 5000, fromPosition)
elseif item.itemid == 1946 and getgate.itemid == 0 then
doCreateItem(1355, 1, gatepos)
doTransformItem(item.uid, item.itemid-1)
else
doPlayerSendCancel(cid,"Sorry, not possible.")
end
return 1
end
This is the error im getting:
attempt to index a nil value
stack traceback:
[C]: in function 'docreateitem'
data/actions/scripts/quests/demonhelmet2.lua:5: in function data/actions/scripts/quests/demonhelmet2.lua
Last edited: