RanXerox
Master
Posts: 550
Likes Given: 1
Likes Received: 12 in 9 posts
Joined: Dec 2010
Reputation: 19
|
RE: Skillcap issues
I think you should ditch the entire memory item idea and implement it as TAGs (one per skill) on the items that need them, for example:
TAG.ModAlchemy=10.0
Implement the equip and unequip side effects of those tags in an EVENT that all equipable items have... Something like:
Code:
[EVENT e_equipitem]
ON=@Equip
IF (<TAG0.ModAlchemy>)
IF (<TAG0.ModAlchemy> < 0)
SRC.SYSMESSAGE @032,,You equipped a cursed item that lowered your Alchemy
ENDIF
SRC.TAG.ModAlchemy=<EVAL <SRC.TAG0.ModAlchemy> + <TAG0.ModAlchemy>>
TRY SRC.Alchemy=<EVAL <SRC.Alchemy>+<TAG0.ModAlchemy>>
ENDIF
ON=@UnEquip
IF (<TAG0.ModAlchemy>)
SRC.TAG.ModAlchemy=<EVAL <SRC.TAG0.ModAlchemy> - <TAG0.ModAlchemy>>
TRY SRC.Alchemy=<EVAL <SRC.Alchemy>-<TAG0.ModAlchemy>>
IF (<SRC.TAG0.ModAlchemy>==0)
SRC.TAG.ModAlchemy=
SRC.SYSMESSAGE @032,,Your Alchemy has returned to normal
ENDIF
ENDIF
In your skillgain overrides, to check if someone is wearing an item that has affected their skill, just look for a TAG.ModAlchemy with a non zero value directly on the player.
You could try and get crafty and write some kind of FOR loop to go through all the skill KEYs so you dont need an IF structure for each skill... but try to get it working without that first.
PS... I am not sure what happens when you set a skill to a negative value... so maybe setting the TAG on an item to a negative number is a bad idea.
(This post was last modified: 03-01-2013 02:05 PM by RanXerox.)
|
|
03-01-2013 02:03 PM |
|
|