Connection ErrorBad RequestThis page went staleSession ExpiredSign in requiredForbiddenNot FoundToo Many RequestsServer ErrorBad GatewayService UnavailableGateway TimeoutHTTP Version Not Supported
Session Expired
Your session has expired. Please log in to continue.
Sign in required
You need an account to do that. Sign in or create one — it only takes a minute.
This page went stale
Your security token was rejected, usually because the page sat open too long or you signed in elsewhere. Nothing was saved. Reload the page and try again.
Request Failed
We encountered an issue while processing your request.
Please check your internet connection and try again.
Here are many examples using this trigger:
https://www.google.ru/search?q=NEW_DAY_TRIGGER+forum.heroesworld.ru&oq=NEW_DAY_TRIGGER+forum.heroesworld.ru&aqs=chrome..69i57.2887j0j4&sourceid=chrome&es_sm=93&ie=UTF-8#q=NEW_DAY_TRIGGER+forum.heroesworld.ru&newwindow=1&filter=0
Here's how to change resources:
SetPlayerResource(nPlayerID, nResID, nCount)
Sets the current amount of resource nResID to nCount for player nPlayerID. Based on this function, a higher-level primitive is implemented in the /scripts/advmap-startup.lua file – void SetPlayerStartResource(nPlayerID, nResID, nCount), which distributes starting resources to the player depending on the difficulty level.
And here's how to find out the current amount of resources:
GetPlayerResource(nPlayerID, nResID)
Returns the current amount of resource nResID for player nPlayerID. Resource IDs are defined in /scripts/advmap-startup.lua and are as follows:
WOOD = 0
ORE = 1
MERCURY = 2
CRYSTAL = 3
SULFUR = 4
GEM = 5
GOLD = 6
Example: Add 10000 gold to the first player:
SetPlayerResource(1, GOLD, GetPlayerResource(1, GOLD) + 10000).