I was wondering if someone could help me with a small example of a code making a buff spell.
The idea is that you can buff someone or yourself, increasing str, int or evasion or what else there is to buff.
I tried to create somethink myself.
if(src.MP <30+(src.protectlevel*3))src<<"Not enough MP"
for(M in view(5))
M=(input("Protect","Who") as mob in J)
src.overlays += /obj/spells/shield
M.<<"You have been protected!"
M.overlays -= /obj/spells/shield
M.<<"Your protection is down!"
usr<<"That person is already protected wait till his buff is finished!"
the problem is atm when you are buffed and you logg out and back on again you still are having the boost but you can get buffed again. Also i would like to make it so when you are buffed and someone buffs you again your buff goes back to beginning of time so the last buff is gone instant.
I hope someone would like to help me with this one.