Auto-translated
Regarding your script, it updates the task when there are exactly 8 artifacts.
Added 5 minutes later
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
__________________________________
nginx/0.8.54