Guest User

Untitled

a guest
Aug 6th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 3.75 KB | None | 0 0
  1. sub EVENT_SAY{
  2.     if($text=~/hail/i && ($npc->GetRace() <= 12 || $npc->GetRace() == 522)){
  3.         quest::say("I want nothing to do with you");
  4.         plugin::DoAnim(quest::ChooseRandom("shakeno", "disgusted"));
  5.     }
  6.     if($text=~/hail/i){
  7.         if($npc->GetCleanName()=~/mournful/i){
  8.             quest::say("Please help me ". $name . " I've been trapped here for sooo long....");
  9.             plugin::DoAnim("plead");
  10.         }
  11.     }
  12.     if($text=~/hail/i && (substr($npc->GetName(), 0, 1) eq "#" && substr($npc->GetName(), 1, 2) ne "#")){
  13.         quest::say("Yes, we know...");
  14.     }
  15. }
  16.  
  17. $dpsType = 0;
  18. $spawnTimes = 0;
  19. $SecBase = 550000;
  20. $tempus = 0;
  21.  
  22. sub EVENT_AGGRO {
  23.     ### Named NPC
  24.     if(substr($npc->GetName(), 0, 1) eq "#" && substr($npc->GetName(), 1, 2) ne "#"){
  25.         quest::setnexthpevent(5);
  26.     }
  27. }
  28.  
  29. sub EVENT_COMBAT{
  30.     quest::emote("gives you a disgusting look");
  31.     #plugin::NPCCombat();
  32.     my $npc_name = $npc->GetCleanName();
  33.     if($combat_state == 1){
  34.         $RandInt = plugin::RandomRange(1, 100);
  35.         if($RandInt < 99){
  36.             quest::setnexthpevent(50);
  37.         }
  38.         ###Break down aggro messages...
  39.         if($npc_name=~//i){
  40.             quest::say(quest::ChooseRandom("What are you doing here! I am going to make you pay for what you've done!",
  41.             "You will pay dearly $race!",
  42.             "Why can't we be left alone?",
  43.             "Our kind will take care of you...",
  44.             "All will be greatful after I am done with you",
  45.             "Our kind won't be trampled by the likes of you anymore..."
  46.             ));
  47.         }
  48.         ### Named NPC
  49.         if(substr($npc->GetName(), 0, 1) eq "#" && substr($npc->GetName(), 1, 2) ne "#"){
  50.             if ($combat_state == 1) {
  51.                quest::settimer(1,5); ## Fast DPS
  52.                quest::settimer(2,60); ## Med DPS
  53.                quest::settimer(3,90); ## Low DPS
  54.             }
  55.         }
  56.     }
  57. }
  58.  
  59. sub EVENT_TIMER {
  60.     ### Named NPC
  61.     if(substr($npc->GetName(), 0, 1) eq "#" && substr($npc->GetName(), 1, 2) ne "#"){
  62.         if ($tempus == 0) {
  63.             if ($timer == 1) {
  64.                 $dpsType = 1;
  65.                 $spawnTimes = 5;
  66.                 quest::stoptimer(1);
  67.             }
  68.             elsif ($timer == 2) {
  69.                 $dpsType = 2;
  70.                 $spawnTimes = 4;
  71.                 quest::stoptimer(2);
  72.             }
  73.             elsif ($timer == 3){
  74.                 $dpsType = 3;
  75.                 $spawnTimes = 3;
  76.                 quest::stoptimer(3);
  77.             }
  78.         }
  79.     }
  80. }
  81.  
  82. sub EVENT_HP {
  83.     ### Named NPC
  84.     my $npc_name = $npc->GetCleanName();
  85.     if($hpevent == 50 && $npc_name =~/a_/i){
  86.         CloneAppearanceEXP();
  87.         quest::addloot(1079);
  88.     }
  89.     if(substr($npc->GetName(), 0, 1) eq "#" && substr($npc->GetName(), 1, 2) ne "#"){
  90.         if ($spawnTimes > 1)  {
  91.             if ($hpevent == 5) {
  92.                 if ($dpsType == 1) {
  93.                     $npc->SetHP($SecBase);
  94.                     quest::stoptimer(1);
  95.                     quest::stoptimer(2);
  96.                     quest::stoptimer(3);
  97.                     quest::setnexthpevent(5);
  98.                     $tempus = 1;
  99.                     $spawnTimes = $spawnTimes-1;
  100.                 }
  101.                 elsif ($dpsType == 2) {
  102.                     quest::shout("HP EVENT - dpsType = 2");
  103.                     $npc->SetHP($SecBase);
  104.                     quest::stoptimer(1);
  105.                     quest::stoptimer(2);
  106.                     quest::stoptimer(3);
  107.                     quest::setnexthpevent(5);
  108.                     $tempus = 1;
  109.                     $spawnTimes = $spawnTimes-1;
  110.                 }
  111.                 elsif ($dpsType == 3) {
  112.                     quest::shout("HP EVENT - dpsType = 3");
  113.                     $npc->SetHP($SecBase);
  114.                     quest::stoptimer(1);
  115.                     quest::stoptimer(2);
  116.                     quest::stoptimer(3);
  117.                     quest::setnexthpevent(5);
  118.                     $tempus = 1;
  119.                     $spawnTimes = $spawnTimes-1;
  120.                 }
  121.                 else {
  122.                     quest::depop();
  123.                 }
  124.             }
  125.         }
  126.     }
  127. }
  128.  
  129. sub EVENT_DEATH {
  130.     ### Named NPC
  131.     if(substr($npc->GetName(), 0, 1) eq "#" && substr($npc->GetName(), 1, 2) ne "#"){
  132.         quest::stoptimer(1);
  133.         quest::stoptimer(2);
  134.         quest::stoptimer(3);
  135.         $dpsType = 0;
  136.         $spawnTimes = 0;
  137.         $tempus = 0;
  138.     }
  139. }
  140.  
  141. sub CloneAppearanceEXP{
  142.     quest::npcrace(549);
  143.     quest::npctexture(quest::ChooseRandom(1, 2, 3, 4, 5));
  144.     quest::npcsize(12);
  145.     $npc->TempName("Plasma Remains");
  146.     quest::emote("convulses and reveals its true identity... ");
  147.     ##quest::say("transforming");
  148. }
Add Comment
Please, Sign In to add comment