mIRC Home    About    Download    Register    News    Help

Print Thread
#259371 12/11/16 04:48 PM
Joined: Nov 2016
Posts: 14
A
Aegis Offline OP
Pikka bird
OP Offline
Pikka bird
A
Joined: Nov 2016
Posts: 14
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.

Joined: Nov 2016
Posts: 7
R
Red Offline
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
R
Joined: Nov 2016
Posts: 7
Do you mean you want the bot to say random quotes?

Red #259373 13/11/16 05:48 AM
Joined: Nov 2016
Posts: 14
A
Aegis Offline OP
Pikka bird
OP Offline
Pikka bird
A
Joined: Nov 2016
Posts: 14
Nope!
what i stated on first page that.

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.

Joined: Nov 2016
Posts: 14
A
Aegis Offline OP
Pikka bird
OP Offline
Pikka bird
A
Joined: Nov 2016
Posts: 14
Not working~

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?

Joined: Nov 2016
Posts: 14
A
Aegis Offline OP
Pikka bird
OP Offline
Pikka bird
A
Joined: Nov 2016
Posts: 14
Same.
What is trugger again?

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.

Joined: Oct 2016
Posts: 14
F
Pikka bird
Offline
Pikka bird
F
Joined: Oct 2016
Posts: 14
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.

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