mIRC Home    About    Download    Register    News    Help

Print Thread
#247177 23/07/14 06:16 PM
D
Dcease
Dcease
D
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.

A
AeonPsych
AeonPsych
A
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.

D
Dcease
Dcease
D
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