mIRC Home    About    Download    Register    News    Help

Print Thread
help me please #177774 31/05/07 04:39 AM
Joined: Oct 2005
Posts: 54
B
bojak71730 Offline OP
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

Re: help me please [Re: bojak71730] #177792 31/05/07 11:42 AM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
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
Re: help me please [Re: Riamus2] #177819 31/05/07 07:28 PM
Joined: Oct 2005
Posts: 54
B
bojak71730 Offline OP
Babel fish
OP Offline
Babel fish
B
Joined: Oct 2005
Posts: 54
is there any way to have multiple networks

Re: help me please [Re: bojak71730] #177834 31/05/07 10:12 PM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
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)

Re: help me please [Re: RusselB] #177839 01/06/07 12:02 AM
Joined: Oct 2005
Posts: 54
B
bojak71730 Offline OP
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

Re: help me please [Re: bojak71730] #177841 01/06/07 12:32 AM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
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
Re: help me please [Re: Riamus2] #177844 01/06/07 12:58 AM
Joined: Oct 2005
Posts: 54
B
bojak71730 Offline OP
Babel fish
OP Offline
Babel fish
B
Joined: Oct 2005
Posts: 54
the !off command works however the !on command does not

Re: help me please [Re: bojak71730] #177849 01/06/07 02:22 AM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Paste what you have.


Invision Support
#Invision on irc.irchighway.net
Re: help me please [Re: Riamus2] #177875 01/06/07 04:10 PM
Joined: Oct 2005
Posts: 54
B
bojak71730 Offline OP
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

Re: help me please [Re: bojak71730] #177891 01/06/07 11:10 PM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
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:*:{

Re: help me please [Re: bojak71730] #207715 29/12/08 03:53 AM
Joined: Oct 2005
Posts: 54
B
bojak71730 Offline OP
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?

Re: help me please [Re: bojak71730] #207718 29/12/08 05:02 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
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
      }
    }
  }
}

Re: help me please [Re: RusselB] #207720 29/12/08 05:41 AM
Joined: Oct 2005
Posts: 54
B
bojak71730 Offline OP
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?

Re: help me please [Re: bojak71730] #207721 29/12/08 06:31 AM
Joined: Jul 2007
Posts: 1,129
T
Tomao Offline
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
Change
Code:
on *:input:#channel:{


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



Re: help me please [Re: Tomao] #207723 29/12/08 07:20 AM
Joined: Oct 2005
Posts: 54
B
bojak71730 Offline OP
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)

Re: help me please [Re: bojak71730] #207724 29/12/08 08:00 AM
Joined: Jul 2007
Posts: 1,129
T
Tomao Offline
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.