mIRC Home    About    Download    Register    News    Help

Print Thread
#49493 14/09/03 10:06 PM
Joined: Sep 2003
Posts: 122
Gar Offline OP
Vogon poet
OP Offline
Vogon poet
Joined: Sep 2003
Posts: 122
I have a friend that uses Trillian. He has this script that allows him to to tye /slap [nick] and it produces a saying that uses what ever he put in the [nick] part.

I was wondering, is there anyway it would work in mIRC? Here is the code:

Code:
int main()
{ 
  add_alias("slap", a_slap);
  add_alias("slap1", a_slap1);
  add_alias("slap2", a_slap2);
  add_alias("slap3", a_slap3);
  add_alias("slap4", a_slap4);
}

string defchan = "#santharia";
string defchan = "#santharia";

string slap = "upside the head with a large trout.";
string slap1 = "with a Volvo... that was clamped anyway so the driver doesn't mind.";
string slap2 = "with the back of his hand.";
string slap3 = "with a wiffle bat.";
string slap4 = "with a Cat'O'Nine tails.";

void a_slap(void)
{
  if (ArgList[1] != NULL) defchan = ArgList[1];
  if (ArgList[0] != NULL) person = ArgList[0];
  parse_command("/describe ", defchan," slaps ", person, " ", slap, "\n");
}
void a_slap1(void)
{
  if (ArgList[1] != NULL) defchan = ArgList[1];
  if (ArgList[0] != NULL) person = ArgList[0];
  parse_command("/describe ", defchan," slaps ", person, " ", slap, "\n");
}
void a_slap2(void)
{
  if (ArgList[1] != NULL) defchan = ArgList[1];
  if (ArgList[0] != NULL) person = ArgList[0];
  parse_command("/describe ", defchan," slaps ", person, " ", slap, "\n");
}
void a_slap3(void)
{
  if (ArgList[1] != NULL) defchan = ArgList[1];
  if (ArgList[0] != NULL) person = ArgList[0];
  parse_command("/describe ", defchan," slaps ", person, " ", slap, "\n");
}
void a_slap4(void)
{
  if (ArgList[1] != NULL) defchan = ArgList[1];
  if (ArgList[0] != NULL) person = ArgList[0];
  parse_command("/describe ", defchan," slaps ", person, " ", slap, "\n");
}

 


If it doesn't is there a way I can do it in mIRC?

#49494 14/09/03 10:14 PM
Joined: Aug 2003
Posts: 148
K
Vogon poet
Offline
Vogon poet
K
Joined: Aug 2003
Posts: 148
alias slap {
if ($2 != $null) { describe $chan slaps $2 }
}


_________
may death strike you.
#49495 14/09/03 10:25 PM
Joined: Jan 2003
Posts: 150
J
Vogon poet
Offline
Vogon poet
J
Joined: Jan 2003
Posts: 150
here you go

quickscript...
Code:
alias xslap {
  if ($1) {
    var %s
    if ($2 == 0) { %s = upside the head with a large trout. }
    elseif ($2 == 1) { %s = with a Volvo... that was clamped anyway so the driver doesn't mind. }
    elseif ($2 == 2) { %s = with the back of his hand. }
    elseif ($2 == 3) { %s = with a wiffle bat. }
    elseif ($2 == 4) { %s = with a Cat'O'Nine tails. } 
    else { %s = with nuclear warhead... }
    describe $active slaps $1 %s
  }
  else { echo 4 -a * XSLAP syntax: /xslap nick type }
}


Go ahead, jump. 100,000 lemmings can't be wrong.
#49496 14/09/03 11:10 PM
Joined: Sep 2003
Posts: 122
Gar Offline OP
Vogon poet
OP Offline
Vogon poet
Joined: Sep 2003
Posts: 122
thanks. Does the "x" have to be in front of the "slap" Could I remove it so I only have to type /slap rather then /xslap ?

#49497 14/09/03 11:13 PM
Joined: Jan 2003
Posts: 150
J
Vogon poet
Offline
Vogon poet
J
Joined: Jan 2003
Posts: 150
np
as you wish grin


Go ahead, jump. 100,000 lemmings can't be wrong.

Link Copied to Clipboard