yojimbos_law

mp burning script

Jul 14th, 2018
342
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. script:
  2.  
  3. int librams_today = get_property("libramSummons").to_int();
  4. int mp_spent = librams_today * (librams_today ** 2 + 5 ) / 6;
  5. int times_to_cast = 0;
  6. int mp_to_burn = my_mp() - my_maxmp()*1/10;
  7. while(mp_to_burn > 0 && (librams_today + times_to_cast)*((librams_today + times_to_cast)**2+5) / 6 < mp_to_burn + mp_spent){
  8. times_to_cast++;
  9. }
  10. print("mp to burn: "+mp_to_burn);
  11. print("cast this many times: "+times_to_cast);
  12. if(times_to_cast > 0){
  13. use_skill(times_to_cast,$skill[summon dice]);
  14. }
  15.  
  16. =======================================================================
  17. output:
  18.  
  19. > run some mp burning thing.ash
  20.  
  21. mp to burn: 8997
  22. cast this many times: 14
  23. Casting Summon Dice 14 times...
  24. You acquire an item: d4
  25. You acquire an item: d12
  26. You acquire an item: d8
  27. You acquire an item: d6
  28. You acquire an item: d20
  29. You acquire an item: d6
  30. You acquire an item: d10
  31. You acquire an item: d4
  32. You acquire an item: d10
  33. You acquire an item: d4
  34. You acquire an item: d10
  35. You acquire an item: d10
  36. You acquire an item: d6
  37. You acquire an item: d10
  38. Preference libramSummons changed from 30 to 44
  39. Summon Dice was successfully cast.
Advertisement
Add Comment
Please, Sign In to add comment