mIRC Homepage
Posted By: bojak71730 help me please - 31/05/07 04:39 AM
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
Posted By: Riamus2 Re: help me please - 31/05/07 11:42 AM
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
Posted By: bojak71730 Re: help me please - 31/05/07 07:28 PM
is there any way to have multiple networks
Posted By: RusselB Re: help me please - 31/05/07 10:12 PM
change
Code:
if ($network == Undernet)
to
Code:
if $istok(network1 network2 network3 network4,$network,32)
Posted By: bojak71730 Re: help me please - 01/06/07 12:02 AM
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
Posted By: Riamus2 Re: help me please - 01/06/07 12:32 AM
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
  }
}
Posted By: bojak71730 Re: help me please - 01/06/07 12:58 AM
the !off command works however the !on command does not
Posted By: Riamus2 Re: help me please - 01/06/07 02:22 AM
Paste what you have.
Posted By: bojak71730 Re: help me please - 01/06/07 04:10 PM
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
Posted By: RusselB Re: help me please - 01/06/07 11:10 PM
You're missing the ON parameter of the ON INPUT event.

change the very first line to
Code:
on *:input:*:{
Posted By: bojak71730 Re: help me please - 29/12/08 03:53 AM
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?
Posted By: RusselB Re: help me please - 29/12/08 05:02 AM
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
      }
    }
  }
}
Posted By: bojak71730 Re: help me please - 29/12/08 05:41 AM
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?
Posted By: Tomao Re: help me please - 29/12/08 06:31 AM
Change
Code:
on *:input:#channel:{


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


Posted By: bojak71730 Re: help me please - 29/12/08 07:20 AM
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)
Posted By: Tomao Re: help me please - 29/12/08 08:00 AM
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.
© mIRC Discussion Forums