User Control Panel
Advertisements

HELP US, HELP YOU!

2 commands optimized for White Warrior, tested and working

 
Post new topic   Reply to topic    Bot Depot Forum Index -> Commands
View unanswered posts
Author Message
ceceboyken
Newbie
Newbie


Joined: 29 Jun 2005
Posts: 18

Reputation: 10.8

PostPosted: Sat Jul 16, 2005 4:28 pm    Post subject: 2 commands optimized for White Warrior, tested and working Reply with quote

i edited these commands for white warrior and wanted to share them with you Smile I DIDN'T CREATE THEM
This one is to change your bots name, put in admin commands directory:
Code:

#Made for White Warrior
#Coded by Martin
#Edited by ceceboyken

if($msg =~ /^!botname (.*)/)
{
$wrd = "$1";
$self->set_name("$wrd");
$self->sendmsg("Nick set to $wrd");
}
elsif ($msg =~ /!botname/i) {

$self->sendmsg("(i) Use !botname <name>");
}

And this one is to convert text to speech Cool
Code:

#Made for White Warrior
#Coded by mattaustin
#Edited by ceceboyken

use LWP::UserAgent;

if ($msg =~ /!speech (.*)$/i) {

$ua = LWP::UserAgent->new;

$text = "$1";

my $req = HTTP::Request->new(POST =>

'http://hegel.research.att.com/tts/cgi-bin/nph-talk');
$req->content("txt=$text&voice=crystal");
my $res = $ua->request($req);
$res->{_content} =~ m/speech\/(.*?wav)/;
$self->sendmsg(":o The spoken

word or phrase:\nhttp://hegel.research.att.com/tts/speech/$1");
}

elsif ($msg =~ /!speech/i) {

$self->sendmsg("(i) Use !speech <word or phrase>");
}


Last edited by ceceboyken on Sun Jul 17, 2005 10:13 am; edited 2 times in total
Back to top
Cheater
Senior Member
Senior Member


Joined: 10 Jun 2005
Posts: 236

Reputation: 15.8Reputation: 15.8

PostPosted: Sat Jul 16, 2005 5:31 pm    Post subject: Reply with quote

In the first code, you might want to try this

Code:
if($msg =~ /^!botname (.*)/)
{
$wrd = "$1";
$self->set_name("$wrd");
$self->sendmsg("(i)Name set to $wrd");
}
elsif ($msg =~ /!botname/i) {

$self->sendmsg("(i) Use !botname <name>");
}


That way you are sending a reply when the name is set.

And in the second code, you might want to either ask the people hosting the site if they mind you using it in your bot, or even better make a copy of your own on your own site to ensure it is always up and running. But I like the codes. Nice job.

P.S. When I tried to get to the site, I got an error. So I tried going to the main page and got the apache test page. I haven't tested it in a bot, but I'm just letting you know.

P.P.S. You might want to add a line of credit like this at the top

Code:

#Edited by: CeceBoyKen
Back to top
ceceboyken
Newbie
Newbie


Joined: 29 Jun 2005
Posts: 18

Reputation: 10.8

PostPosted: Sat Jul 16, 2005 6:17 pm    Post subject: Reply with quote

Quote:
P.S. When I tried to get to the site, I got an error. So I tried going to the main page and got the apache test page. I haven't tested it in a bot, but I'm just letting you know.
i got that problem too in the beginning, but it works in the bot Smile
btw, try this:
http://hegel.research.att.com/tts/cgi-bin/nph-talk
Quote:

And in the second code, you might want to either ask the people hosting the site if they mind you using it in your bot, or even better make a copy of your own on your own site to ensure it is always up and running.
the REAL creator of this script has to do that i think, i cannot make a copy of it because it's scripted
Quote:

P.P.S. You might want to add a line of credit like this at the top

yeah ill do that Razz EDIT: done !
Quote:
But I like the codes. Nice job.
Thanks Cool
Back to top
Cheater
Senior Member
Senior Member


Joined: 10 Jun 2005
Posts: 236

Reputation: 15.8Reputation: 15.8

PostPosted: Sun Jul 17, 2005 1:57 am    Post subject: Reply with quote

Your link worked...thanks. And one last edit you might want to make. You might want to add a few more comments. With this info:

Original Creator
How to use the script (what command you send to the bot)
A description

But once again, nice job.
Back to top
ceceboyken
Newbie
Newbie


Joined: 29 Jun 2005
Posts: 18

Reputation: 10.8

PostPosted: Sun Jul 17, 2005 10:14 am    Post subject: Reply with quote

fixed Wink
Back to top
Cheater
Senior Member
Senior Member


Joined: 10 Jun 2005
Posts: 236

Reputation: 15.8Reputation: 15.8

PostPosted: Sun Jul 17, 2005 12:38 pm    Post subject: Reply with quote

Ok. You just gave me a gret idea for my bot Wink
Back to top
ceceboyken
Newbie
Newbie


Joined: 29 Jun 2005
Posts: 18

Reputation: 10.8

PostPosted: Sun Jul 17, 2005 4:05 pm    Post subject: Reply with quote

Cheater wrote:
Ok. You just gave me a gret idea for my bot Wink

tell me Very Happy
Back to top
Addict
Not Yet a God
Not Yet a God


Joined: 21 Jan 2004
Posts: 473

Reputation: 34.4Reputation: 34.4Reputation: 34.4

PostPosted: Sun Jul 17, 2005 8:27 pm    Post subject: Re: 2 commands optimized for White Warrior, tested and worki Reply with quote

ceceboyken wrote:
i edited these commands for white warrior and wanted to share them with you Smile I DIDN'T CREATE THEM
This one is to change your bots name, put in admin commands directory:
Code:

#Made for White Warrior
#Coded by Martin
#Edited by ceceboyken

if($msg =~ /^!botname (.*)/)
{
$wrd = "$1";
$self->set_name("$wrd");
$self->sendmsg("Nick set to $wrd");
}
elsif ($msg =~ /!botname/i) {

$self->sendmsg("(i) Use !botname <name>");
}

And this one is to convert text to speech Cool
Code:

#Made for White Warrior
#Coded by mattaustin
#Edited by ceceboyken

use LWP::UserAgent;

if ($msg =~ /!speech (.*)$/i) {

$ua = LWP::UserAgent->new;

$text = "$1";

my $req = HTTP::Request->new(POST =>

'http://hegel.research.att.com/tts/cgi-bin/nph-talk');
$req->content("txt=$text&voice=crystal");
my $res = $ua->request($req);
$res->{_content} =~ m/speech\/(.*?wav)/;
$self->sendmsg(":o The spoken

word or phrase:\nhttp://hegel.research.att.com/tts/speech/$1");
}

elsif ($msg =~ /!speech/i) {

$self->sendmsg("(i) Use !speech <word or phrase>");
}


When you have a variable, you dont need to use quotes. Like this:

Code:

if($msg =~ /^!botname (.*)$/i) {
my $wrd = $1;
if($wrd > 0){
$self->set_name($wrd);
$self->sendmsg("Nick set to ".$wrd);
}else{
$self->sendmsg("(i) Use !botname <name>");
}


Also, most people use the new MSN modules.. so this command is out of date.
Back to top
darkmonkey
The Merovingian
The Merovingian


Joined: 18 Apr 2004
Posts: 2557
Location: London, England
Reputation: 39.3Reputation: 39.3Reputation: 39.3Reputation: 39.3
votes: 7

PostPosted: Sun Jul 17, 2005 8:57 pm    Post subject: Reply with quote

Not for the released WhiteWarrior Razz. (Yes, that was a subtle hint that a new one is on it's way).
_________________
~ Josh
[ Need bot hosting on a dedicated server? PM me. ]
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Bot Depot Forum Index -> Commands All times are GMT
Page 1 of 1

 



Protected by phpBB Security phpBB-TweakS
phpBB Security Has Blocked 9 Exploit Attempts.
Antispam Captcha Mod by phpbb-security.com
Powered by phpBB © 2001, 2005 phpBB Group