public override bool OnGossipSelect(Player player, GameObject go, uint sender, uint action) { player.PlayerTalkClass.ClearMenus(); if (action == eTradeskill.GossipActionInfoDef + 1) { player.CLOSE_GOSSIP_MENU(); Creature target = ScriptedAI.GetClosestCreatureWithEntry(player, GameobjectConst.NpcOuthouseBunny, 3.0f); if (target) { target.GetAI().SetData(1, (uint)player.GetGender()); go.CastSpell(target, GameobjectConst.SpellIndisposedIii); } go.CastSpell(player, GameobjectConst.SpellIndisposed); if (player.HasItemCount(GameobjectConst.ItemAnderholsSliderCider)) { go.CastSpell(player, GameobjectConst.SpellCreateAmberseeds); } return(true); } else { player.CLOSE_GOSSIP_MENU(); player.GetSession().SendNotification(GameobjectConst.GoAnderholsSliderCiderNotFound); return(false); } }
public override bool GossipSelect(Player player, uint menuId, uint gossipListId) { uint action = player.PlayerTalkClass.GetGossipOptionAction(gossipListId); player.ClearGossipMenu(); if (action == eTradeskill.GossipActionInfoDef + 1) { player.CloseGossipMenu(); Creature target = ScriptedAI.GetClosestCreatureWithEntry(player, CreatureIds.OuthouseBunny, 3.0f); if (target) { target.GetAI().SetData(1, (uint)player.GetNativeGender()); me.CastSpell(target, SpellIds.IndisposedIii); } me.CastSpell(player, SpellIds.Indisposed); if (player.HasItemCount(ItemIds.AnderholsSliderCider)) { me.CastSpell(player, SpellIds.CreateAmberseeds); } return(true); } else { player.CloseGossipMenu(); player.GetSession().SendNotification(GossipConst.AnderholsSliderCiderNotFound); return(false); } }
public void DeadEvent() { died = true; for (int i = 0; i < spellList.Length; i++) { if (spellList[i] != null) { Destroy(spellList[i].gameObject);//자신의 스펠 삭제 } } for (int i = 0; i < Land.allLand.Count; i++) { if (Land.allLand[i].LandUnit != null) { ScriptedAI targetAI = Land.allLand[i].LandUnit.gameObject.GetComponent <ScriptedAI>(); if (targetAI) { targetAI.DeleteThreatTarget(this); } } } if (diedEvent != null) { diedEvent();//죽었을때 이벤트발생(몬스터같은경우 던전스테이지갱신등) } Destroy(gameObject); }
public override bool OnGossipHello(Player player, GameObject go) { Creature creature = ScriptedAI.GetClosestCreatureWithEntry(go, CreatureIds.Muglash, SharedConst.InteractionDistance * 2); if (creature) { npc_muglash pEscortAI = creature.GetAI <npc_muglash>(); if (pEscortAI != null) { creature.GetAI().Talk(TextIds.SayMugBrazierWait); pEscortAI._isBrazierExtinguished = true; return(false); } } return(true); }
private void MobMovement_OnInitialize() { _scriptedAI = _parent.RequiredComponent <ScriptedAI>(); }
private void MobMovement_OnDestroy() { _entry = null; _scriptedAI = null; }