• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

Action Remove stone

pioncz

New Member
Joined
Dec 3, 2008
Messages
149
Reaction score
1
Hi,
I want to make script what will make and remove strone.
Its him :
Code:
function onUse(cid, item, frompos, item2, topos)

local lever = 1945 -- The itemid of your lever (default state)
local objectid = 1355 -- The itemid of the object that you will be added/removed
local objectpos = {x=369, y=328, z=9, stackpos=1} -- Position of the object that will be added/removed



object = getThingfromPos(objectpos)

if (item.itemid == lever) then
doRemoveItem(object, 1)
doTransformItem(item.uid, lever+1)
else
doCreateItem(objectid, 1, objectpos)
doTransformItem(item.uid, lever)
end

end
But it dont work.
Its something bad in removeitem, but i dont know what ;<
 
This Script should work. Just change the positions and UID's etc..
Code:
function onUse(cid, item, frompos, item2, topos)
gatepos = {x=564, y=486, z=9, stackpos=1}
getgate = getThingfromPos(gatepos)

     if item.uid == 2556 and item.itemid == 1945 and getgate.itemid == 1304 then
        doRemoveItem(getgate.uid,1)
        doTransformItem(item.uid,item.itemid+1)
     elseif item.uid == 2556 and item.itemid == 1946 and getgate.itemid == 0 then
        doCreateItem(1304,1,gatepos)
        doTransformItem(item.uid,item.itemid-1)
    else
        doPlayerSendCancel(cid,"Sorry not possible.")
     end
  return 1
end
 
Why it shouldn't work ?? I have this Script in my TFS and its working perfectly..
(@Gansta.jr:Es ist vom POI Script :D )
 
Back
Top