Python
- def getModule():
- EnvironmentData = {
- # Explanation:
- # 16 - (16:00:00 - 16:59:59)
- # "d:/ymir work/environment/capedragonhead.msenv" - Environment what will be set on this time.
- # You can add how many environments you want.
- 4: "d:/ymir work/environment/metin2_map_n_flame_dragon_01.msenv",
- 8: "d:/ymir work/environment/mtthunder.msenv",
- 12: "d:/ymir work/environment/bayblacksand.msenv",
- 16: "d:/ymir work/environment/capedragonhead.msenv",
- 20: "d:/ymir work/environment/snowm02.msenv",
- 22: "d:/ymir work/environment/trent02.msenv"
- }
- return EnvironmentData # Returns the dict with all items
- def getHour():
- return ((app.GetGlobalTimeStamp() / 60) / 60 % 24) # Returns the hour from server timestamp (loaded by TPacketGCTime)
- def Main():
- for key, c_pszName in getModule().iteritems():
- if getHour() is key and app.IsExistFile(c_pszName): # Checks if current hour is equal with index from dict EnvironmentData and it checks if environment exists (file .msenv) in pack.
- background.RegisterEnvironmentData(0, c_pszName) # Set the environment
- background.SetEnvironmentData(0)
Informations: