Guest User

Untitled

a guest
Jun 26th, 2013
278
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 3.87 KB | None | 0 0
  1. sub EVENT_SPAWN {
  2. quest::modifynpcstat("min_hit",1595);
  3. quest::modifynpcstat("max_hit",2000);
  4. $counter = 0;
  5. $counter1 = 0;
  6. $counter2 = 0;
  7. $counter3 = 0;
  8. $counter4 = 0;
  9. $counter5 = 0;
  10. }
  11.  
  12. sub EVENT_COMBAT {
  13. if ($combat_state == 1) {
  14.     quest::settimer("adds",75);
  15.     quest::shout("Aggro");
  16.     quest::setnexthpevent(50);
  17.     }
  18. if ($combat_state == 0) {
  19.     quest::npcsize(15);
  20.     quest::stoptimer("adds");
  21.     quest::stoptimer("adds2");
  22.     quest::stoptimer("poison");
  23.     quest::stoptimer("disease");
  24.     quest::stoptimer("deathtouch");
  25.     quest::stoptimer("armorbreak");
  26.     quest::shout("De Aggro");
  27.     $counter = 0;
  28.     $counter1 = 0;
  29.     $counter2 = 0;
  30.     $counter3 = 0;
  31.     $counter4 = 0;
  32.     $counter5 = 0;
  33.     quest::depop(402145);
  34.     quest::depop(402146);
  35.     quest::depop(402147);
  36.     quest::depop(402148);
  37.     quest::depopall(402149);
  38.     }
  39. }
  40.  
  41. sub EVENT_TIMER {
  42. if ($timer eq "adds") {
  43.     quest::shout("Come my servants!  Do away with these interlopers!");
  44.     quest::spawn2(402145,540947,0,-1,1499.1,-228.6,129.0);
  45.     quest::spawn2(402146,540948,0,-97.4,1400.0,-228.6,62.8);
  46.     quest::spawn2(402147,540945,0,-0.3,1273.1,-228.6,0.1);
  47.     quest::spawn2(402148,540946,0,94.8,1400.0,-228.6,192.3);
  48.     }
  49. if ($timer eq "adds2") {
  50.     quest::shout("You will not win!");
  51.     quest::spawn2(402145,0,0,-1,1499.1,-228.6,129.0);
  52.     quest::spawn2(402146,0,0,-97.4,1400.0,-228.6,62.8);
  53.     quest::spawn2(402147,0,0,-0.3,1273.1,-228.6,0.1);
  54.     quest::spawn2(402148,0,0,94.8,1400.0,-228.6,192.3);
  55.     }
  56. if ($timer eq "disease") {
  57. my @ClientList = $entity_list->GetClientList();
  58. foreach $i(@ClientList) {
  59.     if ($i) {
  60.         $npc->SpellFinished(5188, $i);
  61.         }
  62.     }
  63. }
  64. if ($timer eq "armorbreak") {
  65. my @ClientList = $entity_list->GetClientList();
  66. foreach $i(@ClientList) {
  67.     if ($i) {
  68.         $i->SpellFinished(5190, $i);
  69.         }
  70.     }
  71. }
  72. if ($timer eq "poison") {
  73. my @ClientList = $entity_list->GetClientList();
  74. foreach $i(@ClientList) {
  75.     if ($i) {
  76.         $npc->SpellFinished(5189, $i);
  77.         }
  78.     }
  79. }
  80.  
  81. if ($timer eq "deathtouch") {
  82. my @ClientList = $entity_list->GetClientList();
  83. my $target = $ClientList[rand @ClientList];
  84.     if ($target) {
  85.         $npc->SpellFinished(7477,$target); #Cazic Touch 2
  86.         }
  87.     }
  88. }
  89.  
  90. sub EVENT_HP {
  91. if ($hpevent <= 50 && $hpevent >= 49) {
  92.     quest::shout("Come my Children!");
  93.     quest::spawn2(402145,0,0,-1,1499.1,-228.6,129.0);
  94.     quest::spawn2(402146,0,0,-97.4,1400.0,-228.6,62.8);
  95.     quest::spawn2(402147,0,0,-0.3,1273.1,-228.6,0.1);
  96.     quest::spawn2(402148,0,0,94.8,1400.0,-228.6,192.3);
  97.     quest::stoptimer("adds");
  98.     quest::settimer("adds2",45);
  99.     }
  100. }
  101.  
  102. sub EVENT_SIGNAL {
  103. my $npcname = $npc->GetCleanName();
  104.  
  105. if ($signal == 1) {
  106.     $minhit += 1595;  #update with balanced minhit, bases, should scale +100 on each end
  107.     $maxhit += 2000;  #update with balanced maxhit, bases, should scale +100 on each end
  108.     $counter += 1;
  109.     quest::ze(14,"$npcname Grows in Size");
  110.     $size = $counter;
  111.     quest::npcsize(15 + $size);
  112.     quest::modifynpcstat("min_hit",$minhit + 100); #balance
  113.     quest::modifynpcstat("max_hit",$maxhit + 200); #Balance5
  114.     $npc->SetHP($npc->GetHP() + 122500); #set for proper %s. 5% per mob will be #
  115.     }
  116. if ($signal == 2) { #Southern Mobs
  117.     $counter2 += 1;
  118.     if ($counter2 == 2) {
  119.         quest::settimer("disease", 50);
  120.         }
  121. }
  122. if ($signal == 3) { #Northern Mobs
  123.     $counter3 += 1;
  124.     if ($counter3 == 2) {
  125.         quest::settimer("armorbreak", 40);
  126.         }
  127.     }
  128. if ($signal == 4) { #Eastern Mobs
  129.     $counter4 += 1;
  130.     if ($counter4 == 2) {
  131.         quest::settimer("poison", 45);
  132.         }
  133.     }
  134. if ($signal == 5) { #Western Mobs
  135.     $counter5 += 1;
  136.     if ($counter5 == 2) {
  137.         quest::settimer("deathtouch", 60); #Random Client DT
  138.         quest::shout("DT");
  139.         }
  140.     }
  141. }
  142.  
  143. sub EVENT_SLAY {  #Raises another Servant, this one is aggro and fights tho.
  144. if ($npc && $entity_list) {
  145.     quest::shout("Rise!  Serve your new master!");
  146.     my $entida = quest::spawn2(402149,0,0,$x,$y,$z,$h); #need to get NPCid for this shit.
  147.     if ($entida) {
  148.         $entida->CastToNPC()->AddToHateList($npc->GetHateTop(),1);
  149.         }
  150.     }
  151. }
Advertisement
Add Comment
Please, Sign In to add comment