Go Back   EQEmulator Home > EQEmulator Forums > Support > Support::General Support

Support::General Support Post all topics here having to do with errors while trying to connect to an EQEMu server but not about the setup/running of the Server itself.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 07-07-2016, 08:48 PM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,603
Default

The custom spell is the easy part really, you just have to write the encounter based on if the client has X buff or not they receive Y damage. This is just an example and definitely is not a final version to say the least, I'm just trying to show you how to do it.
Code:
sub EVENT_SPAWN {
    quest::setnexthpevent(80);
}

sub EVENT_HP {
    if ($hpevent ~~ [20, 40, 60, 80]) {
        Spell();
        quest::setnexthpevent(($hpevent - 20));
    }
}

sub Spell {
    my @hate = $npc->GetHateList();
    foreach my $hate_ent (@hate) {
        if ($hate_ent->GetEnt()->IsClient()) {
            if ($hate_ent->GetEnt()->FindBuff(X)) {
                $hate_ent->GetEnt()->Damage(100);
                $hate_ent->GetEnt()->Message(315, "You have been hit for 100 points of damage, mitigating 900 damage because you have X buff.");
            } else {
                $hate_ent->GetEnt()->Damage(1000);
                $hate_ent->GetEnt()->Message(315, "You have been hit for 1,000 points of damage because you did not have X buff.");
            }
        }
    }
}
Reply With Quote
 


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:09 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