From 8080299f6dad9654d2714e63178a2f5498797258 Mon Sep 17 00:00:00 2001 From: atom0s Date: Sat, 31 Dec 2016 23:41:48 -0800 Subject: [PATCH] Added /ah command to force-open the auction house menu. --- ahgo.lua | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/ahgo.lua b/ahgo.lua index cf354da..77ab21c 100644 --- a/ahgo.lua +++ b/ahgo.lua @@ -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); \ No newline at end of file