• 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 Lever remove corpse not working

GoykJarman

New Member
Joined
Oct 4, 2010
Messages
6
Reaction score
0
Can anyone tell me why this script isnt working. There are no errors but in game I get.."You need to place the corpse of Efreet on the counter!!.")
Im not sure why though. I changed the OnTimer to 6 but I thought that would fix my other problem. I thought that if i had 1-3 scripts like this with the same OnTimer number they wont work, before the walls wouldnt reset or even move. All postions are right and item IDS are right. Not tagged sorry didnt know how too.

function onUse(cid, item, frompos, item2, topos)

local switchUniqueID = 12615 -- uniqueID of switch
local switchID = 1945
local switch2ID = 1946
local itemID = 3037
local itempos = {x=183, y=748, z=7, stackpos=1}
local wallpos = {x=192, y=739, z=6, stackpos=1}

local playername = getPlayerName(cid)
local getitem = getThingfromPos(itempos)
local wallchk = getThingfromPos(wallpos)

if item.uid == switchUniqueID and item.itemid == switchID and getitem.itemid == itemID and wallchk.itemid == 1137 then
doSendMagicEffect(itempos,10)
doSendMagicEffect(wallchk,10)
doRemoveItem(getitem.uid,1)
doRemoveItem(wallchk.uid,1)
doTransformItem(item.uid,item.itemid+1)
addEvent(onTimer6, 2*60*1000)
elseif item.uid == switchUniqueID and item.itemid == switch2ID then
doTransformItem(item.uid,item.itemid-1)
else
doPlayerSendCancel(cid,"You need to place the corpse of Efreet on the counter!!.")
end
return 1
end


function onTimer6()

wallnewpos = {x=192, y=739, z=6}
doCreateItem(1137,1,wallnewpos)
end
 
Back
Top