ManaBoost(Script)

From CoffeeMud Wiki
Revision as of 13:36, 17 September 2024 by Loki (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
CoffeeMUD
Administrator                                                  Builder                                                              Player
=CoffeeMUD Builder Information=
Basics Praetor     Player Support     Commands     Zapper Masks Advanced Races     Classes     Abilities     Socials     Scripting    
Building Behaviors     Properties     Areas     Rooms     Exits     Items     Mobs Systems Achievements     Crafting     Help Info     Ships     Planes of Existence     Quests     Triumphs    

Mana Boosting

If you want a certain action to boost a character's mana, add this snippet appropriately into your script prog:

Adding Mana to a Mob

MPSETVAR $n MaxMana $%GSTAT($n BASEMANA)%
IF GSTAT($n MANA < $<$n MaxMana>)
    MPSETVAR $n CurMana $%GSTAT($n MANA)%
    MPSETVAR $n ManaCalc $%MATH($<$n CurMana> + 50)%
    IF GSTAT($n BASEMANA < $<$n ManaCalc>)
        MPSETVAR $n ManaCalc $<$n MaxMana>
    ENDIF
    MPGSET $n MANA $<$n ManaCalc>
ENDIF
~

Notes

.