Luna Hell Pass/Contaminated Underpath - Beta 28.10.2017

Build a Hell Pass script?

NO!!!
0
No votes
Yes
16
43%
Yes. (How to write script video tutorial)
21
57%
 
Total votes: 37

User avatar
Diavolakos
Posts: 114
Joined: Thu Apr 20, 2017 5:05 am
Has thanked: 31 times
Been thanked: 13 times

Re: Luna Hell Pass/Contaminated Underpath - Beta 28.10.2017

Post by Diavolakos » Tue Jan 02, 2018 9:40 pm

cooco wrote:
Mon Jan 01, 2018 4:49 pm
Change 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
And this actually worked, I put escapeOffsetY=60;

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
EDIT: it didn't work it says this:
- [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
I play on NA Server Siel

cooco
VIP
Posts: 218
Joined: Fri Feb 17, 2017 2:01 am
Has thanked: 58 times
Been thanked: 85 times

Re: Luna Hell Pass/Contaminated Underpath - Beta 28.10.2017

Post by cooco » Wed Jan 03, 2018 3:55 pm

Add this code at start and set your custom value

Code: Select all

escapeOffsetY=0;
then change this code

Code: Select all

-- if boss focus us
			if finalBossEntity:GetTargetID() == playerID then
				-- One shot entity
				if CheckAvailable(HellWaveID) and HellWaveTimer < Time() then
					PlayerInput:Ability(HellWaveID);
					HellWaveTimer = HellWaveTimer + 5000;
					--return false;
				end
				-- Skill
				if CheckAvailable(HellStrikeID) then
					PlayerInput:Ability(HellStrikeID);
					--return false;
				end

				if CheckAvailable(MercilessRuptureID) then
					PlayerInput:Ability(MercilessRuptureID);
					--return false;
				end

				--Write("Dist aggro "..Player:GetPosition():DistanceToPosition(finalBossEntity:GetPosition()));
				if Player:GetPosition():DistanceToPosition(finalBossEntity:GetPosition()) <= 8 then
					EscapeAggro();
				end
				weNeedReturnBack = true;
				return false;
			end
			

With

Code: Select all

-- if boss focus us
			if finalBossEntity:GetTargetID() == playerID then
				if ( finalBossEntity:GetHealth() < 70 and escapeOffsetY > 0 ) then
					Write("Changing offset");
					escapeOffsetY=0;
				end
				-- One shot entity
				if CheckAvailable(HellWaveID) and HellWaveTimer < Time() then
					PlayerInput:Ability(HellWaveID);
					HellWaveTimer = HellWaveTimer + 5000;
					--return false;
				end
				-- Skill
				if CheckAvailable(HellStrikeID) then
					PlayerInput:Ability(HellStrikeID);
					--return false;
				end

				if CheckAvailable(MercilessRuptureID) then
					PlayerInput:Ability(MercilessRuptureID);
					--return false;
				end

				--Write("Dist aggro "..Player:GetPosition():DistanceToPosition(finalBossEntity:GetPosition()));
				if Player:GetPosition():DistanceToPosition(finalBossEntity:GetPosition()) <= 8 then
					EscapeAggro();
				end
				weNeedReturnBack = true;
				return false;
			end
EscapeAggro function like this

Code: Select all

function EscapeAggro()
	--Write("EscapeAggro");
	
	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
Should work :)

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest