mIRC Home    About    Download    Register    News    Help

Print Thread
#176967 17/05/07 02:09 PM
Joined: Feb 2007
Posts: 10
N
Pikka bird
OP Offline
Pikka bird
N
Joined: Feb 2007
Posts: 10
Hi, I need a script for a huggle alias.
So when I type, /hug <person> it'll take a random huggle from a text file and make me do.
/me <random huggle> nick.

If anyone can make this script for me then I will be VERY happy laugh

Last edited by Nightmare69; 17/05/07 02:49 PM.
Joined: Feb 2007
Posts: 10
N
Pikka bird
OP Offline
Pikka bird
N
Joined: Feb 2007
Posts: 10
Okay, I have tried this...

Code:
/hug $1 /me # $read(huggles.txt) $1


but it just returns the following error,
Code:
Nightmare Unknown command


Any help?

Joined: Dec 2002
Posts: 2,031
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,031
/hug describe # $read(huggles.txt) $1

Joined: Feb 2007
Posts: 10
N
Pikka bird
OP Offline
Pikka bird
N
Joined: Feb 2007
Posts: 10
Okay ty laugh

Joined: Feb 2007
Posts: 10
N
Pikka bird
OP Offline
Pikka bird
N
Joined: Feb 2007
Posts: 10
Hi, I need a new script, I currently have.

Code:
on *:text:<nick:#: {
  if ($nick == Nightmare} {
    /nick $2
  }
  else {
    notice $nick You do not have access to this command.
  }
}


How would I do it so I can have two people access to that command.
Or maybe I could write a file called, admins.txt one on each line and if they're not in there... it'll give the notice you do not have access to that command, how would I do that?

if ($nick == $read(admins.txt) or something?
Sorry, I'm a big noob lol

Joined: Dec 2002
Posts: 2,031
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,031
Code:
on *:TEXT:<nick &:#: {
  if (($nick == Nightmare) || ($nick == nick2)) {
    nick $2
  }
  else {
    notice $nick You do not have access to this command.
  }
}


You could add them to your user list.

To use the file idea...

Code:
on *:TEXT:<nick &:#: {
  if ($read(admins.txt,w,$nick) != $null) {
    nick $2
  }
  else {
    notice $nick You do not have access to this command.
  }
}


Add the nicks to admins.txt .. one nick per line.

~ Edit ~

I forgot to mention that I added the & wildcard to the matchtext.
* = any string of characters ; & = any one word ; ? = any one character

Last edited by RoCk; 17/05/07 08:37 PM.

Link Copied to Clipboard