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.
So, I need a complex script; I tried to do it myself, but it didn't work. The script should do the following: if a Necropolis castle is captured, you can stand on a tile next to the castle, and a choice will appear: destroy the castle for 30 wood, 30 ore, 10 of each rare resource, and 10,000 gold. If you click "no," nothing happens. If you click "yes," the resources are deducted, the Necropolis castle disappears with a "Holy Word" animation, and a ruined Human castle appears. Next, if you stand on the same tile again, the same choice is offered: build a Human castle for 50 wood and ore and 15 of each rare resource and 20,000 gold. If you click "yes," the ruined castle disappears with the same "Holy Word" animation, and a regular level 1 castle appears. If you don't have enough resources, the action fails, and the ruined castle remains. How can this be implemented?
Added 1 minute ago
I'll mark the tile with a region and put a circle on it so it's visible.