Author Topic: Channel Notifications  (Read 4906 times)

0 Members and 1 Guest are viewing this topic.

Offline Craftman_21

  • Newbie
  • *
  • Posts: 5
    • View Profile
Channel Notifications
« on: January 18, 2008, 04:19:29 pm »
How do i set it so that when someone joins a game it shows the game they joined in the channel?

Thank you

Offline Camel

  • Hero Member
  • *****
  • Posts: 1703
    • View Profile
    • BNU Bot
Re: Channel Notifications
« Reply #1 on: January 18, 2008, 05:35:49 pm »
There isn't any particularly good way to do that, but if you're mutual friends, you could write a filter to catch the whisper and translate it to an announcement.

<Camel> i said what what
<Blaze> in the butt
<Camel> you want to do it in my butt?
<Blaze> in my butt
<Camel> let's do it in the butt
<Blaze> Okay!

Offline Craftman_21

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Channel Notifications
« Reply #2 on: January 18, 2008, 11:51:25 pm »
You think you could give me a small example or template of how to filter a whisper of joining a game into an announcement?

Also is it possible to have a command to list the current users online that are in the bot's database or a seperate list of users?
« Last Edit: January 19, 2008, 09:12:42 am by Craftman_21 »

Offline Camel

  • Hero Member
  • *****
  • Posts: 1703
    • View Profile
    • BNU Bot
Re: Channel Notifications
« Reply #3 on: January 19, 2008, 04:30:20 pm »
I have no experience with JavaOp; I'm simply stating that it would be possible to generate such an event by watching the incoming whispers.

Take a look at the plugins that exist already, and you should be able to use that to create a new one.

You could use the friends for the latter part of your question.

<Camel> i said what what
<Blaze> in the butt
<Camel> you want to do it in my butt?
<Blaze> in my butt
<Camel> let's do it in the butt
<Blaze> Okay!

Offline chuck

  • Full Member
  • ***
  • Posts: 335
  • Canadian Biathlete
    • View Profile
    • Chucks Blog
Re: Channel Notifications
« Reply #4 on: January 19, 2008, 09:55:10 pm »
Take a look at my SleepScript plugin, it should be fairly simple to create a script to do this.
Chucks Blog
JavaOp2 Plugins

Quote
Error, keyboard not connected. Press F1 to continue.

Offline Craftman_21

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Channel Notifications
« Reply #5 on: January 20, 2008, 03:23:29 pm »
Ahh this is something i've been looking for all this time.

Few questions though, how do have it set that anytime someone says a specific word that it will reply with a particular message.

For example, anytime someone says bunny it would display the bunny. Because currently the person has to say "bunny" by itself in order to get a response.

Also how do you create a user database in which it can interact with b.net so you can check and see which users are online and which game they are currently or if they are offline.

And my last question, what function would you use to make the bot do a particular action every 10 minutes.

Im sorry if this is alot of questions that you dont have time for, im really noob to bots and i've never made scripts before so its all a new experience to me.
« Last Edit: January 20, 2008, 03:40:32 pm by Craftman_21 »

Offline chuck

  • Full Member
  • ***
  • Posts: 335
  • Canadian Biathlete
    • View Profile
    • Chucks Blog
Re: Channel Notifications
« Reply #6 on: January 20, 2008, 07:42:32 pm »
Few questions though, how do have it set that anytime someone says a specific word that it will reply with a particular message.

For example, anytime someone says bunny it would display the bunny. Because currently the person has to say "bunny" by itself in order to get a response.
You would probably need to use an array to make it possible to say "bunny is funny" and it still respond with the bunny.

Also how do you create a user database in which it can interact with b.net so you can check and see which users are online and which game they are currently or if they are offline.
Thats a fairly large task, and would require you set timers to /whois the users every couple mins, listen for friend messages, etc. I'd only attempt this once you are comfortable with the scripting language, and I doubt you'll get anyone to do it for you without a price. I'd help with it, but I'm fairly bust lately.

And my last question, what function would you use to make the bot do a particular action every 10 minutes.
To tell you the truth, I don't remember how to do that in sleep. If you read the sleep manual, (Google for java sleep language documentation) you should be able to figure it out.
« Last Edit: January 20, 2008, 07:44:42 pm by chuck »
Chucks Blog
JavaOp2 Plugins

Quote
Error, keyboard not connected. Press F1 to continue.

Offline chuck

  • Full Member
  • ***
  • Posts: 335
  • Canadian Biathlete
    • View Profile
    • Chucks Blog
Re: Channel Notifications
« Reply #7 on: January 20, 2008, 07:43:35 pm »
EDIT: Ugh, double post by mistake. Oopsie.
Chucks Blog
JavaOp2 Plugins

Quote
Error, keyboard not connected. Press F1 to continue.

Offline Craftman_21

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Channel Notifications
« Reply #8 on: January 20, 2008, 07:53:15 pm »
If i tried writing the script for the user online/offline check, would you mind looking over it to help me optimize it or see if im doing something wrong?

And is there a basic function to check if a user is online or an interface to help with friend lists and battle.net thats in sleepscript 2.0?

Also is it possible for the timing function to have multiple timer instances for multiple routines?

How do i use the $tick function to have it set that when 5000 milliseconds or 5 seconds passes it displays "5 seconds have passed"

My Current script trying to do it:

sub onMessage {
   if ($2 eq ".starttimer") {
   $ticks();
   if ($ticks eq 5000);
   sendMessage("5 Seconds have passed....");
   }
}
« Last Edit: January 21, 2008, 08:38:17 am by Craftman_21 »

Offline chuck

  • Full Member
  • ***
  • Posts: 335
  • Canadian Biathlete
    • View Profile
    • Chucks Blog
Re: Channel Notifications
« Reply #9 on: January 21, 2008, 06:11:05 pm »
I'd help, but I have literally forgotten how to use sleep. I know there are a few great scripters in it around here somewhere, but I forget their names.

Your best bet is to mess around with some simple scripts until you get used to the language, then try some complicated stuff. Trial and error is a good way to learn.
Chucks Blog
JavaOp2 Plugins

Quote
Error, keyboard not connected. Press F1 to continue.