View previous topic :: View next topic |
Author |
Message |
Olyn Immortal
Joined: 23 Jul 2008 Posts: 3252 Location: Pennsylvania
|
Posted: Thu Sep 25, 2014 3:39 pm Post subject: MUSHclient Plugin Development Thread |
|
|
It looks like MUSHclient and TinTin++ still be the big two clients for those off us interested in msdp. Msdp support is the biggest gamechanger that I can think of in our game's history. I'm curious to see who is interested/capable of helping to developing a true AR plugin for this client. I came across this screenshot of another game's plugin. We can definitely do this and more.
http://www.slothmud.org/images/splork/v2.5%20MC.PNG |
|
Back to top |
|
|
Davairus Implementor
Joined: 16 Jan 2004 Posts: 10368 Location: 0x0000
|
|
Back to top |
|
|
Olyn Immortal
Joined: 23 Jul 2008 Posts: 3252 Location: Pennsylvania
|
Posted: Thu Sep 25, 2014 4:51 pm Post subject: |
|
|
It's a place to start. |
|
Back to top |
|
|
Mikoos
Joined: 03 Nov 2012 Posts: 474
|
Posted: Thu Sep 25, 2014 5:47 pm Post subject: |
|
|
Sign me up. set up the main repo and I'll do a pull I'm guessing we'd want to basically clone the webclient? so something like these features:
minimap,
affects,
group members listed,
health, mana, and move bars,
character sheet,
inventory,
an exp bar
and whatever else.
hell, we could find an open sourced client and hack the crap out of it (as long as it already supports MSDP) |
|
Back to top |
|
|
Faelon Emissary
Joined: 23 Feb 2006 Posts: 938 Location: Your moms house.
|
Posted: Thu Sep 25, 2014 6:10 pm Post subject: |
|
|
I think Mudlet is open source and it supports msdp. |
|
Back to top |
|
|
Davairus Implementor
Joined: 16 Jan 2004 Posts: 10368 Location: 0x0000
|
Posted: Thu Sep 25, 2014 8:36 pm Post subject: |
|
|
mudlet supports ATCP and our code doesnt support that, but it does support fallback to MSDP through ATCP (the two protocols are actually very similar). i tried to figure this out a couple nights ago but eventually dropped all the fucks i gave.
client/server requests and responses
Client: IAC SB ATCP "MSDP" IAC SE
Client: IAC SB ATCP "REPORT HEALTH MANA" IAC SE
Server: IAC SB ATCP "MSDP.HEALTH 500" IAC SE
Server: IAC SB ATCP "MSDP.MANA 100" IAC SE
You can probably do that with any actp supporting mud client
the alleged mudlet script
sendATCP("MSDP", "")
sendATCP("REPORT", "HEALTH MANA ACTIONS")
display(atcp)
Displays:
table {
'MSDPMANA': '150'
'MSDPACTIONS': '1280'
'MSDPHEALTH': '1352'
}
using
int TLuaInterpreter::sendATCP( lua_State *L )
{
string msg;
if( ! lua_isstring( L, 1 ) )
{
lua_pushstring( L, "wrong argument type" );
lua_error( L );
return 1;
}
else
{
msg = lua_tostring( L, 1 );
}
string what;
if( ! lua_isstring( L, 2 ) )
{
lua_pushstring( L, "wrong argument type" );
lua_error( L );
return 1;
}
else
{
what = lua_tostring( L, 2 );
}
string _h;
_h += TN_IAC;
_h += TN_SB;
_h += 200;
_h += msg;
_h += " ";
_h += what;
_h += TN_IAC;
_h += TN_SE;
Host * pHost = TLuaInterpreter::luaInterpreterMap[L];
pHost->mTelnet.socketOutRaw( _h );
return 0;
}
source: http://forums.mudlet.org/viewtopic.php?f=7&t=1418&sid=bba9e608ebea617ecb2f13494f763941&start=20
look for this file on that thread that should be of help. http://forums.mudlet.org/download/file.php?id=306 |
|
Back to top |
|
|
Olyn Immortal
Joined: 23 Jul 2008 Posts: 3252 Location: Pennsylvania
|
Posted: Thu Sep 25, 2014 9:16 pm Post subject: |
|
|
mudlet 3.0.0 alpha was just released 2 weeks ago and has native msdp support |
|
Back to top |
|
|
Mikoos
Joined: 03 Nov 2012 Posts: 474
|
Posted: Thu Sep 25, 2014 11:30 pm Post subject: |
|
|
hmmm seems workable. I can't believe it's 2014 and there's not a java(or even python) client with MSDP support. I hate Lua in mudlet, but if we can do everything in cpp, then I won't have a problem with it. |
|
Back to top |
|
|
Vanisse Immortal
Joined: 06 Jan 2006 Posts: 2793 Location: inside a tree
|
Posted: Fri Sep 26, 2014 4:12 am Post subject: |
|
|
just wanted to temporarily threadjack and say you guys are awesome. that's all. and now, back to programming |
|
Back to top |
|
|
Rothak
Joined: 03 Oct 2011 Posts: 257 Location: Japan
|
Posted: Sun Sep 28, 2014 5:53 pm Post subject: |
|
|
Is there a way to send a time once a certain trigger happens in game? I use mush client but I'm not savvy by any means. If someone knows one, could you send it here? Thanks |
|
Back to top |
|
|
Vanisse Immortal
Joined: 06 Jan 2006 Posts: 2793 Location: inside a tree
|
|
Back to top |
|
|
Mikoos
Joined: 03 Nov 2012 Posts: 474
|
Posted: Wed Oct 01, 2014 7:24 am Post subject: |
|
|
alright so I'm an idiot. Mushclient does do everything we want and is more customizable than I realized(the source is open, but we won't have to mess with that for this) anyway the generic plugin sort of blows up and I had to download a new one to mess with(I would post a screenshot, but not advertising another mud). basically the goal here for mushclient would be to develop XML with lua inside of it. the XML will format the client for the display and the lua will take care of the MSDP protocal. once that's done we'll flesh it out with specific scripts and aliases. will post a link to the repo once I have the basics going. |
|
Back to top |
|
|
Mikoos
Joined: 03 Nov 2012 Posts: 474
|
Posted: Thu Jan 29, 2015 7:39 pm Post subject: |
|
|
Code: |
testing testing..123 |
|
|
Back to top |
|
|
Mikoos
Joined: 03 Nov 2012 Posts: 474
|
Posted: Thu Jan 29, 2015 7:50 pm Post subject: |
|
|
Alright so, below this is a simple lua script I made, just to see what lua was all about. originally it was suppose to be OOP, which is why everything is encapsulated in mines, but OOP inside of lua, because it's inside of mushclient, is fugly so I didn't go with that. Anyway, it collects silver ore and it should work, but you may have to tinker with the path, might have broke it. This will be the last lua script I make for the mushclient plugin, I hate tje so called 'timer' which is why it's not in the script. the way it increments and decrements is retarded (which is why you see variable = variable +1, instead of variable++) and all around it got on my nerves, thankfully mushclient supports python, so I'm going with that. AFTER I do the MSDP thing. And if anyone with l33t XML skills wants to hop on the project, that would be great.
Code: |
require 'tprint'
mines = {
operating = false;
step = 1;
obtained_ore = false;
move_status = false;
evil_mage = false;
two_east_mage = false;
max_silver_ore = 0;
silver_ore_count = 0;
golems_in_room = 0;
granite_golems_killed = 0;
silver_golems_killed = 0;
total_golems_killed = 0;
gold_collected = 0;
path_to_boulder = "4ne5nenwnun3d7n";
path_from_boulder = "7s3usdsesw5sw4s";
path_forward = {'d', 'd', 's', 'w', 's', 'e', 's', 'e', 's', 'w', 'w', 'n', 'w'};
path_backward = {'e', 's', 'e', 'e', 'n', 'w', 'n', 'w', 'n', 'e', 'n', 'u', 'u'};
path_bfix = {'u', 'u', 'n', 'e', 'n', 'w', 'n', 'w', 'n', 'e', 'e', 's', 'e'};
}
function add_mine_triggers()
AddTrigger("thirst", "You are thirsty.", "get canteen sack | drink cant | drink cant | drink cant | put cant sack", trigger_flag.Enabled , custom_colour.Custom15, 0, "", "")
AddTrigger("hunger", "You are hungry.", "get cake sack | eat cake", trigger_flag.Enabled , custom_colour.Custom15, 0, "", "")
AddTrigger("graniteenter", "A granite golem enters the room.", "", trigger_flag.Enabled , custom_colour.Custom15, 0, "", "add_fighting_golems")
AddTrigger("silverenter", "A silver golem enters the room.", "", trigger_flag.Enabled , custom_colour.Custom15, 0, "", "add_fighting_golems")
AddTrigger("silverdead", "A shambling silver golem is DEAD!!", "", trigger_flag.Enabled , custom_colour.Custom15, 0, "", "silver_killed")
AddTrigger("granitedead", "A shambling granite golem is DEAD!!", "", trigger_flag.Enabled , custom_colour.Custom15, 0, "", "granite_killed")
AddTrigger("oresack", "You get a lump of silver ore from the corpse of a shambling silver golem.", "put ore sack", trigger_flag.Enabled , custom_colour.Custom15, 0, "", "add_silver_ore")
AddTrigger("takeore", "A lump of valuable silver ore is lying here.", "get ore | put ore sack", trigger_flag.Enabled , custom_colour.Custom15, 0, "", "add_silver_ore")
AddTrigger("magician", "(White Aura) In a dark shroud, a magician raises his minions.", "", trigger_flag.Enabled , custom_colour.Custom15, 0, "", "stop")
AddTrigger("moveon", "They aren't here.", "", trigger_flag.Enabled , custom_colour.Custom15, 0, "", "can_move")
end
function mine()
mines.operating = true;
to_boulder();
move();
end
function stop()
mines.operating = false
mines.obtained_ore = false
mines.step = 1
end
function check_run_status()
print("Running status is " .. mines.operating)
end
function to_boulder()
Execute("#4ne5nenwnun3d7n")
Send("open boulder");
end
function from_boulder()
Execute("#7s3usdsesw5sw4s")
stop()
end
function can_move()
mines.move_status = true
move()
end
function move()
if not mines.operating then
return
end
if mines.obtained_ore then
move_backward()
return
else
Send("scan")
if mines.operating then
Send(mines.path_forward[mines.step])
mines.step = mines.step + 1
Send("kill golem")
end
end
end
function move_backward()
Send("scan")
if mines.operating then
Send(mines.path_bfix[mines.step])
mines.step = mines.step - 1
end
if mines.step == 1 then
Send(mines.path_bfix[mines.step])
from_boulder()
end
Send("kill golem")
end
function add_fighting_golems()
mines.golems_in_room = mines.golems_in_room + 1
mines.move_status = false
end
function remove_fighting_golems()
mines.golems_in_room = mines.golems_in_room - 1
if mines.golems_in_room == 0 then
mines.move_status = true
end
end
function add_silver_ore()
mines.silver_ore_count = mines.silver_ore_count + 1
mines.obtained_ore = true
end
function granite_killed()
mines.granite_golems_killed = mines.granite_golems_killed + 1
remove_fighting_golems()
Send("kill golem")
end
function silver_killed()
mines.silver_golems_killed = mines.silver_golems_killed + 1
remove_fighting_golems()
Send("kill golem")
end
function show_totals()
print ("Total Granite Golems " .. (mines.granite_golems_killed))
print ("Total Silver Golems " .. (mines.silver_golems_killed))
mines.total_golems_killed = mines.silver_golems_killed + mines.granite_golems_killed
print ("Total Golems Killed " .. (mines.total_golems_killed))
print ("Total Silver Ore collected " .. (mines.silver_ore_count))
print ("Operating status is " .. (mines.operating))
end |
for the budding lua scriptor you can:
*Make it so it clears the entire mines, the setup is already there for you
*finish the gold totals
*add a function that calls add_mine_triggers() then mine(). then a function of the inverse
*The second to last parameter of AddTrigger accepts a music file, so add something like the Zelda item get sound, when an ore is collected and such.
*and some other things I'm probably forgetting, haven't worked on this in months.
Once MSDP is out of the way(and I make the git repo), I make more with Python and python-twitter do some some crazy things |
|
Back to top |
|
|
Mikoos
Joined: 03 Nov 2012 Posts: 474
|
Posted: Thu Jan 29, 2015 7:56 pm Post subject: |
|
|
Something else for the list I forgot to mention. In the function you make to call up the script, make it so that that it accepts a parameter for total silver ore you wanted collected. The variable is already there, max_silver_ore |
|
Back to top |
|
|
Mikoos
Joined: 03 Nov 2012 Posts: 474
|
Posted: Tue Feb 03, 2015 12:18 am Post subject: |
|
|
UPDATE: So I have the mini map being drawn to a mini-window of MUSHclient, unfortunately the colors are not working properly, due to an issue in MUSHclient. The client can handle all kinds of colors from strings, but only if you can get what's called 'style runs' of the string. unfortunately this is almost impossible with strings collected from MSDP variables. The good news is, I'm talking to Nick Gammon, the gentleman who programmed MUSHclient, and seeing what we can do...if we hit a roadblock, or if he comes up with a ridiculous way to get around this, I may submit a patch to MUSHclient (or he may write his own.) ...stay tuned. |
|
Back to top |
|
|
Davairus Implementor
Joined: 16 Jan 2004 Posts: 10368 Location: 0x0000
|
Posted: Tue Feb 03, 2015 2:34 am Post subject: |
|
|
THATS not going to work because you are supposed to use the autmapper not try to process the one we send
read help color code + use substitutions is probably your answer |
|
Back to top |
|
|
Mikoos
Joined: 03 Nov 2012 Posts: 474
|
Posted: Tue Feb 03, 2015 3:17 am Post subject: |
|
|
Why send a map, if clients are not suppose to use it? It works for tintin++ just fine, in fact Tintin++ automatically formats and colors everything from ROOM_MAP, but not MUSHclient. My goal is to keep the processing of the mud client minimal as possible, and having the map automatically sent by the server should do that. And plus it's sent via MSDP, which is what I thought the purpose of this was. |
|
Back to top |
|
|
Davairus Implementor
Joined: 16 Jan 2004 Posts: 10368 Location: 0x0000
|
Posted: Tue Feb 03, 2015 3:39 am Post subject: |
|
|
ok |
|
Back to top |
|
|
Mikoos
Joined: 03 Nov 2012 Posts: 474
|
Posted: Tue Feb 03, 2015 3:54 am Post subject: |
|
|
actually, with more thought I see what you're thinking: That his client was designed for his automapper alone and not originally for MSDP, which would make sense, but on the other hand all I'm doing is parsing a string for basic ANSI codes...which his client should have been able to do (and it does, but only when packets are received, not with strings that are already stored in a table.) |
|
Back to top |
|
|
|