Answered my own question.
For anyone else that has picked the Caravan Strongbox but still wants access to Brem's expanded inventory i have tested and confirmed two different options.
If you only want Brem's inventory and dont care about killing them all you can allow Brem's special Trade.
Code: Select all
[ENABLE]
{$lua}
if syntaxcheck then return end
local uuid = "1bba9a5b-8d05-4dc1-9df1-b6d3c3a382c6" --PLA_ZhentDungeon_State_AllowedSpecialTrade
local cmdCall = getAddress("cmdCall")
local cmdArgs = getAddress("cmdArgs")
local cmdStr1 = getAddress("cmdStr1")
local cmdStr2 = getAddress("cmdStr2")
PrepareCall("GetHostCharacter")
executeCodeEx(0, nil, cmdCall)
local player = readPointer(cmdArgs + 0x08)
player = readString(player, 256, false)
writeString(cmdStr1, player)
writeBytes(cmdStr1 + #player, 0)
writeString(cmdStr2, uuid)
writeBytes(cmdStr2 + #uuid, 0)
PrepareCall("SetFlag")
writePointer(cmdArgs + 0x08, cmdStr2)
writePointer(cmdArgs + 0x18, cmdStr1)
writeQword(cmdArgs + 0x28, 0)
writeQword(cmdArgs + 0x38, 1)
local result = executeCodeEx(0, nil, cmdCall)
print(result == 1 and "success" or "failure")
{$asm}
[DISABLE]
If you want to continue the Zhentarim Questline you can remove the flag that says you ever opened the chest.
Code: Select all
[ENABLE]
{$lua}
if syntaxcheck then return end
local uuid = "118e5e96-5ee0-4760-86f3-5e3044bc9f76" --PLA_ZhentShipment_State_ChestUnlocked
local cmdCall = getAddress("cmdCall")
local cmdArgs = getAddress("cmdArgs")
local cmdStr1 = getAddress("cmdStr1")
local cmdStr2 = getAddress("cmdStr2")
PrepareCall("GetHostCharacter")
executeCodeEx(0, nil, cmdCall)
local player = readPointer(cmdArgs + 0x08)
player = readString(player, 256, false)
writeString(cmdStr1, player)
writeBytes(cmdStr1 + #player, 0)
writeString(cmdStr2, uuid)
writeBytes(cmdStr2 + #uuid, 0)
PrepareCall("ClearFlag")
writePointer(cmdArgs + 0x08, cmdStr2)
writePointer(cmdArgs + 0x18, cmdStr1)
writeQword(cmdArgs + 0x28, 0)
writeQword(cmdArgs + 0x38, 1)
local result = executeCodeEx(0, nil, cmdCall)
print(result == 1 and "success" or "failure")
{$asm}
[DISABLE]