//69_hench_switch // Henchman is not in soley ranged attack mode // Created by: 69MEH69 Oct2004 #include "69_INC_HENAI" void main() { object oPC = GetPCSpeaker(); SetCombatCondition(X0_COMBAT_FLAG_RANGED, FALSE); SetLocalInt(OBJECT_SELF, "COMBAT_FLAG_SWITCH", TRUE); ActionSpeakString("Very well."); int nClass = GetClassByPosition(1); switch(nClass) { case CLASS_TYPE_BARBARIAN: case CLASS_TYPE_FIGHTER: case CLASS_TYPE_PALADIN: if(HasMeleeWeapon69(OBJECT_SELF)) { SetAssociateState(NW_ASC_USE_RANGED_WEAPON, FALSE); bkEquipMelee(oPC); } break; default: if(HasRangedWeapon69(OBJECT_SELF)) { SetAssociateState(NW_ASC_USE_RANGED_WEAPON, TRUE); bkEquipRanged(oPC); } break; } }