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

Loading…
Cancel
Save