mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Oct 2005
Posts: 75
C
Babel fish
OP Offline
Babel fish
C
Joined: Oct 2005
Posts: 75
hello again,

i have another one

on 666:text:!mycmds:*:/play -n $nick $mircdir\cmds\mycmds.txt 800

and this is whats in the txt file

4,8-=--=--=--=--=--=--=--=-My Commands List-=--=--=--=--=--=--=--=-
4,8»4 $me opme
4,8»4 $me deopme
4,8»4 $me mode #channel +\- ntsklimsp
4,8»4 $me kick #channel nick reason
4,8»4 $me ban #channel nick reason
4,8»4 $me unban #channel nick\address
4,8»4 $me say <your msg here>
4,8»
4,8»7 ie1: $me opme
4,8»7 ie2: $me mode #Lobby +nts
4,8»7 ie3: $me kick #Lobby Junior kiss my (_Y__)
4,8-=--=--=--=--=--=--=-End of My Command List-=--=--=--=--=--=--=-

it plays the txt file just the way it suppose to be played the problem is i want $me to display as my Original Active nick i put in Connect in Option but instead of playin that...it just play plain $me with the rest of all that in the txt file just so when i change the bot nick anytime $me will display as MyNewBotNick....or can that work?

Last edited by Confuzzled; 14/11/05 10:11 AM.
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
/help /play

Quote:
The -c switch forces mIRC to interpret lines as actual commands instead of plain text.


Just be careful about what you're playing as the commands could cause problems if you don't know what commands are being played.


Invision Support
#Invision on irc.irchighway.net
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
hes also gonna need the word SAY at the front of each line for that to work
ie

SAY 4,8-=--=--=--=--=--=--=--=-My Commands List-=--=--=--=--=--=--=--=-
SAY 4,8»4 $me opme
SAY 4,8»4 $me deopme
etc etc

It treats the lines as commands, not just evaluates them.

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Hm... it won't play to a nick with say in front, when using -c? That seems strange to me...

I'd think that play works like /msg or /notice....

Playing the line results in this basic format:
/msg $nick The address for $me is $address

Where, the line in the text file would be:
The address for $me is $address

Otherwise, it seems as if it would be using this format:
/msg $nick SAY The address for $me is $address

Since you're already including $nick in the /play command, I'd think it would play to the nick. Oh well... not saying it does... just that it doesn't make sense for it not to. smile

I suppose it just treats it as not really displaying the text when using -c, but instead treating the lines as just a lot of commands to be run. I guess that does make sense... but I don't know... still seems like a weird way to handle it. Heh. Oh well. I never use -c anyhow. laugh


Invision Support
#Invision on irc.irchighway.net
Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
he put 4,8»4 $me opme
color and an identifier
me or /me would work, but that wouldnt be colored as the OP showed

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Yes, I knew $me was an identifier. I'm sure he doesn't mean to use /me. Still, I understand the reason for needing /say included... I'm not entirely sure I agree with it, but perhaps it is best that way. I do see a use for having it like that.


Invision Support
#Invision on irc.irchighway.net
Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
the logic is that the first thing on the string (each line of the file) will be a command

why have it that way and not both "well if there is a command there, do that but otherwise look for variables or identifiers in the string" I can only guess at
As a guess it would take a lot more logic in the part of mIRC code that is there to parse text files as command strings

Joined: Oct 2005
Posts: 1,741
G
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
One way you could get the identifiers without adding commands to each line of the text file is by using the -a (alias) switch.

A command like this:

/play -a /msg nick myplay.txt

The green portion could be replaced with the desired destination command, such as:

/play -a /msg #channel myplay.txt
/play -a /echo -s myplay.txt
/play -a /notice joe_bob myplay.txt

or if you have a custom alias:

alias mycommand {
/msg #channel $1-
/echo -s $1-
/write tempfile.txt $1-
}

/play -a /mycommand myplay.txt

-------------------------------------

I used the following lines in a text file called play.txt:
Line 1, I am $me
Line 2, it is $time
Line 3, 1+1= $+ $calc(1 + 1)


..and the following command:
/play -a /msg genius_at_work play.txt

..and I got the following MSGs from my bot (geniusBOT):
(geniusBOT): Line 1, I am geniusBOT
(geniusBOT): Line 2, it is 21:55:59
(geniusBOT): Line 3, 1+1=2


-------------------------------------

It seems to work for me on v6.16. It may or may not on previous (or subsequent) versions.

-genius_at_work

Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
I have seen the alias option mentioned in 6.16 but have not tried it. looks like I will have an opportunity coming up in a project, so its bound to be a learning experiance laugh

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Yeah, the alias option for /play expands /play so that it becomes extremely versatile. laugh


Invision Support
#Invision on irc.irchighway.net

Link Copied to Clipboard