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