Advertisement
randy336

[Trinity] Npc porter

Dec 7th, 2013
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.50 KB | None | 0 0
  1. class npc_guard : public CreatureScript
  2. {
  3. public:
  4.     npc_guard() : CreatureScript("npc_guard") { }
  5.  
  6.     struct npc_guardAI : public ScriptedAI
  7.     {
  8.         npc_guardAI(Creature* creature) : ScriptedAI(creature) {}
  9.  
  10.         void EnterCombat(Unit* who)
  11.         {
  12.             if (me->IsHostileTo(who)) who->ToPlayer()->TeleportTo(1, 1629.359985f, -4373.390137f, 33.097401f, 3.548390f);
  13.         };
  14.  
  15.         CreatureAI* GetAI(Creature* creature)
  16.         {
  17.             return new npc_guardAI(creature);
  18.         };
  19.     };
  20. };
  21.  
  22. void AddSC_npc_guard()
  23. {
  24.     new npc_guard();
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement