cmi_player_equip/unequip

View previous topic View next topic Go down

cmi_player_equip/unequip

Post  Redrover on Sat Apr 21, 2012 11:33 am

I believe you are trying to alleviate an exploit with this code, but it's having a negative impact on characters who legally wear CON boosting items.

I didn't notice this till the end of the OC when I gave a spellcaster a +4 CON item and they died when transitioning to a new area. Seems the damage portion of the script is firing on area load, without an unequip/equip event taking place. Also, if the character has a lot of damage, they die when removing the item, which is understandable, and I think that's the intended purpose is anyway.

It looks as if you're checking to see if a flag is on to use this code, but I can't figure out where to set that flag, or if it's even a flag I can set at all. Is this a user controlled flag?
int nDisableConFix = GetLocalInt(oPC, "DisableConFix")

Thinking about a possible alternative... not sure if it's possible, but would it work in reverse? What I mean is, instead of causing damage first and then healing, could you add HP (like an Aid type spell) and then apply the damage? Not sure that would work if they already have an Aid type effect in place. Not sure that would fix the damage element firing on area load.

At any rate, is it possible to turn off that section of code, or can I simply remove that whole section and recompile it? Not sure what else that part hooks into if I cut it out of the script.

Thanks,
Red

EDIT: 4/24/12
I see 1.42f is out and you added an option flag to turn this off... thanks! I did try disabling that bit in the script (just commented out those bits and recompiled), and the damage on area load stopped. If you can tell me what script(s) you are using on area loads I'll take a look at the code and see if I can find the culprit.

Best,
Red


Redrover

Posts : 3
Join date : 2012-04-20
Age : 44

View user profile

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum