And this actually worked, I put escapeOffsetY=60;cooco wrote: ↑Mon Jan 01, 2018 4:49 pmChange this function with this new. Set escapeOffsetY (100 should be good)
NOT TESTED, try it
Code: Select all
function EscapeAggro() --Write("EscapeAggro"); local escapeOffsetY=0; if goToStartRoom then local tempTimer = Time(); local elapsedTime = tempTimer - offsetTimer; if elapsedTime > updatePositionTime then local d = moveSpeed * updatePositionTime / 1000; local ourCurrentPos = Player:GetPosition(); local newY = ourCurrentPos.Y - d; if newY < 190 + escapeOffsetY then Player:SetPosition(centerRoomX, 190 + escapeOffsetY, airZ); weAreAtStartRoomPos = true; goToStartRoom = false; return true; else Player:SetPosition(centerRoomX, newY, airZ); end offsetTimer = tempTimer; end else if MoveToBarricade(10 + escapeOffsetY) then weAreAtStartRoomPos = false; goToStartRoom = true; return true; end end return false; end
Now the only thing to do is to set the offset back to 0 when the boss has like less than 70% HP, this way all npcs will hit the boss and canons but we are secure the boss will never lose our agro and attack the barricade.
This should be easy to simply check Entity:GetHealt() and if it is lower than a percentage that we will put, the escapeOffsetY should be changed to 0
All my chars got an S-rank, even those unlucky to get the many mobs (you are hearing a lot of footsteps). It just took them more time to finish because of the fact the npcs didn't hit the boss all the time.
~~~~~~~~~
Something like this would work (I will have to test it)
Code: Select all
if ( Entity:GetHealth() < 70 and escapeOffsetY > 0 ) then
Write("Changing offset");
local escapeOffsetY=0;
end
- [string "Luna Daily AFK edited offset.lua"]:701: attempt to index global 'Entity' (a nil value)
So the Entity:GetHealth() < 70 doesn't work in here