Page 1 of 2
Text only client- done!
Posted: 11 Mar 2012, 12:42
by Derpella
Sometimes everyone musts use some resources eating programs, but would like to keep tmw open to see some nice flamewars to join...
Whisperbot got modified a bit to make possible reading and imputing text from terminal/console.
Download:
https://gist.github.com/2016586 (if you have no idea how git works, just download files config and whisperbot.py by clicking "raw" next to them)
or just git://gist.github.com/2016586.git
You must edit config file entering your data (case sensitive!), rename to config.py, then run whisperbot.py file, which needs having Python installed.
Big thanks for:
-kook who did input possibility and many small fixes
-anonymous author who made Whisperbot
-Mistakes who shared the original Whisperbot
-nikin who did logging code
-pwet who cooperated :)
Re: Text-mode client ;)
Posted: 11 Mar 2012, 13:16
by Chicka-Maria
First code is a fail : maltarules is of no more

Re: Text-mode client ;)
Posted: 11 Mar 2012, 13:38
by kook
Re: Text-mode client ;)
Posted: 11 Mar 2012, 13:40
by kook
ill leave removing the square as an exercise...
Re: Text-mode client ;)
Posted: 11 Mar 2012, 14:19
by Crush
The Gist you were looking for has been deleted. Sorry about that!
Re: Text-mode client ;)
Posted: 11 Mar 2012, 14:24
by kook
Re: Text-mode client ;)
Posted: 11 Mar 2012, 14:42
by Derpella
Hmm... it is working, but I seem to have a one warning...
http://pastebin.com/zQA77H4V
Re: Text-mode client ;)
Posted: 11 Mar 2012, 15:18
by kook
thats a common error.
Re: Text-mode client ;)
Posted: 21 Mar 2012, 08:21
by Derpella
I took your latest kook's version and made :
-whispers readable
-logging possible, including own text and whispers
-timestamps
http://pastebin.com/eTJnvBTQ
Download:
http://pastebin.com/download.php?i=eTJnvBTQ
What I'll try to do (or force poor kookie :3):
-making whispering and using commands, like /present possible
-cutting out color and market tab marks (like ##0)
-cutting out "^@" from end of lines in logs
Re: Text-mode client ;)
Posted: 21 Mar 2012, 17:51
by o11c
Derpella wrote:-cutting out "^@" from end of lines in logs
Just add [:-1] where you need to remove it.
Or, you can read the '\0' it in the sendall, and replace
message = packet[28:]
with
message = packet[28:-1]
Re: Text only client- done!
Posted: 21 Mar 2012, 17:53
by Derpella
You fell from the sky to me!
Now I have opposite problem: the NULL sign isn't sent when you type in tty, and because of that commands like /present and /whisper don't work...
Re: Text only client- done!
Posted: 21 Mar 2012, 17:55
by o11c
You'll have to add it then. Try replacing:
return "\x96\0%s%s%s" % ...
with:
return "\x96\0%s%s%s\0" % ...
etc
Re: Text only client- done!
Posted: 21 Mar 2012, 18:46
by kook
// Added + 1 in order to let eAthena parse admin commands correctly
https://github.com/mana/mana/blob/maste ... andler.cpp
hmhhmh, but, /me is done by typing *xxx*, see this line:
void ChatHandler::me(const std::string &text)
{
std::string action = strprintf("*%s*", text.c_str());
talk(action);
}
as per other /actions, the hub is here:
https://github.com/mana/mana/blob/maste ... andler.cpp
and i dare not..
Re: Text only client- done!
Posted: 27 May 2013, 17:00
by 0x0BAL
I cant get this working with Python 3.2.2 the last version
i get an invalid syntax error
Re: Text only client- done!
Posted: 28 May 2013, 01:50
by kook
0x0BAL wrote:I cant get this working with Python 3.2.2 the last version
i get an invalid syntax error
python 2.7 is here to stay, no reason to run this in version 3..or is there?