Created
November 27, 2015 01:03
-
-
Save nidefawl/10ecac2b4091719732e8 to your computer and use it in GitHub Desktop.
ReturnCost Craftland
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static double getReturnCosts(ModPlayer cmdUser) { | |
long fullhoursplayed = cmdUser.getFullHoursPlayed(); | |
if (fullhoursplayed < 12) { | |
return 0; | |
} | |
long fullDays = 1 + (fullhoursplayed/24); | |
double price = Math.min(1500, fullDays*200); | |
int r = cmdUser.getPremiumRank(); | |
if (r >= 5) | |
return 100; | |
if (r >= 4) | |
return Math.min(price, 500); | |
if (r >= 3) | |
return Math.min(price, 800); | |
if (r >= 2) | |
return Math.min(price, 1000); | |
return price; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment