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.
I did it like this, but the hero still enters the Castle and commits suicide. And there's another problem there... When transforming into a Necropolis, the Halls of Shields somehow become inaccessible, even though the owner hires a caravan from there without any problems. The other buildings work as expected.
```
function CaptureStraker()
if (GetObjectOwner("PlayerTown") == PLAYER_4) then
ChangeHeroStat("Straker", 7, -GetHeroStat('Straker', 7))
Trigger(OBJECT_CAPTURE_TRIGGER, "PlayerTown", nil)
TransformTown("PlayerTown", TOWN_NECROMANCY)
sleep(2)
SetAIPlayerAttractor("PlayerTown", 4, 1)
SetAIPlayerAttractor("DwarfTown", 4, 2)
sleep(2)
ReplaceDwelling("d", TOWN_NECROMANCY)
SetObjectOwner("d", 4)
ReplaceDwelling("dd", TOWN_NECROMANCY)
SetObjectOwner("dd", 4)
ReplaceDwelling("ddd", TOWN_NECROMANCY)
SetObjectOwner("ddd", 4)
ReplaceDwelling("dddd", TOWN_NECROMANCY)
SetObjectOwner("dddd", 4)
AddObjectCreatures("PlayerTown", CREATURE_LICH, 20)
AddObjectCreatures("PlayerTown", CREATURE_BONE_DRAGON, 10)
ChangeHeroStat("Straker", 0, 25000)
end
end