mIRC Home    About    Download    Register    News    Help

Print Thread
Again help needed~ #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.

Re: Again help needed~ [Re: Aegis] #259372 13/11/16 03:43 AM
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?

Re: Again help needed~ [Re: 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.

Re: Again help needed~ [Re: Aegis] #259374 13/11/16 09:30 AM
Joined: Aug 2016
Posts: 36
ruprecht Offline
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.

Re: Again help needed~ [Re: ruprecht] #259375 13/11/16 09:53 AM
Joined: Nov 2016
Posts: 14
A
Aegis Offline OP
Pikka bird
OP Offline
Pikka bird
A
Joined: Nov 2016
Posts: 14
Not working~

Re: Again help needed~ [Re: Aegis] #259376 13/11/16 01:56 PM
Joined: Aug 2016
Posts: 36
ruprecht Offline
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?

Re: Again help needed~ [Re: ruprecht] #259386 14/11/16 03:48 PM
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?

Re: Again help needed~ [Re: Aegis] #259398 15/11/16 02:17 AM
Joined: Aug 2016
Posts: 36
ruprecht Offline
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.

Re: Again help needed~ [Re: ruprecht] #259400 15/11/16 11:03 AM
Joined: Oct 2016
Posts: 14
F
FoxInABox Offline
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.

Re: Again help needed~ [Re: FoxInABox] #259401 15/11/16 01:44 PM
Joined: Aug 2016
Posts: 36
ruprecht Offline
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.