magicadd= 15
Im sure you already know that adds 15 magic but I am wondering how to change it from 15 to unlimited not a big number but where itl say something like ~ instead of a number and ~ will never run out im trying to make it so if I equip a ring the #/# on the stats tab will turn into ~/~
meaning unlimited magic can run out
Copyright © 2025 BYOND Software.
All rights reserved.
magicadd="~"
Where-ever you decrease/add to magicadd, check to see if it is "~". If it is, don't touch it. Heck, make it a proc if your going to have multiple stats like that.
<code> mob/proc Statadd(stat,num) var/S = src.vars["[stat]"] if(S == "~") return S S += num </code>
And just call Statadd("magicadd",2000) if you need to add 2000 to it, or Statadd("magicadd",-500) if you need to decrease 500 from magicadd. It won't touch it as long as magicadd == "~". This works for any other variable a mob has, as well.