mIRC Home    About    Download    Register    News    Help

Print Thread
#67791 14/01/04 10:20 AM
Joined: Jan 2004
Posts: 30
M
mbot Offline OP
Ameglian cow
OP Offline
Ameglian cow
M
Joined: Jan 2004
Posts: 30
Hey.

I've got 2 questions for You.

1. I need a .mrc wirte to a .ini. If I write the .mrc like this:
write -a slaps.txt $!nick $+ 's
Then the $!nick is written to the .ini file as $nick as it is supposed to, but the $+ 's part is wriiten to the .ini like 's and added to the end of $nick. Have tried to $!+ 's but it does not seem to work properly. Any suggestions?

2. Is it possible to define the on action command, so it will react on a given parameter and on a variable? Something like this:
on *:ACTION:*slaps $me*:#: {
describe $chan $read(file.txt)
}
For some reason this does not work, either. Suggestions?

Thx.

Joined: Oct 2003
Posts: 273
E
EVH Offline
Fjord artisan
Offline
Fjord artisan
E
Joined: Oct 2003
Posts: 273
1.
Not sure I understand the 1st
is this what you mean?
write slaps.txt $eval($nick $+ 's,0)


2.
on *:ACTION:$(*slaps $me *):#: {
describe # $read(file.txt)
}

Last edited by EVH; 14/01/04 12:57 PM.
Joined: Jan 2004
Posts: 30
M
mbot Offline OP
Ameglian cow
OP Offline
Ameglian cow
M
Joined: Jan 2004
Posts: 30
Hey.
I appreciate your reply but it does not work. It looks like this in my script:
Code:
on *:ACTION:$(*slaps $me*):#: {
  describe $chan $read(slaps.txt)
}
 

Did I mess it up ? If I do it like this instead, it works:
(where user being the nick of the user, naturally)
Code:
 
on *:ACTION:*slaps user*:#: {
  describe $chan $read(slaps.txt)
}
 

But I find it better if could make it work without entering the specific nick.

Concerning my 1st question.I figured it out. I have written a .mrc which indcludes this(the first piece of code is from the same file as well):

write -a slaps.txt steals $!nick $!+ 's keyboard. mwahaha!

What the script is supposed to do is create + write to a file named slaps.txt and read from it on the upper action....and so it does laugh

Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
It's not working because you've got $me next to the *.

Just change it to:
Code:
on *:ACTION:$(*slaps $+($me,*)):#: {
describe $chan $read(slaps.txt)
}


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Joined: Jan 2004
Posts: 30
M
mbot Offline OP
Ameglian cow
OP Offline
Ameglian cow
M
Joined: Jan 2004
Posts: 30
Hey.

Super nice! grin

/me bows and thanks

Joined: Dec 2003
Posts: 33
M
Man Offline
Ameglian cow
Offline
Ameglian cow
M
Joined: Dec 2003
Posts: 33
Code:
 
on *:ACTION:$(*slaps $me $+ *):#: {
  describe $chan $read(slaps.txt)
} 
 


OR

Code:
 
on *:ACTION:$(*slaps $me *):#: {
  describe $chan $read(slaps.txt)
} 
 



Link Copied to Clipboard