Jump to content

timer


matttu

Recommended Posts

Posted (edited)

Hey!

Im trying to show people that server gets refreshed in 30 minutes but when i change some stuff it bugs loot system

this is the right one.

function refreshItemLootPoints () 
    local time = getRealTime() 
    local hour = time.hour 
    outputChatBox("#ff2200ATTENTION #ffffff - Item refresh in 1 minute! #FF0000 BEWARE OF MASSIVE LAG!",getRootElement(),255,255,255,true) 
    setTimer(refreshItemLoots,60000,1) 
end 
setTimer(refreshItemLootPoints,gameplayVariables["itemrespawntimer"] ,1) 

This is what i've done... if maybe someone can help? =)

function refreshItemLootasd () 
    local time = getRealTime() 
    local hour = time.hour 
    outputChatBox("#ff2200ATTENTION #ffffff- Item refresh in 30 minute!",getRootElement(),255,255,255,true) 
    setTimer(1800000,1) 
end 

Edited by Guest

Because limits like fears, are often just an illusions!

Posted

So it should look like this?

function refreshItemLootasd () 
    local time = getRealTime() 
    local hour = time.hour 
    outputChatBox("#ff2200ATTENTION #ffffff- Item refresh in 30 minute!",getRootElement(),255,255,255,true) 
    setTimer(refreshItemLoots, 1800000, 1) 
end 

Because limits like fears, are often just an illusions!

Posted

Indeed, go ahead and try it out and let me know if it works

EDIT: You are using a different function inside setTimer than the one that displays the message, right? Otherwise it will just continue displaying the message every 30 minutes.

Kinetic Roleplay

Forums || Mantis || YouTube

Posted (edited)

setTimer(refreshItemLootasd, 1800000, 1)

setTimer(refreshItemLoots, 60000, 1)

Edited by Guest

Because limits like fears, are often just an illusions!

Posted

The forum is censoring the function names

I just want to know if the function name in this line:

function :~ () 

is different from the function name in this line:

setTimer(:~, 1800000, 1) 

Kinetic Roleplay

Forums || Mantis || YouTube

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...