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 03-28-2013, 02:56 PM
vkrr
Sarnak
 
Join Date: Mar 2013
Posts: 65
Default How to Kill a players pet and mercenary

I'm looking for a way to kill a player's pet and mercenary by means of a quest without killing the player.


any suggestions?
Reply With Quote
  #2  
Old 03-28-2013, 05:03 PM
vkrr
Sarnak
 
Join Date: Mar 2013
Posts: 65
Default

I can do this to 'kill' pets, but im not sure about mercs.
Code:
			quest::selfcast(1285);
			quest::selfcast(331);
Reply With Quote
  #3  
Old 03-28-2013, 05:19 PM
Zamthos
Discordant
 
Join Date: Jan 2013
Posts: 284
Default

May I ask the functionality of this? Could they not just re-spawn the pet? And I don't believe there are any mercenary-related questmgr.cpp options, unless they've been recently added, so, as of my knowledge, there is no way to kill mercenaries using a Perl script.
Reply With Quote
  #4  
Old 03-28-2013, 08:09 PM
sorvani
Dragon
 
Join Date: May 2010
Posts: 966
Default

Quote:
Originally Posted by Zamthos View Post
And I don't believe there are any mercenary-related questmgr.cpp options, unless they've been recently added, so, as of my knowledge, there is no way to kill mercenaries using a Perl script.
A merc is an NPC and will be available in the entity list. So you can find it like that and then kill it or depop it or whatever.
Reply With Quote
  #5  
Old 03-28-2013, 09:42 PM
Zamthos
Discordant
 
Join Date: Jan 2013
Posts: 284
Default

True, but would that not depop all the mercenaries with the same ID? Or kill them all? I don't quite understand this, it's like sending a signal to increase it's damage 200x to a certain NPC ID and having multiple of it and making things unintentionally stronger, it'd be better if you could pinpoint a specific mercenary rather than send the signal or choose it from a entity list using an ID because it's very broad and will affect any of the NPCs with an equivalent ID. Supposed I was to send a signal to NPC ID 1, a hypothetical orc, and I only wanted it to do it to a specific one, there's no way I could make it specifically just that one, it would effect everything in that zone that has the NPC ID '1', so it would be very inefficient and more than likely, make players angry if their mercenary dies even if they're across the zone.
Reply With Quote
  #6  
Old 03-28-2013, 10:18 PM
vkrr
Sarnak
 
Join Date: Mar 2013
Posts: 65
Default

there shouldnt be more than 1 merc per ID, unless something is horribly, horribly wrong.

thanks for the input guys.
Reply With Quote
  #7  
Old 03-28-2013, 10:19 PM
Zamthos
Discordant
 
Join Date: Jan 2013
Posts: 284
Default

It's the same NPC ID, named differently, just like pets. There are only 40 IDs for them.

Code:
1	1	1	1	Apprentice Tank - Tier I
2	1	2	1	Apprentice Tank - Tier II
3	1	3	1	Apprentice Tank - Tier III
4	1	4	1	Apprentice Tank - Tier IV
5	1	5	1	Apprentice Tank - Tier V
6	2	1	1	Journeyman Tank - Tier I
7	2	2	1	Journeyman Tank - Tier II
8	2	3	1	Journeyman Tank - Tier III
9	2	4	1	Journeyman Tank - Tier IV
10	2	5	1	Journeyman Tank - Tier V
11	1	1	2	Apprentice Healer - Tier I
12	1	2	2	Apprentice Healer - Tier II
13	1	3	2	Apprentice Healer - Tier III
14	1	4	2	Apprentice Healer - Tier IV
15	1	5	2	Apprentice Healer - Tier V
16	2	1	2	Journeyman Healer - Tier I
17	2	2	2	Journeyman Healer - Tier II
18	2	3	2	Journeyman Healer - Tier III
19	2	4	2	Journeyman Healer - Tier IV
20	2	5	2	Journeyman Healer - Tier V
21	1	1	9	Apprentice Melee DPS - Tier I
22	1	2	9	Apprentice Melee DPS - Tier II
23	1	3	9	Apprentice Melee DPS - Tier III
24	1	4	9	Apprentice Melee DPS - Tier IV
25	1	5	9	Apprentice Melee DPS - Tier V
26	2	1	9	Journeyman Melee DPS - Tier I
27	2	2	9	Journeyman Melee DPS - Tier II
28	2	3	9	Journeyman Melee DPS - Tier III
29	2	4	9	Journeyman Melee DPS - Tier IV
30	2	5	9	Journeyman Melee DPS - Tier V
31	1	1	12	Apprentice Caster DPS - Tier I
32	1	2	12	Apprentice Caster DPS - Tier II
33	1	3	12	Apprentice Caster DPS - Tier III
34	1	4	12	Apprentice Caster DPS - Tier IV
35	1	5	12	Apprentice Caster DPS - Tier V
36	2	1	12	Journeyman Caster DPS - Tier I
37	2	2	12	Journeyman Caster DPS - Tier II
38	2	3	12	Journeyman Caster DPS - Tier III
39	2	4	12	Journeyman Caster DPS - Tier IV
40	2	5	12	Journeyman Caster DPS - Tier V
Reply With Quote
  #8  
Old 03-28-2013, 10:46 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

They are referring to Entity ID, which will always be unique.

As mentioned, I don't think there are any merc specific functions exported to perl yet. So, it might be hard to associate a merc with its owner. Though, something as simple as GetOwner() might work. I don't recall offhand if that applies properly to mercs from the class Mob version or if it only works from the merc specific override of GetOwner().
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #9  
Old 03-28-2013, 11:16 PM
Zamthos
Discordant
 
Join Date: Jan 2013
Posts: 284
Default

May I ask how exactly you could pull the exact Entity ID every time for every pet and mercenary?
Reply With Quote
  #10  
Old 03-28-2013, 11:25 PM
lerxst2112
Demi-God
 
Join Date: Aug 2010
Posts: 1,743
Default

http://www.eqemulator.net/wiki/wikka...ListIterations
Reply With Quote
  #11  
Old 03-28-2013, 11:29 PM
Zamthos
Discordant
 
Join Date: Jan 2013
Posts: 284
Default

A foreach to check a certain NPC type and use every entity ID from it? Not exactly what I meant.

This would pull all entity IDs for the one NPC and perform the action for all of them, not a singular Entity, I know this is possible, however I want to see how you can logistically work it out in the least problematic manner.
Code:
if($text=~/npc/i)
{
	my @npclist = $entity_list->GetNPCList();
	foreach $ent (@npclist)
	{
	    $ent->Shout("I'm a npc!");
	}
}
Reply With Quote
  #12  
Old 03-29-2013, 01:22 AM
lerxst2112
Demi-God
 
Join Date: Aug 2010
Posts: 1,743
Default

Loop through the list and check each one to decide if it belongs to player X or not. If it does, do the thing you want to do, otherwise, skip it.

The debate is if there is a way currently exposed to Perl that allows you to tie a merc to a player. As Trevius said above, GetOwner() might work. I haven't messed with Mercs on the emu yet, but if they are named like they are on live then it might be possible to get at the <Soandso's mercenary> string and match them that way.
Reply With Quote
  #13  
Old 03-29-2013, 01:14 PM
sorvani
Dragon
 
Join Date: May 2010
Posts: 966
Default

Quote:
Originally Posted by lerxst2112 View Post
Loop through the list and check each one to decide if it belongs to player X or not. If it does, do the thing you want to do, otherwise, skip it.

The debate is if there is a way currently exposed to Perl that allows you to tie a merc to a player. As Trevius said above, GetOwner() might work. I haven't messed with Mercs on the emu yet, but if they are named like they are on live then it might be possible to get at the <Soandso's mercenary> string and match them that way.
They are so that could work if the title is available.
Reply With Quote
  #14  
Old 04-01-2013, 11:17 AM
vkrr
Sarnak
 
Join Date: Mar 2013
Posts: 65
Default

for what it's worth, I was using this as part of a comprehensive 'rebirth' package on my server. A player reaches max level and then has a chance to be born again as a different class.
Once any pets are dead and buffs are stripped, the class change is forced which disconnects the player, when they log back in the mercenary is back to level 1 with them so problem solved =)
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 02:06 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