Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 10-26-2013, 01:24 AM
Township EQ
Hill Giant
 
Join Date: Sep 2013
Posts: 118
Default "Spell" Quest

Hey guys.

I'm trying to make a lifetap proc that does 25% of a target's current HP with a maximum of 500. The problem I'm running into is it seems like the actual script is correct but it's not executing for some reason.

Here's what I did. I copied and existing lifetap spell, and took out the damage, so it is a blank spell. The ID of this blank spell is 8558. I then created a file called 8558 and put it in my global\spells folder. I've done a server restart and countless #reloadqst's and I can spam cast this all day on things and it still doesn't work. Here's the script.

Please note, this is my first attempt to do anything that I deem as non-simple so hopefully you guys wont tear it apart too hard :P

I uploaded a picture as well because the code thing messes up spacing.



Code:
sub EVENT_SPELL_EFFECT_CLIENT {

                              my $client = $entity_list->GetClientByID($caster_id);
                              my $ClientTarget = $Client->GetTarget();
   
if($ClientTarget->IsNPC()) {	 
    TESTLIFETAP();
    }
}








sub TESTLIFETAP {
                              my $client = $entity_list->GetClientByID($caster_id);
                              my $ClientTarget = $Client->GetTarget();
                              my $TargetsCurrentHP = $ClientTarget->GetHP();
                              my $Targets25pctCurrentHP = ($TargetsCurrentHP * 0.25);
							  
   if($TargetsCurrentHP >= 500) {  
   
            $ClientTarget->SetHP($TargetsCurrentHP - 500);
			$client->Emote("hit $ClientTarget for ".($TargetsCurrentHP - 500)." points of non-melee damage.");
		    }
   elsif($TargetsCurrentHP < 500) {
            $ClientTarget->SetHP($TargetsCurrentHP - $Targets25pctCurrentHP);
			$client->Emote("hit $ClientTarget for ".($TargetsCurrentHP - $Targets25pctCurrentHP)." points of non-melee damage.");
            }
}


                        my $client = $entity_list->GetClientByID($caster_id);
                              my $ClientTarget = $Client->GetTarget();
							  
   if($TargetsCurrentHP >= 500) {  
   
            $ClientTarget->SetHP($TargetsCurrentHP - 500);
			$client->Emote("hit $ClientTarget for ".($TargetsCurrentHP - 500)." points of non-melee damage.");
		    }
   elsif($TargetsCurrentHP < 500) {
            $ClientTarget->SetHP($TargetsCurrentHP - $Targets25pctCurrentHP);
			$client->Emote("hit $ClientTarget for ".($TargetsCurrentHP - $Targets25pctCurrentHP)." points of non-melee damage.");
            }
}
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:27 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