View Single Post
  #3  
Old 10-01-2017, 12:15 PM
Nerdgasm
Discordant
 
Join Date: Apr 2013
Posts: 426
Default

Quote:
Originally Posted by phentop View Post
I know most of these posts are old, but - what do you do with these scripts? save them as .pl files? put them in the quest folder? put them in the plugins folder? Global? I have 0 knowledge of writing these quests, but I can follow directions. Anyone have directions for quests like these on the forums.
You can do it one of two ways... Take the script and put it in Notepad ++ and save the file under whatever zone you have that npc and name the script Mob_Name.pl

Example; if I had a mob in Tipt with that script and his name was Deathbringer_Greo I would paste this script into notepad ++

Code:
sub EVENT_COMBAT {
  if($combat_state == 1) {
  quest::say("You won't be the first to desecrate the land of the unliving.");
  quest::settimer("dostuff",int(rand(24)) + 1);
  quest::settimer("spawncorpse",1);
  }
  elsif($combat_state == 0) {
  $npc->SetHP($npc->GetMaxHP());
  quest::depopall(999348);
  quest::stoptimer("dostuff"); 
  quest::stoptimer("spawncorpse"); 
  }  
}

sub EVENT_DEATH {
  quest::stoptimer("dostuff"); 
  quest::stoptimer("spawncorpse"); 
  quest::depopall(999348);
  quest::say("My ancestors will make you pay for this intrusion.");
 }
 
sub EVENT_TIMER {  
  if($timer == "dostuff") { 
   quest::stoptimer("dostuff"); 
   quest::emote("begins to draw power from his undead victims.");
   quest::signalwith(999348,1,0); #signal 1 to adventurercorpse for damage increase.. if alive they signal back signal 2
   quest::settimer("dostuff",int(rand(24)) + 1);
   }
   if($timer == "spawncorpse") {
   quest::stoptimer("spawncorpse");  
   quest::spawn2(999348,0,0,$x + int(rand(35)),$y + int(rand(35)),$z,0);
   quest::settimer("spawncorpse",int(rand(24)) + 1);
   }   
}

 
sub EVENT_SIGNAL {
  if($signal == 2) { #Players didn't kill corpses.. increase min/max damage by 10/25 respectively
   quest::modifynpcstat("min_hit", $npc->GetMinDMG() + 10);
   quest::modifynpcstat("max_hit", $npc->GetMaxDMG() + 25);
   }
  if($signal == 3) { #Player killed corpse reducing damage
   quest::modifynpcstat("min_hit", $npc->GetMinDMG() - 10);
   quest::modifynpcstat("max_hit", $npc->GetMaxDMG() - 25);
   quest::emote("has lost a portion of his stolen power.");
   }
}
and name is Deathbringer_Greo.pl saving it inside ::Quests/tipt::

Do the same for the rest of the scripts but name them as needed (the corpses would be corpses.pl in ::Quests/Tipt:: etc)

If you need extensive help I can help you via Teamviewer or what not... just let me know. =)
__________________
I am the All Mighty Mittens!
Reply With Quote