mIRC Homepage
Posted By: Dcease On/off script. - 23/07/14 07:36 PM
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?
Posted By: AeonPsych Re: On/off script. - 23/07/14 07:43 PM
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.
Posted By: Dcease Re: On/off script. - 23/07/14 09:53 PM
Well, the case is. I'm kinda of a noob. Big one, where do I place it for an example, this fun script
Posted By: Loki12583 Re: On/off script. - 23/07/14 10:14 PM
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.
Posted By: Dcease Re: On/off script. - 23/07/14 10:33 PM
I suppose you're right.
Posted By: AeonPsych Re: On/off script. - 24/07/14 01:40 AM
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
© mIRC Discussion Forums