/* * This script is copyrighted by New World WoW server and can't be use or distributed without permission. * This script was made by ApoC [apoc@newworld.cz] */ #include "precompiled.h" #include "simple_ai.h" struct MANGOS_DLL_DECL npc_kolkar_wranglerAI : public SimpleAI { npc_kolkar_wranglerAI(Creature* c) : SimpleAI(c) { Spell[0].Spell_Id = 12024; Spell[0].First_Cast = 4000; Spell[0].Cooldown = 6000; Spell[0].CooldownRandomAddition = 5000; Spell[0].Cast_Target_Type = CAST_HOSTILE_TARGET; Spell[0].Enabled = true; Spell[1].Spell_Id = 6660; Spell[1].First_Cast = 1000; Spell[1].Cooldown = 6000; Spell[1].CooldownRandomAddition = 5000; Spell[1].Cast_Target_Type = CAST_HOSTILE_RANDOM; Spell[1].Enabled = true; } void JustDied(Unit* who) { if (who->GetTypeId() != TYPEID_PLAYER) return; Player* p = (Player*)who; if (p->GetQuestStatus(4285) == QUEST_STATUS_INCOMPLETE) { if (rand() % 1000 <= 100) { m_creature->SummonCreature(9456, 1.0f, 1.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 600000); } } } }; CreatureAI* GetAI_npc_kolkar_wranglerAI(Creature *_Creature) { return new npc_kolkar_wranglerAI(_Creature); } void AddSC_nw_barrens() { Script *newscript; newscript = new Script; newscript->Name="npc_kolkar_wrangler"; newscript->GetAI = GetAI_npc_kolkar_wranglerAI; newscript->RegisterSelf(); }