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

Lua Transform Revscriptsys

adrenyslopez

Member
Joined
Dec 22, 2015
Messages
173
Reaction score
13
Does anyone know how to pass it to revscriptsys but let it be with actionid?

i used otbr tfs 1.3

Code:
    <movevent event="StepIn" itemid="407" script="stamina_tile.lua" />
    <movevent event="StepOut" itemid="407" script="stamina_tile.lua" />

Lua:
eventsId = {}

local function rechargeStamina(cid)
    local player = Player(cid)

    if not player then
        eventsId[cid] = nil
        return
    end

    player:setStamina(player:getStamina() + 1)

    eventsId[cid] = addEvent(rechargeStamina, 60 * 1000, cid)
end

function onStepIn(creature, item, position, fromPosition)
    if creature:isPlayer() then
        local cid = creature:getId()
        eventsId[cid] = addEvent(rechargeStamina, 60 * 1000, cid)
    end

    return true
end

function onStepOut(creature, item, pos, fromPosition)
    if creature:isPlayer() then
        local cid = creature:getId()
        stopEvent(eventsId[cid])
        eventsId[cid] = nil
    end

    return true
end
 
Top