#include "spn_functions" #include "inc_item_props" //script cleans speed modifications based on equipped items const int ITEM_PROPERTY_SPEED_INCREASE = 134; const int ITEM_PROPERTY_SPEED_DECREASE = 135; const string PLAYER_SPEED_INCREASE = "player_speed_increase"; const string PLAYER_SPEED_DECREASE = "player_speed_decrease"; void CleanSpeedProperties(object oPC); void main() { object oPC = GetEnteringObject(); object oSkin = GetPCSkin(oPC); AssignCommand(oSkin, CleanSpeedProperties(oPC)); } void CleanSpeedProperties(object oPC) { //clean existing modification effect eTest = GetFirstEffect(oPC); object oSkin = GetPCSkin(oPC); while(GetIsEffectValid(eTest)) { if(GetEffectCreator(eTest) == OBJECT_SELF && GetEffectType(eTest) == (EFFECT_TYPE_MOVEMENT_SPEED_DECREASE || EFFECT_TYPE_MOVEMENT_SPEED_INCREASE) ) RemoveEffect(oPC, eTest); eTest = GetNextEffect(oPC); } }