User Control Panel
Advertisements

HELP US, HELP YOU!

Morphious: Chat command

 
Post new topic   Reply to topic    Bot Depot Forum Index -> Code Help
View unanswered posts
Author Message
m4g3_o_f4t3
Newbie
Newbie


Joined: 19 Mar 2004
Posts: 42
Location: New Zealand
Reputation: 26.8Reputation: 26.8Reputation: 26.8

PostPosted: Mon Apr 05, 2004 3:51 am    Post subject: Reply with quote

Hey i saw that on some Morphious bots then you type !chat it comes up with some rules
i was wondering how to do that because my friend wont tell me Sad

And also is there a way i can get a chat for moderater and up? :blink:
Back to top
jeanhub
Almost An Agent
Almost An Agent


Joined: 14 Feb 2004
Posts: 1138

Reputation: 50.7

PostPosted: Tue Apr 06, 2004 9:58 pm    Post subject: Reply with quote

Ok here is the staffroom...

Code:
<br /><br />if ($msg eq "staffroom") {<br />   if (!exists $msn->{staffroom})<br />   {<br />       $msn->{staffroom} = $self;<br />       &send($self, "This Is Now The Staff room ");<br />   }<br />   elsif ($self eq $msn->{staffroom})<br />   {<br />       &send($self, "You Are Currently In The Staff room.");<br />   }<br />   else<br />   {<br />       $msn->{staffroom}->invite($username);<br />       &send($self, "Ok $username Now Inviting You To The Staff room");<br />   }   <br />}


but i did not reall *lazy* understand what you mean... by rules...



if (msg eq "chat") {
$self->sendmsg("*NO inviting other bots
*NO inviting troublesome users
*NO spamming/flooding
*NO swearing
*NO racism
*NO playing games in the chatroom")
if ($reply eq yes) {
#chat thingy here
} else {
$self->sendmsg("\Hey accept My rules or go away :@")
}



do ou mean some thhing like this ^ or when you type !chat it sned you and welcoem message are those rules?
Back to top
Cer
Upgraded Agent
Upgraded Agent


Joined: 03 Feb 2004
Posts: 3776
Location: Michigan
Reputation: 146.9
votes: 4

PostPosted: Tue Apr 06, 2004 11:18 pm    Post subject: Reply with quote

If it's Andromeda you can use a callback. Razz
_________________
Current Site (2008) http://www.cuvou.com/
Back to top
Calum
Not Yet a God
Not Yet a God


Joined: 21 Feb 2004
Posts: 373
Location: england
Reputation: 34.7Reputation: 34.7Reputation: 34.7

PostPosted: Tue Apr 06, 2004 11:34 pm    Post subject: Reply with quote

i know what *lazy* mean

you would have to have some thing like

Code:
<br />if (msg eq "chat") {<br />$self->sendmsg("rules here")<br />if ($reply eq yes) {<br />#chat thingy here<br />} else {<br />$self->sendmsg("\:o you did not accept")<br />}<br />


or summat like that
Back to top
Cer
Upgraded Agent
Upgraded Agent


Joined: 03 Feb 2004
Posts: 3776
Location: Michigan
Reputation: 146.9
votes: 4

PostPosted: Tue Apr 06, 2004 11:36 pm    Post subject: Reply with quote

Or like this...

Code:
sub chat {<br />   my ($bot,$self,$user,$msg) = @_;<br /><br />   if ($msg eq "yes") {<br />      # invite to chat...<br />   }<br />   else {<br />      $bot->{settings}->{callback} = "chat";<br />      return "Rules...";<br />   }<br />}

_________________
Current Site (2008) http://www.cuvou.com/
Back to top
Calum
Not Yet a God
Not Yet a God


Joined: 21 Feb 2004
Posts: 373
Location: england
Reputation: 34.7Reputation: 34.7Reputation: 34.7

PostPosted: Tue Apr 06, 2004 11:36 pm    Post subject: Reply with quote

if this doesnt work then post saying it doesnt

but it should do there may be a few misplased things but...
Back to top
Cer
Upgraded Agent
Upgraded Agent


Joined: 03 Feb 2004
Posts: 3776
Location: Michigan
Reputation: 146.9
votes: 4

PostPosted: Tue Apr 06, 2004 11:37 pm    Post subject: Reply with quote

QUOTE(Cer @ Apr 6 2004, 06:36 PM)
Or like this...

Code:
sub chat {<br />   my ($bot,$self,$user,$msg) = @_;<br /><br />   if ($msg eq "yes") {<br />      # invite to chat...<br />   }<br />   else {<br />      $bot->{settings}->{callback} = "chat";<br />      return "Rules...";<br />   }<br />}

Well that's the Andromeda anyway, doesn't help you too much though. <_<

_________________
Current Site (2008) http://www.cuvou.com/
Back to top
Calum
Not Yet a God
Not Yet a God


Joined: 21 Feb 2004
Posts: 373
Location: england
Reputation: 34.7Reputation: 34.7Reputation: 34.7

PostPosted: Tue Apr 06, 2004 11:41 pm    Post subject: Reply with quote

lol cer i beat you Razz

I Sent Mine First AND mines For Morph Not That Silly Andromeda
Back to top
Stephen
Senior Member
Senior Member


Joined: 03 Dec 2003
Posts: 159

Reputation: 32.8Reputation: 32.8Reputation: 32.8

PostPosted: Wed Apr 07, 2004 5:14 am    Post subject: Reply with quote

QUOTE(Cer @ Apr 6 2004, 11:37 PM)
QUOTE(Cer @ Apr 6 2004, 06:36 PM)
Or like this...

Code:
sub chat {<br />   my ($bot,$self,$user,$msg) = @_;<br /><br />   if ($msg eq "yes") {<br />      # invite to chat...<br />   }<br />   else {<br />      $bot->{settings}->{callback} = "chat";<br />      return "Rules...";<br />   }<br />}

Well that's the Andromeda anyway, doesn't help you too much though. <_<

Lol cer Wink Your wrong there.. Morphious has callback in it.
It uses it in the same way andromeda does Smile
Back to top
Stephen
Senior Member
Senior Member


Joined: 03 Dec 2003
Posts: 159

Reputation: 32.8Reputation: 32.8Reputation: 32.8

PostPosted: Wed Apr 07, 2004 5:23 am    Post subject: Reply with quote

Code:
if ($msg eq "chat")<br />{<br />   if (!exists $self->{callback})<br />   {<br />      $self->{callback} = 'chat';<br />      &send($self, "*NO inviting other bots\n*NO inviting troublesome users\n*NO spamming/flooding\n*NO swearing\n*NO racism\n*NO playing games in the chatroom.\n\nYou must obey these rules in chat.\n\nType yes if you agree.\nType No if you dont.");<br />      return;<br />   }<br />}<br /> else<br />{<br />   if ($msg eq "yes")<br />   {<br />      if (!exists $msn->{chatroom})<br />      {<br />          &send($self, "This is now the chatroom.");<br />          $msn->{chatroom} = $self;<br />      }<br />      elsif($msn->{chatroom} eq $self)<br />      {<br />          &send($self, "Your in the chatroom.");<br />      }<br />      else<br />      {<br />          $msn->{chatroom}->invite($username);<br />          &send($self, "Inviting you to chatroom.");<br />      }<br />      delete $self->{callback};<br />   }<br />   if ($msg eq "no")<br />   {<br />      delete $self->{callback};<br />      &send($self, "Fine, dont enter chat then.");<br />   }<br />}
Back to top
m4g3_o_f4t3
Newbie
Newbie


Joined: 19 Mar 2004
Posts: 42
Location: New Zealand
Reputation: 26.8Reputation: 26.8Reputation: 26.8

PostPosted: Wed Apr 07, 2004 6:44 am    Post subject: Reply with quote

QUOTE(Stephen @ Apr 6 2004, 09:23 PM)
Code:
if ($msg eq "chat")<br />{<br />   if (!exists $self->{callback})<br />   {<br />      $self->{callback} = 'chat';<br />      &send($self, "*NO inviting other bots\n*NO inviting troublesome users\n*NO spamming/flooding\n*NO swearing\n*NO racism\n*NO playing games in the chatroom.\n\nYou must obey these rules in chat.\n\nType yes if you agree.\nType No if you dont.");<br />      return;<br />   }<br />}<br /> else<br />{<br />   if ($msg eq "yes")<br />   {<br />      if (!exists $msn->{chatroom})<br />      {<br />          &send($self, "This is now the chatroom.");<br />          $msn->{chatroom} = $self;<br />      }<br />      elsif($msn->{chatroom} eq $self)<br />      {<br />          &send($self, "Your in the chatroom.");<br />      }<br />      else<br />      {<br />          $msn->{chatroom}->invite($username);<br />          &send($self, "Inviting you to chatroom.");<br />      }<br />      delete $self->{callback};<br />   }<br />   if ($msg eq "no")<br />   {<br />      delete $self->{callback};<br />      &send($self, "Fine, dont enter chat then.");<br />   }<br />}

thatnks exactly what i needed...
Very Happy
Back to top
dvondrake
Not Yet a God
Not Yet a God


Joined: 11 Mar 2004
Posts: 314
Location: El Paso, Texas
Reputation: 32.6Reputation: 32.6Reputation: 32.6

PostPosted: Sun May 02, 2004 1:08 pm    Post subject: Reply with quote

QUOTE(Stephen @ Apr 6 2004, 09:23 PM)
Code:
if ($msg eq "chat")<br />{<br />   if (!exists $self->{callback})<br />   {<br />      $self->{callback} = 'chat';<br />      &send($self, "*NO inviting other bots\n*NO inviting troublesome users\n*NO spamming/flooding\n*NO swearing\n*NO racism\n*NO playing games in the chatroom.\n\nYou must obey these rules in chat.\n\nType yes if you agree.\nType No if you dont.");<br />      return;<br />   }<br />}<br /> else<br />{<br />   if ($msg eq "yes")<br />   {<br />      if (!exists $msn->{chatroom})<br />      {<br />          &send($self, "This is now the chatroom.");<br />          $msn->{chatroom} = $self;<br />      }<br />      elsif($msn->{chatroom} eq $self)<br />      {<br />          &send($self, "Your in the chatroom.");<br />      }<br />      else<br />      {<br />          $msn->{chatroom}->invite($username);<br />          &send($self, "Inviting you to chatroom.");<br />      }<br />      delete $self->{callback};<br />   }<br />   if ($msg eq "no")<br />   {<br />      delete $self->{callback};<br />      &send($self, "Fine, dont enter chat then.");<br />   }<br />}

Will this work in Mayabot 2.0??
Back to top
Gavin
God Like
God Like


Joined: 15 Mar 2004
Posts: 661
Location: Manchester, UK
Reputation: 36.2Reputation: 36.2Reputation: 36.2Reputation: 36.2

PostPosted: Sun May 02, 2004 1:09 pm    Post subject: Reply with quote

yer it does i tried it before
_________________
MSN: gavin [at] gavinbrittain [dot] co [dot] uk
E-Portfolio: www.gavinbrittain.co.uk (New version comming soon)
Back to top
dvondrake
Not Yet a God
Not Yet a God


Joined: 11 Mar 2004
Posts: 314
Location: El Paso, Texas
Reputation: 32.6Reputation: 32.6Reputation: 32.6

PostPosted: Sun May 02, 2004 6:16 pm    Post subject: Reply with quote

Thanks for the info Gavin!
Back to top
Gavin
God Like
God Like


Joined: 15 Mar 2004
Posts: 661
Location: Manchester, UK
Reputation: 36.2Reputation: 36.2Reputation: 36.2Reputation: 36.2

PostPosted: Sun May 02, 2004 6:24 pm    Post subject: Reply with quote

lol its alright we are all here to help eachother Razz
_________________
MSN: gavin [at] gavinbrittain [dot] co [dot] uk
E-Portfolio: www.gavinbrittain.co.uk (New version comming soon)
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Bot Depot Forum Index -> Code Help 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