PDA

View Full Version : Identifiers for ModifyNPCStat


Bohbo
01-06-2015, 10:17 PM
I cannot find any working links to the list of identifiers for the ModifyNPCStat.

For example NPC_Types has mindmg and maxdmg and the identifiers are min_hit and max_hit.


Any help would be appreciated.

Kayen
01-06-2015, 10:21 PM
id = Your identifier

void NPC::ModifyNPCStat(const char *identifier, const char *newValue)
{
std::string id = identifier;
std::string val = newValue;
for(int i = 0; i < id.length(); ++i) {
id[i] = std::tolower(id[i]);
}

if(id == "ac") { AC = atoi(val.c_str()); return; }
else if(id == "str") { STR = atoi(val.c_str()); return; }
else if(id == "sta") { STA = atoi(val.c_str()); return; }
else if(id == "agi") { AGI = atoi(val.c_str()); return; }
else if(id == "dex") { DEX = atoi(val.c_str()); return; }
else if(id == "wis") { WIS = atoi(val.c_str()); CalcMaxMana(); return; }
else if(id == "int" || id == "_int") { INT = atoi(val.c_str()); CalcMaxMana(); return; }
else if(id == "cha") { CHA = atoi(val.c_str()); return; }
else if(id == "max_hp") { base_hp = atoi(val.c_str()); CalcMaxHP(); if (cur_hp > max_hp) { cur_hp = max_hp; } return; }
else if(id == "max_mana") { npc_mana = atoi(val.c_str()); CalcMaxMana(); if (cur_mana > max_mana){ cur_mana = max_mana; } return; }
else if(id == "mr") { MR = atoi(val.c_str()); return; }
else if(id == "fr") { FR = atoi(val.c_str()); return; }
else if(id == "cr") { CR = atoi(val.c_str()); return; }
else if(id == "pr") { PR = atoi(val.c_str()); return; }
else if(id == "dr") { DR = atoi(val.c_str()); return; }
else if(id == "PhR") { PhR = atoi(val.c_str()); return; }
else if(id == "runspeed") { runspeed = (float)atof(val.c_str()); CalcBonuses(); return; }
else if(id == "special_attacks") { NPCSpecialAttacks(val.c_str(), 0, 1); return; }
else if(id == "special_abilities") { ProcessSpecialAbilities(val.c_str()); return; }
else if(id == "attack_speed") { attack_speed = (float)atof(val.c_str()); CalcBonuses(); return; }
else if(id == "attack_delay") { attack_delay = atoi(val.c_str()); CalcBonuses(); return; }
else if(id == "atk") { ATK = atoi(val.c_str()); return; }
else if(id == "accuracy") { accuracy_rating = atoi(val.c_str()); return; }
else if(id == "avoidance") { avoidance_rating = atoi(val.c_str()); return; }
else if(id == "trackable") { trackable = atoi(val.c_str()); return; }
else if(id == "min_hit") { min_dmg = atoi(val.c_str()); return; }
else if(id == "max_hit") { max_dmg = atoi(val.c_str()); return; }
else if(id == "attack_count") { attack_count = atoi(val.c_str()); return; }
else if(id == "see_invis") { see_invis = atoi(val.c_str()); return; }
else if(id == "see_invis_undead") { see_invis_undead = atoi(val.c_str()); return; }
else if(id == "see_hide") { see_hide = atoi(val.c_str()); return; }
else if(id == "see_improved_hide") { see_improved_hide = atoi(val.c_str()); return; }
else if(id == "hp_regen") { hp_regen = atoi(val.c_str()); return; }
else if(id == "mana_regen") { mana_regen = atoi(val.c_str()); return; }
else if(id == "level") { SetLevel(atoi(val.c_str())); return; }
else if(id == "aggro") { pAggroRange = atof(val.c_str()); return; }
else if(id == "assist") { pAssistRange = atof(val.c_str()); return; }
else if(id == "slow_mitigation") { slow_mitigation = atoi(val.c_str()); return; }
else if(id == "loottable_id") { loottable_id = atof(val.c_str()); return; }
else if(id == "healscale") { healscale = atof(val.c_str()); return; }
else if(id == "spellscale") { spellscale = atof(val.c_str()); return; }
}

Bohbo
01-13-2015, 10:53 AM
Thanks Kayen,

Sorry i forgot to sub to this thread, i changed my default options to do it automatically. I am curious what source file you pulled that from.