dorian
Messages : 5 Date d'inscription : 17/02/2011
| Sujet: NPC Anti PVP Ven 18 Fév - 19:25 | |
| Anti-PvP en version 3.3.5 - Code:
-
#include "ScriptPCH.h" #define bump 42435
/*Script Dorian*/
class custom_anti_pvpguard : public CreatureScript { public: custom_anti_pvpguard() : CreatureScript("custom_anti_pvpguard") { } struct custom_anti_pvpguardAI : public ScriptedAI { custom_anti_pvpguardAI (Creature *c) : ScriptedAI(c) {Reset();}
uint32 bump_Timer;
void Reset() { bump_Timer = 1000 ;
}
void UpdateAI(const uint32 diff) { if (!UpdateVictim()) return;
if (bump_Timer < diff) { DoCast(me->getVictim(),bump); bump_Timer = 1000; }else bump_Timer -= diff;
DoMeleeAttackIfReady(); } };
CreatureAI* GetAI (Creature* pCreature) const { return new custom_anti_pvpguardAI (pCreature); } };
void AddSC_custom_anti_pvpguard () { new custom_anti_pvpguard(); } | |
|