matttu Posted October 23, 2013 Share Posted October 23, 2013 (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 October 24, 2013 by Guest Link to comment
J.S. Posted October 24, 2013 Share Posted October 24, 2013 You have no function in setTimer() in the second code Correct syntax is setTimer( [function], [time in ms], [number of executions] ) Link to comment
matttu Posted October 24, 2013 Author Share Posted October 24, 2013 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 Link to comment
J.S. Posted October 24, 2013 Share Posted October 24, 2013 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. Link to comment
matttu Posted October 24, 2013 Author Share Posted October 24, 2013 (edited) setTimer(refreshItemLootasd, 1800000, 1) setTimer(refreshItemLoots, 60000, 1) Edited October 24, 2013 by Guest Link to comment
J.S. Posted October 24, 2013 Share Posted October 24, 2013 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) Link to comment
matttu Posted October 24, 2013 Author Share Posted October 24, 2013 refresh Item Lootasd Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now