Thread: [PI] Summoning Timer

Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1 [PI] Summoning Timer 
    I'm President Carter


    Join Date
    Jan 2011
    Posts
    1,204
    Thanks given
    17
    Thanks received
    222
    Rep Power
    144
    Well heres the code that shows the amount of time left in the summoning interface.
    Code:
    getPA().sendFrame126(""+summonTime/60+"."+summonTime+"", 17025);
    The problem with this is that it shows the minutes and then all the seconds. I don't want it to show the seconds if its greater than 59 seconds. So it would be something like, 2.30. Which is the Minutes.Seconds.


    Reply With Quote  
     

  2. #2  
    Registered Member
    IngeniousPentaSquid's Avatar
    Join Date
    Jun 2011
    Age
    28
    Posts
    993
    Thanks given
    47
    Thanks received
    140
    Rep Power
    79
    dude how did u add that
    Reply With Quote  
     

  3. #3  
    I'm President Carter


    Join Date
    Jan 2011
    Posts
    1,204
    Thanks given
    17
    Thanks received
    222
    Rep Power
    144
    Bump.


    Reply With Quote  
     

  4. #4  
    Registered Member Pakku's Avatar
    Join Date
    Mar 2010
    Posts
    1,234
    Thanks given
    127
    Thanks received
    111
    Rep Power
    47
    Before it shows the time, format it.
    Reply With Quote  
     

  5. #5  
    I'm President Carter


    Join Date
    Jan 2011
    Posts
    1,204
    Thanks given
    17
    Thanks received
    222
    Rep Power
    144
    Quote Originally Posted by stripies View Post
    Before it shows the time, format it.
    What do you mean?


    Reply With Quote  
     

  6. #6  
    Registered Member
    Vox''s Avatar
    Join Date
    Nov 2008
    Age
    31
    Posts
    3,113
    Thanks given
    49
    Thanks received
    181
    Rep Power
    731
    In the summonTime method, add an if statement saying if it's larger than 60, divide it by 60. If not, then return as just seconds.

    Quote Originally Posted by Zirtrix View Post
    So I've recently changed some things in the server, but when i compile it says
    Code:
    source\server\model\players\packets\Commands.java: 58: error: cannot find symbol
    This.Antileech("Remove This Line");
    ^
    Anyone know the problem?
    Student and Developer for http://www.rune-server.org/runescape...pve-based.html
    Reply With Quote  
     

  7. #7  
    Registered Member Pakku's Avatar
    Join Date
    Mar 2010
    Posts
    1,234
    Thanks given
    127
    Thanks received
    111
    Rep Power
    47
    Code:
    I don't want it to show the seconds if its greater than 59 seconds.
    I'm not sure what you mean by that, but do something like

    if (seconds > 59) {
    dowhatever
    }
    Reply With Quote  
     

  8. #8  
    I'm President Carter


    Join Date
    Jan 2011
    Posts
    1,204
    Thanks given
    17
    Thanks received
    222
    Rep Power
    144
    I set the time for each familiar like this "summontime = 1800"(Thats 1800 seconds). Then I do "summonTime/60" which gives me 30 minutes. But the way I want it to work is it will say, "X minutes. X Seconds" so for example "4(minutes).56(seconds)" then it will keep going down and then be "3(minutes).59(seconds)". Do you get that?


    Reply With Quote  
     

  9. #9  
    Registered Member
    Abyssal head's Avatar
    Join Date
    May 2008
    Age
    32
    Posts
    1,255
    Thanks given
    14
    Thanks received
    22
    Rep Power
    238
    do something like this:
    Code:
    if(summoningSeconds > 59)
    {
        //show the text without seconds
    } else {
      //show the text with minutes AND seconds
    }

    Reply With Quote  
     

  10. #10  
    Registered Member Pakku's Avatar
    Join Date
    Mar 2010
    Posts
    1,234
    Thanks given
    127
    Thanks received
    111
    Rep Power
    47
    Yeah, I got it.

    Do something like

    Code:
    if (summoningtime > 0) {
    if (summoningtime >= 60) {
    minutes = summoningtime / 60;
    }else{
    minutes = 0;
    }
    seconds = summoningtime - (minutes * 60);
    }
    I think that would work
    Reply With Quote  
     

Page 1 of 2 12 LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. [PI] Pk Timer - Safe Timer [PI]
    By Trivzor in forum Tutorials
    Replies: 43
    Last Post: 06-24-2014, 07:49 AM
  2. Replies: 6
    Last Post: 06-07-2011, 02:10 PM
  3. [Summoning][508][Espeon[508][Summoning]
    By ghostrevan in forum Help
    Replies: 0
    Last Post: 03-05-2009, 08:30 PM
  4. Replies: 7
    Last Post: 08-06-2008, 01:06 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •