mIRC Home    About    Download    Register    News    Help

Print Thread
Need help with scripting #174762 12/04/07 02:08 PM
Joined: Apr 2007
Posts: 8
L
llVIU Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
L
Joined: Apr 2007
Posts: 8
Hello.

I need to know what I need to put in aliases.ini to have:

1. a "mass kick" script (the way I call it) that first sets mode +i then kicks all unvoiced users in a channel and then sets mode -i, this would be triggered when I type /mk smile

2. a script that sends a notice to all unvoiced users, I curently have a scrip that sends the notice only to 1 user that I chose, this is what it is..heh:

/n /notice $$1 *text here*

so when I type "/n *user name*" ,it will send the given text to him...

Any help is apreciated laugh

Re: Need help with scripting [Re: llVIU] #174763 12/04/07 02:20 PM
Joined: Oct 2006
Posts: 342
L
learn3r Offline
Fjord artisan
Offline
Fjord artisan
L
Joined: Oct 2006
Posts: 342
Code:
alias mk {
  if (!$chan && !$1) { echo -a ERROR: You need to type this in a channel, or else include a channel with it. | return }
  var %chan = $iif($chan,$chan,$1)
  if ($me !isop %chan) { echo -a ERROR: You need to be an op in the channel. | return }
  var %total = $nick(%chan,0,r)
  var %cnt = 1
  while (%cnt <= %total) {
    var %unvoiced = %unvoiced $nick(%chan,%cnt,r)
    if ($gettok(%unvoiced,0,32) == 4) {
      mode %chan +i
      kick %chan %unvoiced
      unset %unvoiced
    }
    inc %cnt
  }
  mode %chan -i
  unset %chan
}




learn learn learn
Re: Need help with scripting [Re: learn3r] #174765 12/04/07 02:46 PM
Joined: Apr 2007
Posts: 8
L
llVIU Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
L
Joined: Apr 2007
Posts: 8
thank you very much for trying to help, but it doesn't seem to work... it says "MK Unknown command" at the status window..

Re: Need help with scripting [Re: llVIU] #174776 12/04/07 05:49 PM
Joined: Mar 2005
Posts: 420
X
xDaeMoN Offline
Fjord artisan
Offline
Fjord artisan
X
Joined: Mar 2005
Posts: 420
Maybe you pasted the code in your ALIASES section. Try putting it on the REMOTES section.


If you have a plastic floor runner over your tiles, then you're one Hella Pinoy!
Re: Need help with scripting [Re: xDaeMoN] #174918 14/04/07 12:11 PM
Joined: Apr 2007
Posts: 8
L
llVIU Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
L
Joined: Apr 2007
Posts: 8
Never mind, whatever you guys were trying to say was harder to understand than making a script for myself.

Works perfectly the way I wanted except that it works for 10 users max.

/mk /mode #Pest +i | /kick #Pest $nick(#Pest,1,r) 4,1 Please message Liviu31 in RuneScape for voice  | /kick #Pest $nick(#Pest,2,r) 4,1 Please message Liviu31 in RuneScape for voice  | /kick #Pest $nick(#Pest,3,r) 4,1 Please message Liviu31 in RuneScape for voice  | /kick #Pest $nick(#Pest,4,r) 4,1 Please message Liviu31 in RuneScape for voice  | /kick #Pest $nick(#Pest,5,r) 4,1 Please message Liviu31 in RuneScape for voice  | /kick #Pest $nick(#Pest,6,r) 4,1 Please message Liviu31 in RuneScape for voice  | /kick #Pest $nick(#Pest,7,r) 4,1 Please message Liviu31 in RuneScape for voice  | /kick #Pest $nick(#Pest,8,r) 4,1 Please message Liviu31 in RuneScape for voice  | /kick #Pest $nick(#Pest,9,r) 4,1 Please message Liviu31 in RuneScape for voice  | /kick #Pest $nick(#Pest,10,r) 4,1 Please message Liviu31 in RuneScape for voice  | /mode #Pest -i

/mn /notice $nick(#Pest,1,r) 4,1 Please message Liviu31 in RuneScape for voice  | /notice $nick(#Pest,2,r) 4,1 Please message Liviu31 in RuneScape for voice  | /notice $nick(#Pest,3,r) 4,1 Please message Liviu31 in RuneScape for voice  | /notice $nick(#Pest,4,r) 4,1 Please message Liviu31 in RuneScape for voice  | /notice $nick(#Pest,5,r) 4,1 Please message Liviu31 in RuneScape for voice  | /notice $nick(#Pest,6,r) 4,1 Please message Liviu31 in RuneScape for voice  | /notice $nick(#Pest,7,r) 4,1 Please message Liviu31 in RuneScape for voice  | /notice $nick(#Pest,8,r) 4,1 Please message Liviu31 in RuneScape for voice  | /notice $nick(#Pest,9,r) 4,1 Please message Liviu31 in RuneScape for voice  | /notice $nick(#Pest,10,r) 4,1 Please message Liviu31 in RuneScape for voice 

Thank you very much anyway. smile

Re: Need help with scripting [Re: llVIU] #174922 14/04/07 02:36 PM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
All you had to do was put that code into the REMOTES tab instead of the ALIASES tab (or remove "alias" from the first line of it and then put it into the ALIASES tab). Nothing really hard about that.

Your code, no offense, is a messy nightmare. You should *never* overuse pipes (|) like that.


Invision Support
#Invision on irc.irchighway.net