mIRC Home    About    Download    Register    News    Help

Print Thread
#35856 12/07/03 01:20 AM
Joined: Apr 2003
Posts: 300
A
andymps Offline OP
Fjord artisan
OP Offline
Fjord artisan
A
Joined: Apr 2003
Posts: 300
I am now making an away script, and i need to make it to is msg's the channels listed in the list box, anyone help, thanx in advance for anythin u can do,


Liek OMG Yuo Stoleded my MageHurtzzzz!!!11
#35857 12/07/03 01:45 AM
Joined: Mar 2003
Posts: 54
J
Babel fish
Offline
Babel fish
J
Joined: Mar 2003
Posts: 54
Loop with $did($dname,listboxid,variable number)

#35858 12/07/03 01:49 AM
Joined: Dec 2002
Posts: 1,321
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,321
Assuming that ID number 15 is your listbox containing your chosen channels (unselected):
Code:
var %i = 1
while $gettok($didtok(15, 44), $+(%i, -, $calc(%i + 3)), 44) {
  .timer 1 $calc(%i / 2) describe $ifmatch is away: stuff here
  inc %i 4
}

If you wish to use /msg instead of /me, switch the word describe to the word msg.

The timer should keep you from flooding yourself off by spacing out each group of messages.


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C
#35859 12/07/03 01:49 AM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
you could also do

/privmsg $didtok(dname, id, 44) $+(:,<awaymsg>)


-KingTomato
#35860 12/07/03 01:58 AM
Joined: Apr 2003
Posts: 300
A
andymps Offline OP
Fjord artisan
OP Offline
Fjord artisan
A
Joined: Apr 2003
Posts: 300
Thanx everyone smile


Liek OMG Yuo Stoleded my MageHurtzzzz!!!11
#35861 12/07/03 01:59 AM
Joined: Dec 2002
Posts: 1,321
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,321
What if he has 50 channels to send it to? wink


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C
#35862 12/07/03 02:03 AM
Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
(assuming the id of your box is 15)
Code:
alias gmsg {
var %i $1
while (%i &lt;= $did(name,15).lines) &amp;&amp; (%i &lt;= $2) {
did -ck name 15 %i
msg $did(name,15).seltext &lt;yourstuffhere&gt;
inc %i
}
} 


edit:
now he can use $gmsg(10,20) that will message the 10th to 20th channel in listbox.

Last edited by pheonix; 12/07/03 02:22 AM.

new username: tidy_trax
#35863 12/07/03 02:12 AM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
or

Code:
alias imaway {
  ; prefs
  var %dname = [color:Red]&lt;dialogname&gt;[/color], %id = [color:blue]&lt;idnumber&gt;[/color], %tok = 1, %chans
  while ($gettok($didtok(%dname, %id, 44), %tok, 44) {
    var %chans = $addtok(%chans, $ifmatch, 44)
    if ($numtok(%chans, 44) == 15) || (%id == $did(%dname, %id).lines) {
      /raw PRIVMSG %chans $+(:,$$1-)
      /unset %chans
    }
    /inc %tok
  }
}


that would msg 15 channels at a time. How's that hammer? >:D btw--miss me on dalnet? heh


-KingTomato
#35864 12/07/03 02:12 AM
Joined: Dec 2002
Posts: 1,321
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,321
If he used that alias, he would flood himself off.

Also, perhaps you might be interested to know that UBBCode allows you to use [[/b]code] and [[/b]/code] tags around your code to indent it properly, making your scriptlets much easier for everyone to read and understand.


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C
#35865 12/07/03 02:15 AM
Joined: Dec 2002
Posts: 1,321
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,321
Not all IRCds will accept more than 4 targets in a single PRIVMSG. Furthermore, a lot of those that do will alert opers for those messages with more than a certain number of targets, perhaps attracting unnecessary and unwanted attention for a simple away message.


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C
#35866 12/07/03 02:16 AM
Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
thanx, why would that alias flood him off :tongue: its a simple while loop.


new username: tidy_trax
#35867 12/07/03 02:17 AM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
Its basically an /amsg with the channel list in a listbox rather than using $chan(N). I've never heard of an /amsg triggering an opnotice, therefor wouldn't see this being a problem.


-KingTomato
#35868 12/07/03 02:18 AM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
As hammer pointed out, what if the user had 100 channels in the listbox. Now thats 100/msg's, that looks liek a flood to me..

EDIT: Anyways, why are u selecting each and every item, then using seltext? You do realise did has a line number parameter, correct?


-KingTomato
#35869 12/07/03 02:22 AM
Joined: Apr 2003
Posts: 300
A
andymps Offline OP
Fjord artisan
OP Offline
Fjord artisan
A
Joined: Apr 2003
Posts: 300
hmmmm, well there will only be 17 channels, will that flood me ?


Liek OMG Yuo Stoleded my MageHurtzzzz!!!11
#35870 12/07/03 02:31 AM
Joined: Dec 2002
Posts: 1,321
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,321
Try it and see. laugh That's almost always the best way to learn, anyway.


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C
#35871 12/07/03 02:54 AM
Joined: Apr 2003
Posts: 300
A
andymps Offline OP
Fjord artisan
OP Offline
Fjord artisan
A
Joined: Apr 2003
Posts: 300
Ok KT i tried ur version and... it didnt work
* /while: invalid format (line 18, away.txt)


Liek OMG Yuo Stoleded my MageHurtzzzz!!!11
#35872 12/07/03 03:01 AM
Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
add an extra ) to then end wink


new username: tidy_trax

Link Copied to Clipboard