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.
Regarding your script, it updates the task when there are exactly 8 artifacts.
Added 5 minutes later
function am()
local old = 8
while 1 do
local count = 0
for i=36,43 do
count = count + (HasArtefact("Muscip", i) or 0)
end
if count ~= old then
if old < 8 then
SetObjectiveState("obj", OBJECTIVE_ACTIVE);
end
if count == 8 then
SetObjectiveState("obj", OBJECTIVE_COMPLETED);
else
SetObjectiveProgress('obj', count);
end;
old = count
end;
sleep(5);
end;
end;
502 Bad Gateway __________________________________ nginx/0.8.54
So, it turns out that the task will only update if the number of artifacts is equal to 8, but in the place where I actually need it, i.e., with a smaller value, it won't.
502 Bad Gateway __________________________________ nginx/0.8.54
function am() local old = 8 while 1 do local count = 0 for i=36,43 do count = count + (HasArtefact("Muscip", i) or 0) end if count ~= old then if old == 8 then SetObjectiveState("obj", OBJECTIVE_ACTIVE); end if count == 8 then SetObjectiveState("obj", OBJECTIVE_COMPLETED); else SetObjectiveProgress('obj', count); end; old = count end; sleep(5); end; end;
function killallactive() SetObjectiveVisible("killall", true); startThread (am); end;
function winF() Win(); end;
function obj() local old = 0 while 1 do local count = 0 for i=36,43 do count = count + (HasArtefact("Muscip", i) or 0) end if count == 8 then print("Player 1 has all artifacts"); SetObjectiveState("obj", OBJECTIVE_COMPLETED); QuestionBox(GetMapDataPath().."complete-game.txt", "killallactive", "winF"); break end if count ~= old then print("Player 1 has "..count.."/8 artifacts"); SetObjectiveProgress("obj", count); old = count end sleep(5); end; end;
startThread (obj);
502 Bad Gateway __________________________________ nginx/0.8.54