Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ General
➜ advice on creating plugin with MSDP from scratch?
advice on creating plugin with MSDP from scratch?
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| George
(9 posts) Bio
|
Date
| Thu 25 Aug 2011 02:54 PM (UTC) |
Message
| 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:
<?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). | Top |
|
Posted by
| Chyort
USA (58 posts) Bio
|
Date
| Reply #1 on Fri 26 Aug 2011 06:47 AM (UTC) Amended on Fri 26 Aug 2011 06:48 AM (UTC) by Chyort
|
Message
|
George said:
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).
Assuming i understand you right, I think this might help you.
http://clanscw.brinkster.net/godwars/topic.asp?TOPIC_ID=2522
KaVir has a simple plugin that notes the MSDP info.
Quote:
Note that all this does is display the data that's being sent back and forth - there are no energy bars etc. However it's really easy to add this to existing plugins to replace the trigger they usually use to capture text from the screen.
I recently started looking at MSDP, and what KaVir's plugin can do... But it all is Way beyond me at this point :P
I hope this helps. | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
12,822 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top