mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jan 2007
Posts: 280
Fjord artisan
OP Offline
Fjord artisan
Joined: Jan 2007
Posts: 280
I got 2 scripts.. 1 works, but i wanna change it, and the other one doesnt work :

This one work, but i wanna change it to : On *:TEXT:!say*:#spelops:{ but then, the $3 and $4- doesnt work! Then i get : *<what i wanna say to them>* no such/channel Look :::

On *:TEXT:*Say*:#spelops:{
msg $3 $4-
}


Then it works with : <Bot name> say <chan or name> <text>
But i wanna have !say <Chan or Name> <Text> With : On *:TEXT:!say*:#Spelops:{
but then the $3 and $4- are wrong.. i said that allready..

The one who works is :

ON *:TEXT:*Geil*:?: { /msg #spelletjes !op | .timer 1 5 | /msg #spelletjes !akick $address($nick,2) This is NOT a sex chat! ALSO in private! }

But then... She types !op and she is opped. But if she is saying the akick. A other bot, is kicking her! HELP!

The ignore is :

On *:TEXT:*Ignore*:#spelops:{
ignore $3-
}

But i wanna have it like the say : ON *:TEXT:!ignore*:#spelops:{

But then i get :

* ignore is on
and if i look in the ignored peoples list..
there is NO nickname! HELP!!!

Please help me, i need it!


But then


Squee whenever a squee squee's. Squee whenever a squee does not squee.
Joined: Jan 2007
Posts: 280
Fjord artisan
OP Offline
Fjord artisan
Joined: Jan 2007
Posts: 280
i get :

* Ignore is on

but when i am looking in the addressbook..
there is NO ignored peoples!

HELP ME!



Squee whenever a squee squee's. Squee whenever a squee does not squee.
Joined: Oct 2003
Posts: 313
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Oct 2003
Posts: 313
The text seen by the event handler (on text in this case) is split up into "word"s, referenced by $N - $N is the Nth word in the text.

So:

Code:
On *:TEXT:*Say*:#spelops:{
  msg $3 $4-
}

splits the line "BotName say Chan_or_name text" into:
Code:
 $1      $2  $3           $4
"BotName say Chan_or_name text"

($4- just means all words from the fourth one to the end of the line)

So where you have the line "!say Chan_or_name text", your words are one item to the left of the previous example:
Code:
 $1   $2           $3  
"!say Chan_or_name text"


I hope that makes sense - it should help you figure it all out, and explains why your ignore isn't working correctly, too. (There's no $3 in "!ignore nick"....)


Sais
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Just so that you know, what you have can be abused very easily.

As an easy example (one that doesn't cause actual harm), if someone types:

!say #chan I've been hacked! | quit

You'll message that to the channel and then you will /quit.


Invision Support
#Invision on irc.irchighway.net
Joined: Jan 2007
Posts: 280
Fjord artisan
OP Offline
Fjord artisan
Joined: Jan 2007
Posts: 280
Yo! It works!

I thank you both, cause, all operators are happy'er smile

But, does somebody know's it from that

Code:
 
ON *:TEXT:*Geil*:?: { /msg #spelletjes !op | .timer 1 5 | /msg
#spelletjes !akick $address($nick,2) This is NOT a sex chat! ALSO in private! }





????????????????????

Last edited by DuXxXieJ; 06/01/07 07:13 PM.

Squee whenever a squee squee's. Squee whenever a squee does not squee.
Joined: Dec 2006
Posts: 80
Babel fish
Offline
Babel fish
Joined: Dec 2006
Posts: 80
In this code:
Code:
 
ON *:TEXT:*Geil*:?: { /msg #spelletjes !op | .timer 1 5 | /msg
#spelletjes !akick $address($nick,2) This is NOT a sex chat! ALSO in private! }


You have a .timer set up with a return seperator ~> | between the .timer and the command its going to execute, being your /msg command.

First:
When setting up a .timer (if you have any other scripts using them) you can give it a name like: .timer.geil
Naming them will give each one its own detail, making them unique to mIRC, so you dont start the same timer twice. In the example below, I used the persons nickname appended to the .timer to make it unique.

Second:
With the return seperator between the .timer and the message, you've started a timer with no command. mIRC will start a 5 second .timer, but yet execute the /msg command instantly, without the delay.

This code should fix it:
Code:
 
ON *:TEXT:*Geil*:?: { 
 /msg #spelletjes !op 
 .timer. $+ $nick 1 5 /msg #spelletjes !akick $address($nick,2) This is NOT a sex chat! ALSO in private!
} 

Last edited by Scripto; 06/01/07 07:59 PM.

Scripto ---- Life is about the relationships. The correct code being: $replace($them,$you,$me)
Joined: Jan 2007
Posts: 280
Fjord artisan
OP Offline
Fjord artisan
Joined: Jan 2007
Posts: 280
yow cool! It works

*Hugs the peoples who helped*


grin blush


Squee whenever a squee squee's. Squee whenever a squee does not squee.

Link Copied to Clipboard