Resonator Script (EU English client)

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

Resonator Script (EU English client)

Post by cooco » Thu Apr 20, 2017 6:05 pm

Code: Select all

function OnLoad()
	Settings = Include( "OfficialGrinderFramework/Settings.lua" );
	Helper = Include( "OfficialGrinderFramework/HelperFunction.lua" );
	Settings:Initialize();
	Class = Include( "OfficialGrinderFramework/Classes/" .. Player:GetClass():ToString() .. ".lua" );
end



function OnFrame()
	-- Check if we are currently moving, when we are, we cannot do this.
	if not Player:IsMoving() and not Player:IsResting() then

		-- Check if we need to perform kind of healing routine.
		if Class.Heal ~= nil and not Class:Heal( true ) then
			return false;
		end
		
		-- Check the force members and see if we have to do anything.
		if Class.Force ~= nil and not Class:Force() then
			return false;
		end
		
		-- Check if we need to perform kind of healing routine.
		if Class.Heal ~= nil and not Class:Heal( false ) then
			return false;
		end
		
	end
	
	-- Initialize the variable that we need to hold the target entity.
	local Entity = EntityList:GetEntity( Player:GetTargetID());
	
	-- Check if the entity is valid and if it is alive.
	if Entity ~= nil and not Entity:IsDead() and not Entity:IsFriendly() then
		Class:Attack(Entity, Entity:GetPosition():DistanceToPosition( Player:GetPosition()), false);
		
	else
		for ID, Entity in DictionaryIterator( EntityList:GetList()) do
			-- Check if the entiy is valid.
			if Entity ~= nil then
			
				-- Check entity name
				if ResonatorMobCheck( Entity) == true then
					-- Check distance
					if Entity:GetPosition():DistanceToPosition( Player:GetPosition()) <= 20 then
						Player:SetTarget(Entity);
						Class:Attack(Entity, Entity:GetPosition():DistanceToPosition( Player:GetPosition()), false);
					end
				end
				
			end
		end
	end
end

-- "Id Resonator", "Elite Siege Cannon of the Hyperion Defence"
function ResonatorMobCheck(Entity)
	if Entity ~= nil and not Entity:IsDead() then
		if Entity:GetName()=="Elite Siege Cannon of the Hyperion Defence" or Entity:GetName()=="Id Resonator" then
			local EntityState = Entity:GetState();
			
			if EntityState:GetState( "Id Aetheric Field" ) == nil then
				--Write("unita list".. Entity:GetName());
				return true;
			end
		end
	end
	
	return false;
end


function Attack ( Entity, Range, Stunned)
	return Class:Attack ( Entity, Range, Stunned);
end

function Heal (CombatEnabled)
	return Class:Heal(CombatEnabled);
end

function Pause()
	return Class:Pause()
end

robertgigant
Posts: 28
Joined: Sun Jul 09, 2017 11:07 pm
Has thanked: 16 times
Been thanked: 2 times

Re: Resonator Script (EU English client)

Post by robertgigant » Sat Sep 02, 2017 11:46 am

to what this script

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

Re: Resonator Script (EU English client)

Post by cooco » Sat Sep 02, 2017 2:07 pm

robertgigant wrote:
Sat Sep 02, 2017 11:46 am
to what this script
Script for this https://www.youtube.com/watch?v=Ydv0VlJ6dKA

User avatar
Quirunerk
Posts: 65
Joined: Sun Aug 20, 2017 3:06 pm
Has thanked: 24 times
Been thanked: 1 time

Re: Resonator Script (EU English client)

Post by Quirunerk » Sat Sep 02, 2017 6:43 pm

i will try it thanks

User avatar
Quirunerk
Posts: 65
Joined: Sun Aug 20, 2017 3:06 pm
Has thanked: 24 times
Been thanked: 1 time

Re: Resonator Script (EU English client)

Post by Quirunerk » Sat Sep 02, 2017 7:11 pm

can we do solo ?

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

Re: Resonator Script (EU English client)

Post by cooco » Sat Sep 02, 2017 9:25 pm

Quirunerk wrote:
Sat Sep 02, 2017 7:11 pm
can we do solo ?
Solo instance? Nope Katalamize/IS is a 12 player instance.
Take care this script work in Aion EU with client language english.

User avatar
Quirunerk
Posts: 65
Joined: Sun Aug 20, 2017 3:06 pm
Has thanked: 24 times
Been thanked: 1 time

Re: Resonator Script (EU English client)

Post by Quirunerk » Sat Sep 02, 2017 9:32 pm

i know but can we do solo with 1 lvl account ? And are u getting crash too ? Can nucular make hack for 64 bit ?

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

Re: Resonator Script (EU English client)

Post by cooco » Sun Sep 03, 2017 1:27 am

don't understand what are you asking. sorry my english :oops:

User avatar
0x00
VIP
Posts: 105
Joined: Tue Jan 10, 2017 11:40 pm
Has thanked: 10 times
Been thanked: 23 times

Re: Resonator Script (EU English client)

Post by 0x00 » Thu Oct 05, 2017 5:32 am

cooco wrote:
Sun Sep 03, 2017 1:27 am
don't understand what are you asking. sorry my english :oops:
Forget what he's asking! I have a few questions :P

I noticed you do not call the OnRun() function in the OnFrame() - I tested it, it's better and more efficient. Why did you do this? I'm asking because it's a good solution!

and as for input - why don't you add this? To allow an on /off feature keybind?

OnLoad():

Code: Select all

-- Settings
-- Check the key codes here (Member Name): http://msdn.microsoft.com/en-us/library/system.windows.input.key.aspx
    Register( "AttackHandle", "Oem8" );

OnFrame():

Code: Select all

if _AttackStarted ~= nil then
	-- Check if Buffmanager is enabled TODO

	-- Check if we are currently moving, when we are, we cannot do this.
	if not Player:IsMoving() and not Player:IsResting() then

		-- Check if we need to perform kind of healing routine.
		if Class.Heal ~= nil and not Class:Heal( true ) then
			return false;
		end
		
		-- Check the force members and see if we have to do anything.
		if Class.Force ~= nil and not Class:Force() then
			return false;
		end
		
		-- Check if we need to perform kind of healing routine.
		if Class.Heal ~= nil and not Class:Heal( false ) then
			return false;
		end
		
	end
	
	-- Initialize the variable that we need to hold the target entity.
	local Entity = EntityList:GetEntity( Player:GetTargetID());

		if Entity == nil or Player:IsDead() then 
			return false;
		elseif Entity:IsDead() or Entity:IsFriendly() then
			return false;
		elseif not Entity:IsGatherable() and not Entity:IsFriendly() and not Entity:IsDead() then
				return Class:Attack( Entity, Entity:GetPosition():DistanceToPosition( Player:GetPosition()), Stunned, true );
				
			end
		end
	end
function AttackHandle(): - (add it at the bottom!)

Code: Select all

	
	if _AttackStarted ~= nil then
			_AttackStarted = nil;

			Write("Auto-Attack Mode: DISABLED!");	
		else
			_AttackStarted = true;
			Write("0verkill Mode: ENABLED!");	
	end
end

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

Re: Resonator Script (EU English client)

Post by cooco » Thu Oct 05, 2017 3:24 pm

0x00 wrote:
Thu Oct 05, 2017 5:32 am

I noticed you do not call the OnRun() function in the OnFrame() - I tested it, it's better and more efficient. Why did you do this? I'm asking because it's a good solution!

and as for input - why don't you add this? To allow an on /off feature keybind?

OnLoad():

Code: Select all

-- Settings
-- Check the key codes here (Member Name): http://msdn.microsoft.com/en-us/library/system.windows.input.key.aspx
    Register( "AttackHandle", "Oem8" );

OnFrame():

Code: Select all

if _AttackStarted ~= nil then
	-- Check if Buffmanager is enabled TODO

	-- Check if we are currently moving, when we are, we cannot do this.
	if not Player:IsMoving() and not Player:IsResting() then

		-- Check if we need to perform kind of healing routine.
		if Class.Heal ~= nil and not Class:Heal( true ) then
			return false;
		end
		
		-- Check the force members and see if we have to do anything.
		if Class.Force ~= nil and not Class:Force() then
			return false;
		end
		
		-- Check if we need to perform kind of healing routine.
		if Class.Heal ~= nil and not Class:Heal( false ) then
			return false;
		end
		
	end
	
	-- Initialize the variable that we need to hold the target entity.
	local Entity = EntityList:GetEntity( Player:GetTargetID());

		if Entity == nil or Player:IsDead() then 
			return false;
		elseif Entity:IsDead() or Entity:IsFriendly() then
			return false;
		elseif not Entity:IsGatherable() and not Entity:IsFriendly() and not Entity:IsDead() then
				return Class:Attack( Entity, Entity:GetPosition():DistanceToPosition( Player:GetPosition()), Stunned, true );
				
			end
		end
	end
function AttackHandle(): - (add it at the bottom!)

Code: Select all

	
	if _AttackStarted ~= nil then
			_AttackStarted = nil;

			Write("Auto-Attack Mode: DISABLED!");	
		else
			_AttackStarted = true;
			Write("0verkill Mode: ENABLED!");	
	end
end
To be honest i writed this script with very very low LUA knowledge (like not xD) this script was a mix of copy/paste.

About OnFrame/OnRune question. I write this simply script to understand some difference between OnFrame and OnRune

Code: Select all

time=Time();
time2=Time();
function OnFrame()
	local t= Time();
	Write("OnFrame: "..t-time2);
	time2 = t;

end

function OnRun()
	local t= Time();
	Write("OnRun: "..t-time);
	time = t;
end
This is the result

Code: Select all

Clearing the console window...
- OnFrame: 12
- OnRun: 78
- OnFrame: 68
- OnFrame: 56
- OnFrame: 63
- OnFrame: 60
- OnFrame: 63
- OnRun: 310
- OnFrame: 67
- OnFrame: 56
- OnFrame: 65
- OnFrame: 60
- OnFrame: 63
- OnRun: 310
- OnFrame: 66
- OnFrame: 58
- OnFrame: 60
- OnFrame: 63
- OnFrame: 62
- OnRun: 314
- OnFrame: 71
- OnFrame: 57
- OnFrame: 59
- OnFrame: 62
- OnFrame: 61
- OnRun: 306
- OnFrame: 67
- OnFrame: 58
- OnFrame: 63
- OnFrame: 62
- OnFrame: 61
- OnRun: 314
So i think OnFrame was better for this IS/Kata script (just need quikly update entity and skill, not need something else).

About "Register key" i notice a strange behaviour (probably my mistake). If i open same scritp in two client RegisterKey work only in one client not both :roll:

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest