Page 1 of 1

Help to revive OfficialCheatingScript.lua

Posted: Tue May 02, 2017 7:05 am
by smaion40
Hello guys, some of you might remember this script, it was used before to solo bosses without the need of moving your character around to not lose boss aggro.

I tried to use the script but it doesnt work anymore. Soloing bosses in Aion 5.3 new instances is worthy? or there's a reason of why this script was taken out of the new AS version?.

EDIT: Enough was said about both servers actions against soloing instances. Anyway I still believe this script is a vital part of the AS, regretfully my coding skills are not enough to modify and make this script work, I would love any help you guys can give me, I'm willing to help and open to questions. Thank you.

Code: Select all

--[[
	--------------------------------------------------
	Copyright (C) 2011 Blastradius
	
	All rights reserved. You are not allowed to share this!
	--------------------------------------------------
]]--

-- OnLoad: Initialize the settings and register the key handlers.
function OnLoad()

	--------------------------------------------------
	--       Y O U   M A Y   E D I T   T H I S      --
	--------------------------------------------------
	
	-- Register the key combination for Super Glide (Automatic).
	Register( "KeyCheatingAutomatic", "X", "Control" );
	Register( "KeyCheatingApproach", "C", "Control" );

	-- Register the key combinations for Super Glide (Accurate)
	Register( "KeySuperGlideDownAccurate", "E", "Control" );
	Register( "KeySuperGlideForwardAccurate", "Z", "Control" );
	Register( "KeySuperGlideUpAccurate", "Q", "Control" );
	
	-- Register the key combinations for Super Glide (Coarse)
	Register( "KeySuperGlideDownCoarse", "E", "Alt" );
	Register( "KeySuperGlideForwardCoarse", "Z", "Alt" );
	Register( "KeySuperGlideUpCoarse", "Q", "Alt" );
	
	--------------------------------------------------
	--            D O   N O T   T O U C H           --
	--------------------------------------------------
	
	-- Include the Class library.
	Controller = Include( "OfficialGrinderFramework/Classes/" .. Player:GetClass():ToString() .. ".lua" );
	-- Include the Helper library.
	Helper = Include( "OfficialGrinderFramework/HelperFunction.lua" );
	-- Include the Settings.
	Settings = Include( "OfficialGrinderFramework/Settings.lua" );
	-- Initialize the Settings.
	Settings:Initialize();
	-- Initialize the Settings using boss-values.
	Settings:InitializeBoss();
	-- Set the attack state to allow attacking.
	Settings.AllowAttack = true;
	-- Set the Cleric attack state to allow attacking.
	Settings.Cleric.AllowAttack = true;
	
	--------------------------------------------------
	--       Y O U   M A Y   E D I T   T H I S      --
	--------------------------------------------------
	
	-- Contains the line distance when using the automatic attack routine (nil for circular movement).
	Settings.AutomaticLineDistance = nil;
	-- Contains the step size when using the automatic attack routine.
	Settings.AutomaticStepSize = 5;
	-- Contains the distance when using accurate super glide.
	Settings.SuperGlideDistanceAccurate = 0.5;
	-- Contains the distance when using coarse super glide.
	Settings.SuperGlideDistanceCoarse = 6;
	-- Indicates whether super glide coarse is restricted to actually gliding.
	Settings.SuperGlideRestrict = true;
	-- Indicates whether to move while attacking.
	Settings.MoveWhileAttacking = true;
	-- Contains the potion to use to recover MP (Use a 30-second cooldown potion).
	Settings.ManaPotion = "Fine Mana Potion";
	-- Contains the potion to use to recover MP/HP (Use a 30-second cooldown potion).
	Settings.RecoveryPotion = "Fine Recovery Potion";

	
end

-- OnRun: Check automatic movement for boss bugging.
function OnFrame()
	-- CheatingAutomatic: Check automatic attacking/movement for boss bugging.
	if CircularTeleportation ~= nil then
		-- Check other entities similar to the 'Safety' and 'Trust Force' combination of the cheating extension.
		for ID, Entity in DictionaryIterator( EntityList:GetList()) do
			if Entity:IsPlayer() and ForceList:GetForce( Entity:GetID()) == nil and Entity:GetID() ~= Player:GetID() then
				return;
			end
		end
		-- Retrieve the entity.
		local Entity = EntityList:GetEntity( Player:GetTargetID());
		-- Check if the potion shared cooldown timer has expired.
		if _iPotion == nil or _iPotion < Time() then
			-- Check if the recovery potion has been configured and may need to be used.
			if Settings.RecoveryPotion ~= nil and Entity ~= nil and Entity:GetName() == "Stormwing" and Entity:GetHealth() >= 80 then
				-- Check if the player health or player mana is low enough to justify the use of a recovery potion.
				if ( Player:GetHealth() < 95 or Player:GetMana() < 80 ) and CheatingPotion( Settings.RecoveryPotion ) then
					return;
				end
			-- Check if the mana potion has been configured and needs to be used.
			elseif Settings.ManaPotion ~= nil and Player:GetMana() < 80 and CheatingPotion( Settings.ManaPotion ) then
				return;
			end
		end
		
		-- Enable smooth casting feature.
		AsCircularMagic:EnableSmoothCasting();
		-- CheatingApproach: Is this an insane bow wielder?
		if CheatingInsaneBowWielder() then
			return;
		end
		-- Check if the character is preparing for movement.
		if Settings.MoveWhileAttacking and _bMoving ~= nil then
			-- Run the Circular Teleportation Magic and wait until it gives a success.
			if not AsCircularMagic:DoMove() then
				return;
			-- Disable the moving toggle.
			else
				_bMoving = nil;
			end
		end
		-- Check if the attacking toggle is enabled.
		if _bAttacking ~= nil and ( Player:IsBusy() or Player:GetSkillTime() > 0 ) then
			-- Disable the attacking toggle.
			_bAttacking = nil;
			-- Enable the moving toggle.
			_bMoving = true;
		end
		-- Check if the controller has an attack routine, the player is not busy and the target entity is valid.
		if Controller.Attack ~= nil and Entity ~= nil and not Player:IsBusy() and Entity:IsMonster() and not Entity:IsFriendly() then
			-- Check if the entity is dead.
			if Entity:IsDead() then
				-- Clear the CircularTeleportation.
				CircularTeleportation = nil;
				return;
			-- Otherwise shoot everything we have got.
			else
				-- Initialize the stunned status.
				local Stunned = false;
				-- Loop through the state of the target entity .
				for ID, StateIndex in DictionaryIterator( Entity:GetState():GetList()) do
					-- Check if the state is correct and is a stun.
					if StateIndex ~= nil and StateIndex:IsStun() then
						-- Set the stunned status.
						Stunned = true;
					end
				end
				-- Run the attack routine on the entity.
				Controller:Attack( Entity, Entity:GetPosition():DistanceToPosition( Player:GetPosition()), Stunned, true );
				-- Enable the attacking toggle.
				_bAttacking = true;
			end
		end
	end
end

--------------------------------------------------
--      C H E A T I N G   F U N C T I O N S     --
--------------------------------------------------

-- CheatingAutomatic: Automatic Circular Teleportation
function CheatingAutomatic( Position, Distance )
	-- Initialize the Circular Teleportation Magic.
	AsCircularMagic:DoInitialize( Position, Distance, Settings.AutomaticLineDistance );
	-- Set the CircularTeleportation.
	CircularTeleportation = true;
end

-- CheatingApproach: Approach Position
function CheatingApproach( Position )
	-- Change the Z-axis of the position.
	Position.Z = Player:GetPosition().Z;
	-- Set the player movement.
	Player:SetMove( Position );
end

-- CheatingApproach: Is this an insane bow wielder?
function CheatingInsaneBowWielder()
	-- Check if this player is either an Assassin or a Gladiator.
	if Player:GetClass():ToString() == "Assassin" or Player:GetClass():ToString() == "Gladiator" then
		-- Loop through each item in the inventory.
		for Inventory in ListIterator( InventoryList:GetList()) do
			-- Check if this item is a bow and is equipped.
			if Inventory:GetType():ToString() == "Bow" and Inventory:GetSlot():ToString() == "MainHand_Equipped" then
				-- Run the Circular Teleportation Magic.
				AsCircularMagic:DoMove();
				return true;
			end
		end
	end
	-- This is not an insane bow wielder.
	return false;
end

-- CheatingPotion: Potion Consumption
function CheatingPotion( Potion )
	-- Retrieve the mana potion from the inventory list.
	local Inventory = InventoryList[Potion];
	-- Check if the potion is available.
	if Inventory ~= nil then
		-- Retrieve the recovery potion.
		local InventoryRecovery = InventoryList:GetInventory( Settings.RecoveryPotion );
		-- Retrieve the mana potion.
		local InventoryMana = InventoryList:GetInventory( Settings.ManaPotion );
		-- Check if either of the possible potions is in cooldown, which means all of them are!
		if ( InventoryRecovery ~= nil and InventoryRecovery:GetCooldown() ~= 0 ) or ( InventoryMana ~= nil and InventoryMana:GetCooldown() ~= 0 ) then
			-- Set the potion shared cooldown timer.
			_iPotion = Time() + 30000;
			-- Enable the moving toggle.
			_bMoving = true;
		-- Use the potion.
		else
			-- Disable smooth casting feature.
			AsCircularMagic:DisableSmoothCasting();
			-- Attempt to use the inventory item.
			PlayerInput:Inventory( Inventory:GetName());
			-- Stop executing the script this run.
			--return true;
		end
	end
	-- Do not stop executing the script this run.
	return false;
end
			
--------------------------------------------------
--   S U P E R   G L I D E   F U N C T I O N S  --
--------------------------------------------------

-- SuperGlideDown: Change the Z-axis of the position to a higher position.
function SuperGlideDown( Distance )
	-- Retrieve the player position.
	local Pos = Player:GetPosition();
	-- Change the Z-axis of the position.
	Pos.Z = Pos.Z - Distance;
	-- Set the new player position.
	Player:SetPosition( Pos );
end

-- SuperForward: Change the X-axis and Y-axis of the position to a forward position.
function SuperGlideForward( Distance )
	-- Retrieve the player camera.
	local Angle = Player:GetCamera();
	-- Retrieve the player position.
	local Pos = Player:GetPosition();
	-- Change the X-axis of the position.
	Pos.X = Pos.X + Distance * math.sin( Angle.X / 180 * math.pi );
	-- Change the Y-axis of the position.
	Pos.Y = Pos.Y - Distance * math.cos( Angle.X / 180 * math.pi );
	-- Set the new player position.
	Player:Setposition( Pos );
end

-- SuperGlideUp: Change the Z-axis of the position to a lower position.
function SuperGlideUp( Distance )
	-- Retrieve the player position.
	local Pos = Player:GetPosition();
	-- Change the Z-axis of the position.
	Pos.Z = Pos.Z + Distance;
	-- Set the new player position.
	Player:SetPosition( Pos );
end

--------------------------------------------------
--          K E Y   H A N D L E R S [C]         --
--------------------------------------------------

-- KeyCheatingAutomatic: Automatic Circular Teleportation
function KeyCheatingAutomatic()
	-- Check if the CircularTeleportation is empty.
	if CircularTeleportation == nil then
		-- Visual reference.
		Write( "KeyCheatingAutomatic: Kill the target." );
		-- Automatic Circular Teleportation
		CheatingAutomatic( Player:GetPosition(), Settings.AutomaticStepSize );
	-- Otherwise the CircularTeleportation is not empty.
	else
		-- Visual reference.
		Write( "KeyCheatingAutomatic: Stop killing the target." );
		-- Clear the CircularTeleportation.
		CircularTeleportation = nil;
	end
end

-- KeyCheatingApproach: Approach Target
function KeyCheatingApproach()
	-- Check if we are moving, in which case we stop movement.
	if Player:IsMoving() then
		Player:SetMove( nil );
	-- Otherwise start movement.
	else
		-- Retrieve the entity.
		local Entity = EntityList:GetEntity( Player:GetTargetID());
		-- Check if the entity is a monster and is not friendly.
		if Entity ~= nil and Entity:IsMonster() and not Entity:IsFriendly() then
			CheatingApproach( Entity:GetPosition());
		end
	end
end

--------------------------------------------------
--          K E Y   H A N D L E R S [S]         --
--------------------------------------------------

-- KeySuperGlideDownAccurate: Accurate Super Glide Down
function KeySuperGlideDownAccurate()
	SuperGlideDown( Settings.SuperGlideDistanceAccurate );
end

-- KeySuperGlideForwardAccurate: Accurate Super Glide Forward
function KeySuperGlideForwardAccurate()
	SuperGlideForward( Settings.SuperGlideDistanceAccurate );
end

-- KeySuperGlideUpAccurate: Accurate Super Glide Up
function KeySuperGlideUpAccurate()
	SuperGlideUp( Settings.SuperGlideDistanceAccurate );
end

-- KeySuperGlideDownCoarse: Coarse Super Glide Down
function KeySuperGlideDownCoarse()
	if not Settings.SuperGlideRestrict or Player:IsGliding() then
		SuperGlideDown( Settings.SuperGlideDistanceCoarse );
	end
end

-- KeySuperGlideForwardCoarse: Coarse Super Glide Forward
function KeySuperGlideForwardCoarse()
	if not Settings.SuperGlideRestrict or Player:IsGliding() then
		SuperGlideForward( Settings.SuperGlideDistanceCoarse );
	end
end

-- KeySuperGlideUpCoarse: Coarse Super Glide Up
function KeySuperGlideUpCoarse()
	if not Settings.SuperGlideRestrict or Player:IsGliding() then
		SuperGlideUp( Settings.SuperGlideDistanceCoarse );
	end
end

Re: OfficialCheatingScript.lua

Posted: Wed May 03, 2017 12:59 am
by vivi
instance hacking is calling so hard for a ban in EU, dunno about US.

Re: OfficialCheatingScript.lua

Posted: Wed May 03, 2017 6:48 pm
by smaion40
vivi wrote:
Wed May 03, 2017 12:59 am
instance hacking is calling so hard for a ban in EU, dunno about US.
That's pretty much what AS was made for. In EU they are pretty strict when it comes to instance soloing, but as far as I know upper instances (and maybe others) are still possible in NA.

Re: OfficialCheatingScript.lua

Posted: Wed May 03, 2017 10:08 pm
by vivi
in NA you can still do it for sure, in EU is ban for sure, thats a shame but its the current state

Re: OfficialCheatingScript.lua

Posted: Thu May 04, 2017 5:11 am
by creatine
in EU theyre strict about it because gaming company had been sued for million before this because of hacking. thats why theyre sparing no expenses in busting out hackers. as for NA, well... im sure the time will come.