View Single Post
  #13  
Old 05-02-2017, 10:06 PM
Osage's Avatar
Osage
Fire Beetle
 
Join Date: Jan 2017
Posts: 12
Default

Ok I figured out how to find the spawngroup in the spawngroup table sorry if anyone hurt their forehead slapping it while looking at my previous post lol. My results were limited to 100,000 so they weren't showing up a simple filter solved that problem.

Code:
sub EVENT_COMBAT {
    if ($combat_state == 1) {
        quest::say("You won't be the first to desecrate the halls of my ancestors.");
        quest::settimer("dostuff", int(rand(24)) + 1);
        quest::settimer("spawncorpse", 1);
    } else {
        $npc->SetHP($npc->GetMaxHP());
        quest::depopall(101140);
        quest::stoptimer($_) for ("dostuff", "spawncorpse");
    }
}

sub EVENT_DEATH {
    quest::stoptimer("dostuff");
    quest::stoptimer("spawncorpse");
    quest::depopall(101140);
    quest::say("My ancestors will make you pay for this intrusion.");
}

sub EVENT_TIMER {
    if ($timer eq "dostuff") {
        quest::stoptimer("dostuff");
        quest::emote("begins to draw power from his deceased victims.");
        quest::signalwith(101140, 1, 0);# signal 1 to adventurercorpse for damage increase..if alive they signal back signal 2
        quest::settimer("dostuff", int(rand(24)) + 1);
    } elsif($timer eq "spawncorpse") {
        quest::stoptimer("spawncorpse");
        quest::enable_spawn2(275122); # Enables this spawn group to start spawning again once the respawn timer is up for it.
        quest::settimer("spawncorpse", int(rand(24)) + 1);
    }
}

sub EVENT_SIGNAL {
    if ($signal == 2) {
        quest::modifynpcstat("min_hit", $npc->GetMinDMG() + 10);
        quest::modifynpcstat("max_hit", $npc->GetMaxDMG() + 25);
    } elsif($signal == 3) {
        quest::modifynpcstat("min_hit", $npc->GetMinDMG() - 10);
        quest::modifynpcstat("max_hit", $npc->GetMaxDMG() - 25);
        quest::emote("has lost a portion of his stolen power.");
    }
}
So I implemented the spawngroup function and created a spawngroup for my feigned NPC's. I cant figure out however how to get the NPC's to spawn at random... Am I going to have to create multiple spawn locations for this spawngroup and if so how do I get the script to choose just 1 at random intervals in the fight?
__________________
Currently Developing Rise of Norrath
Prestige Content now live!
http://theriseofnorrath.com/
https://discord.gg/KV3XrtG
Reply With Quote