Liikuid
Spin Machine!
Ok i have a script and the fuction is the next...
I put the object and i try to move the lever and dont work and says this "you need to place the 2121 (Ring)" already place in the correct position but don't work!
bad english xD sry...
function onUse(cid, item, frompos, item2, topos)
local switchUniqueID = 21005 -- uniqueID of switch
local switchID = 1945
local switch2ID = 1946
local itemID = 2121
local itempos = {x=480, y=169, z=7, stackpos=1}
local wallpos = {x=477, y=167, z=7, 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 == 1058 then
doSendMagicEffect(itempos,10)
doSendMagicEffect(wallchk,10)
doRemoveItem(getitem.uid,1)
doRemoveItem(wallchk.uid,1)
doTransformItem(item.uid,item.itemid+1)
addEvent(onTimer7, 1000)
elseif item.uid == switchUniqueID and item.itemid == switch2ID then
doTransformItem(item.uid,item.itemid-1)
else
doPlayerSendCancel(cid,"You need to place the ring.")
end
return true
end
function onTimer7()
wallnewpos = {x=477, y=167, z=7}
doCreateItem(1058,1,wallnewpos)
end
I put the object and i try to move the lever and dont work and says this "you need to place the 2121 (Ring)" already place in the correct position but don't work!
bad english xD sry...