mIRC Home    About    Download    Register    News    Help

Print Thread
Help! #238345 18/07/12 11:29 PM
Joined: Jul 2012
Posts: 5
S
SynEyeX Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
S
Joined: Jul 2012
Posts: 5
Hi, i have a little problem here. My $1 is not working, It's like a msn bot. if i say !say hi the bot should say hi to me.

heres the script:

if (%msn.chat.data == !say) {
.timer 1 1 msn.say %msn.email.msg $1-
halt
}

whats wrong with is:S?

Sorry for bad english, im dutch!

I know in the old mIRC MSN bot days, (Freezing and non-Freezing) $1 Just worked for everything. But why isn't it working now?

Re: Help! [Re: SynEyeX] #238346 18/07/12 11:32 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
The variable %msn.chat.data need to get a matching word, how do you set it?


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Re: Help! [Re: sparta] #238347 18/07/12 11:34 PM
Joined: Jul 2012
Posts: 5
S
SynEyeX Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
S
Joined: Jul 2012
Posts: 5
Its like, if i type !say on the MSN chat client. it will start, its a simple command like this:

if (%msn.chat.data == !status busy) {
.timer 1 1 msn.say %msn.email.msg Status set to busy.
.timer 1 3 sendmsn CHG %msn.main BSY | titlebar @Messenger -=[ Busy ]=-
halt
}

If i type !status busy the MSN bot will set the status to busy. But i cant figure out why $1 doesnt work,

i want it like this: If i say !say helloworld

The bot must say helloworld to;p

sorry for bad english.

Re: Help! [Re: SynEyeX] #238348 19/07/12 02:37 AM
Joined: Oct 2004
Posts: 8,327
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,327
What event is this in? $1 is not filled in all events. If you want $1 from a variable, then you need to tokenize the variable first.

Example:
set %var this is a test
tokenize 32 %var
echo -a $1-

If you're in an event like ON TEXT, then $1- is the text shown without needing to tokenize it.

Also, remember that if the text is !say helloworld, then $2 is helloworld... $1 is !say.


Invision Support
#Invision on irc.irchighway.net
Re: Help! [Re: Riamus2] #238352 19/07/12 07:47 PM
Joined: Jul 2012
Posts: 5
S
SynEyeX Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
S
Joined: Jul 2012
Posts: 5
$2 dont work either ;s

Re: Help! [Re: SynEyeX] #238355 20/07/12 06:15 AM
Joined: Oct 2003
Posts: 3,918
A
argv0 Offline
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
Paste the full script, not just part of it.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Re: Help! [Re: argv0] #238357 20/07/12 10:35 AM
Joined: Jul 2012
Posts: 5
S
SynEyeX Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
S
Joined: Jul 2012
Posts: 5

Re: Help! [Re: SynEyeX] #238358 20/07/12 01:18 PM
Joined: Jan 2004
Posts: 1,279
L
Loki12583 Offline
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,279
$1- is undefined in sockets. If the data you're looking at is in %msn.chat.data you can tokenize 32 %msn.chat.data to use $1- as you're used to. Furthermore, if the data is contained in this variable, your condition if (%msn.chat.data == !say) will be false, use if (!say * iswm %msn.chat.data).

Passing unknown text to a timer is unsafe, use this alias and $safe($1-) in the timer.

Code:
alias safe return $!decode( $encode($1,m) ,m)

Re: Help! [Re: Loki12583] #238362 20/07/12 02:32 PM
Joined: Jul 2012
Posts: 5
S
SynEyeX Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
S
Joined: Jul 2012
Posts: 5
Can you make a !say command for me? I'm actually really beginning with mIRC.