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

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

Reply
 
Thread Tools Display Modes
  #1  
Old 08-27-2008, 04:38 PM
kayen85
Sarnak
 
Join Date: Dec 2007
Posts: 50
Default Quest function to cause mob to be damaged?

I want MobA to loose say 100 hps every time MobB is killed.

I can't quite find the code that allows this to happen, though still playing around. Figured this probably isn't a complicated one. If anyone knows let me know.

Thanks
Reply With Quote
  #2  
Old 08-27-2008, 04:49 PM
kayen85
Sarnak
 
Join Date: Dec 2007
Posts: 50
Default nevermind

Figured it out 2 minutes after posting was just a syntax error in what I thought should have worked. Found it in the quest object section of wiki.

$npc->Damage($npc, 100, spell_ID, skill_value, true, -1, false);

Works well.
Reply With Quote
  #3  
Old 08-27-2008, 04:56 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Quest Tutorial Wiki Page:
http://www.eqemulator.net/wiki/wikka...=QuestTutorial

Quest Objects Wiki Page:
http://www.eqemulator.net/wiki/wikka...a=QuestObjects

The only subs you will need should be:
sub EVENT_DEATH
sub EVENT_SIGNAL

And you will probably want to use a signal for the dead NPC to send a signal to the boss. Then, when the boss gets the signal, they remove 100 hps from themselves.
Code:
quest::signal(npc_id, [wait]) - cause an EVENT_SIGNAL on all mobs in the zone with this NPC type, with $signalid = 0. wait is an optional time to wait in ms before sending signal.
quest::signalwith(npc_id,signal_id, [wait]) - same as signal(), except it sets $signal to the supplied signal_id. wait is an optional time to wait in ms before sending signal.

The only tricky part is doing the actual set amount of damage. You might be able to use this command:
Code:
$npc->Damage(from, damage, spell_id, attack_skill, avoidable= true, buffslot= -1, iBuffTic= false);
Though I have no idea what settings to put in there.

But, you might also be able to use something simpler like:
Code:
$mob->SetHP($mob->GetHP() - 100);
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
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 07:37 PM.


 

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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3