Nice.. but you could've used math and made this method probably 4-5 lines total instead of this huge one.
|
Purpose: To add a int to minutes convert
Difficulty: 2
***umed Knowledge: How to use ints
Server Base: Whitescape (all)
Cl***es Modified: Any you choose (most likely client.java)
Procedure
Step 1: Add this in the file that you want to change a int into a minute counter
Now, what this can be used for: This can be used if you have a built in server restarter (i use it to display the time till a restart). for example you want it to be in a sendQuest just add +getMinutes(int) after the last " Ex. sendQuest("Time till whatever "+getMinutes(whateverintyouwanttoconverthere)) ;Code:public int getMinutes(int time) { return time / 60; }
Credits: Nour
Nice.. but you could've used math and made this method probably 4-5 lines total instead of this huge one.
Thanks, i do what i know , mind giving me an idea?
Well, use the division operator to just divide the parameter by 60, and return the calculated value.
I see, thanks.
Nour, what what I put in my server name, if I wanted it to countdown from 20 minutes, and after 20 minutes, the server reboots?
Thanks
You no on your server, you can have some text and the top, saying idk, something likes: Players online: 35, or: Uber server 3.0, but I want a 20 minute timer that is counting down.
Thanks
in the sendQuest you want just add +getMinutes(1200)
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |