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.
HEH, I mixed up this script; it needs to be looped so that it works constantly.
```html
garrisons={'G1', 'G2', 'G3', 'G4', 'G5', 'G6', 'G7', 'G8', 'G9'} for i, gar in garrisons do SetObjectEnabled(gar, nil) Trigger(4, gar, "capture_gar") end
function capture_gar(hero, gar) local a = {} a[1], a[3], a[5], a[7], a[9], a[11], a[13] = GetObjectCreaturesTypes(gar) for i = 1, 7 do if a[i*2-1] ~= 0 then a[i*2] = 2 * GetObjectCreatures(gar, a[i*2-1]) end end SetObjectEnabled(gar, 1) Trigger(4, gar, nil) MakeHeroInteractWithObject(hero, gar) local i = GetLastSavedCombatIndex() while i == GetLastSavedCombatIndex() do sleep(1) end if not IsHeroAlive(hero) then SetObjectEnabled(gar, nil) Trigger(4, gar, "capture_gar") return end for i = 1, 7 do if a[i*2] then AddObjectCreatures(gar, a[i*2-1], a[i*2]) end end DenyGarrisonCreaturesTakeAway(gar, 1) end