Thread: GS2 'cron jobs'
View Single Post
  #1  
Old 05-14-2009, 08:32 PM
LoneAngelIbesu LoneAngelIbesu is offline
master of infinite loops
LoneAngelIbesu's Avatar
Join Date: May 2007
Location: Toldeo, Ohio
Posts: 1,049
LoneAngelIbesu has a spectacular aura aboutLoneAngelIbesu has a spectacular aura about
Send a message via AIM to LoneAngelIbesu
Quote:
Originally Posted by Tigairius View Post
We're all saying that you should keep a database and only update the shops every time someone enters the level to prevent the use of a timeout/sleep. It's really the best way to go about it, if you wanted to restock all shops just add a DBNPC.restockall = true boolean and check it when a player enters a shop.
I've already finished the system. Auto-updating was a last-minute addition that I had accidentally overlooked. When a player enters a level with a shop in it, the serverr.restocktime check that Inverness suggested is used.
__________________
"We are all in the gutter, but some of us are looking at the stars."
— Oscar Wilde, Lady Windermere's Fan
Reply With Quote