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

RevScripts Help Script

adrenysny

Member
Joined
Feb 17, 2021
Messages
140
Reaction score
14
Hello, please help me add the remaining time to this script like in this photo
Lua:
local config = {
    [59885] = {position = Position(32458, 32507, 6)}
}

local dukeCastle = MoveEvent()

function dukeCastle.onStepIn(creature, item, position, fromPosition)
    local player = creature:getPlayer()
    if not player then
        return false
    end

    for index, value in pairs(config) do
        if item.actionid == index then
            if(item.actionid == 59885)then
                if(player:getStorageValue(Storage.GraveDanger.CobraBastion.DrumeTimer) > os.time())then
                    player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have faced this boss in the last 20 hours.")
                    player:teleportTo(fromPosition, true)
                    player:getPosition():sendMagicEffect(CONST_ME_POFF)
                    return false
                end
            end
            doSendMagicEffect(player:getPosition(), CONST_ME_POFF)
            player:teleportTo(value.position)   
        end
    end
end

dukeCastle:type("stepin")

for index, value in pairs(config) do
    dukeCastle:aid(index)
end

dukeCastle:register()
 

Attachments

Top