EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Q&A (https://www.eqemulator.org/forums/forumdisplay.php?f=599)
-   -   NPC casting types (https://www.eqemulator.org/forums/showthread.php?t=25604)

ChaosSlayer 06-30-2008 11:07 PM

NPC casting types
 
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:

Quote:

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:

Code:

$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.


All times are GMT -4. The time now is 02:03 PM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.