hi, I'm wondering what pointers and tips people have for people writing plugins using MSDP.
Currently I've based things off of KaVir's GW2 plugin, so the stripped down plugin looks like this:
The first thing I'd like to figure out is how people generally debug the MSDP packets sent by the mud; I watch the packet stream by selecting debug packets, but is there some other intermediate stream you can inspect or a way to create one so you can see the English translation of the MSDP negotiation and variables sent by the mud (hope that makes sense).
Currently I've based things off of KaVir's GW2 plugin, so the stripped down plugin looks like this:
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE muclient>
<!-- Saved on Thursday, July 14, 2011, 10:33 PM -->
<!-- MuClient version 4.64 -->
<!-- Plugin "conquest" generated by Plugin Wizard -->
<muclient>
<plugin
name="conquest"
author="george"
id="94bb7c5857d64917248618c6"
language="lua"
save_state="y"
date_written="2011-07-14 22:32:18"
requires="4.64"
version="1.0"
>
</plugin>
<!-- Get our standard constants -->
<include name="constants.lua"/>
<script>
<![CDATA[
--latest
local using_msdp = false
local msdp = {}
]]>
-- MSDP negotiation
local MSDP = 69
function OnPluginTelnetRequest (type, data)
if type == MSDP and data == "WILL" then
using_msdp = true
return true
else -- another protocol
return false
end -- if
end -- function OnPluginTelnetRequest
function OnPluginTelnetSubnegotiation (type, data)
if type == MSDP then
endpos=string.len(data)
for i=endpos,1,-1 do
if string.byte(data,i) == 1 then
variable = string.sub(data,i+1,endpos)
StoreVariable(variable, value)
endpos = i-1
elseif string.byte(data,i) == 2 then
value = string.sub(data,i+1,endpos)
endpos = i-1
end -- if
end -- for
end -- if
end -- function OnPluginTelnetSubnegotiation
</script>
</muclient>
The first thing I'd like to figure out is how people generally debug the MSDP packets sent by the mud; I watch the packet stream by selecting debug packets, but is there some other intermediate stream you can inspect or a way to create one so you can see the English translation of the MSDP negotiation and variables sent by the mud (hope that makes sense).