DKMCC123

Mithril Profit Calculator

Nov 27th, 2021
7,961
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.33 KB | None | 0 0
  1. clc
  2. speed = 2400;
  3. fortune = 870;
  4. effi = 85;
  5.  
  6. hardness = 1500;
  7. mithMult = 3.5;
  8.  
  9. realismFactor = 0.5;
  10.  
  11. miningTime = round(hardness * 30 / speed);
  12.  
  13. if miningTime > 4
  14. minedPS = 20 / miningTime;
  15. else
  16. minedPS = 20 / 4;
  17. end
  18. minedOut = sprintf('You will mine %5.1f blocks per second.\n', minedPS);
  19.  
  20. if effi < 20
  21. increaseMinedPerc = 10 + effi * 0.4;
  22. elseif effi < 40
  23. increaseMinedPerc = 2 * (10 + effi * 0.4);
  24. elseif effi < 60
  25. increaseMinedPerc = 3 * (10 + effi * 0.4);
  26. elseif effi < 80
  27. increaseMinedPerc = 4 * (10 + effi * 0.4);
  28. elseif effi < 100
  29. increaseMinedPerc = 5 * (10 + effi * 0.4);
  30. else
  31. increaseMinedPerc = 6 * (10 + effi * 0.4);
  32. end
  33. effiOut = sprintf('Your efficient miner increases the number of blocks you mine by %5.2f%%.\n', increaseMinedPerc);
  34.  
  35. minedPSTot = minedPS * (1 + increaseMinedPerc / 100);
  36. mithProd = minedPSTot * (1 + fortune / 100) * mithMult;
  37. mithPH = mithProd * 3600;
  38. moneyPH = mithPH * 10;
  39. real_mithPH = mithPH * realismFactor;
  40. real_moneyPH = moneyPH * realismFactor;
  41.  
  42. finalOut = sprintf('You will mine an average of %5.2f blocks per second, and will produce a total of %5.2f mithril and %5.2f coins per hour. \nRealistically, you will produce a total of %5.2f mithril and %5.2f coins per hour', minedPSTot, mithPH, moneyPH, real_mithPH, real_moneyPH);
  43. disp(finalOut)
Advertisement
Add Comment
Please, Sign In to add comment