PDA

View Full Version : NPC casting types


ChaosSlayer
06-30-2008, 11:07 PM
I am trying to determine casting example for various types of npc script casting.

1st type is when npc quets script makes player to cast spell on self - as if player has casted it and i belive these spells also unresisteable.


EXAMPLE:

quest::say("Binding your soul. You will return here when you die.");
quest::selfcast(2049);


Now there are types, are when npc casts spell on a player - like when npc trying to nuke the player OR on another npc - could anyone post simple exmaple?


and finaly, when npc would cast spell on itself (like buff) - again exmaple?

any other posible variations?

AndMetal
07-03-2008, 01:16 AM
From the Wiki (http://www.eqemulator.net/wiki/wikka.php?wakka=QuestTutorial):


quest::castspell(id,spellid) - Casts "spell" on entity with "id". This is buggy, if it does not work try $npc->CastSpell(id,spellid)
quest::selfcast(spellid) - Forces client to cast spell on themself (useful for self only and group effect spells).


That's pretty much it. For quest::castspell/$npc->CastSpell(id,spellid), you would need the entity's ID. If you are trying to get one for an NPC, I believe you can use one of the following quest objects (http://www.eqemulator.net/wiki/wikka.php?wakka=QuestObjects):


$entity_list->GetMobByNpcTypeID(get_id);
$entity_list->GetMobID(id);
$entity_list->GetMob(name);

KLS
07-03-2008, 01:46 AM
$npc should also function as the object for the npc giving the quest assuming it's not a player quest.