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.
For now, this is how it is. If there are any errors, let me know, and we will fix them. ;)
```
HAVEN_DWLS = {}
hutt = 0
function burn()
for i, dw_type in {"PEASANT_HUT", "ARCHERS_HOUSE", "BARRACKS", "HEAVEN_MILITARY_POST"} do
for j, dw in GetObjectNamesByType(dw_type) do
HAVEN_DWLS[dw] = "откл"
SetObjectEnabled(dw, nil)
Trigger(4, dw, "BurnHavenDwelling")
end
end
startThread(burn2)
end
startThread(burn)
function burn2()
while 1 do
repeat
sleep()
until IsPlayerCurrent(1)
for dwelling, state in HAVEN_DWLS do
if state == "вкл" then
HAVEN_DWLS[dwelling] = "откл"
SetObjectEnabled(dwelling, nil)
Trigger(4, dwelling, "BurnHavenDwelling")
end
end
repeat
sleep()
until not IsPlayerCurrent(1)
for dwelling, state in HAVEN_DWLS do
if state == "откл" then
HAVEN_DWLS[dwelling] = "вкл"
SetObjectEnabled(dwelling, 1)
Trigger(4, dwelling, nil)
end
end
end
end
function BurnHavenDwelling(hero, hut)
if GetCurrentPlayer() == 1 then
QuestionBox ( "/Maps/SingleMissions/NewRandomMap 43/burn1.txt" , 'burnok("'..hut..'")' , 'burnno("'..hut..'")');
end
end
function burnok(hut)
Trigger(4, hut, nil)
hutt = hutt + 1
HAVEN_DWLS[hut] = nil
end
function burnno(hut)
SetObjectEnabled(hut, 1)
Trigger(4, hut, nil)
sleep(1)
MakeHeroInteractWithObject('Nymus' , hut)
sleep(1)
SetObjectEnabled(hut, nil)
Trigger(4, hut, "BurnHavenDwelling")
end