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.

Reply
 
Thread Tools Display Modes
  #1  
Old 07-07-2016, 05:31 PM
emho24
Fire Beetle
 
Join Date: Sep 2013
Posts: 19
Default Custom spell help

I'd apprecate any assistance with a set of custom spells, point me in the right direction if you are able.

I'd like to create a set of custom spells that directly interact with each other. The first spell is a detrimental spell that will be used as an NPC aoe. It needs to be unresistable with no partial resists, but can be mitigated by a set percentage if the player has the correct resist buff.

Example:
- Boss casts custom aoe
- player 1 does not have the associated custom resist buff and gets hit with unresistable 1000 damage
- player 2 currently has the associated custom resist buff and 90% of the damage is mitgated, player gets hit with 100 damage.

Thoughts?
Reply With Quote
  #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
  #3  
Old 07-08-2016, 03:53 PM
emho24
Fire Beetle
 
Join Date: Sep 2013
Posts: 19
Default

Thanks, this was exactly what was looking for. So much to learn.

I was able to make some modifications to your example and get my stuff working as intended.
Reply With Quote
  #4  
Old 07-09-2016, 10:30 AM
Maze_EQ
Demi-God
 
Join Date: Mar 2012
Posts: 1,103
Default

I like kingly's way, but I always use two different spells for X and Y.

X has certain item/buff and Y not having.

I
__________________
"No, thanks, man. I don't want you fucking up my life, too."

Skype:
Comerian1
Reply With Quote
Reply


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 06:10 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