mIRC Home    About    Download    Register    News    Help

Print Thread
Help me please, Just learnin to script #92483 02/08/04 06:04 PM
Joined: Aug 2004
Posts: 6
N
Natoriousb Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
N
Joined: Aug 2004
Posts: 6
I need some help with an auto response. I want to responed to people after I auto op them, but only if I op them. This is what i have so far

On *:Text:*Thanks for the*:#mar-ops:{
/msg $chan Not a problem $nick
}

any suggestions?
Thanks grin

Re: Help me please, Just learnin to script #92484 02/08/04 06:29 PM
Joined: Dec 2002
Posts: 774
T
theRat Offline
Hoopy frood
Offline
Hoopy frood
T
Joined: Dec 2002
Posts: 774
on @*:Text:*Thanks for the*:#mar-ops:{
if ( $istok(%opped,$nick,32) ) {
/msg $chan Not a problem $nick
set %opped $remtok(%opped,$nick,1,32)
}
}

on @:op:#mar-ops: {
if ( $nick == $me ) {
set %opped %opped $opnick
}
}



try something like that...


Code:
//if ( khaledisgod ) echo yes | else echo no
Re: Help me please, Just learnin to script #92485 02/08/04 10:04 PM
Joined: Aug 2004
Posts: 6
N
Natoriousb Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
N
Joined: Aug 2004
Posts: 6
Thanks, but that doesnt seem to be working.

Whats : %opped

thanks for ya help

Re: Help me please, Just learnin to script #92486 03/08/04 04:00 AM
Joined: Dec 2002
Posts: 1,245
M
MikeChat Offline
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
in mode changes like op deop and so on the person making the change is held in $nick
Code:
 
on *:op:#:if ($nick == $me) { msg $chan $nick has opped $opnick }
 


Re: Help me please, Just learnin to script #92487 03/08/04 06:20 PM
Joined: Dec 2002
Posts: 1,530
L
landonsandor Offline
Hoopy frood
Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,530
and if you're making the change you can do this:

on me:*:op:#:msg $chan $nick has opped $opnick

That will only trigger when YOU do it. If you're planning on using things for others and you, use what MikeChat showed you as it'll be easier to integrate


Those who fail history are doomed to repeat it
Re: Help me please, Just learnin to script #92488 08/08/04 12:57 AM
Joined: Aug 2004
Posts: 6
N
Natoriousb Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
N
Joined: Aug 2004
Posts: 6
This is what i have
------------------------------------------------
on @*:Text:*Thanks for the*:#mar-ops:{
if ( $istok(%opped,$nick,32) ) {
/say Not a problem $nick
set %opped $remtok(%opped,$nick,1,32)
}
}

on *:op:#:if ($nick == $me) { msg $chan $nick gave ops to $opnick }
on me:*:op:#:msg $chan $nick gave ops to $opnick
---------------------------------------------------------------
Only the last line of code works. Can you help me fix the top part?

Re: Help me please, Just learnin to script #92489 08/08/04 03:30 AM
Joined: Dec 2002
Posts: 1,530
L
landonsandor Offline
Hoopy frood
Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,530
on me:*:op:#:msg $chan $nick gave ops to $opnick

replaces:

on *:op:#:if ($nick == $me) { msg $chan $nick gave ops to $opnick }

So you dont need both of them.

Code:
on @*:Text:*Thanks for the*:#mar-ops:{
  if ( $istok(%opped,$nick,32) ) {
   say Not a problem $nick
   set %opped $remtok(%opped,$nick,1,32)
  }
}


As for the above, does it even trigger? Maybe try this to test to see if it even triggers:

Code:
on @*:Text:*Thanks for the*:#mar-ops:{
  echo -s THIS IS A TEST
  if ( $istok(%opped,$nick,32) ) {
   say Not a problem $nick
   set %opped $remtok(%opped,$nick,1,32)
  }
}


If the "this is a test" does not even fire, that would be a place to start figuring out why it wont (like multiple on text events etc)


Those who fail history are doomed to repeat it
Re: Help me please, Just learnin to script #92490 08/08/04 04:43 AM
Joined: Aug 2004
Posts: 6
N
Natoriousb Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
N
Joined: Aug 2004
Posts: 6
This is a test showed up...but the rest doesnt.

Re: Help me please, Just learnin to script #92491 08/08/04 09:51 PM
Joined: Dec 2002
Posts: 1,530
L
landonsandor Offline
Hoopy frood
Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,530
This might sound stupid but why not use:

Code:
if ($nick isin %opped) {
 say Not a problem $nick
 set %opped $remtok(%opped,$nick,1,32)
}


I understand you are trying to see if the token (which is actually the nickname firing the event) exists in that variable, but would my above example work for you? Tokens arent my thing and while I understand them, I feel like Im missing something important but it could just be me.


Those who fail history are doomed to repeat it
Re: Help me please, Just learnin to script #92492 08/08/04 10:15 PM
Joined: Dec 2002
Posts: 788
C
Coolkill Offline
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 788
One usually doesnt use "isin" when searching for specific set of characters in a phrase, because:

%var being; testingabc this is a test

if (abc isin %var) would return true, because, it appears in the string, however it is NOT a "word" on its own.. whereas $istok checked if it was a "word" by looking to see if there was a space either side..

If you are still looking for a working solution, with the same effect as the first lot of coding..

On *:Text:*Thanks for the*:[color:red]#channel
:{
if (!$hget(opr,$nick)) {
msg $chan Not a problem $nick
hadd -mu60 opr $nick 1
}
}
[/color]
Eamonn.

Re: Help me please, Just learnin to script #92493 08/08/04 10:43 PM
Joined: Dec 2002
Posts: 1,530
L
landonsandor Offline
Hoopy frood
Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,530
I agree for that exact reason, but I just couldnt (for some stupid reason) figure out that simple token code - it just wasnt happening lol Im sure you know what I mean


Those who fail history are doomed to repeat it
Re: Help me please, Just learnin to script #92494 08/08/04 10:52 PM
Joined: Aug 2003
Posts: 1,831
I
Iori Offline
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
Then you're probably not adding the nick to the var when you op them.
  • on me:@*:op:#mar-ops:set %opped $addtok(%opped,$opnick,32)


Re: Help me please, Just learnin to script #92495 25/08/04 05:33 AM
Joined: Aug 2004
Posts: 6
N
Natoriousb Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
N
Joined: Aug 2004
Posts: 6
that works but it does it even when Im not the one doing the opping

[01:30] * murda-- sets mode: +v T-MaC
[01:30] <T-MaC> Thanks for the +v
[01:30] > Not a problem T-MaC

I want it to do it just for opping when i do it. I figured out how to get it to do it in any chan im in but I cant figure out how to do it just for ops by me. Any Suggestions?

Re: Help me please, Just learnin to script #92496 25/08/04 05:43 AM
Joined: Dec 2002
Posts: 1,530
L
landonsandor Offline
Hoopy frood
Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,530
so then do something as simple as

if ($nick == $me) { stuff }

the above means if YOU op the person.

if ($opnick == $me) { stuff }

the above means if you're the one being opped

if (($opnick == $me) && ($nick == $me)) { stuff }

the above means if you're the one opping and you're the one being opped (thought Id throw this in anyhow jsut to illustrate is all). Do any of those help you out at all??


Those who fail history are doomed to repeat it
Re: Help me please, Just learnin to script #92497 25/08/04 10:07 PM
Joined: Aug 2004
Posts: 6
N
Natoriousb Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
N
Joined: Aug 2004
Posts: 6
I tried what you posted , but it doesnt work? what goes where "stuff" is?

if ($nick == $me) { stuff }

Re: Help me please, Just learnin to script #92498 26/08/04 03:44 AM
Joined: Dec 2002
Posts: 1,530
L
landonsandor Offline
Hoopy frood
Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,530
referrencing therat's example:

Code:
on @:op:#mar-ops: {
  if ($nick == $me) { set %opped %opped $opnick }
}


See how it all fits together? if you have more if statements that you want to fire when you're the one who opped somebody you'd use (totally made up code):


Code:
on @:op:#mar-ops: {
  if ($nick == $me) {
    if ($nick == hello-there) { command1 }
    if ($me == Bossman) { msg # Bossman says know your role }
  }
}


Those who fail history are doomed to repeat it