@ -25,7 +25,7 @@
_addon.author = ' atom0s ' ;
_addon.author = ' atom0s ' ;
_addon.name = ' allmaps ' ;
_addon.name = ' allmaps ' ;
_addon.version = ' 3.0.0 ' ;
_addon.version = ' 3.0.1 ' ;
require ' common '
require ' common '
@ -33,7 +33,8 @@ require 'common'
-- allmaps Table
-- allmaps Table
---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
local allmaps = { } ;
local allmaps = { } ;
allmaps.pointer = ashita.memory . findpattern ( ' FFXiMain.dll ' , 0 , ' 50??????????83C4048886????????0FBF8E????????8A ' , 0x01 , 0 ) ;
allmaps.pointer1 = ashita.memory . findpattern ( ' FFXiMain.dll ' , 0 , ' 50??????????83C4048886????????0FBF8E????????8A ' , 0x01 , 0 ) ;
allmaps.pointer2 = ashita.memory . findpattern ( ' FFXiMain.dll ' , 0 , ' 50??????????83C4048886????????0FBF96????????8A ' , 0x01 , 0 ) ;
----------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
-- func: load
-- func: load
@ -41,18 +42,21 @@ allmaps.pointer = ashita.memory.findpattern('FFXiMain.dll', 0, '50??????????83C4
----------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
ashita.register_event ( ' load ' , function ( )
ashita.register_event ( ' load ' , function ( )
-- Validate the pointers..
-- Validate the pointers..
if ( allmaps.pointer == 0 ) then
if ( allmaps.pointer1 == 0 or allmaps.pointer2 == 0 ) then
print ( ' \31 \200 [ \31 \05 ' .. ' allmaps ' .. ' \31 \200 ] \30 \01 ' .. ' \30 \68 Failed to find required signature. \30 \01 ' ) ;
print ( ' \31 \200 [ \31 \05 ' .. ' allmaps ' .. ' \31 \200 ] \30 \01 ' .. ' \30 \68 Failed to find required signature(s) . \30 \01 ' ) ;
return ;
return ;
end
end
-- Backup the function data..
-- Backup the function data..
allmaps.backup = ashita.memory . read_array ( allmaps.pointer , 5 ) ;
allmaps.backup1 = ashita.memory . read_array ( allmaps.pointer1 , 5 ) ;
allmaps.backup2 = ashita.memory . read_array ( allmaps.pointer2 , 5 ) ;
-- Overwrite the function..
-- Overwrite the function..
local patch = { 0xB8 , 0x01 , 0x00 , 0x00 , 0x00 } ;
local patch = { 0xB8 , 0x01 , 0x00 , 0x00 , 0x00 } ;
ashita.memory . write_array ( allmaps.pointer , patch ) ;
ashita.memory . write_array ( allmaps.pointer1 , patch ) ;
ashita.memory . write_array ( allmaps.pointer2 , patch ) ;
print ( string.format ( ' \31 \200 [ \31 \05 ' .. ' allmaps ' .. ' \31 \200 ] \31 \130 Function patched; /map should now display all maps as if you own them. ' ) ) ;
print ( string.format ( ' \31 \200 [ \31 \05 ' .. ' allmaps ' .. ' \31 \200 ] \31 \130 Function patched; /map should now display all maps as if you own them. ' ) ) ;
print ( string.format ( ' \31 \200 [ \31 \05 ' .. ' allmaps ' .. ' \31 \200 ] \31 \130 Function patched; viewing homepoint/waypoint warps should now display maps. ' ) ) ;
end ) ;
end ) ;
----------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
@ -61,7 +65,10 @@ end);
----------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
ashita.register_event ( ' unload ' , function ( )
ashita.register_event ( ' unload ' , function ( )
-- Restore the map function patch..
-- Restore the map function patch..
if ( allmaps.backup ~= nil ) then
if ( allmaps.backup1 ~= nil ) then
ashita.memory . write_array ( allmaps.pointer , allmaps.backup ) ;
ashita.memory . write_array ( allmaps.pointer1 , allmaps.backup1 ) ;
end
if ( allmaps.backup2 ~= nil ) then
ashita.memory . write_array ( allmaps.pointer2 , allmaps.backup2 ) ;
end
end
end ) ;
end ) ;