PDA

View Full Version : Kiling NPC with a quest


ChaosSlayer
01-21-2008, 11:55 AM
Is there a way to KILL an NPC with a quest command?

Like quest::killself?
or perhaps set ist curent hp to 0?
or deal leathal damage?

in otherwords I need NPC to DIE as a result of event, with dieing animation, faction hits to anyone on its agro list, corpse fading animation etc (i know I can just depop them but thats not the same thing)

thanks =)

ChaosSlayer
01-28-2008, 02:45 PM
anyone? =)

AndMetal
01-28-2008, 03:51 PM
I think you're looking for $npc->Kill().

Example:
sub EVENT_SAY {
if ($text=~/kill yourself/i) {
quest::say("As you wish, oh great one");
$npc->Kill();
}
}

Found here: QuestObjects (http://www.eqemulator.net/wiki/wikka.php?wakka=QuestObjects) (Wiki).

Something interesting about the quest system is that, basically, the quest:: commands are wrappers for the commands listed in the above Wiki article. For example, you can make an NPC say something using $npc->Say(), although that one in particular takes an additional option (format).

ChaosSlayer
01-28-2008, 04:27 PM
ahh thank you so much!
i will try it out. I was just over that list of comands you mentioned, unfortunately looking at that list and knowing how to use it is 2 diffirent things =)

speicaly when it comes to special "format" set up, as you said =)

there is another thing there which perhaps you could help me with.
I am looking at:

GetEquipmentColor(material_slot)
GetEquipmentMaterial(material_slot)
GetEquipment(material_slot)


could you tell me to properly use this?
I read that on one of the server they got npcs customly dressed by randomly assigning them material of armor by slot. I would like to try to do the same thing, just not sure how to write up this script.