Train Magic Resist (Resisting Spells) by weteamsteve
# Train Resist Spells by casting Poison Field and standing it, can use in your rented room
# By Zanarkand AKA Weteamsteve#9245
# Void Aspect Armor is good for this
# You need reagents in your shelf loadout
# poison_field_duration is (120 * (Magery / 100)) seconds
#journal cleanup
clearsysmsg
@setvar! stop_at_skill_level 100
if diffhits > 30
overhead "Healing Self." 88
cast "Greater Heal"
wait 450
target self
elseif counttype 'Sulfurous Ash' backpack < 1 or counttype 'Garlic' backpack < 1 or counttype 'Ginseng' backpack < 1 or counttype '3981' backpack < 1 or counttype '3962' backpack < 1 or counttype 'nightshade' backpack < 1
if findtype "storage shelf" ground any any 2 as the_shelf
overhead "Resupply" 88
menu the_shelf 1
wait 500
endif
elseif mana < 20
overhead "Meditating" 88
useskill "meditation"
while mana < maxmana
endwhile
pause 600
elseif skill 'Resisting Spells' < stop_at_skill_level
if not findtype 'Field of Poison' ground 0 0
overhead "Casting Poison Field" 88
cast "Poison Field"
waitfortarget 5000
targetrelloc 0 0
pause 1000
endif
if insysmsg "Your concentration is disturbed, thus ruining thy spell."
overhead "We failed casting Poison Field, restarting." 88
loop
endif
while findtype 'Field of Poison' ground 0 0
if hits < 30
walk "right"
walk "right"
endif
if diffhits > 30
overhead "Healing Self." 88
cast "Greater Heal"
waitfortarget 2000
target self
endif
if not findtype 'Field of Poison' ground 0 0
overhead "Poison Field has faded." 88
break
endif
wait 500
endwhile
else
overhead "Congrats on reaching {{stop_at_skill_level}} Resisting Spells!" 88
stop
endif
loop