mIRC Home    About    Download    Register    News    Help

Print Thread
script to only run when I type the command #265280 26/03/19 04:21 PM
Joined: Aug 2018
Posts: 5
T
TheGigon Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
T
Joined: Aug 2018
Posts: 5
I'm still new to mIRC so trying to figure something out.

I would like a script to run only when I type the command !ball15 in chat. Can I target an on text event trigger to my user name/nick or will I need to use an if then else trigger? If I need to use an if then else trigger, how do I get it to trigger for my username?

Thank you for any help that can be provided for this.

Re: script to only run when I type the command [Re: TheGigon] #265282 26/03/19 04:50 PM
Joined: Feb 2003
Posts: 2,626
Raccoon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,626
You cannot trigger your own On TEXT events in your own client. When you send a message to a channel or user, there is no acknowledgement from the server sent back to your client to tell you that you spoke in the channel or to a user. mIRC only triggers On TEXT events when a server tells mIRC that somebody spoke.

This is by design, as well, to prevent a script from trigging itself. You will need to create a command /alias to activate your scripted behaviors, or you will need to run a second instance of mIRC to behave as a third-party bot entity.


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
Re: script to only run when I type the command [Re: TheGigon] #265294 27/03/19 09:33 PM
Joined: Mar 2019
Posts: 5
R
rafa555 Offline
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
R
Joined: Mar 2019
Posts: 5
You use the ON INPUT Event, it is only for messages you type

Code:
on *:INPUT:#:{
 if ($1- == !ball15) { }
}