Warrior Auto Shot Macro [Hack]

Post Reply
Snigery
Posts: 41

Warrior Auto Shot Macro [Hack]

Post by Snigery » Wed Jan 05, 2022 12:21 am

Okay not really a hack, but absolutely impractical. Someone was asking for warriors to have auto-shot, so I thought I would make them a macro instead of requiring devs to make game changes. But it turns out this solution freezes your game client while it runs, so it exits after so long, otherwise you'd have to restart the game. This is my test version which was able to repeat a given chat message every so often, though I didn't see it happen because my game UI was frozen while it ran, haha. If you want to still use this then swap out the SendChatMessage() functions for CastSpellByName( "Shoot" ) or whatever the ability warriors have is. If you want you can role-play the game freezing as the warriors brain shutting down from the stress of now having to master all melee weapons and ranged weapons.

You have to have the SuperMacro addon which will allow you to use the LUA code that makes this work. Here is the LUA code.

Code: Select all

local vAASwitch = false;

function auto_attack_hack()
  local
    time = GetTime()
    i = 0;
  
  if vAASwitch then
    SendChatMessage( "Halting..." .. i, "say" );
    vAASwitch = false;
  else
    SendChatMessage( "Resuming..." .. i, "say" );
    vAASwitch = true;
  end
  
  while vAASwitch and i < 100000000 do
    if GetTime() - time > 1 then
      SendChatMessage( "AAing", "say" )
      time = GetTime();
      
    end
    
    i = i + 1;
  end
  
  if i > ( 100000000 - 1 ) then
    SendChatMessage( "Ending Loop..." .. i, "say" );
  end
end
And here is the macro.

Code: Select all

/script auto_attack_hack()

Post Reply