Jump to content
  • 0

Command pet stop attack


Question

Posted

Hi need help to fix command pet stop attack

ACMD_FUNC(stop)
{
    struct pet_data *pd;

    pet_stop_attack(pd);
    
    return 0;
}

that I should add since it gives gravity like that

2 answers to this question

Recommended Posts

  • 0
Posted

Try it:

ACMD_FUNC(stop)
{
	nullpo_retr(-1, sd);

	if (!sd->status.pet_id || sd->pd == NULL)
	{
		clif_displaymessage(fd, msg_txt(sd,184)); // Sorry, but you have no pet.
		return -1;
	}

	pet_stop_attack(sd->pd);

	return 0;
}

 

  • 0
Posted

It did not help but I added 2 more lines and it's ok

sd->pd->target_id = 0;
pet_stop_attack(sd->pd);
pet_stop_walking(sd->pd,1);

Thank you

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...