Lbtg
Advanced OT User
- Joined
- Nov 22, 2008
- Messages
- 2,398
- Reaction score
- 165
PHP:
function onUse(cid, item, frompos, item2, topos)
wall1 = {x=994, y=983, z=7, stackpos=1}
wall2 = {x=995, y=983, z=7, stackpos=1}
wall3 = {x=996, y=983, z=7, stackpos=1}
wall4 = {x=997, y=983, z=7, stackpos=1}
getwall1 = getThingfromPos(wall1)
getwall2 = getThingfromPos(wall2)
getwall3 = getThingfromPos(wall3)
getwall4 = getThingfromPos(wall4)
if item.uid == 5015 and item.itemid == 1945 then
doRemoveItem(getwall1.uid,1)
doRemoveItem(getwall2.uid,1)
doRemoveItem(getwall3.uid,1)
doRemoveItem(getwall4.uid,1)
doTransformItem(item.uid,item.itemid+1)
elseif item.uid == 5015 and item.itemid == 1946 then
doCreateItem(7823,1,wall1)
doCreateItem(7823,1,wall2)
doCreateItem(7823,1,wall3)
doCreateItem(7823,1,wall4)
doTransformItem(item.uid,item.itemid-1)
else
doPlayerSendCancel(cid,"Sorry, not possible.")
end
return 1
end
this script removes only 2 statyes not 4. whats the problem ?