Advertisement
Guest User

Untitled

a guest
Sep 25th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.14 KB | None | 0 0
  1. ##
  2. SPELL_CAST:
  3. matchre CAST_FAIL backfire|Currently lacking the skill|your spell fails completely
  4. matchre CAST_SELF You can't cast that at
  5. matchre NOTHINGLEFT so that's a bit pointless.
  6. send cast %spell.target
  7. matchwait 2
  8.  
  9. if $preparedspell = "None" then GOTO LEARN_CHECK
  10. else GOTO SPELL_CAST
  11.  
  12. ##
  13. CAST_SELF:
  14. matchre CAST_FAIL backfire|Currently lacking the skill|your spell fails completely
  15. matchre SPELL_CAST You can't cast that at yourself
  16. send cast
  17. matchwait 2
  18. if $preparedspell = "None" then GOTO LEARN_CHECK
  19. else GOTO SPELL_CAST
  20.  
  21. ##*****************************
  22. LEARN_CHECK:
  23. if (%spell.check = "NO") then RETURN
  24. wait 3
  25. ## Not Increasing LearningRate at all or only increasing by 1 - Increase prep slightly
  26. if (($%spell.type.LearningRate - %spell.learningrate.pre < 2)) then {
  27. math spell.prep add 1
  28. wait .3
  29. if %spell.prep > 77 then send var spell.prep 77
  30. put #var cs_spell_%spell.name.prep %spell.prep
  31. send #ECHO >Output Increasing %spell.name to %spell.prep mana - %spell.type
  32. wait .3
  33. RETURN
  34. }
  35. ## Increasing LearningRate by 2, Good prep amount
  36. if (($%spell.type.LearningRate - %spell.learningrate.pre = 2) || (%spell.learningrate.pre > 20)) then {
  37. ## GOOD PREP ***********
  38. ##send #ECHO >Output No change to %spell.name at %spell.prep mana - %spell.type
  39. RETURN
  40. }
  41. ## Increasing LearningRate by 3 or more, Too Much Prep, decreasing by 1
  42. if (($%spell.type.LearningRate - %spell.learningrate.pre > 2)) then {
  43. ## EITHER NOT ENOUGH PREP OR CRITTER TOO LOW ************
  44. math spell.prep subtract 1
  45. wait .3
  46. if %spell.prep > 77 then send var spell.prep 77
  47. put #var cs_spell_%spell.name.prep %spell.prep
  48. send #ECHO >Output Increasing %spell.name to %spell.prep mana - %spell.type
  49. wait .3
  50. RETURN
  51. }
  52. ## Cast backfired/failed/etc.. Decrease prep by 3 and stop dynamically moving.
  53. CAST_FAIL:
  54. ## Too much prep
  55. put #var cs_spell_%spell.name.check NO
  56. math spell.prep subtract 3
  57. if %spell.prep < 3 then var spell.prep 3
  58. wait .3
  59. put #var cs_spell_%spell.name.prep %spell.prep
  60. send #ECHO >Output %spell.name FAILED - Reducing to %spell.prep - %spell.type -Dyno OFF
  61. RETURN
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement