Guest User

Untitled

a guest
Jun 26th, 2013
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 3.47 KB | None | 0 0
  1. #second priest of the nameless
  2. #63147
  3. #spawns in courtyard
  4.  
  5. sub EVENT_SPAWN {
  6. quest::modifynpcstat("special_attacks","SERFTMCNIDf");
  7. quest::shout("Behold!  The power of The Nameless.");
  8. $counter = 0;
  9. }
  10.  
  11. sub EVENT_COMBAT {
  12. if ($combat_state == 1) {
  13.     quest::shout("I will destroy you fools!  How dare you challenge me!");
  14.     quest::settimer("race",10);
  15.     quest::settimer("leach",50);
  16.     quest::settime("ae",70);
  17.     quest::setnexthpevent(80);
  18.     }
  19. if ($combat_state == 0) {
  20.     quest::stoptimer("race");
  21.     quest::stoptimer("leach");
  22.     quest::depopall(63149);
  23.     quest::depopall(63148);
  24.     quest::npcrace(1);
  25.     $npc->ChangeSize(5);
  26.     quest::shout("Foolish Mortals!");
  27.     $counter = 0;
  28.     quest::modifynpcstat("special_attacks","SERFTMCNIDf");
  29.     }
  30. }
  31.  
  32. sub EVENT_TIMER {
  33. if ($timer eq "leach") {
  34. my $TTarget = $npc->GetHateTop();
  35. quest::ze(4,"You feel your soul being ripped away...");
  36.     if ($TTarget) {
  37.         $npc->SpellFinished(4165,$TTarget);
  38.         }
  39.     }
  40. if ($timer eq "race") {
  41.     quest::npcrace(452);
  42.     $npc->ChangeSize(75);
  43.     quest::stoptimer("race");
  44.     }
  45. if ($timer eq "debuffirst") {
  46.     quest::stoptimer("debuffirst");
  47.     quest::settimer("debuff",70);
  48.     my @Hatelist = $npc->GetHateList();
  49.     foreach $i(@Hatelist) {
  50.         if ($i) {
  51.             my $hent = $i->GetEnt();
  52.             if ($hent) {
  53.                 $npc->SpellFinished(3496,$hent);
  54.                 }
  55.             }
  56.         }
  57.     }
  58. if ($timer eq "ae") {
  59. my @Hatelist = $npc->GetHateList();
  60. foreach $i(@Hatelist) {
  61.     if ($i) {
  62.         my $hent = $i->GetEnt();
  63.         if ($hent) {
  64.             $npc->SpellFinished(3498,$hent);
  65.             }
  66.         }
  67.     }
  68. }
  69. if ($timer eq "debuff") {
  70.     my @Hatelist = $npc->GetHateList();
  71.     foreach $i(@Hatelist) {
  72.         if ($i) {
  73.             my $hent = $i->GetEnt();
  74.             if ($hent) {
  75.                 $npc->SpellFinished(3496,$hent);
  76.                 }
  77.             }
  78.         }
  79.     }
  80. if ($timer eq "pull") {
  81.     my @Hatelist = $npc->GetHateList();
  82.     foreach $i(@Hatelist) {
  83.         if ($i) {
  84.             my $hent = $i->GetEnt();
  85.             if ($hent) {
  86.                 $npc->SpellFinished(2080,$hent);
  87.                 }
  88.             }
  89.         }
  90.     }
  91. }
  92.  
  93. sub EVENT_HP {
  94. if ($hpevent <= 80 && $hpevent >= 79) {
  95.     quest::shout("Feel my wraith!");
  96.     quest::settimer("debuffirst",3);
  97.     quest::setnexthpevent(60);
  98.     }
  99. if ($hpevent <= 60 && $hpevent >= 59) {
  100.     quest::shout("Tremble before my power!");
  101.     quest::ze(14,"The Ground begins to shake, Crystals rise out of the ground");
  102.     quest::spawn2(63148,0,0,255.6, 832.7,6.8,165.3);
  103.     quest::spawn2(63148,0,0,160.0,750.2,6.9,40.6);
  104.     quest::spawn2(63148,0,0,239.2,681.5,6.9,6.0);
  105.     quest::modifynpcstat("special_attacks","ABSERFTMCNIDf");
  106.     quest::setnexthpevent(30);
  107.     }
  108. if ($hpevent <= 30 && $hpevent >= 29) {
  109.     quest::ze(14,"You feel you skin rip away from you");
  110.     my @Hatelist = $npc->GetHateList();
  111.     foreach $i(@Hatelist) {
  112.     if ($i) {
  113.         my $hent = $i->GetEnt();
  114.         if ($hent) {
  115.             my $dmgamt = ($hent->GetHP() * .25);
  116.             $hent->Damage($npc,$dmgamt, 0, 1, 'FALSE', -1, 'FALSE');
  117.             $hent->Message(16, "The Priest's Eyes glow red.  You have taken $dmgamt of Non-Melee damage.");
  118.             }
  119.         }
  120.     }
  121. }
  122. }
  123.  
  124. sub EVENT_SIGNAL {
  125. if ($signal == 1) {
  126.     $counter += 1;
  127.     if ($counter == 3) {
  128.         quest::modifynpcstat("special_attacks","SERFTMCNIDf");
  129.         quest::ze(14,"The Priest of the Nameless roars with rage");
  130.         quest::depopall(63149);
  131.         $counter = 0;
  132.         }
  133.     }
  134. }
  135.  
  136. sub EVENT_DEATH {
  137. quest::stoptimer("pull");
  138. quest::stoptimer("debuff");
  139. quest::stoptimer("ae");
  140. quest::shout2("I will have my revenge!");
  141. quest::signalwith(63146,3,0);
  142. }
  143.  
  144. sub EVENT_KILLED_MERIT {
  145. my $globalname = "raidevent";
  146.  
  147. if (!defined $qglobals{$globalname}) {
  148.     quest::setglobal("$globalname",1,5,'H8');
  149.     }
  150. }
Advertisement
Add Comment
Please, Sign In to add comment