AstolfoFate

tpEval Version 2.lua

Mar 28th, 2021
86
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- enter tp amount you have
  2. write("Enter your TP amount: ")
  3. tpOwned = read()
  4. numTpOwned = tonumber(tpOwned)
  5. write("Enter your TP cost: ")
  6. currentTpCost = read()
  7. numCurrentTpCost = tonumber(currentTpCost)
  8. if numCurrentTpCost < 3520 then
  9.   error("Enter a number thats 3520 or greater")
  10. end
  11. i = 1
  12. if numCurrentTpCost == 3520 and numTpOwned == 3520 then
  13.   print("Attributes Obtainable: "..i)
  14. else
  15.   numTpOwned = numTpOwned - numCurrentTpCost
  16.   --program subtracts each level up from amount punched in
  17.   repeat
  18.     numCurrentTpCost = numCurrentTpCost + 60
  19.     numTpOwned = numTpOwned - numCurrentTpCost
  20.     i = i + 1
  21.   until numTpOwned <= 0
  22.   print("Attributes obtainable: "..i)
  23. end
  24. -- 3520 - numTpOwned = numTpOwned
  25. --3,520-(tp entered)=(ntp entered) 1 loop= 1 levels worth of tp
  26. --3,580-(ntp entered)=(nntp entered) 2 + 2 levels worth of tp
  27.  
RAW Paste Data