Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ##
- SPELL_CAST:
- matchre CAST_FAIL backfire|Currently lacking the skill|your spell fails completely
- matchre CAST_SELF You can't cast that at
- matchre NOTHINGLEFT so that's a bit pointless.
- send cast %spell.target
- matchwait 2
- if $preparedspell = "None" then GOTO LEARN_CHECK
- else GOTO SPELL_CAST
- ##
- CAST_SELF:
- matchre CAST_FAIL backfire|Currently lacking the skill|your spell fails completely
- matchre SPELL_CAST You can't cast that at yourself
- send cast
- matchwait 2
- if $preparedspell = "None" then GOTO LEARN_CHECK
- else GOTO SPELL_CAST
- ##*****************************
- LEARN_CHECK:
- if (%spell.check = "NO") then RETURN
- wait 3
- ## Not Increasing LearningRate at all or only increasing by 1 - Increase prep slightly
- if (($%spell.type.LearningRate - %spell.learningrate.pre < 2)) then {
- math spell.prep add 1
- wait .3
- if %spell.prep > 77 then send var spell.prep 77
- put #var cs_spell_%spell.name.prep %spell.prep
- send #ECHO >Output Increasing %spell.name to %spell.prep mana - %spell.type
- wait .3
- RETURN
- }
- ## Increasing LearningRate by 2, Good prep amount
- if (($%spell.type.LearningRate - %spell.learningrate.pre = 2) || (%spell.learningrate.pre > 20)) then {
- ## GOOD PREP ***********
- ##send #ECHO >Output No change to %spell.name at %spell.prep mana - %spell.type
- RETURN
- }
- ## Increasing LearningRate by 3 or more, Too Much Prep, decreasing by 1
- if (($%spell.type.LearningRate - %spell.learningrate.pre > 2)) then {
- ## EITHER NOT ENOUGH PREP OR CRITTER TOO LOW ************
- math spell.prep subtract 1
- wait .3
- if %spell.prep > 77 then send var spell.prep 77
- put #var cs_spell_%spell.name.prep %spell.prep
- send #ECHO >Output Increasing %spell.name to %spell.prep mana - %spell.type
- wait .3
- RETURN
- }
- ## Cast backfired/failed/etc.. Decrease prep by 3 and stop dynamically moving.
- CAST_FAIL:
- ## Too much prep
- put #var cs_spell_%spell.name.check NO
- math spell.prep subtract 3
- if %spell.prep < 3 then var spell.prep 3
- wait .3
- put #var cs_spell_%spell.name.prep %spell.prep
- send #ECHO >Output %spell.name FAILED - Reducing to %spell.prep - %spell.type -Dyno OFF
- RETURN
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement