Browse Source

default attachements on load error fixed

I went a different way with getting the default attachments from memory. Tested and working.
master
Tornac 4 years ago
parent
commit
a19284c926
  1. 32
      pupatt.lua

32
pupatt.lua

@ -25,7 +25,7 @@
_addon.author = 'tornac'; _addon.author = 'tornac';
_addon.name = 'pupatt'; _addon.name = 'pupatt';
_addon.version = '1.07'; _addon.version = '1.10';
--------------------------------- ---------------------------------
--DO NOT EDIT BELOW THIS LINE --DO NOT EDIT BELOW THIS LINE
@ -96,6 +96,9 @@ ashita.register_event('incoming_packet', function(id, size, packet)
end end
end end
end end
if (id == 0x000A) then
attFromMemory()
end
return false; return false;
end); end);
@ -238,7 +241,6 @@ end
ashita.register_event('render', function() ashita.register_event('render', function()
-- Process the objectives packet queue.. -- Process the objectives packet queue..
process_queue(); process_queue();
attFromMemory();
end); end);
--------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------
@ -294,21 +296,17 @@ end;
--------------------------------------------------------------- ---------------------------------------------------------------
function attFromMemory() function attFromMemory()
if (currentAttachments[1] == nil) then local pointer1 = ashita.memory.findpattern('FFXiMain.dll', 0, 'C1E1032BC8B0018D????????????B9????????F3A55F5E5B', 10, 0);
local pointer1 = ashita.memory.findpattern('FFXiMain.dll', 0, 'C1E1032BC8B0018D????????????B9????????F3A55F5E5B', 10, 0); if (pointer1 == 0) then
if (pointer1 == 0) then err('Failed to locate current attachments, please cycle a attachment to continue.');
err('Failed to locate current attachments, please cycle a attachment to continue.'); else
else local offset1 = ashita.memory.read_uint32(pointer1);
local offset1 = ashita.memory.read_uint32(pointer1); pointer = ashita.memory.read_uint32(AshitaCore:GetPointerManager():GetPointer('inventory'));
pointer = ashita.memory.read_uint32(AshitaCore:GetPointerManager():GetPointer('inventory')); pointer = ashita.memory.read_uint32(pointer);
pointer = ashita.memory.read_uint32(pointer); currentAttachments = ashita.memory.read_array((pointer + offset1) + offset, 0x0E);
currentAttachments = ashita.memory.read_array((pointer + offset1) + offset, 0x0E); for i = 1, 14 do
if (currentAttachments ~= nil) then currentAttachments[i] = string.format("0x%X" , currentAttachments[i]);
for i = 1, 14 do end
currentAttachments[i] = string.format("0x%X" , currentAttachments[i]);
end
end
end
end end
end; end;

Loading…
Cancel
Save