mIRC Home    About    Download    Register    News    Help

Print Thread
#179946 30/06/07 07:35 PM
Joined: Oct 2006
Posts: 68
B
BuTLeR Offline OP
Babel fish
OP Offline
Babel fish
B
Joined: Oct 2006
Posts: 68
Code:
on *:TEXT:*:#:{
  if (%antiflood) { msg $chan Antiflood ON | halt }
  else { set -u10 %antiflood on }
  elseif ($1 == $ $+ cmds) { notice $nick Commands: $ $+ server / $ $+ ip :: $ $+ ts :: $ $+ google }
  elseif ($1 == $ $+ google) { set %searchstring $replace($2-,$chr(32),+) | msg $chan www.google.co.uk/search?btnG=Search&q= $+ %searchstring $+ &num=50 | /unset %searchstring }
  elseif ($1 == $ $+ server) { msg $chan Server: ... Password: 4fun }
  elseif ($1 == $ $+ ip) { msg $chan Server: ... Password: 4fun }
  elseif ($1 == $ $+ ts) { msg $chan TeamSpeak: ... (Ask for password) }
}


Why wont this work =/


At Your Service.
BuTLeR #179947 30/06/07 07:37 PM
Joined: Apr 2006
Posts: 464
O
Fjord artisan
Offline
Fjord artisan
O
Joined: Apr 2006
Posts: 464
Its an invalid construction, should be:

If
Elseif
Elseif
Elseif
Elseif
Else

BuTLeR #179948 30/06/07 07:39 PM
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
That first elseif should be an if. You could also shorten the code by using $!cmds instead of $ $+ cmds, and same for the others. Also, since you /halt in the if statement, there's no need for you to use an else statement to set the %antiflood variable:

Code:
on *:TEXT:*:#:{
  if (%antiflood) { 
    msg $chan Antiflood ON 
    halt
  }
  set -u10 %antiflood on
  if ($1 == $!cmds) { notice $nick Commands: $!server / $!ip :: $!ts :: $!google }
  elseif ($1 == $!google) { set %searchstring $replace($2-,$chr(32),+) | msg $chan www.google.co.uk/search?btnG=Search&q= $+ %searchstring $+ &num=50 | /unset %searchstring }
  elseif ($1 == $!server) { msg $chan Server: ... Password: 4fun }
  elseif ($1 == $!ip) { msg $chan Server: ... Password: 4fun }
  elseif ($1 == $!ts) { msg $chan TeamSpeak: ... (Ask for password) }
}

hixxy #179956 01/07/07 01:47 AM
Joined: Oct 2006
Posts: 68
B
BuTLeR Offline OP
Babel fish
OP Offline
Babel fish
B
Joined: Oct 2006
Posts: 68
thx works =]


At Your Service.
BuTLeR #179958 01/07/07 03:52 AM
Joined: Oct 2006
Posts: 68
B
BuTLeR Offline OP
Babel fish
OP Offline
Babel fish
B
Joined: Oct 2006
Posts: 68
i now have a prob with this bit...
Code:
  if (%owner) {
    halt
  }
  set -u3 %owner on

i add it to other commands n wen i trigger a command it sets all of them n yes i am changing the %blah bit


At Your Service.
BuTLeR #179974 01/07/07 01:21 PM
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
I'm not sure what you're asking. Can you paste the whole command with the above script included?

hixxy #179979 01/07/07 03:03 PM
Joined: Oct 2006
Posts: 68
B
BuTLeR Offline OP
Babel fish
OP Offline
Babel fish
B
Joined: Oct 2006
Posts: 68
Code:
on Owner:TEXT:*:#:{
  if (%owner) {
    halt
  }
  set -u3 %owner on
  if ($1 == $!voice) { mode $chan +v $2 }
  elseif ($1 == $!devoice) { mode $chan -v $2 }
  elseif ($1 == $!op) { mode $chan +o $2 }
  elseif ($1 == $!up) { mode $chan +o $nick }
  elseif ($1 == $!deop) { mode $chan -o $2 }
  elseif ($1 == $!down) { mode $chan -o $nick }
}

on *:TEXT:*:#:{
  if (%cmds) {
    halt
  }
  set -u3 %cmds on
  if ($1 == $!cmds) { msg $chan 4C14ommands:4 $!server 14/4 $!ip 14::4 $!ts 14::4 $!google }
}

on *:TEXT:*:#:{
  if (%commands) {
    halt
  }
  set -u5 %commands on
  if ($1 == $!google) { set %searchstring $replace($2-,$chr(32),+) | msg $chan www.google.co.uk/search?btnG=Search&q= $+ %searchstring $+ &num=50 | /unset %searchstring }
  elseif ($1 == $!server) { msg $chan 4S14erver:4 ... 14- 4P14assword:4 4fun 14- 4R14eporter: 4#w!n.live }
  elseif ($1 == $!ip) { msg $chan 4S14erver:4  ... 4P14assword:4 4fun 14- 4R14eporter: 4#w!n.live }
}


thats just sum of them which ever i command it to do it sets all the antifloods

Last edited by BuTLeR; 01/07/07 04:31 PM.

At Your Service.
BuTLeR #179987 01/07/07 06:36 PM
Joined: Oct 2006
Posts: 68
B
BuTLeR Offline OP
Babel fish
OP Offline
Babel fish
B
Joined: Oct 2006
Posts: 68
never mind sorted it xD

Last edited by BuTLeR; 01/07/07 08:22 PM.

At Your Service.

Link Copied to Clipboard