mIRC Home    About    Download    Register    News    Help

Print Thread
On/off script. #247182 23/07/14 07:36 PM
Joined: Jul 2014
Posts: 19
D
Dcease Offline OP
Pikka bird
OP Offline
Pikka bird
D
Joined: Jul 2014
Posts: 19
I been googling around, and I didnt find any script that worked. Basically I want an on/off script that enables and disables for an example "fun" I create a category called Fun with few of my fun scripts in, and if I want them to be disabled I just type !funoff in my twitch chat. Any idea how to do such a thing?

Re: On/off script. [Re: Dcease] #247183 23/07/14 07:43 PM
Joined: Jul 2014
Posts: 48
A
AeonPsych Offline
Ameglian cow
Offline
Ameglian cow
A
Joined: Jul 2014
Posts: 48
use a variable. Paraphrased, and not spellchecked:
Code:
on *:text:!funoff:#:{
   set a variable of your choice here
}

on *:text:!funon:#:{
  set the same variable for fun off
}

Then, in all of your fun scripts:
Code:
on *:text:!funscript:#:{
  if (funvariable) { return }
  else {
    -do whatever the fun script is supposed to do here-
  }
}


repeat per fun script. Again... This is not actual/correct script syntax, this is basically an outline. I assume that one already knows how to add ontext code blocks, and check/set variables within them.

Last edited by AeonPsych; 24/07/14 01:42 AM. Reason: clarity
Re: On/off script. [Re: AeonPsych] #247192 23/07/14 09:53 PM
Joined: Jul 2014
Posts: 19
D
Dcease Offline OP
Pikka bird
OP Offline
Pikka bird
D
Joined: Jul 2014
Posts: 19
Well, the case is. I'm kinda of a noob. Big one, where do I place it for an example, this fun script

Re: On/off script. [Re: Dcease] #247193 23/07/14 10:14 PM
Joined: Jan 2004
Posts: 1,282
L
Loki12583 Offline
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,282
He didn't give you a working script, he gave you somewhat of an outline.

And don't take screenshots of your code, just copy it to the forum in [code] [ /code] tags or to a pastebin.

And that script contains everything you need to add already. A text event, setting a variable, a comparison, and returning.

Re: On/off script. [Re: Loki12583] #247194 23/07/14 10:33 PM
Joined: Jul 2014
Posts: 19
D
Dcease Offline OP
Pikka bird
OP Offline
Pikka bird
D
Joined: Jul 2014
Posts: 19
I suppose you're right.

Re: On/off script. [Re: Dcease] #247200 24/07/14 01:40 AM
Joined: Jul 2014
Posts: 48
A
AeonPsych Offline
Ameglian cow
Offline
Ameglian cow
A
Joined: Jul 2014
Posts: 48
As loki mentioned, the block of code you posted has every type of information you need to fill in the outline I posted.
It has the ontext command, setting variables, checking variables, and actual script/to-do code.

I tried and added some clarity to my original posting of the outline. If you are still confused, maybe it will help