Re: have shortcut key finction in script?
Posted: Fri Mar 10, 2017 10:14 pm
You have to bind the mouse click to a key, then you can bind the "pseudo key click" to aionscript.
You have to bind the mouse click to a key, then you can bind the "pseudo key click" to aionscript.
Two things: I actually rewrote the entire framework for that function so, check your PMs - your not VIP, this is a one off. Secondly:
Code: Select all
http://lpaste.net/81206866515853312Code: Select all
http://lpaste.net/7542220304173498368Code: 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" );
Register( "UIModHandle", "Insert" );
Register( "BuffHandle", "Home" );
Register( "AttackSPDCheckEntity", "End" );
-- End SettingsCode: Select all
function AttackHandle()
if _AttackStarted ~= nil then
_AttackStarted = nil;
Write("0verkill Mode: DISABLED!");
else
_AttackStarted = true;
Write("0verkill Mode: DISABLED!");
end
endCode: Select all
function OnRun()
if _AttackStarted ~= nil and Player:GetTargetID() ~= 0 then
local Entity = EntityList:GetEntity( Player:GetTargetId());
if Player:IsDead() then
return false;
end
if EntityList:GetEntity( Player:GetTargetId()):IsDead() then
local AggroEntity = Helper:FindTarget( true, Player:GetPosition());
if AggroEntity ~= nil then
Player:SetTarget( AggroEntity );
Player:SetMove( nil );
end
return false;
end
if Entity:IsGatherable() or Entity:IsPet() or Entity:IsFriendly() or Entity:IsObject() then
if AggroEntity ~= nil then
Player:SetTarget( AggroEntity );
Player:SetMove( nil );
end
return false;
end
if Entity:IsHostile() or Entity:IsMonster() or Entity:GetTargetID() == Player:GetID() then
if not Player:IsMoving() and Helper:CheckAvailable( "Attack" ) and (Player:GetPosition():DistanceToPosition( Entity:GetPosition()) <= 35 and Player:GetPosition():DistanceToPosition( Entity:GetPosition()) >= 5) then
PlayerInput:Ability( "Attack" );
elseif Player:GetPosition():DistanceToPosition( Entity:GetPosition()) <= 5 then
return Controller:Attack( Entity, Entity:GetPosition():DistanceToPosition( Player:GetPosition()), Stunned, true );
end
end
end
end