Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Custom

Quests::Custom Custom Quests here

Reply
 
Thread Tools Display Modes
  #1  
Old 05-02-2017, 08:08 PM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,604
Default

You can actually do #npcedit setanimation 3 so they spawn feigned. Also, you were missing semi-colons and had an extra comma within your array at the top.

Here's your feigned NPC:
Code:
sub EVENT_SPAWN {
    quest::npcgender(int(rand(2)));
    quest::npcrace(quest::ChooseRandom(1, 4, 6, 7));
    quest::npctexture(quest::ChooseRandom(1, 2));
    quest::wearchange(7, quest::ChooseRandom(1. .3, 7, 8, 14));
}

sub EVENT_SIGNAL {
    if ($signal == 1) {
        quest::signalwith(101109, 2, int(rand(5)));
    }
}

sub EVENT_DEATH {
    quest::signalwith(101109, 3, int(rand(5)));
}
Here's your boss:
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::spawn2(101140, 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) {
        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.");
    }
}
These are completely untested, but give them a try and let me know.


Post-note: You don't have to define a variable for quest::ChooseRandom(), the return type is automatic so you can use it within methods.
Also, "==" is the numeric equality operator, "eq" is the string equality operator. Not that it really matters, but once you get in to more advanced code this may cause some issues (trust me).

Last edited by Kingly_Krab; 05-02-2017 at 08:14 PM..
Reply With Quote
  #2  
Old 05-02-2017, 08:31 PM
Osage's Avatar
Osage
Fire Beetle
 
Join Date: Jan 2017
Posts: 12
Default

Ok so the script you provided works just as the other did and is much cleaner so thank you for that!

However, when I did a #npcedit setanimation 3 on my feigned mobs I get the message "NPCID 101140 now has the animation set to 3 on spawn with spawngroup 0".

When I type the command Mob 1 falls down but when I spawn another Mob 2 is still standing... Do I need to assign a spawngroup for these mobs for it to work?

__________________
Currently Developing Rise of Norrath
Prestige Content now live!
http://theriseofnorrath.com/
https://discord.gg/KV3XrtG
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 09:04 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3