----------------------------------------- -- ExtraActionBar Version 1.0 by Rock5 -- local extraActionBar_offset local function checkOffset() if not extraActionBar_offset then local pattern = string.char( 0x56, 0x8B, 0xF1, 0x8B, 0x86, 0xFF, 0xFF, 0xFF, 0xFF, 0x85, 0xC0, 0x57, 0x74, 0x20) local mask = "xxxxx????xxxx" local offset = 5 local startloc = 0x770000 local found = findPatternInProcess(getProc(), pattern, mask, startloc, 0xA0000); if( found == 0 ) then error("Unable to find ExtraAction Bar offset. Pattern needs updating.", 0); end extraActionBar_offset = memoryReadUInt(getProc(), found + offset); end end function GetExtraActionButtons() checkOffset() local size = 12 local tmp = {} if RoMScript("ExtraActionBarFrame:IsVisible()") then local baseId = memoryReadIntPtr(getProc(),addresses.actionBarPtr,{extraActionBar_offset,0}) local index = 1 local buttonId = memoryReadIntPtr(getProc(),addresses.actionBarPtr,{extraActionBar_offset,8}) repeat buttonId = memoryReadIntPtr(getProc(),addresses.actionBarPtr,{extraActionBar_offset,(size* (index-1) + 8)}) tmp[index] = { Id = buttonId, Name = GetIdName(buttonId) } index = index + 1 until memoryReadIntPtr(getProc(),addresses.actionBarPtr,{extraActionBar_offset,size*(index-1)}) ~= baseId end return tmp end function UseExtraActionButton(_indexNameOrId) if not _indexNameOrId then return end if type(_indexNameOrId) == "number" and _indexNameOrId < 11 then RoMScript("UseExtraAction(".._indexNameOrId..")") else local ExtraActionsTable = GetExtraActionButtons() for index, button in pairs(ExtraActionsTable) do if button.Id == _indexNameOrId or button.Name == _indexNameOrId then RoMScript("UseExtraAction("..index..")") break end end end end