Advertisement
Guest User

Ashita All maps

a guest
Mar 21st, 2018
273
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.12 KB | None | 0 0
  1. --[[
  2. * Ashita - Copyright (c) 2014 - 2016 atom0s [atom0s@live.com]
  3. *
  4. * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
  5. * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to
  6. * Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.
  7. *
  8. * By using Ashita, you agree to the above license and its terms.
  9. *
  10. *      Attribution - You must give appropriate credit, provide a link to the license and indicate if changes were
  11. *                    made. You must do so in any reasonable manner, but not in any way that suggests the licensor
  12. *                    endorses you or your use.
  13. *
  14. *   Non-Commercial - You may not use the material (Ashita) for commercial purposes.
  15. *
  16. *   No-Derivatives - If you remix, transform, or build upon the material (Ashita), you may not distribute the
  17. *                    modified material. You are, however, allowed to submit the modified works back to the original
  18. *                    Ashita project in attempt to have it added to the original project.
  19. *
  20. * You may not apply legal terms or technological measures that legally restrict others
  21. * from doing anything the license permits.
  22. *
  23. * No warranties are given.
  24. ]]--
  25.  
  26. _addon.author   = 'atom0s';
  27. _addon.name     = 'allmaps';
  28. _addon.version  = '3.0.0';
  29.  
  30. require 'common'
  31.  
  32. ---------------------------------------------------------------------------------------------------
  33. -- allmaps Table
  34. ---------------------------------------------------------------------------------------------------
  35. local allmaps   = { };
  36. allmaps.pointer = ashita.memory.findpattern('FFXiMain.dll', 0, '50??????????83C4048886????????0FBF8E????????8A', 0x01, 0);
  37.  
  38. ----------------------------------------------------------------------------------------------------
  39. -- func: load
  40. -- desc: Event called when the addon is being loaded.
  41. ----------------------------------------------------------------------------------------------------
  42. ashita.register_event('load', function()
  43.     -- Validate the pointers..
  44.     if (allmaps.pointer == 0) then
  45.         print('\31\200[\31\05' .. 'allmaps'.. '\31\200]\30\01 ' .. '\30\68Failed to find required signature.\30\01');
  46.         return;
  47.     end
  48.  
  49.     -- Backup the function data..
  50.     allmaps.backup = ashita.memory.read_array(allmaps.pointer, 5);
  51.  
  52.     -- Overwrite the function..
  53.     local patch = { 0xB8, 0x01, 0x00, 0x00, 0x00 };
  54.     ashita.memory.write_array(allmaps.pointer, patch);
  55.     print(string.format('\31\200[\31\05' .. 'allmaps'.. '\31\200] \31\130Function patched; /map should now display all maps as if you own them.'));
  56. end);
  57.  
  58. ----------------------------------------------------------------------------------------------------
  59. -- func: unload
  60. -- desc: Event called when the addon is being unloaded.
  61. ----------------------------------------------------------------------------------------------------
  62. ashita.register_event('unload', function()
  63.     -- Restore the map function patch..
  64.     if (allmaps.backup ~= nil) then
  65.         ashita.memory.write_array(allmaps.pointer, allmaps.backup);
  66.     end
  67. end);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement