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.
look, firstly, in the xdb file of the script, you didn't specify the path to the lua file. That is, even if the path was specified correctly, the script would not run. The problem with specifying an adequate path is quite tricky, because SetHeroCombatScript, unlike many other functions, requires an explicit indication of the initial slash, even if you use the GetMapDataPath() function. That is, the correct script will be like this:
path = '/'..GetMapDataPath()
main_hero = 'Raelag'
print("The main character is named");
SetHeroCombatScript('Raelag', path.."CombatScript.xdb#xpointer(/Script)");
print("combat script started");
and in addition, there are typos in the names of functions in the combat script, and the targets for casts are not specified in the UnitCastAimedSpell function. Here is your map with fixed paths, but in order for Raelag to cast spells correctly, you need to define who these spells should be cast on.