algun Posted February 27, 2010 Share Posted February 27, 2010 Hello all I try to make a mod to all class can detect an disarm trap. I make a new player_core with my own sys_trap_h and core_h Detection is OKBut each time i try to disarm i have a failure. I try to change Trap_GetModifiedScore(sys_trap_h) and GetDisableDeviceLeveltfa(core_h )with other value but.... always a failure int Trap_GetModifiedScore(object oCreature) //GDE Modified SKILL LOCKPICKING BY TRAPS { float fAbility = 0.0f; if (HasAbility(oCreature, ABILITY_SKILL_TRAPS_1)) //GDE ABILITY_SKILL_LOCKPICKING_1 fAbility += 1.0f; if (HasAbility(oCreature, ABILITY_SKILL_TRAPS_2)) //GDE ABILITY_SKILL_LOCKPICKING_2 fAbility += 1.0f; if (HasAbility(oCreature, ABILITY_SKILL_TRAPS_3)) //GDE ABILITY_SKILL_LOCKPICKING_3 fAbility += 1.0f; if (HasAbility(oCreature, ABILITY_SKILL_TRAPS_4)) //GDE ABILITY_SKILL_LOCKPICKING_4 fAbility += 1.0f; fAbility *= GDE_ALLCLASS_SKILL_BONUS; fAttribute += GetAttributeModifier(oCreature, PROPERTY_ATTRIBUTE_INTELLIGENCE); float fLevel = IntToFloat(GetLevel(oCreature)); float fScore = fAbility + fLevel; Log_Trace(LOG_CHANNEL_SYSTEMS_TRAPS, "sys_traps_h.Trap_GetModifiedScore", "(Ability + Attribute + Level) = (" + FloatToString(fAbility, 3, 1) + " + " + FloatToString(fAttribute, 3, 1) + " + " + FloatToString(fLevel, 3, 1) + ") = " + FloatToString(fScore, 3, 1));; return FloatToInt(fScore); } float GetDisableDeviceLeveltfa(object oCreature) { float fPlayerScore = 0.0f; // if (HasAbility(oCreature, ABILITY_TALENT_HIDDEN_ROGUE)) disable ROGUE only function // { fPlayerScore = GetAttributeModifier(oCreature, PROPERTY_ATTRIBUTE_INTELLIGENCE); #ifdef DEBUG Log_Trace(LOG_CHANNEL_SYSTEMS_PLACEABLES, GetCurrentScriptName(), "Intelligence Modifier = " + ToString(fPlayerScore)); #endif int nSkillLevel = 0; if (HasAbility(oCreature, ABILITY_SKILL_TRAPS_4)) //GDE ABILITY_SKILL_LOCKPICKING_4 { nSkillLevel = 5; } else if (HasAbility(oCreature, ABILITY_SKILL_TRAPS_3)) //GDE ABILITY_SKILL_LOCKPICKING_3 { nSkillLevel = 4; } else if (HasAbility(oCreature, ABILITY_SKILL_TRAPS_2)) //GDE ABILITY_SKILL_LOCKPICKING_2 { nSkillLevel = 3; } else if (HasAbility(oCreature, ABILITY_SKILL_TRAPS_1)) //GDE ABILITY_SKILL_LOCKPICKING_1 { nSkillLevel = 2; } fPlayerScore += (10.0f * nSkillLevel); #ifdef DEBUG Log_Trace(LOG_CHANNEL_SYSTEMS_PLACEABLES, GetCurrentScriptName(), "With Skill = " + ToString(fPlayerScore)); #endif // } return fPlayerScore; } If someone has an idea... Thanks Link to comment Share on other sites More sharing options...
Recommended Posts