mIRC Homepage
Posted By: Timdog How did he do that? - 12/03/05 03:13 AM
I know someone who has a script that I would like to modify and use for myself. He won't give up the script either. ;o

He has it so that he can right click on someone and select a command. This is used on nicks. The script does a /me does something to the person they selected. This part I'm pretty sure I can figure out. It's the next part that I haven't been abble to figure out. It says "total people this person has done something to people: insert nuumber You have had something done to you: insert number.

I can't figure out how I can add that last part. A little help?
Posted By: SladeKraven Re: How did he do that? - 12/03/05 03:25 AM
Sorry if I didn't understand do you mean something along the lines of...

Code:
menu nicklist {
  Commands
  .Msg PVT: {
    inc %nick. [ $+ [ $$1 ] ]
    msg $$1 Hello $$1 $+ , I have selected your name %nick. [ $+ [ $$1 ] ] time(s).
  }
  .Msg in chan: {
    inc %nick. [ $+ [ $$1 ] ]
    msg $chan Hello $$1 $+ , I have selected your name %nick. [ $+ [ $$1 ] ] time(s).
  }
  .Action PVT: {
    inc %nick. [ $+ [ $$1 ] ]
    describe $$1 Hello $$1 $+ , I have selected your name %nick. [ $+ [ $$1 ] ] time(s).
  }
  .Action in chan: {
    inc %nick. [ $+ [ $$1 ] ]
    describe $chan Hello $$1 $+ , I have selected your name %nick. [ $+ [ $$1 ] ] time(s).
  }
}
Posted By: Timdog Re: How did he do that? - 12/03/05 03:31 AM
That seems to be what I'm looking for. smile
Posted By: SladeKraven Re: How did he do that? - 12/03/05 03:36 AM
You're welcome. grin
Posted By: Timdog Re: How did he do that? - 12/03/05 04:01 AM
Ok, I've got a few problems. Is there a way so that it will not do it by nicks because as it is now, it will restart the count once people change their nick. Also, is there anyway that I can display my grand total of doing that action. Thanks for the help from the IRC scripting n000bie. ^_^
Posted By: SladeKraven Re: How did he do that? - 12/03/05 04:15 AM
Quote:

Is there a way so that it will not do it by nicks because as it is now, it will restart the count once people change their nick.[/quote

I don't understand what you mean by that dude. frown

[quote]
Also, is there anyway that I can display my grand total of doing that action. Thanks for the help from the IRC scripting n000bie. ^_^


Code:
menu nicklist {
  Commands
  .Msg PVT: {
    inc %nick. [ $+ [ $$1 ] ]
    msg $$1 Hello $$1 $+ , I have selected your name %nick. [ $+ [ $$1 ] ] time(s).
  }
  .Msg in chan: {
    inc %nick. [ $+ [ $$1 ] ]
    msg $chan Hello $$1 $+ , I have selected your name %nick. [ $+ [ $$1 ] ] time(s).
  }
  .Action PVT: {
    [color:red]inc %action[/color]
    inc %nick. [ $+ [ $$1 ] ]
    describe $$1 Hello $$1 $+ , I have selected your name %nick. [ $+ [ $$1 ] ] time(s).  [color:red]time(s). Action %action time(s).[/color]
  }
  .Action in chan: {
    [color:red]inc %action[/color]
    inc %nick. [ $+ [ $$1 ] ]
    describe $chan Hello $$1 $+ , I have selected your name %nick. [ $+ [ $$1 ] ] time(s). [color:red]Action %action time(s).[/color]
  }
}
Posted By: Timdog Re: How did he do that? - 12/03/05 05:00 AM
If someone changes their nick, then their number of times having done something to them will start counting for the new nick and not addd in the old nicks.
Posted By: DaveC Re: How did he do that? - 12/03/05 08:17 AM
Code:
menu nicklist {
  Commands
  .Msg PVT: {
    inc %nick. [ $+ [ $$1 ] ]
    inc %total.msg.pvt
    msg $1 Hello $1 $+ , I have selected your name %nick. [ $+ [ $1 ] ] time(s). This action taken %total.msg.pvt time(s).
  }
  .Msg in chan: {
    inc %nick. [ $+ [ $$1 ] ]
    inc %total.msg.chan
    msg $chan Hello $1 $+ , I have selected your name %nick. [ $+ [ $1 ] ] time(s). This action taken %total.msg.chan time(s).
  }
  .Action PVT: {
    inc %nick. [ $+ [ $$1 ] ]
    inc %total.action.pvt
    describe $1 Hello $1 $+ , I have selected your name %nick. [ $+ [ $1 ] ] time(s). This action taken %total.action.pvt time(s).
  }
  .Action in chan: {
    inc %nick. [ $+ [ $$1 ] ]
    inc %total.action.chan
    describe $chan Hello $1 $+ , I have selected your name %nick. [ $+ [ $1 ] ] time(s). This action taken %total.action.chan time(s).
  }
}
;
;* $1 is normally the nick selected
;* inc %nick. [ $+ [ $$1 ] ] ; this keeps a count per nick, $$1 is used so that the code stops if there is no $1 value
;* inc %total.????.????      ; this keeps a track on the total for this specific action
;
on *:NICK:{
  if ($var(%nick. [ $+ [ $nick ] ] )) {
    set %nick. [ $+ [ $newnick ] ] %nick. [ $+ [ $nick ] ]
    unset %nick. [ $+ [ $nick ] ]
  }
}
;
;monitors and changes the nick variable when it detects a nick change *** this well only catch nick changes in channels you are in *** 
;
© mIRC Discussion Forums