public override bool OnStartCombat(GameObject attachee, GameObject triggerer) { var leader = SelectedPartyLeader; if ((!attachee.HasMet(leader))) { SetCounter(0, GetCounter(0) + 1); if (((GetCounter(0) >= 4) && (Utilities.group_percent_hp(leader) > 30))) { foreach (var pc in GameSystems.Party.PartyMembers) { if (pc.type == ObjectType.pc) { attachee.AIRemoveFromShitlist(pc); } } leader.BeginDialog(attachee, 1); DetachScript(); return(SkipDefault); } } return(RunDefault); }
public override bool OnStartCombat(GameObject attachee, GameObject triggerer) { while ((attachee.FindItemByName(8903) != null)) { attachee.FindItemByName(8903).Destroy(); } // if (attachee.d20_query(Q_Is_BreakFree_Possible)): # workaround no longer necessary! // create_item_in_inventory( 8903, attachee ) if ((Utilities.obj_percent_hp(attachee) < 75)) { GameObject found_pc = null; foreach (var pc in GameSystems.Party.PartyMembers) { if (pc.type == ObjectType.pc) { found_pc = pc; attachee.AIRemoveFromShitlist(pc); } } if (found_pc != null) { Co8.StopCombat(attachee, 1); found_pc.BeginDialog(attachee, 1); DetachScript(); return(SkipDefault); } } // Spiritual Weapon Shenanigens # CombatStandardRoutines.Spiritual_Weapon_Begone(attachee); return(RunDefault); }
public override bool OnStartCombat(GameObject attachee, GameObject triggerer) { // attachee.item_transfer_to(triggerer,4130) if ((Utilities.obj_percent_hp(attachee) < 50)) { GameObject found_pc = null; foreach (var pc in GameSystems.Party.PartyMembers) { if (pc.type == ObjectType.pc) { found_pc = pc; attachee.AIRemoveFromShitlist(pc); var worg = Utilities.find_npc_near(attachee, 14352); worg.AIRemoveFromShitlist(pc); } } if (found_pc != null) { if ((!GetGlobalFlag(194))) { SetGlobalFlag(194, true); found_pc.BeginDialog(attachee, 150); DetachScript(); return(SkipDefault); } } } return(RunDefault); }
public override bool OnDisband(GameObject attachee, GameObject triggerer) { SetGlobalFlag(235, false); var ring = attachee.FindItemByName(6088); if ((ring != null)) { ring.ClearItemFlag(ItemFlag.NO_TRANSFER); } var dagger = attachee.FindItemByName(4058); if ((dagger != null)) { dagger.ClearItemFlag(ItemFlag.NO_TRANSFER); } foreach (var pc in GameSystems.Party.PartyMembers) { attachee.AIRemoveFromShitlist(pc); attachee.SetReaction(pc, 50); } return(RunDefault); }
public override bool OnStartCombat(GameObject attachee, GameObject triggerer) { var leader = SelectedPartyLeader; if (((attachee.GetMap() == 5093) && (GetGlobalVar(956) == 1))) { attachee.SetInt(obj_f.critter_strategy, 21); return(RunDefault); } else if ((attachee.GetMap() != 5093 && GetGlobalVar(969) == 1)) { SetGlobalVar(969, 0); } else if (((GetQuestState(67) == QuestState.Accepted) && (!GetGlobalFlag(963)))) { SetCounter(0, GetCounter(0) + 1); if ((GetCounter(0) >= 2)) { foreach (var pc in GameSystems.Party.PartyMembers) { if (pc.type == ObjectType.pc) { attachee.AIRemoveFromShitlist(pc); } } SetGlobalFlag(963, true); leader.BeginDialog(attachee, 1); return(SkipDefault); } } return(RunDefault); }
public override bool OnStartCombat(GameObject attachee, GameObject triggerer) { if ((Utilities.obj_percent_hp(attachee) < 50 && (!attachee.HasMet(triggerer)))) { GameObject found_pc = null; foreach (var pc in GameSystems.Party.PartyMembers) { if (pc.type == ObjectType.pc) { found_pc = pc; attachee.AIRemoveFromShitlist(pc); } } if (found_pc != null) { found_pc.BeginDialog(attachee, 200); return(SkipDefault); } } return(RunDefault); }
public override bool OnStartCombat(GameObject attachee, GameObject triggerer) { // while(attachee.item_find(8903) != OBJ_HANDLE_NULL): // attachee.item_find(8903).destroy() // if (attachee.d20_query(Q_Is_BreakFree_Possible)): # workaround no longer necessary! // create_item_in_inventory( 8903, attachee ) if (((Utilities.obj_percent_hp(attachee) < 30) && (!GetGlobalFlag(208)))) { GameObject found_pc = null; foreach (var pc in GameSystems.Party.PartyMembers) { if (pc.type == ObjectType.pc) { found_pc = pc; } else { pc.AIRemoveFromShitlist(attachee); } attachee.AIRemoveFromShitlist(pc); } if (found_pc != null) { found_pc.BeginDialog(attachee, 20); DetachScript(); return(SkipDefault); } } return(RunDefault); }
public override bool OnStartCombat(GameObject attachee, GameObject triggerer) { var leader = SelectedPartyLeader; if (((GetQuestState(67) == QuestState.Accepted) && (!GetGlobalFlag(963)))) { SetCounter(0, GetCounter(0) + 1); if ((GetCounter(0) >= 2)) { foreach (var pc in GameSystems.Party.PartyMembers) { if (pc.type == ObjectType.pc) { attachee.AIRemoveFromShitlist(pc); } } SetGlobalFlag(963, true); leader.BeginDialog(attachee, 1); return(SkipDefault); } } return(RunDefault); }
public static bool run_off(GameObject attachee, GameObject triggerer) { foreach (var pc in GameSystems.Party.PartyMembers) { attachee.AIRemoveFromShitlist(pc); } attachee.RunOff(); return(RunDefault); }
public static bool unshit(GameObject attachee, GameObject triggerer) { foreach (var pc in GameSystems.Party.PartyMembers) { attachee.AIRemoveFromShitlist(pc); attachee.SetReaction(pc, 50); } return(RunDefault); }
public override bool OnDying(GameObject attachee, GameObject triggerer) { if (CombatStandardRoutines.should_modify_CR(attachee)) { CombatStandardRoutines.modify_CR(attachee, CombatStandardRoutines.get_av_level()); } if ((attachee.GetStat(Stat.subdual_damage) >= 48 && !GetGlobalFlag(813) && attachee.GetMap() == 5080 && attachee.GetStat(Stat.hp_current) >= 1 && !GameSystems.Combat.IsCombatActive())) { // dice = dice_new("1d1+9") // attachee.healsubdual( OBJ_HANDLE_NULL, dice ) foreach (var target in PartyLeader.GetPartyMembers()) { if ((attachee.GetNameId() == 14262)) { if ((attachee.DistanceTo(target) <= 30 && target.type == ObjectType.pc)) { if ((target.GetSkillLevel(attachee, SkillId.intimidate) >= 10 || target.GetSkillLevel(attachee, SkillId.diplomacy) >= 12 || target.GetSkillLevel(attachee, SkillId.bluff) >= 10)) { DetachScript(); var dice = Dice.Parse("1d1+9"); attachee.HealSubdual(null, dice); attachee.AIRemoveFromShitlist(target); target.BeginDialog(attachee, 1000); return(SkipDefault); } else { DetachScript(); var dice = Dice.Parse("1d1+9"); attachee.HealSubdual(null, dice); attachee.AIRemoveFromShitlist(target); target.BeginDialog(attachee, 2000); return(SkipDefault); } } } } } return(RunDefault); }
public override bool OnDisband(GameObject attachee, GameObject triggerer) { SetGlobalVar(551, 2); foreach (var pc in GameSystems.Party.PartyMembers) { attachee.AIRemoveFromShitlist(pc); attachee.SetReaction(pc, 50); } return(RunDefault); }
public override bool OnStartCombat(GameObject attachee, GameObject triggerer) { var leader = SelectedPartyLeader; SetGlobalVar(763, GetGlobalVar(763) + 1); if ((GetGlobalVar(763) == 2 || GetGlobalVar(763) == 35)) { Utilities.create_item_in_inventory(8900, attachee); Utilities.create_item_in_inventory(8037, attachee); } if ((GetGlobalVar(763) == 3 || GetGlobalVar(763) == 40)) { Utilities.create_item_in_inventory(8901, attachee); } if ((GetGlobalVar(763) == 8)) { Utilities.create_item_in_inventory(8902, attachee); } if ((GetGlobalVar(763) == 11 || GetGlobalVar(763) == 30)) { Utilities.create_item_in_inventory(8904, attachee); } if ((GetGlobalFlag(164) && GetGlobalVar(901) == 2)) { return(RunDefault); } // game.new_sid = 0 else if ((Utilities.obj_percent_hp(attachee) < 50)) { foreach (var pc in GameSystems.Party.PartyMembers) { // if pc.type == obj_t_pc: attachee.AIRemoveFromShitlist(pc); } // game.global_flags[822] = 1 if ((GetGlobalVar(901) == 0)) { leader.BeginDialog(attachee, 200); return(SkipDefault); } else if ((GetGlobalVar(901) == 1)) { leader.BeginDialog(attachee, 130); return(SkipDefault); } } return(RunDefault); }
public static bool remove_combat(GameObject attachee, GameObject triggerer) { foreach (var pc in GameSystems.Party.PartyMembers) { if ((pc.type == ObjectType.pc)) { attachee.AIRemoveFromShitlist(pc); } } return(RunDefault); }
public override bool OnEnterCombat(GameObject attachee, GameObject triggerer) { if ((attachee.GetMap() != 5044)) { foreach (var pc in SelectedPartyLeader.GetPartyMembers()) { attachee.AIRemoveFromShitlist(pc); attachee.SetReaction(pc, 80); } } return(RunDefault); }
public override bool OnStartCombat(GameObject attachee, GameObject triggerer) { if ((attachee.AddCondition("Rend"))) { Logger.Info("Added Rend to Oohlgrist"); } if (((Utilities.obj_percent_hp(attachee) < 50) && (!GetGlobalFlag(350)) && ((ScriptDaemon.get_v(454) & (0x20 + (1 << 7))) == 0))) // if he hasn't already been intimidated or regrouped { GameObject found_pc = null; foreach (var pc in GameSystems.Party.PartyMembers) { if (pc.type == ObjectType.pc) { found_pc = pc; attachee.AIRemoveFromShitlist(pc); } } if (found_pc != null) { SetGlobalFlag(349, true); found_pc.BeginDialog(attachee, 70); return(SkipDefault); } } // THIS IS USED FOR BREAK FREE foreach (var obj in PartyLeader.GetPartyMembers()) { if ((obj.DistanceTo(attachee) <= 9 && obj.GetStat(Stat.hp_current) >= -9)) { return(RunDefault); } } while ((attachee.FindItemByName(8903) != null)) { attachee.FindItemByName(8903).Destroy(); } // if (attachee.d20_query(Q_Is_BreakFree_Possible)): # workaround no longer necessary! // create_item_in_inventory( 8903, attachee ) // attachee.d20_send_signal(S_BreakFree) if (attachee.GetLeader() != null) // Don't wanna f**k up charmed enemies { return(RunDefault); } return(RunDefault); }
public override bool OnDisband(GameObject attachee, GameObject triggerer) { SetGlobalFlag(234, false); var cleaver = attachee.FindItemByName(4213); cleaver.ClearItemFlag(ItemFlag.NO_TRANSFER); foreach (var pc in GameSystems.Party.PartyMembers) { attachee.AIRemoveFromShitlist(pc); attachee.SetReaction(pc, 50); } return(RunDefault); }
public override bool OnSpellCast(GameObject attachee, GameObject triggerer, SpellPacketBody spell) { if ((spell.spellEnum == WellKnownSpells.DispelMagic || spell.spellEnum == WellKnownSpells.BreakEnchantment || spell.spellEnum == WellKnownSpells.DispelEvil)) { SetGlobalFlag(148, true); triggerer.BeginDialog(attachee, 70); foreach (var pc in GameSystems.Party.PartyMembers) { attachee.AIRemoveFromShitlist(pc); } } return(RunDefault); }
public override bool OnEnterCombat(GameObject attachee, GameObject triggerer) { var name_exceptions = new[] { 14012, 14023, 14044, 20001, 14321 }; if (!((name_exceptions).Contains(attachee.GetNameId()))) { foreach (var pc in GameSystems.Party.PartyMembers) { attachee.AIRemoveFromShitlist(pc); attachee.SetReaction(pc, 50); } } return(RunDefault); }
public static void run_away(GameObject attachee) { attachee.AddCondition("sp-Fear", 0, 100, 0); foreach (var pc in GameSystems.Party.PartyMembers) { attachee.AIRemoveFromShitlist(pc); attachee.SetReaction(pc, 30); } attachee.ClearNpcFlag(NpcFlag.KOS); attachee.SetNpcFlag(NpcFlag.KOS_OVERRIDE); attachee.RemoveFromInitiative(); UiSystems.Combat.Initiative.UpdateIfNeeded(); return; }
public override bool OnHeartbeat(GameObject attachee, GameObject triggerer) { if ((GetGlobalFlag(176))) { foreach (var pc in GameSystems.Party.PartyMembers) { attachee.AIRemoveFromShitlist(pc); } var location = new locXY(560, 437); attachee.RunOff(location); } return(RunDefault); }
public override bool OnStartCombat(GameObject attachee, GameObject triggerer) { while ((attachee.FindItemByName(8903) != null)) { attachee.FindItemByName(8903).Destroy(); } // if (attachee.d20_query(Q_Is_BreakFree_Possible)): # workaround no longer necessary! // create_item_in_inventory( 8903, attachee ) if ((Utilities.obj_percent_hp(attachee) < 20)) { GameObject nearby_pc = null; foreach (var pc in GameSystems.Party.PartyMembers) { if (pc.type == ObjectType.pc) { attachee.AIRemoveFromShitlist(pc); } } foreach (var pc in ObjList.ListVicinity(attachee.GetLocation(), ObjectListFilter.OLC_PC)) { if ((attachee.HasLineOfSight(pc))) { if ((nearby_pc == null)) { nearby_pc = pc; } if (pc.FindItemByName(2203) != null) { DetachScript(); pc.BeginDialog(attachee, 330); return(RunDefault); } } } if ((nearby_pc != null)) { DetachScript(); nearby_pc.BeginDialog(attachee, 330); return(SkipDefault); } } return(RunDefault); }
public static void StopCombat(GameObject obj, int flag) { foreach (var pc in GameSystems.Party.PartyMembers) { foreach (var critter in ObjList.ListVicinity(obj, ObjectListFilter.OLC_CRITTERS)) { critter.AIRemoveFromShitlist(pc); if (flag == 1) { critter.ClearNpcFlag(NpcFlag.KOS); } } obj.AIRemoveFromShitlist(pc); } }
public override bool OnExitCombat(GameObject attachee, GameObject triggerer) { if ((attachee.GetStat(Stat.subdual_damage) >= attachee.GetStat(Stat.hp_current) && attachee.GetStat(Stat.hp_current) >= 1 && !GameSystems.Combat.IsCombatActive())) { foreach (var pc in GameSystems.Party.PartyMembers) { if (pc.type == ObjectType.pc) { attachee.AIRemoveFromShitlist(pc); } } SetGlobalFlag(871, true); } return(RunDefault); }
public override bool OnDisband(GameObject attachee, GameObject triggerer) { foreach (var obj in triggerer.GetPartyMembers()) { if ((obj.GetNameId() == 8030)) { triggerer.RemoveFollower(obj); } } foreach (var pc in GameSystems.Party.PartyMembers) { attachee.AIRemoveFromShitlist(pc); attachee.SetReaction(pc, 50); } return(RunDefault); }
public override bool OnStartCombat(GameObject attachee, GameObject triggerer) { if ((Utilities.obj_percent_hp(attachee) < 20)) { GameObject nearby_pc = null; foreach (var pc in GameSystems.Party.PartyMembers) { if (pc.type == ObjectType.pc) { attachee.AIRemoveFromShitlist(pc); } } foreach (var pc in ObjList.ListVicinity(attachee.GetLocation(), ObjectListFilter.OLC_PC)) { if ((attachee.HasLineOfSight(pc))) { if ((nearby_pc == null)) { nearby_pc = pc; } if (pc.FindItemByName(2203) != null) { DetachScript(); pc.BeginDialog(attachee, 330); return(RunDefault); } } } if ((nearby_pc != null)) { DetachScript(); nearby_pc.BeginDialog(attachee, 330); return(SkipDefault); } } return(RunDefault); }
public override bool OnDisband(GameObject attachee, GameObject triggerer) { foreach (var pc in GameSystems.Party.PartyMembers) { attachee.AIRemoveFromShitlist(pc); attachee.SetReaction(pc, 50); } foreach (var npc in ObjList.ListVicinity(attachee.GetLocation(), ObjectListFilter.OLC_NPC)) { foreach (var pc in GameSystems.Party.PartyMembers) { npc.AIRemoveFromShitlist(pc); npc.SetReaction(pc, 50); } } return(RunDefault); }
public override bool OnDisband(GameObject attachee, GameObject triggerer) { SetGlobalFlag(231, false); foreach (var pc in GameSystems.Party.PartyMembers) { attachee.AIRemoveFromShitlist(pc); attachee.SetReaction(pc, 50); } var diamond = attachee.FindItemByName(12036); diamond.ClearItemFlag(ItemFlag.NO_TRANSFER); var amber = attachee.FindItemByName(12040); amber.ClearItemFlag(ItemFlag.NO_TRANSFER); var silver_medallion_necklace = attachee.FindItemByName(6197); silver_medallion_necklace.ClearItemFlag(ItemFlag.NO_TRANSFER); var emerald = attachee.FindItemByName(12010); emerald.ClearItemFlag(ItemFlag.NO_TRANSFER); var silver_necklace = attachee.FindItemByName(6194); silver_necklace.ClearItemFlag(ItemFlag.NO_TRANSFER); var dagger = attachee.FindItemByName(4058); dagger.ClearItemFlag(ItemFlag.NO_TRANSFER); var wand = attachee.FindItemByName(12007); wand.ClearItemFlag(ItemFlag.NO_TRANSFER); var chime = attachee.FindItemByName(12008); chime.ClearItemFlag(ItemFlag.NO_TRANSFER); var ring = attachee.FindItemByName(6083); ring.ClearItemFlag(ItemFlag.NO_TRANSFER); var kit = attachee.FindItemByName(12848); kit.ClearItemFlag(ItemFlag.NO_TRANSFER); return(RunDefault); }
public override bool OnDisband(GameObject attachee, GameObject triggerer) { foreach (var obj in triggerer.GetPartyMembers()) { if ((obj.GetNameId() == 8058 && !GetGlobalFlag(806))) { triggerer.RemoveFollower(obj); triggerer.BeginDialog(attachee, 1000); } } foreach (var pc in GameSystems.Party.PartyMembers) { attachee.AIRemoveFromShitlist(pc); attachee.SetReaction(pc, 50); } var ring = attachee.FindItemByName(6088); ring.ClearItemFlag(ItemFlag.NO_TRANSFER); return(RunDefault); }
public override bool OnStartCombat(GameObject attachee, GameObject triggerer) { if ((GetGlobalFlag(164))) { DetachScript(); } else if ((Utilities.obj_percent_hp(attachee) < 50)) { foreach (var pc in GameSystems.Party.PartyMembers) { if (pc.type == ObjectType.pc) { attachee.AIRemoveFromShitlist(pc); } } falrinth_escape(attachee, triggerer); DetachScript(); } return(RunDefault); }