Jump to content
  • 0

Targeting issues with pet performance through autocast


Humble_Bee

Question


  • Group:  Members
  • Topic Count:  54
  • Topics Per Day:  0.03
  • Content Count:  112
  • Reputation:   9
  • Joined:  09/22/19
  • Last Seen:  

(Note: This issue was solved.)

So I was able to trigger pets to perform when I autocast a skill by doing this in skill.cpp:

 

Spoiler

    case NPC_EMOTION_ON:
    case NPC_EMOTION:
        //val[0] is the emotion to use.
        //NPC_EMOTION & NPC_EMOTION_ON can change a mob's mode 'permanently' [Skotlex]
        //val[1] 'sets' the mode
        //val[2] adds to the current mode
        //val[3] removes from the current mode
        //val[4] if set, asks to delete the previous mode change.
        if (sd) {struct pet_data *pd; pd = sd->pd; {clif_pet_performance(pd, 6);} }

 

But it is having trouble when I'm not the target already. If I autocast an attack on an enemy (like fire bolt) and set NPC_EMOTION to autocast when fire bolt casts, NPC_EMOTION fails to cast (because fire bolt has it's target set on the enemy). If I autocast something like a heal on myself, NPC_EMOTION works consistently. I'm trying to figure out where the targeting is even coming into this calculation. Perhaps because I'm only using sd instead of pointing the sd to player characters?

I also have trouble trying to set NPC_EMOTION as the first attack and having something else autocast off of NPC_EMOTION, because NPC_EMOTION sets my target to myself, which means fire bolt hits me. I have yet to test if this effect happens when trying to autocast fire bolt by causing it to trigger off a self-heal. That will probably be part of my next step.

Can anyone point out where my error is that is causing the targeting issues?

EDIT (SOLVED): I figured out my problems. AutoSpellOnSkill uses the target of the skill before it- so if you attach it to a self-target skill, it will also target the player (heal+fire bolt will cause fire bolt to hit you).  The second part of my problem with the targeting seems to have been linked to NPC_EMOTION being a self skill as well. I tried the code attached to NPC_RANGEATTACK and the code is working like I want it to. After adding Dimik's attack animation as its performance animation client-wise, my Dimik is now happily shooting while I autocast NPC_COMBOATTACK. Just got to figure out why it's also saying it's "I just got fed" quotes and turn that off, and this will be golden.

Edited by Humble_Bee
SOLVED
Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...