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 don't quite understand this part:
```
for i=0,6 do
local type, num = GetObjectArmySlotCreature("ritual", i)
if (type >= 30 and type <= 42 and mod(type, 2) == 0) or (type >= 152 and type <= 158) then
startThread(NecroRitual)
SetObjectOwner("ritual", PLAYER_2)
end
end.
```
And then in the ritual function:
```
for i=0,6 do
local type, num = GetObjectArmySlotCreature("ritual", i)
if GetObjectArmySlotCreature("ritual", i) == 30 then
RemoveObjectCreatures('ritual', type, num, i) ...
```
Why are you setting the hero as the owner for each slot? It seems like this could be done outside the loop. And why are you starting a new thread for each slot? I haven't run the script, but it looks like you're starting 2 threads for two slots that run in parallel, and when the processing of the second cycle in the ritual function goes through all the slots again, the first slot hasn't been cleared yet (by the first thread). It seems that if you remove the loop in the function or remove the duplicate threads, everything should work.
Like this:
```
MakeHeroInteractWithObject(hero, "ritual")
sleep(10)
startThread(NecroRitual)
SetObjectOwner("ritual", PLAYER_2)
local x,y = GetObjectPosition(Hero) ...
```
Also, this is purely aesthetic, but since you're getting the hero's name from the function, why are you writing "Hafad" in other places?