|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Quests::Q&A This is the quest support section |
03-28-2013, 02:56 PM
|
Sarnak
|
|
Join Date: Mar 2013
Posts: 65
|
|
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?
|
03-28-2013, 05:03 PM
|
Sarnak
|
|
Join Date: Mar 2013
Posts: 65
|
|
I can do this to 'kill' pets, but im not sure about mercs.
Code:
quest::selfcast(1285);
quest::selfcast(331);
|
03-28-2013, 05:19 PM
|
Discordant
|
|
Join Date: Jan 2013
Posts: 284
|
|
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.
|
03-28-2013, 08:09 PM
|
Dragon
|
|
Join Date: May 2010
Posts: 965
|
|
Quote:
Originally Posted by Zamthos
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.
|
03-28-2013, 09:42 PM
|
Discordant
|
|
Join Date: Jan 2013
Posts: 284
|
|
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.
|
03-28-2013, 10:18 PM
|
Sarnak
|
|
Join Date: Mar 2013
Posts: 65
|
|
there shouldnt be more than 1 merc per ID, unless something is horribly, horribly wrong.
thanks for the input guys.
|
|
|
|
03-28-2013, 10:19 PM
|
Discordant
|
|
Join Date: Jan 2013
Posts: 284
|
|
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
|
|
|
|
03-28-2013, 10:46 PM
|
|
Developer
|
|
Join Date: Aug 2006
Location: USA
Posts: 5,946
|
|
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().
|
03-28-2013, 11:16 PM
|
Discordant
|
|
Join Date: Jan 2013
Posts: 284
|
|
May I ask how exactly you could pull the exact Entity ID every time for every pet and mercenary?
|
03-28-2013, 11:25 PM
|
Demi-God
|
|
Join Date: Aug 2010
Posts: 1,742
|
|
|
03-28-2013, 11:29 PM
|
Discordant
|
|
Join Date: Jan 2013
Posts: 284
|
|
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!");
}
}
|
03-29-2013, 01:22 AM
|
Demi-God
|
|
Join Date: Aug 2010
Posts: 1,742
|
|
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.
|
03-29-2013, 01:14 PM
|
Dragon
|
|
Join Date: May 2010
Posts: 965
|
|
Quote:
Originally Posted by lerxst2112
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.
|
04-01-2013, 11:17 AM
|
Sarnak
|
|
Join Date: Mar 2013
Posts: 65
|
|
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 =)
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 09:31 PM.
|
|
|
|
|
|
|
|
|
|
|
|
|