[DiscordArchive] In 3.3.5a has anyone found a possible way to read/write Binary from the server to the client?
[DiscordArchive] In 3.3.5a has anyone found a possible way to read/write Binary from the server to the client?
Archived author: Mali • Posted: 2025-05-21T18:16:02.286000+00:00
Original source
In 3.3.5a has anyone found a possible way to read/write Binary from the server to the client?
For example, sending an image from the server to the client using AIO?
Archived author: Titi • Posted: 2025-05-21T18:19:52.513000+00:00
Original source
custom packets? might be a bit heavy for addon messages (aio), also might not support sending raw bytes because they'd be special characters or it'd be too long
Archived author: Mali • Posted: 2025-05-21T18:20:22.352000+00:00
Original source
That's where base64 encoding would come into play.
Archived author: Titi • Posted: 2025-05-21T18:22:39.132000+00:00
Original source
isn't there a character limit ? I guess you could add some header to split between messages tho
ub(i, i) == '1' and 2 ^ (6 - i) or 0) end
ub(c + 1, c + 1)![[Image: image.png?ex=690c3ec1&is=690aed41&hm=4d3...219374bbf&]](https://cdn.discordapp.com/attachments/1086807686571642900/1374814743449043014/image.png?ex=690c3ec1&is=690aed41&hm=4d35a2799de3dc4035061847c94a348aeda8f04a46cf131e2c02b25219374bbf&)
Archived author: Mali • Posted: 2025-05-21T18:22:57.795000+00:00
Original source
```lua
function House_market(player, args)
local function base64Encode(data)
local b = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
return ((data:gsub('.', function(x)
local r, bcode = '', x:byte()
for i = 8, 1, -1 do r = r .. (bcode % 2 ^ i - bcode % 2 ^ (i - 1) > 0 and '1' or '0') end
return r
end)..'0000'):gsub('%d%d%d?%d?%d?%d?', function(x)
if (#x < 6) then return '' end
local c = 0
for i = 1, 6 do c = c + (x
ub(i, i) == '1' and 2 ^ (6 - i) or 0) end
return b
ub(c + 1, c + 1)
end)..({ '', '==', '=' })[#data % 3 + 1])
end
local file = io.open("image.png", "rb")
if not file then
player:SendBroadcastMessage("Converted image not found")
return false
end
local pngData = file:read("*a")
file:close()
local b64 = base64Encode(pngData)
local dataURL = "data:image/png;base64," .. b64
AIO.Handle(player, "Market", "Show", ids, owners, prices, xs, ys, zs, maps, zones, dataURL)
return false
end
```
server side ^
client side v
```lua
function UI.Show(player, img)
if img then
print(img)
return
end
```
![[Image: image.png?ex=690c3ec1&is=690aed41&hm=4d3...219374bbf&]](https://cdn.discordapp.com/attachments/1086807686571642900/1374814743449043014/image.png?ex=690c3ec1&is=690aed41&hm=4d35a2799de3dc4035061847c94a348aeda8f04a46cf131e2c02b25219374bbf&)
Archived author: Mali • Posted: 2025-05-21T18:23:09.256000+00:00
Original source
You can bypass character limits on WoW's client, as can be seen ^
Archived author: Mali • Posted: 2025-05-21T18:24:55.519000+00:00
Original source
I also exposed file open perms on the client, but I've yet to expose file write.
If I can expose file write perms on the client itself, I could just send rb from the server to the client and save.
But that is something I haven't yet exposed.
Only file open.
Archived author: Mali • Posted: 2025-05-21T18:26:15.211000+00:00
Original source
I have a mock system to "write" from the client.
But it sends the data back to the server where io is already readily available in Lua.
Archived author: Natrist • Posted: 2025-05-21T19:55:34.668000+00:00
Original source
0x0080C340
```C++
bool __cdecl Spell_C_HandleTerrainClick(struct CTerrainClickEvent const &)
```