mIRC Homepage
Posted By: Cyrex How long does it take you to write a script? - 16/07/04 06:23 PM
I was just curious about how long it takes scripters out there to complete a large, complex, script? Does it take you hours, days, months?
depends on the script wink usually hours, then days weeks months to debug/perfect.. depending on the functions laugh my "baby" is a constantly ongoing project ask anyone that knows me... hehe
Quite easily months. When you account for the fact that you have to work, eat, sleep and damage the Doulton occasionally you will spend months on and off writing a full script.
to write my bot, its taken about 2 years, we even threw him a 2nd b'day party. However, its continous development, so i work on him (its a him) whenever something needs adding or fixing.

I would estimate i've spent about 100 hours on it in total, but he runs from information pasted from a game, and the format the information is in keeps changing, so that accounts for a lot of the time spent.

He has over 4,000 lines of mIRC script btw grin
That must be a real good bot using all that code..
i could probably get the lines down to about 1500 if i used pipes ( | ) but i hate using them, i perfer the old

on *:text:!blah:#:{
  if (somethin == somethinelse) { 
     do this
  else { 
     do this instead

as opposed to

on *:text:!blah:#: { if (somethin == somethinelse) { do this } | else { do this instead } }

But yes, he is a damn good bot if i do say so myself grin
Genuinely curious - what's wrong with:

on *:text:!blah:#:{
  if (somethin == somethinelse) {  do this }
  else {  do this instead }

That would shrink the lines down WITHOUT using pipes. End of genuinely curious questioning of your apparent wonderful bot's coding smile smile
It looks awful. Apart from that not alot as it would still work correctly.
Really? Do that many people really prefer:

if (whatever) {


if (whatever) { command }

that much?? I would have thought (and if you're right, incorrectly) that the first seemed.... I dont know............... to add unecessary space to a file but of course to each their own smile
I tend to use both methods myself. I normally use the longer method because most often I use multiple commands. If I only have one line then I use the short method.

The main idea for me, is to keep it 'readable'.

For me it just depends on the situation. I always try to keep the horizontal scrollbar away, and that's with the editor using less than the complete screen width. And for multiple commands, it's always commands on new lines, except for some while ($regex(%a,\w)) { inc %i | echo $regml(1) } oneliners smile
Oh, and the last example is bad coding grin

if ($blah) do this
if (blah) { do that }
if (test) {
one long or multiple commands
if (very long test) $&
some long command
I hate using pipes, so I use if statements like this:

if (statement) { only one line of code to do here }
elseif (other statement) {
multiple lines of code
to do here
i find the way i do it much neater, much easier to read and a hell of a lot easier to debug.
Its also easier to see if you accidently forget a { or }

Just saw i missed one from my above example blush
I find it neater also, but i find it wastes a lot of space if you're writing a big script.
that much?? I would have thought (and if you're right, incorrectly)

I don't recall mentioning how many liked a particular style - all I said is that I don't like having opening and closing braces on the same line. Therefore no-one is right or wrong.
There is no waste of space. The number of characters in the script doesn't change so the saving you make vertically is consumed horizontally.
I'd rather have a script with fewer lines, even if it means more characters.
Sorry, I didn't took the time to read the whole thread, but it's mostly a personal answer.

The last addon I coded took me 5 months to code (and it's not already finished, I'll had some more things in the next year), but I had to go to school, and also, I didn't spend all my free time coding it. My addon was quite a big thing (it's now 1250 lines and 52k of codes), and also, it was hard as I had to respect multiple protocols, and also, I had to support a lot of connections (it's a MSN Messenger client for mIRC which I called MSNMIRC, for information, a link to my website is now available in the "More Info" section on this website.. thanks to Tjerk, it was a hard work, but it's worth it I think). So I think you could get a script done in 6 months if you code when you're bored, you make an all-around script with lots of features and you don't make it too difficult. The one I'm coding now with a friend, I'm giving me a year before the release, as I'm coding something quite big with a new theme engine supporting emoticons and a lot of other features.

If you think you can support coding a script for several months, go ahead, you'll be proud when you'll release it and get feedbacks from people who downloaded it. Just one tip: make it customizable for the user.. everybody likes to have a script work the way they want!
I usually script everything on seperate lines... and when I have a function done I would shrink it alot, also using pipes sometimes...

saves me alot of scrolling :-]

but while scripting I try to write it out as much as I can cause it's better to read it then...
I've been writing the same bot for the last 4 years. It is currently on version 34.64.17754.146736146b3.1.
© mIRC Discussion Forums