• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Sending packets in otclient

trasaklasa

New Member
Joined
Mar 2, 2012
Messages
96
Reaction score
0
How its easiest way to send manually packet example: "0x96" or "0xA1" when I am online in game via otclient or other way?
 
at least in OTClientv8:
LUA:
local protocol = g_game.getProtocolGame()
local msg = OutputMessage.create()
-- \x96 = addU8(150)
-- \xA1 = addU8(161)
msg:addU8(150)
protocol:send(msg)
idk if that works in edubart/otclient, feel free to let me know :)


After Make outputMessage::addRawString available in Lua by divinity76 · Pull Request #93 · OTCv8/otcv8-dev (https://github.com/OTCv8/otcv8-dev/pull/93) is merged, in OTClientV8 version>=3.2.5 (which does not exist yet as of writing), you should be able to just write
Code:
msg:addRawString("\xA1");
instead of converting between hex and addU8...

Until then, though, you can use the javascript "\xA1".charCodeAt(0) to convert \xA1 to the addU8() code..


Also know that protocol:send(msg) adds the header automatically. If you don't want auto-header, use protocol:send(msg, false) (but know that messing up the header will break the connection to the server, so you probably do want the autoheader, unless you really know what you're doing..)
 
Last edited:
Back
Top