effects/quest::attack questions.
I have searched trying to find answers for these questions.
On sub EVENT_DEATH I would like a spell effect appear from the corpse location. How would I go about doing this. Also with this I am trying to get NPCs to attack another NPC upon spawning. The sub EVENT_SPAWN, quest::attack(NPC name or ID); will not make them attack. Is there a certain range they need to be in or am I just missing something. I even tried to use a signal so that after they have spawned a signal would do quest::attack but again nadda. |
I never used direct npc to npc attack command, but what I did, I had those npcs set on opposite factions, spawn npc near by and simply had him walk into the agro radius of the intented target. worked well enough
|
quest::castspell(id,spellid); - Casts "spell" on entity with "id".
That is about as close as you can get to having a spell effect. You should at least see the casting effects I think. But it will most likely cast whatever spell you chose on the target as well. So unless you make a custom spell in your spell file, it probably won't have the effect you are looking for. If you do edit your spell file, you can use one of the unused spells like "Free Spell" and just give it the casting effect you want to appear and then have no actual effects set to happen on the target. I think that would probably work like you want. As for quest::attack, I can't seem to get that working either. I am messing with it right now as a matter of fact and it is definitely giving me problems when I am trying to use the NPCID or the name. The NPCs are saying they are "unable to attack <NPCID>". |
I do not even get the Unable to attack message. They just stand there and go DUHH... Think there range might need to be adjusted. Thank you for the help. will keep trying and will see if that castspell works. Thanks.
|
Looks like there are other attack quest options that need to be used for NPCs. I will be messing with this tonight. I am sure this is why it wasn't working for me. I am glad to find this, as it will make the new event I was working on actually work :)
quest::attack("name"); - Attacks PLAYER "name", ONLY PLAYERS. quest::attacknpc(entity_id); - Attacks NPC with ID 'entity_id', NOT NPC TYPE! quest::attacknpctype(npc_type_id); - Attacks the first NPC in the zone with npc type 'npc_type_id' |
quest::attacknpctype(npc_type_id); Worked like a charm! Just wanted to let anyone know that might be curious in the future.
|
I will give that a try. Also if I can't get this figured out by the end of the week I plan to post the current scripts in hopes that someone can aid in making them work.
|
All times are GMT -4. The time now is 07:25 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.