Christmas Lottery
Original Post
A Powerful mIRC script.
Right well, i made a script that allows you to auto-create a channel, and set it up (register it with the server, get seekrit in, set up the modes, give people OP, Voice, Hop etc privs) and a couple of other things.



How to use:
1:Paste the code below into the bottom of your scripts in "Aliases" tab
2:type /SetChan
3:Fill in the forms (like channel name, password for the founder etc)
(Note: when filling out the forms, for yes / no answers, say y for yes, and n for no, any other answer will be considered a typo.)

done. your channel is completed :3

all settings are optional in the script.



the script::

/SetChan {
  ECHO Logic test.
  if ($1 == S) goto S
  elseif ($1 == A) goto A
  elseif ($1 == H) goto H
  elseif ($1 == V) goto V
  elseif ($1 == B) goto B
  elseif ($1 == M) goto M
  elseif ($1 == E) goto E
  else goto R

  :R
  ECHO registering.
  set %chan $?="Please enter the channel name."
  /join %chan
  set %pass $?*="Please enter channel password."
  set %desc $?="Please enter channel description."
  /reg | goto END

  :S
  ECHO Set super operators.
  set -u0 %SOP $?="Do you want to register a super OP (+&)? (y/n)"
  if (%SOP == y) /soper
  elseif (%SOP == n) goto A
  else goto S

  :A
  ECHO Set operators.
  set -u0 %AOP $?="Do you want to register an auto OP (+@)? (y/n)"
  if (%AOP == y) /aoper
  elseif (%AOP == n) goto H
  else goto A

  :H
  ECHO Set privaliged.
  set -u0 %HOP $?="Do you want to register a half OP (+%)? (y/n)"
  if (%HOP == y) /hoper
  elseif (%HOP == n) goto V
  else goto H

  :V
  ECHO Set voice.
  set -u0 %VOP $?="Do you want to register a voiced user (+v)? (y/n)"
  if (%VOP == y) /voper
  elseif (%VOP == n) goto B
  else goto V

  :B
  ECHO request bot.
  set -u0 %BOT $?"Do you want to get Seekrit bot in? (y/n)"
  if (%BOT == y) /bot
  elseif (%BOT == n) goto M
  else goto B

  :M
  ECHO Set modes.
  set -u0 %secret $?="Set the channel as secret? (y/n)"
  set -u0 %private $?="Set the channel as private? (y/n)"
  set -u0 %mute $?="Set the channel as muted? (y/n)"
  set %key $?="Set a key to enter the channel? (y/n)"
  if (%secret == y) /mode %chan +s
  if (%private == y) /mode %chan +p
  if (%mute == y) /mode %chan +m
  if (%key == y) /set %keyn $?="Enter the channels key"
  if (%key == y) /mode %chan +k %keyn
  goto E

  :E
  ECHO finalising...
  if (%key == y) /hop %chan %keyn
  else /hop %chan
  ECHO script done.
  ECHO Please don't forget your password.
  ECHO For more info on this script, or channels / bots, please contact <Vox>
  ECHO For errors, or other stuff, contact <Vox> as well.
  /timerH 1 3 /flushvar
  /halt
  :END
}

/soper {
  set -u0 %nick $?="Please enter nick."
  /msg chanserv SOP %chan ADD %nick
  /SetChan S
}
/aoper {
  set -u0 %nick $?="Please enter nick."
  /msg chanserv AOP %chan ADD %nick
  /SetChan A
}
/hoper {
  set -u0 %nick $?="Please enter nick."
  /msg chanserv HOP %chan ADD %nick
  /SetChan H
}
/voper {
  set -u0 %nick $?="Please enter nick."
  /msg chanserv VOP %chan ADD %nick
  /SetChan V
}
/reg {
  /msg chanserv REGISTER %chan %pass %desc
  /SetChan S
}
/bot {
  /msg botserv ASSIGN %chan seekrit
  /SetChan M
}
/flushvar {
  /echo Flushing variables.
  /unset %chan
  /unset %pass
  /unset %desc
  /unset %keyn
  /unset %key
  /halt
}

[Bug fixes]
Version 1.0
--Section M ::error with the Key mode. Fixed.
Last edited by Vox; Feb 10, 2008 at 02:01 AM.
Hm. Great, should be really useful. I'll have to test it at some point.
"Call yourself alive? I promise you you'll be deafened by dust falling on the furniture,
you'll feel your eyebrows turning to two gashes, and your shoulder blades will ache for want of wings."
not untill you say you don't want any more of them, y/n answer.
y = yes
n = no...
the window says (y/n) achtualy, just say y to add one and n to skip
Hi! I follow your instructions but when I'm done it shows

no such channel

Flushing variables

* Timer h halted

and I can't see my channel can you please help me.
Thanks.
This script is redundant, I'll close it now to say resurrection any further however sufficed to say the IRC serv's that the script depend on are no longer functioning, if you with to have the serv's reinstated, complain to veb.

However i will leave the script intact, it's a nice script to use as a quick example to learn from.