News:

Happy New Year! Yes, the current one, not a previous one; this is a new post, we swear!

Main Menu

Channel Notifications

Started by Craftman_21, January 18, 2008, 04:19:29 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Craftman_21

How do i set it so that when someone joins a game it shows the game they joined in the channel?

Thank you

Camel

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!

Craftman_21

#2
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?

Camel

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!

chuck

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.

Craftman_21

#5
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.

chuck

#6
Quote from: Craftman_21 on January 20, 2008, 03:23:29 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.

Quote from: Craftman_21 on January 20, 2008, 03:23:29 PM
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.

Quote from: Craftman_21 on January 20, 2008, 03:23:29 PM
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.
Chucks Blog
JavaOp2 Plugins

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

chuck

EDIT: Ugh, double post by mistake. Oopsie.
Chucks Blog
JavaOp2 Plugins

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

Craftman_21

#8
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....");
   }
}

chuck

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.