Suggestion: ~bosstimer

Discussion in 'Closed' started by Mouthbreather, Jan 27, 2015.

  1. Andreas
    Offline

    Andreas Donator

    Joined:
    May 31, 2014
    Messages:
    14,272
    Likes Received:
    4,335
    Gender:
    Male
    IGN:
    Egonic
    Level:
    19x
    Pls Matt make it happen!
     
    Mouthbreather likes this.
  2. Andreas
    Offline

    Andreas Donator

    Joined:
    May 31, 2014
    Messages:
    14,272
    Likes Received:
    4,335
    Gender:
    Male
    IGN:
    Egonic
    Level:
    19x
    Bump I really would like a time frame for this, I always forget when I go zak, this would be of much use for me and many others.
     
  3. Mouthbreather
    Offline

    Mouthbreather Donator

    Joined:
    Sep 10, 2014
    Messages:
    540
    Likes Received:
    1,843
    Gender:
    Male
    Location:
    CHANNEL 5
    Country Flag:
    Level:
    512
    Guild:
    ???
    Especially for Krex! :)
     
    Robi likes this.
  4. Hampa
    Offline

    Hampa Donator

    Joined:
    Jan 18, 2014
    Messages:
    1,710
    Likes Received:
    3,213
    I would like npc timers for zak and krex would be great!
     
  5. Oldie
    Offline

    Oldie Well-Known Member

    Joined:
    Jun 6, 2014
    Messages:
    862
    Likes Received:
    259
    Location:
    PureNoob
    Country Flag:
    IGN:
    OldRanger
    Level:
    255
    Guild:
    Noobs
    Well... theoretically you could go

    let c be the class and/or object holding all online characters in server space

    Scrap this spoiler, screw it cause it'd need database writes every boss kill.
    Code:
    private String? getBossTimer(object charName) {
    
    if(c.charName.lastBossRuns*[0]!= null) 
    {
          for (int i, c.charName.lastBossRuns[i] != null, i++) {
                 if( i % 2 == 0){ //If i is a positive number, so every boss name
                     String output += c.charName.lastBossRuns[i];
                 }
                else { <Grab the odd number index that contains kill time of the boss><Do all your math here in regards to calculating next boss time, could use server tickers><add to string output> (You'll need if == krex,  zak, etc) (And formatting)
                }
                      
          }
    }
    else
    {
               <another for loop as above>       
              <lastBossRunsContainerInServerSpace> = <databaseRead><Character,lastBossRuns>
    
    
    *Such a container would be declared and server start
    I'm using arrays instead of hashmaps cause my programming course forced me to use arrays instead.
    

    You can just keep it all in memory, when someone kills a boss, add it to the killed boss container in the online character object
    (hoping you guys keep character objects created even after log off to save the need for reads every time.)
    Then do similar as inside the spoiler just no database read.

    Sorry for my rambling and unclearness in the code hehe. If it doesn't help, oh well, not bad to practise every now and then.

    Hello web crawlers~ Keep judging.

    I'm just saying it could be easily implemented using minimal server resources. By easy, I assume the source isnt a big mess. Obv not Matt's fault.
     
    Andreas likes this.

Share This Page