@petinfo command request

  • Thread starter Thread starter Aurela
  • Start date Start date
A

Aurela

Guest
Hello~

If anyone is able to create a @petinfo command I'd be very thankful.

The command works the same as @hominfo. (status,level,affection)

Thanks!

 
ACMD(petinfo) { struct pet_data *pd; if( !sd->status.pet_id || !sd->pd ) { clif->message(fd, msg_txt(184)); // Sorry, but you have no pet. return false; } pd = sd->pd; snprintf(atcmd_output, sizeof(atcmd_output), "Pet name: %s", // Pet Name pd->pet.name); clif->message(fd, atcmd_output); snprintf(atcmd_output, sizeof(atcmd_output), "Intimate: %u", // Intimate pd->pet.intimate/100); clif->message(fd, atcmd_output); snprintf(atcmd_output, sizeof(atcmd_output), "Hungry: %d", // Hungry pd->pet.hungry); clif->message(fd, atcmd_output); return true;}

Code:
ACMD_DEF(petinfo),
You can add more, but valid type here:

Code:
	int pet_id;	short class_;	short level;	short egg_id;//pet egg id	short equip;//pet equip name_id	short intimate;//pet friendly	short hungry;//pet hungry	char name[NAME_LENGTH];	char rename_flag;
 
Last edited by a moderator:
Back
Top