i had also a problem with armors that drains mana:
badly regen tags doesn't work properly, they always regen even if i put zero or -100 as a regen value.
i guess the only way to do this is modify the typedef of the armor and add a timer every 3 seconds that lower mana to 0.
I tryed also this:
EDIT: i just fixed this version and now seems to work properly
Code:
[TYPEDEF T_ARMOR_LEATHER] // but also t_armor
ON=@EQUIP
IF !(<TAG0.ALLOWMANA>) && !(<SRC.ISGM>)
IF (<SRC.ACTION> == skill_meditation)
SRC.ACTION = -1
SRC.SYSMESSAGE You can't meditate with armor.
ENDIF
SRC.MESSAGE Mana drained by the armor!
SRC.MANA = 0
SRC.MAXMANA = 1
IF !(<SRC.TAG0.ARMORMANA>)
SRC.TAG.ARMORMANA = 1
SRC.EVENTS +e_nomedit
ELSE
SRC.TAG.ARMORMANA += 1
ENDIF
ENDIF
RETURN 0
ON=@UNEQUIP
IF !(<TAG0.ALLOWMANA>) && !(<SRC.ISGM>)
SRC.TAG.ARMORMANA -= 1
IF !(<SRC.TAG0.ARMORMANA>) || (<EVAL <SRC.TAG0.ARMORMANA>> <= 0)
SRC.MAXMANA =
SRC.TAG0.ARMORMANA =
SRC.EVENTS -e_nomedit
ENDIF
ENDIF
RETURN 0
///////////////////////////////////////////////////////////
// armor events
///////////////////////////////////////////////////////////
[EVENTS e_nomedit]
ON=@SKILLPRESTART
IF (<ARGN1> == 46)
SRC.SYSMESSAGE You can't meditate in this state
RETURN 1
ENDIF
RETURN 0
Now i need to address the regen life problem.
For the moment, the best approach seems to be:
1) a typedef to add as tevents on all the pieces of the armor, with timer that every 3 second give +1 hitpoint, if hits are below 50.
2) like before, but instead of having every pieces of the armor with timer, use only one timer within a memory, to add to the player as the first item is equipped, and through the more1 value, raise his regen value
(every armor piece added will increase the more by one, so On timer the player will be healed for the <more1> value of the memory
Any other suggestions are more than appreciated!