mIRC Home    About    Download    Register    News    Help

Print Thread
on action and write probs #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.

Re: on action and write probs #67792 14/01/04 12:29 PM
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.
Re: on action and write probs #67793 14/01/04 01:15 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

Re: on action and write probs #67794 14/01/04 01:32 PM
Joined: Dec 2002
Posts: 2,962
S
starbucks_mafia Offline
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.
Re: on action and write probs #67795 14/01/04 01:51 PM
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

Re: on action and write probs #67796 14/01/04 03:06 PM
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)
}