Advertisement
Guest User

Mee9 bot - XP calc

a guest
Oct 25th, 2016
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.57 KB | None | 0 0
  1. using System;
  2.  
  3. public class RegularRole
  4. {
  5.     public static void Main()
  6.     {
  7.        
  8.         int lvl = 0;
  9.         int storeMultiplier = 45;
  10.         int storePart = 100;
  11.         int storeTotal = 0;
  12.        
  13.         System.Console.WriteLine("XP for level 50:\n");
  14.        
  15.         while(lvl < 50)
  16.         {
  17.             WriteToConsole(lvl, storeTotal, storePart);
  18.             lvl++;
  19.             if(lvl == 1)
  20.             {
  21.                 storeTotal = 100;
  22.             }
  23.            
  24.             storeMultiplier += 10;
  25.             storePart += storeMultiplier;
  26.             storeTotal += storePart;
  27.         }
  28.        
  29.         //Result
  30.         Console.WriteLine("\n \n RESULTS: \n");
  31.        
  32.         WriteToConsole(lvl, storeTotal, storePart);
  33.         OutputData(lvl, storeTotal, 15, true);
  34.         OutputData(lvl, storeTotal, 25, false);
  35.        
  36.         Console.WriteLine("WITHOUT HUMAN ERROR AND ON THE MILLISECOND PRECISE");
  37.     }
  38.    
  39.     private static void WriteToConsole(int lvl, int Total, int Part)
  40.     {
  41.         System.Console.WriteLine(String.Format("Level {0}:\t totalXP: {1}\t part: {2}", lvl, Total, Part));
  42.     }
  43.    
  44.     private static void OutputData(int lvl, int total, int divider, bool isMaximum)
  45.     {
  46.         System.Console.WriteLine("Formula: \t T = T-1 + P-1 * V-1 + 10");
  47.        
  48.         total /= divider;
  49.        
  50.         int minutes = total;
  51.         float hours = total / 60;
  52.         float days = hours / 24;
  53.         float weeks = days/ 7;
  54.        
  55.         string data = String.Format("Writing a message every minute to reach level {0} takes (" + ((isMaximum)?"Max":"Min") + "):\n" +
  56.         "{1} minutes\n"+
  57.         "{2} hours\n"+
  58.         "{3} days\n"+
  59.         "{4} weeks\n", lvl, minutes, hours, days, weeks);
  60.        
  61.         System.Console.WriteLine(data);
  62.     }
  63. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement