mIRC Home    About    Download    Register    News    Help

Print Thread
#259371 12/11/16 04:48 PM
A
Aegis
Aegis
A
need a script like,
user1 say: !random 1 100
Bot say: user1 Result: what ever randomised.


the limit must be high from 100 to as much.

#259372 13/11/16 03:43 AM
R
Red
Red
R
Do you mean you want the bot to say random quotes?

#259373 13/11/16 05:48 AM
A
Aegis
Aegis
A
Nope!
what i stated on first page that.

#259374 13/11/16 09:30 AM
Joined: Aug 2016
Posts: 36
Ameglian cow
Offline
Ameglian cow
Joined: Aug 2016
Posts: 36
Code:
on *:TEXT:!random*:#: { 
  if ($2 !isnum) || ($3 !isnum) { msg $chan $nick Usage: !random n1 n2 }
  else { msg $chan $nick Result: $rand($2,$3) }
}


Not sure exactly what you want. This will produce a random number between n1 and n2.

A
Aegis
Aegis
A
Not working~

#259376 13/11/16 01:56 PM
Joined: Aug 2016
Posts: 36
Ameglian cow
Offline
Ameglian cow
Joined: Aug 2016
Posts: 36
It works perfectly with my trivia bot mIRC running v6.35 and my chat mIRC running v7.46

What version are you using?

A
Aegis
Aegis
A
Same.
What is trugger again?

#259398 15/11/16 02:17 AM
Joined: Aug 2016
Posts: 36
Ameglian cow
Offline
Ameglian cow
Joined: Aug 2016
Posts: 36
The trigger is exactly what you requested in your original post, and clearly shown in the code.

If you can't understand a very simple script like this I'm not sure you can be helped.

F
FoxInABox
FoxInABox
F
Do you have any ON event that grabs any text
on *:TEXT:*:#:{

If so then you need to put the code you requested above that one, because it will trigger on any text and stop any ON TEXT that is below it from triggering.

#259401 15/11/16 01:44 PM
Joined: Aug 2016
Posts: 36
Ameglian cow
Offline
Ameglian cow
Joined: Aug 2016
Posts: 36
Only in the same file. If the scripts are saved to seperate files they'll trigger in order, even if the 1st one uses /halt. Every novice I've helped over the years tends to save each section of code in a new script file, regardless of size.


Link Copied to Clipboard