Curry McFlurry
New Member
- Joined
- Dec 16, 2007
- Messages
- 7
- Reaction score
- 0
Okay so I'm new to scripting and tried this lever script out. But it doesn't seem to work.
Can anyone tell me what I did wrong?
The lever works once but it won't change into the 1946. It stays at 1945.
Can anyone tell me what I did wrong?
The lever works once but it won't change into the 1946. It stays at 1945.
Code:
function onUse(cid, item, frompos, item2, topos)
statuepos1 = {x=1027, y=1098, z=7, stackpos=1}
statuepos2 = {x=1027, y=1097, z=7, stackpos=1}
statue1 = getThingfromPos(statuepos1)
statue2 = getThingfromPos(statuepos2)
if item.itemid == 1945 and item.uid == 6010 then
doRemoveItem(statue1.uid,2767)
doRemoveItem(statue2.uid,2768)
doTransformItem(item.uid,1946)
doPlayerSendTextMessage(cid,22,"What's with that strange noise?")
elseif(item.itemid == 1946 and item.uid == 6010) then
doCreateItem(statue1.uid,2767)
doCreateItem(statue2.uid,2768)
doTransformItem(item.uid,1945)
doPlayerSendTextMessage(cid,22,"There is that strange noise again!")
else
doPlayerSendTextMessage(cid,22,"Sorry, not possible.")
end
end
Code:
<action uniqueid="6010" event="script" value="other/remove.lua"/>