FANDOM


Staffteam1
Wikiteam1

using System.IO;

using System;

class Program {

   static void Main()
   {
       AskMode();
       AskBone();
       AskDxp();
       AskCurrentxp();
       AskBoneprice();
       DoMathsNow4p();
   }
   
   public class Globals
   {
       public static int Rate;
       public static bool Dxp;
       public static int Currentxp;
       public static int Bonesneeded200m;
       public static int Bonesneeded99;
       public static int Bonesneeded95;
       public static int Boneprice;
       public static long Boneprice200m;
       public static long Boneprice99;
       public static long Boneprice95;
       public static int Bonexp;
       public static string Bone;
   }
   
   public static void AskMode()
   {
       Console.Clear();
       Console.WriteLine("This tool will work out the Amount of bones needed for 95,99 and 200m Prayer");
       Console.WriteLine("and how much it would cost");
       Console.WriteLine("depending on your game mode, it assumes you are using the bones on");
       Console.WriteLine("a gilded altar in a player owned home with both burners lit");
       Console.WriteLine("");
       Console.WriteLine("");
       Console.WriteLine("What is your game mode?  ");
       string Mode = Console.ReadLine().ToLower();
       if (Mode == "duke"){
           Globals.Rate = 500;
       }
       else if (Mode == "extreme"){
           Globals.Rate = 150;
       }
       else if (Mode == "legend"){
           Globals.Rate = 50;
       }
       else if (Mode == "immortal"){
           Globals.Rate = 10;
       }
       else if (Mode == "grand master"){
           Globals.Rate = 2;
       }
       else if (Mode == "reset"){
           Reset();
       } else {
           Console.WriteLine("Something went wrong..");
           AskMode();
       }
   }
   
   public static void AskBone()
   {
       Console.WriteLine("");
       Console.WriteLine("Which bones are you using?  ");
       string Bone = Console.ReadLine().ToLower();
       Globals.Bone = Bone;
       if (Bone == "bones"){
           Globals.Bonexp = 16;
       }
       else if (Bone == "big bones"){
           Globals.Bonexp = 53;
       }
       else if (Bone == "zogre bones"){
           Globals.Bonexp = 79;
       }
       else if (Bone == "baby dragon bones"){
           Globals.Bonexp = 105;
       }
       else if (Bone == "dragon bones"){
           Globals.Bonexp = 252;
       }
       else if (Bone == "dagannoth bones"){
           Globals.Bonexp = 438;
       }
       else if (Bone == "ourg bones"){
           Globals.Bonexp = 490;
       }
       else if (Bone == "frost dragon bones"){
           Globals.Bonexp = 630;
       }
       else if (Bone == "reset"){
           Reset();
       } else {
           Console.WriteLine("Something went wrong..");
           AskBone();
       }
   }
   
   public static void AskDxp()
   {
       Console.WriteLine("");
       Console.WriteLine("Are you using double XP?  (Y/N)  ");
       string DxpAnswer = Console.ReadLine().ToLower();
       if (DxpAnswer == "y"){
           Globals.Dxp = true;
       }
       else if (DxpAnswer == "n"){
           Globals.Dxp = false;
       }
       else if (DxpAnswer == "reset"){
           Reset();
       } else {
           Console.WriteLine("Something went wrong..");
           AskDxp();
       }
   }
   
   public static void AskCurrentxp()
   {
       Console.WriteLine("");
       Console.WriteLine("What is your current prayer xp? (whole numbers please e.g 150000)  ");
       string cxp = Console.ReadLine().ToLower();
       Console.WriteLine("Your current prayer xp is " + cxp + " is this correct?  (Y/N)  ");
       string PrayAnswer = Console.ReadLine().ToLower();
       if (PrayAnswer == "y"){
           Globals.Currentxp = Convert.ToInt32(cxp);
       }
       else if (PrayAnswer == "n"){
           AskCurrentxp();
       }
       else if (PrayAnswer == "reset"){
           Reset();
       } else {
           Console.WriteLine("Something went wrong..");
           AskCurrentxp();
       }
   }
   
   public static void AskBoneprice()
   {
       Console.WriteLine("");
       Console.WriteLine("How much are " + Globals.Bone + " each these days? (whole numbers please e.g 150000) ");
       string Boneprice = Console.ReadLine().ToLower();
       Globals.Boneprice = Convert.ToInt32(Boneprice);
   }
   
   public static void DoMathsNow4p()
   {
       int xpfor99 = 13034431 - Globals.Currentxp;
       int xpfor95 = 8771558 - Globals.Currentxp;
       int xpfor200m = 200000000 - Globals.Currentxp;
       if (Globals.Dxp)
       {
           Globals.Bonexp = (Globals.Bonexp * 2) * Globals.Rate;
       } else {
           Globals.Bonexp = Globals.Bonexp * Globals.Rate;
       }
       Globals.Bonesneeded99 = xpfor99 / Globals.Bonexp;
       Globals.Bonesneeded95 = xpfor95 / Globals.Bonexp;
       Globals.Bonesneeded200m = xpfor200m / Globals.Bonexp;
       Globals.Boneprice99 = Globals.Bonesneeded99 * Convert.ToInt64(Globals.Boneprice);
       Globals.Boneprice95 = Globals.Bonesneeded95 * Convert.ToInt64(Globals.Boneprice);
       Globals.Boneprice200m = Globals.Bonesneeded200m * Convert.ToInt64(Globals.Boneprice);
       Printinfo();
   }
   
   public static void Printinfo()
   {
       Console.WriteLine("");
       Console.WriteLine("");
       Console.WriteLine("");
       Console.WriteLine("You need " + Globals.Bonesneeded95 + " " + Globals.Bone + " to reach level 95 Prayer");
       Console.WriteLine("This will cost " + Globals.Boneprice95 + " coins at " + Globals.Boneprice + " each");
       Console.WriteLine("");
       Console.WriteLine("You need " + Globals.Bonesneeded99 + " " + Globals.Bone + " to reach level 99 Prayer");
       Console.WriteLine("This will cost " + Globals.Boneprice99 + " coins at " + Globals.Boneprice + " each");
       Console.WriteLine("");
       Console.WriteLine("You need " + Globals.Bonesneeded200m + " " + Globals.Bone + " to reach level 200m xp in Prayer");
       Console.WriteLine("This will cost " + Globals.Boneprice200m + " coins at " + Globals.Boneprice + " each");
       Console.WriteLine("");
       Console.WriteLine("Written by FourP/4p for Runique");
       Environment.Exit(0);
   }
   
   public static void Reset()
   {
       Globals.Rate = 0;
       Globals.Dxp = false;
       Globals.Currentxp = 0;
       Globals.Boneprice = 0;
       Globals.Bonesneeded99 = 0;
       Globals.Bonesneeded95 = 0;
       Globals.Bonesneeded200m = 0;
       Console.Clear();
       Main();
   }
   }