• 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!

Tile only with a storage! [TFS 1.0]

droox

New Member
Joined
Jun 26, 2013
Messages
47
Reaction score
0
Would I like a script to put on a Tile or a Teleport, where a player can only pass had "X" storage. A quest for example.
 
register on movements.xml

<movevent event="StepIn" itemid="xxxx" script="xxxxxxxx.lua"/> <!-- poison -->
<movevent event="StepOut" uniqueid="xxxx" script="xxxxxxxx.lua"/> <!-- CC Item with action ID's! -->

functions
function onStepIn(cid, item, position, fromPosition)
function onStepOut(cid, item, position, fromPosition)

In your Case:
Code:
function onStepIn(cid, item, position, fromPosition)
local player = Player(cid)
    if player then
        if player:getStorageValue(ME_WANTS_STORAGE_VALUE) ~= -1 then
            return true
        end
        player:teleportTo(fromPosition, true)
    end
return true
end
 
Back
Top