GHI_GetZoneClimate

Pilus edited this page Aug 11, 2015 · 1 revision
Clone this wiki locally

Syntax:

GHI_GetZoneClimate(zoneName)

Arguments:

GHI_GetZoneClimate has 1 optional argument.

zoneName
''String''
The name of the zone you are trying determine the level range for. If unspecified it will use the current zone.

Returns:

zoneData.climate
''String''
The climate type of the zone. Can be one of the following:
  • mountain
  • forest
  • plain
  • jungle
  • highland
  • swamp
  • cold_forest
  • indoor_city
  • wasteland
  • desert
climate.dayTemp
''Number''
Temperature during the day in this climate. Ranges from -25 to 40.
climate.nightTemp
''Number''
Temperature at night in this climate. Ranges from -25 to 40.
climate.indoor
''Number''
Temperature indoors in this climate. Ranges from -25 to 40.
climate.humidity
''String''
The humidity level of the climate. It can be Low, Medium, or High.
climate.precipitation
''String''
The type of precipitation that commonly occurs in the climate. Can be from the following list.
  • nil
  • snow
  • rain
  • sandstorm

Example:

local zoneName = GetRealZoneText();

local zoneClimate, zoneDayTemp, zoneNightTemp, zoneIndoor, zoneHumid, zonePrecip = GHI_GetZoneClimate(zoneName);

local culrPrecip, stayIndoors

if zonePrecip == "" then

currPrecip = "Not weather patterns are forecast for today."

stayIndoors = "Enjoy the weather outside."

else

currPrecip = "There is a chance of "..zonePrecip.." today."

stayIndoors = "We recommend staying indoors. Where you should remain at a comfortable temperature of "..zoneIndoor

end

print("Welcome to "..zoneName..".",

"The temperatures range from "..zoneDayTemp.." in the day to "..zoneNightTemp.." at night.",

"The current humidity level is "..zoneHumid..".",

currPrecip,

stayIndoors)

This script forecasts the weather for the zone you are currently in.