mIRC Home    About    Download    Register    News    Help

Print Thread
Page 1 of 2 1 2
#162113 15/10/06 02:01 AM
Joined: Oct 2006
Posts: 68
B
BuTLeR Offline OP
Babel fish
OP Offline
Babel fish
B
Joined: Oct 2006
Posts: 68
Code:
on 1000:TEXT:`join #*:#:{
  .join $2 | msg $chan Done joining $2 $+ . | .msg $2 Been told to join by $nick $+ . | halt
}
on 1000:TEXT:`part #*:#:{
  .msg $2 Been told to part, sowwy <3 | .part $2 | .msg $chan Done parting $2 $+ . | halt
} 


ok basicly i need to know how to add a msg to it were when i/somone say `join #blah and if its already on that channel it says (im already on that channel) and abit the same with part (i aint on that channel) and also if a user who is not level 1000 its says a msg saying access denied sorry i ask alot =P lolz


At Your Service.
#162114 15/10/06 02:38 AM
Joined: Mar 2003
Posts: 612
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Mar 2003
Posts: 612
Code:
on +1000:TEXT:`join #*:#:{
 if $me !ison $2 {
   .join $2 
   msg $chan Done joining $2 $+ . 
   .msg $2 Been told to join by $nick $+ . 
   halt
 }
 else msg $chan I'm already there idiot!
}
on +1000:TEXT:`part #*:#:{
 if $me ison $2 {
  .msg $2 Been told to part, sowwy <3 
  .part $2 
  .msg $chan Done parting $2 $+ . 
  halt 
 }
 else .msg $chan $nick is a total numbnut, I'm not even on $+($2,!)
} 

on *:text:*:#:{
 if ( `join isin $1 ) || (`part isin $1) { 
  msg $chan $nick please do not try to use commands if you haven't been given the proper status! Thanks. 
 }
}

All untested, but I think it'll work.

btk


billythekid
#162115 15/10/06 02:47 AM
Joined: Oct 2006
Posts: 68
B
BuTLeR Offline OP
Babel fish
OP Offline
Babel fish
B
Joined: Oct 2006
Posts: 68
Thanks billythekid works great =)


At Your Service.
#162116 15/10/06 03:17 AM
Joined: Oct 2006
Posts: 68
B
BuTLeR Offline OP
Babel fish
OP Offline
Babel fish
B
Joined: Oct 2006
Posts: 68
i was wondering if somone could make me a script so when i say `chans my bot shows all the channels its on and if its oped or voice and control of users like:

I am on #blah @ | #blah @ | #blah + | #blah | with control of (number) users

thanks


At Your Service.
#162117 15/10/06 04:43 AM
Joined: Mar 2003
Posts: 612
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Mar 2003
Posts: 612
try this....

Code:
  
on 1:text:`chans:#:{
  var %i $chan(0)
  var %o 0
  while %o < %i {
    inc %o
    set %bot-chans $addtok(%bot-chans,$chan(%o) $left($nick($chan(%o),$me).pnick,1),124)
    if $left($nick($chan(%o),$me).pnick,1) == $chr(64) {
      inc %bot-nicks $nick($chan(%o),0,a,o)
    }
  }
  msg $chan I am on %bot-chans $chr(124) with control over %bot-nicks nicks.
  unset %bot-*
}


I have no idea if it will work as it's wayyyyy too late now! lol

[edit] changed some brackets and made sure the $left thing worked.

btk

Last edited by billythekid; 15/10/06 04:48 AM.

billythekid
#162118 15/10/06 04:47 AM
Joined: Oct 2006
Posts: 68
B
BuTLeR Offline OP
Babel fish
OP Offline
Babel fish
B
Joined: Oct 2006
Posts: 68
hehe yea its 5:44 here but i aint tierd been up for nerly 2 days lolz well ill go see if it works now


At Your Service.
#162119 15/10/06 04:52 AM
Joined: Mar 2003
Posts: 612
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Mar 2003
Posts: 612
well i tested it a little here, it seems to be almost working but missing the first channel name.

will have to study it shocked


billythekid
#162120 15/10/06 04:57 AM
Joined: Mar 2003
Posts: 612
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Mar 2003
Posts: 612
Code:
  
on 1:text:`chans:#:{
  var %i $chan(0)
  var %o 0
  while %o < %i {
    inc %o
    set %bot-chans $addtok(%bot-chans,$chan(%o) 4 $+ $left($nick($chan(%o),$me).pnick,1)  $+ $chr(32) ,124)
    if $left($nick($chan(%o),$me).pnick,1) == $chr(64) {
      inc %bot-nicks $calc( %bot-nicks + $nick($chan(%o),0,a,o))
    }
  }
  msg $chan I am on %bot-chans $chr(124) with control over4 %bot-nicks nicks.
  unset %bot-*
}


billythekid
#162121 15/10/06 05:09 AM
Joined: Oct 2006
Posts: 68
B
BuTLeR Offline OP
Babel fish
OP Offline
Babel fish
B
Joined: Oct 2006
Posts: 68
it dont seem to be working for me at all confused


At Your Service.
#162122 15/10/06 05:10 AM
Joined: Mar 2003
Posts: 612
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Mar 2003
Posts: 612
worked fine here, what's happening on yours?


btk


billythekid
#162123 15/10/06 05:12 AM
Joined: Oct 2006
Posts: 68
B
BuTLeR Offline OP
Babel fish
OP Offline
Babel fish
B
Joined: Oct 2006
Posts: 68
its not setting any thing

[Edit] nvm its working thanks

Last edited by BuTLeR; 15/10/06 05:13 AM.

At Your Service.
#162124 15/10/06 05:16 AM
Joined: Oct 2006
Posts: 68
B
BuTLeR Offline OP
Babel fish
OP Offline
Babel fish
B
Joined: Oct 2006
Posts: 68
I am on #blah [ |#blah [ |#blah [ |#blah @ | with control over 4 nicks.

what are the [ for? should they be there


At Your Service.
#162125 15/10/06 05:44 AM
Joined: Mar 2003
Posts: 612
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Mar 2003
Posts: 612
no they shouldn't be there, lol. it looks like thats a prefix on your network(see how the last #blah came on as @), but I've never seen that one before, I'm sure it's just needing refinement.


btk


billythekid
#162126 15/10/06 05:46 AM
Joined: Oct 2006
Posts: 68
B
BuTLeR Offline OP
Babel fish
OP Offline
Babel fish
B
Joined: Oct 2006
Posts: 68
im on quakenet


At Your Service.
#162127 15/10/06 05:54 AM
Joined: Oct 2006
Posts: 68
B
BuTLeR Offline OP
Babel fish
OP Offline
Babel fish
B
Joined: Oct 2006
Posts: 68
think i know y now, [ is the beginning of my nick on the network so how do i fix this so it dont show it

this is what it looks like when i change my nick that starts with B

I am on #w!n.priv B |#t3st0rz B |#aimlaunch.dk B |#pwnyou @ | with control over 2 nicks.

Last edited by BuTLeR; 15/10/06 06:03 AM.

At Your Service.
#162128 15/10/06 06:03 AM
Joined: Mar 2003
Posts: 612
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Mar 2003
Posts: 612
it could be done using isop ishop and isvoice but thats not as nice, perhaps a comparison something like

on 1:text:`chans:#:{
var %i $chan(0)
var %o 0
while %o < %i {
inc %o

if $left($me,1) != $left($nick($chan(%o),$me).pnick,1) {
set %bot-chans $addtok(%bot-chans,$chan(%o) 4 $+ $left($nick($chan(%o),$me).pnick,1)  $+ $chr(32) ,124)
}
else {
set %bot-chans $addtok(%bot-chans,$chan(%o) $+ $chr(32) ,124)
}

if $left($nick($chan(%o),$me).pnick,1) == $chr(64) {
inc %bot-nicks $calc( %bot-nicks + $nick($chan(%o),0,a,o))
}
}
msg $chan I am on %bot-chans $chr(124) with control over4 %bot-nicks nicks.
unset %bot-*
}


billythekid
#162129 15/10/06 06:13 AM
Joined: Oct 2006
Posts: 68
B
BuTLeR Offline OP
Babel fish
OP Offline
Babel fish
B
Joined: Oct 2006
Posts: 68
I am on #blah|#blah|#blah|#blah @ | with control over 2 nicks.

thats wot it looks like now but is there any way of makin it look neater like:

I am on | #blah | #blah | #blah | #blah @ | with control over 2 nicks.


At Your Service.
#162130 15/10/06 07:01 AM
Joined: Mar 2003
Posts: 612
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Mar 2003
Posts: 612
Code:
on 1:text:`chans:#:{
  var %i $chan(0)
  var %o 0
  while %o &lt; %i {
    inc %o

    if $left($me,1) != $left($nick($chan(%o),$me).pnick,1) {
      set %bot-chans $addtok(%bot-chans,3 $+ $chan(%o) 4 $+ $left($nick($chan(%o),$me).pnick,1)  $+ $chr(124) ,32)
    }
    else {
      set %bot-chans $addtok(%bot-chans,3 $+ $chan(%o) $+ $chr(124) ,32)
    }

    if $left($nick($chan(%o),$me).pnick,1) == $chr(64) {
      inc %bot-nicks $calc( %bot-nicks + $nick($chan(%o),0,a,o))
    }
  }
  msg $chan I am on $chr(124) %bot-chans with control over4 %bot-nicks nicks.
  unset %bot-*
} 

 


billythekid
#162131 15/10/06 07:06 AM
Joined: Oct 2006
Posts: 68
B
BuTLeR Offline OP
Babel fish
OP Offline
Babel fish
B
Joined: Oct 2006
Posts: 68
hehe it now looks like this:

I am on | #w!n.priv| #t3st0rz| #aimlaunch.dk| #pwnyou| with control over nicks.

confused


At Your Service.
#162132 15/10/06 04:15 PM
Joined: Oct 2006
Posts: 68
B
BuTLeR Offline OP
Babel fish
OP Offline
Babel fish
B
Joined: Oct 2006
Posts: 68
it dont show how many nicks im in control with plus its 1 whole colour and no space between | #blah|


At Your Service.
#162133 15/10/06 04:54 PM
Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
are you using the color code with 03 or just 3

colorcode032 2

colorcode32 (no text as mirc sees the 32 as the color number)

#162134 15/10/06 05:13 PM
Joined: Oct 2006
Posts: 68
B
BuTLeR Offline OP
Babel fish
OP Offline
Babel fish
B
Joined: Oct 2006
Posts: 68
ok well this is wot i got
Code:
on 1:TEXT:`chans:#:{
  var %i $chan(0)
  var %o 0
  while %o &lt; %i {
    inc %o

    if $left($me,1) != $left($nick($chan(%o),$me).pnick,1) {
      set %bot-chans $addtok(%bot-chans,5 $+ $chan(%o) 4 $+ $left($nick($chan(%o),$me).pnick,1)  $+ $chr(124) ,32)
    }
    else {
      set %bot-chans $addtok(%bot-chans, $chan(%o) $+ $chr(124) ,32)
    }

    if $left($nick($chan(%o),$me).pnick,1) == $chr(64) {
      inc %bot-nicks $calc( %bot-nicks + $nick($chan(%o),0,a,o))
    }
  }
  msg $chan I am on $chr(124) %bot-chans with control over5  $+ %bot-nicks $+  nicks.
  unset %bot-*
}  


this is wot it comes out with

I am on | #blah| #blah| #blah @ | with control over 1 nicks.

Last edited by BuTLeR; 15/10/06 05:18 PM.

At Your Service.
#162135 15/10/06 07:03 PM
Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
ok, it was inc where it should be set (really use local vars)

try this edited
Code:
on 1:TEXT:`chans:#:{
  var %i $chan(0)
  var %o 0
  while %o &lt; %i {
    inc %o
    if $left($me,1) != $left($nick($chan(%o),$me).pnick,1) {
      set %bot-chans $addtok(%bot-chans,5 $+ $chan(%o) 4 $+ $left($nick($chan(%o),$me).pnick,1)  $+ $chr(124) ,32)
    }
    else {
      set %bot-chans $addtok(%bot-chans, $chan(%o) $chr(124) ,32)
    }
    if $left($nick($chan(%o),$me).pnick,1) == $chr(64) {
      set %bot-nicks $calc( %bot-nicks + $nick($chan(%o),0,a,o))
    }
  }
  msg $chan I am on $chr(124) %bot-chans with control over5  $+ %bot-nicks $+  nicks.
  unset %bot-*
}

Last edited by MikeChat; 15/10/06 07:42 PM.
#162136 15/10/06 07:10 PM
Joined: Oct 2006
Posts: 68
B
BuTLeR Offline OP
Babel fish
OP Offline
Babel fish
B
Joined: Oct 2006
Posts: 68
ok i want it so that the #blah name is always in colour not just wen its oped or voiced and that i want it to show how many users i control in every chan not just 1 for every peron say jimbot is in 1 chan an the other and i have power over him in both channels i want it so its counts him twice you know what i mean?

Last edited by BuTLeR; 15/10/06 07:16 PM.

At Your Service.
#162137 15/10/06 07:34 PM
Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
see edited code above

Last edited by MikeChat; 15/10/06 07:45 PM.
#162138 15/10/06 08:20 PM
Joined: Mar 2003
Posts: 612
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Mar 2003
Posts: 612
haha, I originally wrote the code using set %variable $calc(%variable + numbers) but changed it during "cleanup" lol.

nice catch, mine was working here though, strangely.


btk


billythekid
#162139 15/10/06 10:23 PM
Joined: Oct 2006
Posts: 68
B
BuTLeR Offline OP
Babel fish
OP Offline
Babel fish
B
Joined: Oct 2006
Posts: 68
but when the bot is not voiced or oped its still not colourd red only when its voiced or oped is the channel red =/ confused


At Your Service.
#162140 15/10/06 10:23 PM
Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
I guess to have all the channel names be colored you can do
Code:

change this [color:blue]
    else {
      set %bot-chans $addtok(%bot-chans, $chan(%o) $chr(124) ,32)
    }[/color]

To
[color:red]
    else {
      set %bot-chans $addtok(%bot-chans,5 $+ $chan(%o)  $+ $chr(124) ,32)
    }[/color]


#162141 15/10/06 10:29 PM
Joined: Oct 2006
Posts: 68
B
BuTLeR Offline OP
Babel fish
OP Offline
Babel fish
B
Joined: Oct 2006
Posts: 68
Thanks

sorry im a pain =P hehe


At Your Service.
Page 1 of 2 1 2

Link Copied to Clipboard