• 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 Click On Item

Erikas Kontenis

Board Moderator
Staff member
Board Moderator
Joined
Jul 3, 2009
Messages
1,870
Reaction score
576
Location
Lithuania
Its A Easy Script But how i said i'm learning a lua.

Then u press on item A Will By A Effect Fire And will by deleted a wall after 5 min wall will stands in same position.

Lua:
 function onUse(cid, item, fromPosition, itemEx, toPosition)
        local gatePosition = {x=1090, y=807, z=7, stackpos=1}
        local getGate = getThingFromPos(gatePosition)
        if(item.uid == 50012) then
                if(item.itemid == 8268 and getGate.itemid == 1546) then
                        doSendMagicEffect(fromPosition, CONST_ME_FIREAREA)
						doRemoveItem(getGate.uid, 1)
                        addEvent(onTimer4, 5*60*1000)
                else
                        doPlayerSendCancel(cid, "Sorry not possible.")
                end
        end
        return 1
end

function onTimer4()

wallnewpos = {x=1090, y=807, z=7}              
                doCreateItem(1546,1,wallnewpos)
end


If u like it Please Rep++ Me :)
 
Last edited:
Learn this..

How to use addEvent?

You can use a TFS function in "addEVent", the difference is that the function will have a new parameter (time), before the first parameter of the TFS function

Example(for your script):

Lua:
addEvent(doCreateItem, 5 * 60 * 1000, 1546, 1, wallnewpos)
 
Learn this..

How to use addEvent?

You can use a TFS function in "addEVent", the difference is that the function will have a new parameter (time), before the first parameter of the TFS function

Example(for your script):

Lua:
addEvent(doCreateItem, 5 * 60 * 1000, 1546, 1, wallnewpos)

Big BIg Thanks Its Very Usefull For Me !
 
Back
Top