mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Apr 2004
Posts: 66
C
Cyrex Offline OP
Babel fish
OP Offline
Babel fish
C
Joined: Apr 2004
Posts: 66
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?

Joined: Mar 2004
Posts: 108
X
Vogon poet
Offline
Vogon poet
X
Joined: Mar 2004
Posts: 108
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


sometimes these are as bad as quit messages :tongue:
Joined: Dec 2002
Posts: 2,985
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 2,985
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.

Joined: Mar 2004
Posts: 457
D
Fjord artisan
Offline
Fjord artisan
D
Joined: Mar 2004
Posts: 457
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

Joined: Apr 2004
Posts: 66
C
Cyrex Offline OP
Babel fish
OP Offline
Babel fish
C
Joined: Apr 2004
Posts: 66
That must be a real good bot using all that code..

Joined: Mar 2004
Posts: 457
D
Fjord artisan
Offline
Fjord artisan
D
Joined: Mar 2004
Posts: 457
i could probably get the lines down to about 1500 if i used pipes ( | ) but i hate using them, i perfer the old

Code:
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

Joined: Dec 2002
Posts: 1,541
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,541
Genuinely curious - what's wrong with:

Code:
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


Those who fail history are doomed to repeat it
Joined: Dec 2002
Posts: 2,985
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 2,985
It looks awful. Apart from that not alot as it would still work correctly.

Joined: Dec 2002
Posts: 1,541
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,541
Really? Do that many people really prefer:

if (whatever) {
command
}

over

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


Those who fail history are doomed to repeat it
Joined: Dec 2002
Posts: 21
L
Ameglian cow
Offline
Ameglian cow
L
Joined: Dec 2002
Posts: 21
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'.

Listner


Morals: When the p0rn shop gives you too much change, and you don't keep it.
Joined: Apr 2003
Posts: 701
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Apr 2003
Posts: 701
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

Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
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
}


New username: hixxy
Joined: Mar 2004
Posts: 457
D
Fjord artisan
Offline
Fjord artisan
D
Joined: Mar 2004
Posts: 457
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

Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
I find it neater also, but i find it wastes a lot of space if you're writing a big script.


New username: hixxy
Joined: Dec 2002
Posts: 2,985
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 2,985
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.

Joined: Dec 2002
Posts: 2,985
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 2,985
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.

Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
I'd rather have a script with fewer lines, even if it means more characters.


New username: hixxy
Joined: May 2003
Posts: 79
A
Babel fish
Offline
Babel fish
A
Joined: May 2003
Posts: 79
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!

Joined: Jan 2003
Posts: 1,063
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2003
Posts: 1,063
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...


If it ain't broken, don't fix it!
Joined: Dec 2002
Posts: 266
Z
Fjord artisan
Offline
Fjord artisan
Z
Joined: Dec 2002
Posts: 266
I've been writing the same bot for the last 4 years. It is currently on version 34.64.17754.146736146b3.1.


You won't like it when I get angry.

Link Copied to Clipboard