Browse Source

Added /ah command to force-open the auction house menu.

master
atom0s 7 years ago
parent
commit
8080299f6d
  1. 24
      ahgo.lua

24
ahgo.lua

@ -77,4 +77,28 @@ ashita.register_event('unload', function() @@ -77,4 +77,28 @@ ashita.register_event('unload', function()
if (ahgo.shop_movement_check_backup ~= nil) then
ashita.memory.write_uint8(ahgo.shop_pointer, ahgo.shop_pointer_backup);
end
end);
----------------------------------------------------------------------------------------------------
-- func: command
-- desc: Event called when a command was entered.
----------------------------------------------------------------------------------------------------
ashita.register_event('command', function(command, ntype)
-- Get the arguments of the command..
local args = command:args();
-- Opens the auction house..
if (args[1] == '/ah') then
local packet =
{
0x4C, 0x1E, 0x00, 0x00, 0x02, 0xFF, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
AddIncomingPacket(0x4C, packet);
return true;
end
return false;
end);
Loading…
Cancel
Save