Code:
function onUse(cid, item, frompos, item2, topos)
local switchUniqueID = 13001
local switchID = 1945
local switch2ID = 1946
local bridge = {x=727, y=544, z=7, stackpos=0}
local bridgs = {x=727, y=545, z=7, stackpos=0}
local poxs = {x=728, y=541, z=7, stackpos=1}
local player1POS = {x = 725, y = 542, z = 7}
local sqmID = 13001
local wallchk = getThingfromPos(bridge)
local walle = getThingfromPos(bridgs)
if item.uid == switchUniqueID and item.itemid == switchID and wallchk.itemid == 448 and walle.itemid == 448 then
doRemoveItem(wallchk.uid,1)
doRemoveItem(walle.uid,1)
doTransformItem(item.uid, 1946)
elseif item.uid == switchUniqueID and item.itemid == switch2ID then
doCreateItem(448, bridge)
doCreateItem(448, bridgs)
doTransformItem(item.uid, 1945)
end
if item.uid == switchUniqueID and item.itemid == switchID and item.uid == sqmID and getCreaturePosition(cid) == player1POS then
doCreateItem(2486, poxs)
else
doPlayerSendCancel(cid,"You need to place the corpse of the slain Guard.")
end
return 1
end
I dont want you to fix it for me. I rather want you too tell me if im doing right, like almost there at the end or something.