Auto-translated
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).