mIRC Home    About    Download    Register    News    Help

Print Thread
groups #32217 26/06/03 02:05 AM
Joined: Jun 2003
Posts: 5
C
ckaos Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
C
Joined: Jun 2003
Posts: 5
I'm having some trouble with a remote script.
Here is what I want to do..
on 1:TEXT:!commands:#: {
... a whole pile of /notify $nick commands ...
}

of course this floods the server and the user only gets the first 12 or so notifys.

Someone suggested using a timer and group the notify commands so that they would come out in groups every 30 seconds or whatever. The problem is I am having trouble understanding how/were to define groups and how to use them. I've read the mIRC help on Creating groups and /enable, disable commands but I'm not getting it or something cause it's not working.

I've placed the #group1 on (bunch of notifys) #group1 off in the remote script. Is that were it goes? Were do you enable a group? how do you use a group in a command line ... for example how do you use it with /timer?

thanks
I think I'm really lost.

Re: groups #32218 26/06/03 02:14 AM
Joined: Jan 2003
Posts: 3,012
KingTomato Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
Suggestion:

make a text file that is full of the commands liek commands.txt in the mirc directory, then on the command try:

on 1:TEXT:!commands:#: {
; delay in seconds
var %delay = 3
; sends the users the commands from the text file
/play -m1n $nick commands.txt $calc(%delay * 1000)
}


-KingTomato
Re: groups #32219 26/06/03 11:41 AM
Joined: Dec 2002
Posts: 3,547
S
SladeKraven Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Code:
on 1:TEXT:!commands[color:red]*[/color]:#: {
... a whole pile of /notify $nick commands ...
}

Re: groups #32220 26/06/03 06:11 PM
Joined: Jun 2003
Posts: 5
C
ckaos Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
C
Joined: Jun 2003
Posts: 5
I'll try that KingTomato even though right now I'm still looking at your suggestion and trying to figure it out (I'm new to scripting). What I'm understanding is that you are using the $calc function to multiply 3 by 1000. If this works, then why couldn't I simply append that same delay to the end of each /notice command? As an example:

on 1:TEXT:!commands*:#:{
; delay in seconds
var %delay = 3
/notice $nick !help - Main help screen $calc(%delay * 1000)
/notice $nick !ops - a list of the channel ops $calc(%delay * 1000)
/notice $nick !channels - a list of the affiliated channels (%delay * 1000)
...etc
...etc
}

Would this work??

And thanks in advance for the advice. I appretiate it.

Re: groups #32221 26/06/03 06:13 PM
Joined: Jun 2003
Posts: 5
C
ckaos Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
C
Joined: Jun 2003
Posts: 5
Yeah.. typo.. my script does have the "*"
thanks

Re: groups #32222 26/06/03 06:19 PM
Joined: Jun 2003
Posts: 5
C
ckaos Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
C
Joined: Jun 2003
Posts: 5
Thanks to King Tomato, I'm sure I'll get this thing working, but I'm still curious about groups. At this point, not because I have to know to fix my situation, but because I want to know for no other reason other then curiousity.

Can anyone explain groups to me? How do you set them up? How do you use them? And what are they used for typically?

Sorry, I'm insatiably curious.

Re: groups #32223 26/06/03 08:00 PM
Joined: Jun 2003
Posts: 114
T
Thray Offline
Vogon poet
Offline
Vogon poet
T
Joined: Jun 2003
Posts: 114
He used the /play command in the example script, which is a bit different than /notice. Check '/help /play' within mIRC


-------------
I am the self-appointed God of needlessly complex mIRCscript.
Re: groups #32224 26/06/03 10:13 PM
Joined: Jan 2003
Posts: 3,012
KingTomato Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
As thray said, play is different. Play is specificly for large masses of test in an external file. It gives you the ability to send the clump of text via echo, msg, or notice in intervals. The number on the end is the interval. I multiplyed it by 1000 to get full seconds as the /play command requires milliseconds.

All you need to do is make a text file (like commands.txt) in your mirc file. Make it look like this:

Code:
!command1 - This is a description of command 1
!command1 - This is a description of command 2
!command1 - This is a description of command 1
!command1 - This is a description of command 4
!command1 - This is a description of command 5
...
!command999 - This is a description of command 999


Then, you use the play commands. Now the way I had it, it would read a line from the text file, send it via notice to the person, then waits (%delay) seconds, and sends another line. It continues to do so until all the lines of the text file are sent.

Yes, you dould have something like...

Code:
.timer 1 1 .notice $nick !command1 - This is a description of command 1
.timer 1 3 .notice $nick !command2 - This is a description of command 2
.timer 1 5 .notice $nick !command3 - This is a description of command 3


But I didn't think you wanted to write all those timer prefixes >:D


-KingTomato
Re: groups #32225 28/06/03 01:31 AM
Joined: Jun 2003
Posts: 5
C
ckaos Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
C
Joined: Jun 2003
Posts: 5
I'd like to thank you King Tomato. Now I now only have the script working, more importantly, I understand a new command. (Well at least a little).

Thank you!

I'm still curious about "groups". Anyone out there now much about them? What they are typically userd for? How you set them up and how you use them?

I guess I just want to know out of curiosity. Thank god I'm not a cat.

Re: groups #32226 28/06/03 01:35 AM
Joined: Jan 2003
Posts: 3,012
KingTomato Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
groups are easy say you have...

#mygroup off
on 1:TEXT:*hi*:#: { /msg $chan $nick said hi }
#mygroup end

Okay, not that won't work because the group is off. Now, type /enable #mygroup, and try.. You'll also notice in remote the line "#mygroup off" turns to "#mygroup on". Now, the code inbetween the #'s will word. Its easy as pi (3.14159.....). You /enable and /disable to turn them on and off respectivly.


-KingTomato