mIRC Home    About    Download    Register    News    Help

Print Thread
#247177 23/07/14 06:16 PM
Joined: Jul 2014
Posts: 19
D
Dcease Offline OP
Pikka bird
OP Offline
Pikka bird
D
Joined: Jul 2014
Posts: 19
Hello, so I was wondering. Is it possible to make a script with the command line like " Will X/name fight me" and then there will be several phrases/lines the bot could give, but it would be random. And of course %flood to prevent command spam.

//Dcease new scripter. Even tho I ask for help with scripts or ask for scripts. I always analyze the script I am given. Hoping that I can learn them myself.

Joined: Jul 2014
Posts: 48
A
Ameglian cow
Offline
Ameglian cow
A
Joined: Jul 2014
Posts: 48
something like:
on $*:text:/!will * fight me/:#:{
var opponentname = $2
}



I'm not sure on this syntax at all, but basically, do whatever syntax lets you take in user supplied text from the command. Store the name into a variable, do code for whatever you want to do, and then return a response.

Joined: Jul 2014
Posts: 19
D
Dcease Offline OP
Pikka bird
OP Offline
Pikka bird
D
Joined: Jul 2014
Posts: 19
I found a post and analyzed the script and made my own, thanks anyway. If you need it here it is

on *:text:!fight*:#:{
if ((%floodslap) || ($($+(%,floodslap.,$2),2))) { return }
set -u1 %floodfight On
set -u1 %floodfight. $+ $nick On

I was basically just looking for the $2 think. All i knew when I found this was $nick and $chan.


Link Copied to Clipboard