mIRC Home    About    Download    Register    News    Help

Print Thread
#177774 31/05/07 04:39 AM
Joined: Oct 2005
Posts: 54
B
Babel fish
OP Offline
Babel fish
B
Joined: Oct 2005
Posts: 54
ok i have a two questions. i was wonder is there a way that i can make a script so i can type in a certain color all the time? and is there a way you can make it so that it only does the colors on a certain server my colors i picked are 2,3

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Code:
on *:input:*: {
  if (/* iswm $1) { return }
  if ($network == Undernet) {
    msg $active 02,03 $+ $1-
    halt
  }
}


Change Undernet to whatever network you're using. To make sure you use the correct name, go to your network and type:

//echo -a $network

Last edited by Riamus2; 31/05/07 11:46 AM.

Invision Support
#Invision on irc.irchighway.net
Riamus2 #177819 31/05/07 07:28 PM
Joined: Oct 2005
Posts: 54
B
Babel fish
OP Offline
Babel fish
B
Joined: Oct 2005
Posts: 54
is there any way to have multiple networks

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
change
Code:
if ($network == Undernet)
to
Code:
if $istok(network1 network2 network3 network4,$network,32)

RusselB #177839 01/06/07 12:02 AM
Joined: Oct 2005
Posts: 54
B
Babel fish
OP Offline
Babel fish
B
Joined: Oct 2005
Posts: 54
Code:
 on *:input:*: {
  if (/* iswm $1) { return }
  if ($network == Undernet) {
    msg $active 02,03 $+ $1-
    halt
  }
}
 
with the code givin above is there a way i can create an on and off switch like !on would do the colors 2,3 and !off just do black text only and again thanks for helpin me

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Code:
on *:input:*: {
  if ($1 == !on) { set %colorinput On | return }
  elseif ($1 == !off) { set %colorinput Off | return }
  if (%colorinput != On) { return }
  if (/* iswm $1) { return }
  if ($network == Undernet) {
    msg $active 02,03 $+ $1-
    halt
  }
}


Invision Support
#Invision on irc.irchighway.net
Riamus2 #177844 01/06/07 12:58 AM
Joined: Oct 2005
Posts: 54
B
Babel fish
OP Offline
Babel fish
B
Joined: Oct 2005
Posts: 54
the !off command works however the !on command does not

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Paste what you have.


Invision Support
#Invision on irc.irchighway.net
Riamus2 #177875 01/06/07 04:10 PM
Joined: Oct 2005
Posts: 54
B
Babel fish
OP Offline
Babel fish
B
Joined: Oct 2005
Posts: 54
Code:
  *:input:*: {
  if ($1 == !on) { set %colorinput On | return }
  elseif ($1 == !off) { set %colorinput Off | return }
  if (%colorinput != On) { return }
  if (/* iswm $1) { return }
  if ($network == Undernet) {
    msg $active 02,03 $+ $1-
    halt
  }
}
 


thats what i have the on switch doesnt work

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
You're missing the ON parameter of the ON INPUT event.

change the very first line to
Code:
on *:input:*:{

Joined: Oct 2005
Posts: 54
B
Babel fish
OP Offline
Babel fish
B
Joined: Oct 2005
Posts: 54
Originally Posted By: bojak71730
Code:
 on *:input:*: {
  if ($1 == !on) { set %colorinput On | return }
  elseif ($1 == !off) { set %colorinput Off | return }
  if (%colorinput != On) { return }
  if (/* iswm $1) { return }
  if ($network == Undernet) {
    msg $active 02,03 $+ $1-
    halt
  }
}
 




how would i get the above script to do all of that plus be in more detail to add so it only works for a certain channel?

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
To limit it to a single channel, change $active to the channel name.

Here's a little re-write
Code:
on *:input:#channel:{
  set colorinput $iif($1 == !on,$true,$iif($1 == !off,$false,%colorinput))
  if %colorinput {
    if (/* !iswm $1) {
      if ($network == Undernet) {
        msg $chan 02,03 $+ $1-
        halt
      }
    }
  }
}

RusselB #207720 29/12/08 05:41 AM
Joined: Oct 2005
Posts: 54
B
Babel fish
OP Offline
Babel fish
B
Joined: Oct 2005
Posts: 54
Code:
 on *:input:#channel:{
  set colorinput $iif($1 == !on,$true,$iif($1 == !off,$false,%colorinput))
  if %colorinput {
    if (/* !iswm $1) {
      if ($network == Undernet) {
        msg #tcmafia 02,03 $+ $1-
        halt
      }
    }
  }
}


so this is the correct code that will work only on this channel?

Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
Change
Code:
on *:input:#channel:{


to
Code:
on *:input:#tcmafia:{



Tomao #207723 29/12/08 07:20 AM
Joined: Oct 2005
Posts: 54
B
Babel fish
OP Offline
Babel fish
B
Joined: Oct 2005
Posts: 54
Code:
 on *:input:#tcmafia:{
  set colorinput $iif($1 == !on,$true,$iif($1 == !off,$false,%colorinput))
  if %colorinput {
    if (/* !iswm $1) {
      if ($network == Undernet) {
        msg $chan 02,03 $+ $1-
        halt
      }
    }
  }
}
that didnt work so well it gave me this error .. * /set: invalid parameters (line 2, script1.ini)

Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
RusselB has missed a % in his code:

Quote:
on *:input:#tcmafia:{
set %colorinput $iif($1 == !on,$true,$iif($1 == !off,$false,%colorinput))
if %colorinput {
if (/* !iswm $1) {
if ($network == Undernet) {
msg $chan 02,03 $+ $1-
halt
}
}
}
}


That should fix the error.


Link Copied to Clipboard