1. Hello! You are currently viewing our community as a guest. Register today and apply to be a member of one of the longest standing gaming communities around. Once you have registered learn about our team and how to apply!

I may not be playing much anymore but...

Discussion in 'General Open/Public Discussion' started by Fox, 12 Nov 2001.


Is Fox insane for doing this?

  1. Yes

    5 vote(s)
    83.3%
  2. No

    1 vote(s)
    16.7%
  1. Look what I just typed out...after completely re-designing the CDL Kill Stats program [AGAIN]

    ' Kills

    Dim Blasterk As Integer
    Dim Plasmak As Integer
    Dim Chaingunk As Integer
    Dim Disck As Integer
    Dim Grenadek As Integer
    Dim Laserk As Integer
    Dim Elfk As Integer
    Dim Mortark As Integer
    Dim Missilek As Integer
    Dim Shocklancek As Integer
    Dim Minek As Integer
    Dim Explosionk As Integer
    Dim Impactok As Integer
    Dim Impactgk As Integer
    Dim Turretk As Integer
    Dim PlasmaTk As Integer
    Dim AATk As Integer
    Dim ElfTk As Integer
    Dim MortarTk As Integer
    Dim MissileTk As Integer
    Dim IndoorTk As Integer
    Dim OutdoorTk As Integer
    Dim SentryTk As Integer
    Dim OOBk As Integer
    Dim Lavak As Integer
    Dim Shrikek As Integer
    Dim Bellyk As Integer
    Dim Bombk As Integer
    Dim TChaingunk As Integer
    Dim TMortark As Integer
    Dim Satchelk As Integer
    Dim MPBk As Integer
    Dim Lightk As Integer
    Dim Spawnk As Integer
    Dim Forcek As Integer
    Dim Crashk As Integer
    Dim Campk As Integer
    Dim Suicidek As Integer

    ' Deaths

    Dim Blasterd As Integer
    Dim Plasmad As Integer
    Dim Chaingund As Integer
    Dim Discd As Integer
    Dim Grenaded As Integer
    Dim Laserd As Integer
    Dim Elfd As Integer
    Dim Mortard As Integer
    Dim Missiled As Integer
    Dim Shocklanced As Integer
    Dim Mined As Integer
    Dim Explosiond As Integer
    Dim Impactod As Integer
    Dim Impactgd As Integer
    Dim Turretd As Integer
    Dim PlasmaTd As Integer
    Dim AATd As Integer
    Dim ElfTd As Integer
    Dim MortarTd As Integer
    Dim MissileTd As Integer
    Dim IndoorTd As Integer
    Dim OutdoorTd As Integer
    Dim SentryTd As Integer
    Dim OOBd As Integer
    Dim Lavad As Integer
    Dim Shriked As Integer
    Dim Bellyd As Integer
    Dim Bombd As Integer
    Dim TChaingund As Integer
    Dim TMortard As Integer
    Dim Satcheld As Integer
    Dim MPBd As Integer
    Dim Lightd As Integer
    Dim Spawnd As Integer
    Dim Forced As Integer
    Dim Crashd As Integer
    Dim Campd As Integer
    Dim Suicided As Integer

    Open txtfile.Text For Input As #1

    Do Until EOF(1) = True

    Input #1, intme(x), intvictim(x), intkiller(x), _
    strlocation(x), intgame(x), inttype(x)

    If intme(x) = intkiller(x) Then

    Select Case inttype(x)
    Case 1:
    Blasterk = Blasterk + 1 ' Blaster
    Kills = Kills + 1
    Case 2:
    Plasmak = Plasmak + 1 ' Plasma Gun
    Kills = Kills + 1
    Case 3:
    Chaingunk = Chaingunk + 1 ' Chaingun
    Kills = Kills + 1
    Case 4:
    Disck = Disck + 1 ' Disc Launcher
    Kills = Kills + 1
    Case 5:
    Grenadek = Grenadek + 1 ' Grenade / Launcher
    Kills = Kills + 1
    Case 6:
    Laserk = Laserk + 1 ' Laser Rifle
    Kills = Kills + 1
    Case 7:
    Elfk = Elfk + 1 ' Elf
    Kills = Kills + 1
    Case 8:
    Mortark = Mortark + 1 ' Mortar
    Kills = Kills + 1
    Case 9:
    Missilek = Missilek + 1 ' Missile
    Kills = Kills + 1
    Case 10:
    Shocklancek = Shocklancek + 1 ' Shocklance
    Kills = Kills + 1
    Case 11:
    Minek = Minek + 1 ' A mine, duh
    Kills = Kills + 1
    Case 12:
    Explosionk = Explosionk + 1 ' Nearby explosion
    Kills = Kills + 1
    Case 13:
    Impactok = Impactok + 1 ' Impact w/ another obj
    Kills = Kills + 1
    Case 14:
    Impactgk = Impactgk + 1 ' Impact with ground
    Kills = Kills + 1
    Case 15:
    Turretk = Turretk + 1 ' A turret
    Kills = Kills + 1
    Case 16:
    PlasmaTk = PlasmaTk + 1 ' Plasma Turret
    Kills = Kills + 1
    Case 17:
    AATk = AATk + 1 ' Anti-Air Turret
    Kills = Kills + 1
    Case 18:
    ElfTk = ElfTk + 1 ' ELF turret - You Suck :)
    Kills = Kills + 1
    Case 19:
    MortarTk = MortarTk + 1 ' Mortar Turret
    Kills = Kills + 1
    Case 20:
    MissileTk = MissileTk + 1 ' Missile Turret
    Kills = Kills + 1
    Case 21:
    IndoorTk = IndoorTk + 1 ' uhhh spider clamp?
    Kills = Kills + 1
    Case 22:
    OutdoorTk = OutdoorTk + 1 ' clamp turret?
    Kills = Kills + 1
    Case 23:
    SentryTk = SentryTk + 1 ' Sentry turret
    Kills = Kills + 1
    Case 24:
    OOBk = OOBk + 1 ' out-of-bounds
    Kills = Kills + 1
    Case 25:
    Lavak = Lavak + 1 ' lava
    Kills = Kills + 1
    Case 26:
    Shrikek = Shrikek + 1 ' Shrike-blaster kill
    Kills = Kills + 1
    Case 27:
    Bellyk = Bellyk + 1 ' Belly-blaster kill
    Kills = Kills + 1
    Case 28:
    Bombk = Bombk + 1 ' Bombs
    Kills = Kills + 1
    Case 29:
    TChaingunk = TChaingunk + 1 ' Tank Chaingun
    Kills = Kills + 1
    Case 30:
    TMortark = TMortark + 1 ' Tank Mortar
    Kills = Kills + 1
    Case 31:
    Satchelk = Satchelk + 1 ' Satchel Charge
    Kills = Kills + 1
    Case 32:
    MPBk = MPBk + 1 ' MPB missile
    Kills = Kills + 1
    Case 33:
    Lightk = Lightk + 1 ' Zzzt!
    Kills = Kills + 1
    Case 34:
    VSpawnk = VSpawnk + 1 ' Rofl
    Kills = Kills + 1
    Case 35:
    Forcek = Forcek + 1 ' Force-field power up
    Kills = Kills + 1
    Case 36:
    Crashk = Crashk + 1 ' No clue...I guess crashing
    Kills = Kills + 1
    Case 98:
    Campk = Campk + 1 ' Nexus Camper
    Kills = Kills + 1
    Case 99:
    Suicidek = Suicidek + 1 ' CTRL-K
    Kills = Kills + 1
    End Select

    End If ' ends the killer thingy

    If intme(x) = intvictim(x) Then

    Select Case inttype(x)
    Case 1:
    Blasterd = Blasterd + 1 ' Blaster
    Deaths = Deaths + 1
    Case 2:
    Plasmad = Plasmad + 1 ' Plasma Gun
    Deaths = Deaths + 1
    Case 3:
    Chaingund = Chaingund + 1 ' Chaingun
    Deaths = Deaths + 1
    Case 4:
    Discd = Discd + 1 ' Disc Launcher
    Deaths = Deaths + 1
    Case 5:
    Grenaded = Grenaded + 1 ' Grenade / Launcher
    Deaths = Deaths + 1
    Case 6:
    Laserd = Laserd + 1 ' Laser Rifle
    Deaths = Deaths + 1
    Case 7:
    Elfd = Elfd + 1 ' Elf
    Deaths = Deaths + 1
    Case 8:
    Mortard = Mortard + 1 ' Mortar
    Deaths = Deaths + 1
    Case 9:
    Missiled = Missiled + 1 ' Missile
    Deaths = Deaths + 1
    Case 10:
    Shocklanced = Shocklanced + 1 ' Shocklance
    Deaths = Deaths + 1
    Case 11:
    Mined = Mined + 1 ' A mine, duh
    Deaths = Deaths + 1
    Case 12:
    Explosiond = Explosiond + 1 ' Nearby explosion
    Deaths = Deaths + 1
    Case 13:
    Impactod = Impactod + 1 ' Impact w/ another obj
    Deaths = Deaths + 1
    Case 14:
    Impactgd = Impactgd + 1 ' Impact with ground
    Deaths = Deaths + 1
    Case 15:
    Turretd = Turretd + 1 ' A turret
    Deaths = Deaths + 1
    Case 16:
    PlasmaTd = PlasmaTd + 1 ' Plasma Turret
    Deaths = Deaths + 1
    Case 17:
    AATd = AATd + 1 ' Anti-Air Turret
    Deaths = Deaths + 1
    Case 18:
    ElfTd = ElfTd + 1 ' ELF turret - You Suck :)
    Deaths = Deaths + 1
    Case 19:
    MortarTd = MortarTd + 1 ' Mortar Turret
    Deaths = Deaths + 1
    Case 20:
    MissileTd = MissileTd + 1 ' Missile Turret
    Deaths = Deaths + 1
    Case 21:
    IndoorTd = IndoorTd + 1 ' uhhh spider clamp?
    Deaths = Deaths + 1
    Case 22:
    OutdoorTd = OutdoorTd + 1 ' clamp turret?
    Deaths = Deaths + 1
    Case 23:
    SentryTd = SentryTd + 1 ' Sentry turret
    Deaths = Deaths + 1
    Case 24:
    OOBd = OOBd + 1 ' out-of-bounds
    Deaths = Deaths + 1
    Case 25:
    Lavad = Lavad + 1 ' lava
    Deaths = Deaths + 1
    Case 26:
    Shriked = Shriked + 1 ' Shrike-blaster kill
    Deaths = Deaths + 1
    Case 27:
    Bellyd = Bellyd + 1 ' Belly-blaster kill
    Deaths = Deaths + 1
    Case 28:
    Bombd = Bombd + 1 ' Bombs
    Deaths = Deaths + 1
    Case 29:
    TChaingund = TChaingund + 1 ' Tank Chaingun
    Deaths = Deaths + 1
    Case 30:
    TMortard = TMortard + 1 ' Tank Mortar
    Deaths = Deaths + 1
    Case 31:
    Satcheld = Satcheld + 1 ' Satchel Charge
    Deaths = Deaths + 1
    Case 32:
    MPBd = MPBd + 1 ' MPB missile
    Deaths = Deaths + 1
    Case 33:
    Lightd = Lightd + 1 ' Zzzt!
    Deaths = Deaths + 1
    Case 34:
    VSpawnd = VSpawnd + 1 ' Rofl
    Deaths = Deaths + 1
    Case 35:
    Forced = Forced + 1 ' Force-field power up
    Deaths = Deaths + 1
    Case 36:
    Crashd = Crashd + 1 ' No clue...I guess crashing
    Deaths = Deaths + 1
    Case 98:
    Campd = Campd + 1 ' Nexus Camper
    Deaths = Deaths + 1
    Case 99:
    Suicided = Suicided + 1 ' CTRL-K
    Deaths = Deaths + 1
    End Select

    End If

    x = x + 1

    ReDim Preserve intme(x)
    ReDim Preserve intvictim(x)
    ReDim Preserve intkiller(x)
    ReDim Preserve strlocation(x)
    ReDim Preserve intgame(x)
    ReDim Preserve inttype(x)

    Loop

    Debug.Print Kills
    Debug.Print Deaths

    Wow, your down here already?

    Oh yeah, that's all Visual Basic code FYI [probably should have told you that at the top ^^]

    Hamma, please don't invoke the nasty post length limit on me :)...I'll be good after this, I promise! ;)

    Oh yeah...if I keep going at this rate the CDL Kill Stats program should be done in a few days or so...of course if any more unforeseen problems arise that could change [again]
     
  2. Great Dane

    Great Dane <B><FONT COLOR="RED">THE LEGENDARY BANNED</FONT></

    As of right now you are 100% insane :D
     
  3. mtx

    mtx Official Decepticon

    yeppers.. dedication can sometimes be an ugly thing.
     
  4. ctrl c
    ctrl p
     
  5. lol fox I understand all that.

    You wanna know my honest to god position on your sanity?

    you're sane for wanting to code it.

    but insane for actually following through.

    btw, you got bad coding skills. :p
     
  6. And what was I supposed to do? Use if statements? Or maybe multi-dimensioned arrays? ... I could have accessed the damageTypes.cs file and used that...I might STILL do that...but if I did that...well I COULD use a multi-dimensioned array for kills / deaths with a specific weapon...but now I'm rambling...

    It WILL be done...bad coding or no bad coding :)

    Oh yeah...and I'm going to keep that code for use anyway...the comment block is a rather useful button :D
     
  7. Hamma

    Hamma Commanding Officer Officer

    Officer
    :huh:
     
  8. Great Dane

    Great Dane <B><FONT COLOR="RED">THE LEGENDARY BANNED</FONT></

    I wonder why Mij is copying the code (ctrl c), and then printing it (ctrl p) instead of pasting it (ctrl v)?????
     
  9. Hamma

    Hamma Commanding Officer Officer

    Officer
    haha indeed
     
  10. Actually a Case statement is one of the more efficient means of implementation. When the compiler compiles the code it create a jump table for a case statement meaning that it looks up where to jump and goes there when the code is executed. It has to cycle through if statements to get to the right one. Of course a case (switch) statement means more over head but if it is large like above example i believe the performance outweights the cost.

    I knew I went to college for some reason.....still trying to figure out wtf that was...

    Now you variable names....well they leave something to be desired. Personally I would have gone with killBlaster, killPlasma or kBlaster, kPlasma and dBlaster, dPlasma b/c too me Blasterk looks dump :p

    But that is personal preferance :D

    Although I do think using an array would have saved you a hell of a lot of typing and Diming and would of prolly been faster :p

    But I don't really know what you doing since you aren't doing anything with all those variable you incremented....
     
  11. Well...

    I just went through the code and made it better...and I am thinking of using multi-dimensioned arrays for the kills / deaths...but that wasn't what I came here to post.

    What I did want to post was <a href="ftp://download:cdldownload@66.41.220.207/pub/FoxLog.vl2">this</a>...

    Now that is that you ask? Well...place that .vl2 file in your GameData\base folder, play T2 for a while, and you will have a NEW file in your \base\prefs...and in that file it will list a few numbers and some words. Now if your into T2 scripting [or any programming] you can go read the .cs file and figure out what it means [which isn't that hard since I commented it to hell]...

    The file that the FoxLog.vl2 creates is basically the log file for the client CDL Stats program...but since I haven't finished that quite yet, you only get the log file creator.

    Well? What are you waiting for!? Go download it NOW!

    Comments, questions, etc, PLEASE reply or ICQ me...I don't want to finish this and then have somebody say: 'Well why didn't you do <i>this?</i>'
     
    Last edited: 13 Nov 2001
  12. Ok - I wanted to post YES & NO as per your insanity....
    However, since I am not the Uber-geek (I are a Producer, not a Coder), I use the PJ Script.

    But - sally forth; we have faith in you -
    Rember - "The tragic muscial entertainment has not ended until the diva has lost weight~!"

    ~PM~
     
    Last edited: 13 Nov 2001
  13. access databases are awesome

    much faster than text databases

    and a hell of a lot easier to use
     
  14. Never used Access before...how is it better?
     
  15. Hamma

    Hamma Commanding Officer Officer

    Officer
    ph43r teh mySQL
     
  16. OK...how about explaining mySQL and Access? I'm sure I could figure them out myself but my brain is dead from homework and you both have piqued my curiosity.

    Go download the FoxLog.vl2 <a href="ftp://download:cdldownload@66.41.220.207/pub/FoxLog.vl2">here</a>!
     
  17. Hamma

    Hamma Commanding Officer Officer

  18. access database...

    it's kinda like the text database, except, it's not text. :p

    You can use columns to put specific information into, and rows for specific records.

    it's 10x faster than .txt databases in the sense that everything is already numbered for you, and all the information is put together into one 'record' (row).

    ex:
    I'm working on a recipe library, and it uses an access database

    the database holds the title, meal type, speed to make it, how many it serves, the ingredients, the amount of the ingredients AND the recipe itself. All in one record.

    It's hella easier to code too
     
  19. Hamma

    Hamma Commanding Officer Officer

    Officer
    This forum runs on mySQL :D
     
  20. Somehow I doubt you're going to want to be making SQL Calls while in the middle of playing T2 ..... Can you imagin the FPS hit?
     

Share This Page