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 |
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. |
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. 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); But, you might also be able to use something simpler like: Code:
$mob->SetHP($mob->GetHP() - 100); |
All times are GMT -4. The time now is 01:03 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.