mIRC Home    About    Download    Register    News    Help

Print Thread
J
jcle
jcle
J
Hey guys, Im not a fan of mIRC adon's so when i want to do things i usually script them myself, but i've ran into an obsticle

Currently I have this in my nicklist, and it works:

Talk Direct: /msg #  $$1: $$?="Enter message:"

but what i want to do, is instead of using $$1 I want it to spit back customize nicks based on the users name. So i tried this:

alias msgs {
If ($$1 == [FC]Bender) /msg # Chris[FC]: $$?="Enter message:"
else if ($$1 == Chris554) /msg # Chris[554] $$?="Enter message:"
else /msg #  $$1: $$?="Enter message:"
}

and i tried using $nick instead of $$1 and neither seem to work.. nor did me using:

alias msgs {
/msg #  $$1: $$?="Enter message:"
}

Any suggestions?

Joined: Dec 2002
Posts: 3,534
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,534
As you can see that will get quite messy having hundeds of nicknames.

Code:
alias msgs {
  if ($$1 == Andy1) { do something }
  elseif ($$1 == Andy2) { do something }
  elseif ($$1 == Andy3) { do something }
  elseif ($$1 == Andy4) { do something }
  elseif ($$1 == Andy5) { do something }
  elseif ($$1 == Andy6) { do something }
  elseif ($$1 == Andy7) { do something }
  elseif ($$1 == Andy8) { do something }
  elseif ($$1 == Andy9) { do something }
  else  { bleh.. }
}
[code]
Try this maybe?

[code]
menu nicklist {
  MSG $$1: msgs $$1
}

alias msgs {
  msg $$1 $input(Send Message:,e,Send message to $$1)
}

J
jcle
jcle
J
alright i put that in, onlly issue is the popup message box wont open anymore, even though its the same script from the reg popup cmd for nicklist

the other code you provided at the bottom send a query msg to the user.. see this is what i want

when i click on l il_julia i want it to say Julz: msg
but it doesn't seem to work when i code it, though the regular talk direct i had coded worked just wont work in an alias

Last edited by jcle; 18/03/05 07:25 PM.
Joined: Dec 2002
Posts: 3,534
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,534
I see what you mean. Sorry my bad. Try this.

Code:
menu nicklist {
  $repnick($$1) : msgs $$1 
}

alias repnick {
  if ($1 == Andy) return Andrew Gabriel
  elseif ($1 == jcle) return Your Name Here
  elseif ($1 == DancingQueen) return Fred Astaire
  elseif ($1 == John) return John Doe
  elseif ($1 == Joe) return Joe Bloggs
  else return $1
}

alias msgs { 
  msg $$1 $input(Send Message:,e,Send message to $$1)
}


This seems to work for me. Atleast I think it does.

Edit:
* Changed IFs to ELSEIF's. shocked
* Added ELSE Statement.

Last edited by SladeKraven; 18/03/05 07:54 PM.
J
jcle
jcle
J
okay that works, however i want it to /msg # nick: lskfjsdkljf
instead of messaging them a query so if i rightclick on jcle it would say Jenni: What's up
in the channel that im in at the time

Joined: Dec 2002
Posts: 3,534
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,534
Code:
menu nicklist {
  $repnick($$1) : msgs $$1
}

alias repnick {
  if ($1 == Andy) return Andrew Gabriel
  elseif ($1 == jcle) return Your Name Here
  elseif ($1 == DancingQueen) return Fred Astaire
  elseif ($1 == John) return John Doe
  elseif ($1 == Joe) return Joe Bloggs 
  else return $1
}

alias msgs { 
  msg $chan $repnick($$1) $+ : $input(Send Message:,e,Send message to $$1)
}


Sorry, try this. smile

J
jcle
jcle
J
ohh!

alias msgs {
msg # $repnick($$1): $input(Send Message:,e,Send message to $$1)
}

= what i want, the only problem im having now is i want the nick to be bolded and the text to be non bolded but it will either do one or the other not both lol

J
jcle
jcle
J
lol didn't see your reply before i submitted mine after i figured out how to manipulate that line

J
jcle
jcle
J
smile nvm i figured it out thankx SO much for your time

Joined: Dec 2002
Posts: 3,534
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,534
Try...

Code:
menu nicklist {
  $repnick($$1) : msgs $$1
}

alias repnick {
  if ($1 == Andy) return Andrew Gabriel
  elseif ($1 == jcle) return Your Name Here
  elseif ($1 == DancingQueen) return Fred Astaire
  elseif ($1 == John) return John Doe
  elseif ($1 == Joe) return Joe Bloggs 
  else return $1
}

alias msgs { 
  msg $chan $+($chr(2),$repnick($$1),$chr(2),:) $input(Send Message:,e,Send message to $$1)
}

Joined: Dec 2002
Posts: 3,534
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,534
Quote:
smile nvm i figured it out thankx SO much for your time


Didn't realised you posted just before my previous.

You're welcome. Glad I could help.

Have fun!

-Andy


Link Copied to Clipboard