• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Requesting script ,HELP !

melegy

Devils
Joined
Dec 5, 2012
Messages
178
Reaction score
2
Location
Egypt
Hi, Otlander's
I'm looking for this script [ if you put Item id for example <2160> ,Rock above it Remove ,but Items do not remove so rock will still open untill item gonna alone <2160 >

HELP, HELP, HELP !! :)

THANKS !

- - - Updated - - -

Bumb !

- - - Updated - - -

Bumb !

- - - Updated - - -

Bumb !

- - - Updated - - -

Bumb !

- - - Updated - - -

BUMB !
 
I mean if you put gold coin on position x,y,z Rock position [x.y.z] remove and never back again unless i take my gold coin again.
I Hope you understand now :)

- - - Updated - - -

Bumb !
 
movements.xml
XML:
<movevent type="AddItem" tileitem="1" actionid="6000" event="script" value="script.lua"/>
<movevent type="RemoveItem" tileitem="1" actionid="6000" event="script" value="script.lua"/>

LUA:
local ROCK = 3325
local COIN = 2160
local ROCK_POS = {x = 1000, y = 1000, z = 7}


function onAddItem(moveItem, tileItem, position, cid)
    if (moveItem.itemid == COIN) and (getTileItemById(ROCK_POS, ROCK).uid > 0) then
        doRemoveItem(getTileItemById(ROCK_POS, ROCK).uid)
    end
end


function onRemoveItem(moveItem, tileItem, position, cid)
    if (getTileItemById(ROCK_POS, ROCK).uid < 1) and (getTileItemById(position, COIN).uid < 1) then
        doCreateItem(ROCK, 1, ROCK_POS)
    end
end
 
Last edited:
it needs tileitem tag to work
XML:
<movevent type="AddItem" tileitem="1" actionid="6000" event="script" value="script.lua"/>
<movevent type="RemoveItem" tileitem="1" actionid="6000" event="script" value="script.lua"/>
 
Last edited:
Omg cbrm take all my customers :D Heh xD

But nice to see you active scripter again :D
 
don't be lazy
LUA:
local ROCK = 4995
local COIN = 2160
local ROCK_POS = {x = 675, y = 1197, z = 9}
 
function onAddItem(moveItem, tileItem, position, cid)
    if (moveItem.itemid == COIN) and (getTileItemById(ROCK_POS, ROCK).uid > 0) then
        doRemoveItem(getTileItemById(ROCK_POS, ROCK).uid)
    end
end
 
function onRemoveItem(moveItem, tileItem, position, cid)
    if (getTileItemById(ROCK_POS, ROCK).uid < 1) and (getTileItemById(position, COIN).uid < 1) then
        doCreateItem(ROCK, 1, ROCK_POS)
    end
end
put the actionid in the map to the item where coin will be thrown to
 
Back
Top