mIRC Home    About    Download    Register    News    Help

Print Thread
#125225 15/07/05 06:39 PM
Joined: Mar 2003
Posts: 12
A
Pikka bird
OP Offline
Pikka bird
A
Joined: Mar 2003
Posts: 12
I would like to have a scipt done in two different ways. One way I want to be able to type something in (like /soul) and it reads a random line from a text file. The other way is for anyone in the channel to be able to type something (like !soul) and it read from that same text file (or a different one if need be).

When I type /soul, I want it to do something like this:

soul { action uses Kilik's Dirty Bo on $1-. Ownage! * }

However, where it says "Kilik's Dirty Bo" is where it want it to randomly read from the text file. I have a text file with about thiry different responses, all of which fit in that same space (so it doesn't need to restructure the whole sentance every time, just that one part). Also, $1- is where I would type in a name, obviously.

Also, I am pretty sure it can't be done without messing with a lot of stuff, but is it possible for me to be able to right click on someone's name and it do this for me so I don't have to type in their name (like Slap)?

Thanks. ^_^


-Annon Kaies Zi
#125226 15/07/05 07:22 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
This will only work in a channel.

Code:
alias soul {
  if ($chan != $null) {
    describe $chan $read(responses.txt) $1-
  }
}

Use: /soul nick

Note that if you are only doing this for one channel, you can just use:

Code:
alias soul {
  describe #yourchan $read(responses.txt) $1-
}


To add ! ability for others:
Code:
on *:text:!soul *:#yourchan: {
  describe #yourchan $read(responses.txt) $2-
}


For the first one, if you want to use a selected nick, you can do this:

Go to Popups tab instead of Remotes tab, go to View menu and then Nick List.

At the bottom add:

Code:
-
Soul:describe #yourchan $read(responses.txt) $snicks



**Remember that you must replace #yourchan with your channel's name and responses.txt with the text file you are using.


Invision Support
#Invision on irc.irchighway.net
#125227 16/07/05 02:52 AM
Joined: Mar 2003
Posts: 12
A
Pikka bird
OP Offline
Pikka bird
A
Joined: Mar 2003
Posts: 12
Thanks. ^_^ Worked like a charm.


-Annon Kaies Zi
#125228 16/07/05 06:03 AM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
Code:
alias soul { describe #yourchan $read(responses.txt) $1- }
on *:text:!soul *:#yourchan: { soul $2- }


Would be more correctly structured.

#125229 18/07/05 01:24 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
I had been thinking of doing that and forgot completely as I was thinking of it as two separate scripts by the time I got to that point. smile


Invision Support
#Invision on irc.irchighway.net

Link Copied to Clipboard