Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class npc_guard : public CreatureScript
- {
- public:
- npc_guard() : CreatureScript("npc_guard") { }
- struct npc_guardAI : public ScriptedAI
- {
- npc_guardAI(Creature* creature) : ScriptedAI(creature) {}
- void EnterCombat(Unit* who)
- {
- if (me->IsHostileTo(who)) who->ToPlayer()->TeleportTo(1, 1629.359985f, -4373.390137f, 33.097401f, 3.548390f);
- };
- CreatureAI* GetAI(Creature* creature)
- {
- return new npc_guardAI(creature);
- };
- };
- };
- void AddSC_npc_guard()
- {
- new npc_guard();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement