Jump to content

Recommended Posts

  • 2 weeks later...
Posted

bump! someone please tell me, can i change this to mob race view instead of element view? i want change this to race monster view not element monster view

  • 1 month later...
Posted (edited)

Hmm I tried adding your patch to the show_mob_info. it works great although if the name of the monster is too long then few characters will be omitted. XD

Clif.cpp

		case BL_MOB: {
			mob_data *md = (mob_data *)bl;
			char ele_name[8] = { 0 };
			//char output[16] = { 0 };

			if( md->guardian_data && md->guardian_data->guild_id ){
				PACKET_ZC_ACK_REQNAMEALL packet = { 0 };

				packet.packet_id = HEADER_ZC_ACK_REQNAMEALL;
				packet.gid = bl->id;
				safestrncpy( packet.name, md->name, NAME_LENGTH );
				safestrncpy( packet.guild_name, md->guardian_data->guild_name, NAME_LENGTH );
				safestrncpy( packet.position_name, md->guardian_data->castle->castle_name, NAME_LENGTH );

				clif_send(&packet, sizeof(packet), src, target);
			}else if( battle_config.show_mob_info ){
				PACKET_ZC_ACK_REQNAMEALL packet = { 0 };

				packet.packet_id = HEADER_ZC_ACK_REQNAMEALL;
				packet.gid = bl->id;
				safestrncpy( packet.name, md->name, NAME_LENGTH );

				char mobhp[50], *str_p = mobhp;

				switch (md->status.def_ele) {
				case 0: strcpy(ele_name, "Neutral");break;
				case 1: strcpy(ele_name, "Water");break;
				case 2: strcpy(ele_name, "Earth");break;
				case 3: strcpy(ele_name, "Fire");break;
				case 4: strcpy(ele_name, "Wind");break;
				case 5: strcpy(ele_name, "Poison");break;
				case 6: strcpy(ele_name, "Holy");break;
				case 7: strcpy(ele_name, "Shadow");break;
				case 8: strcpy(ele_name, "Ghost");break;
				case 9: strcpy(ele_name, "Undead");break;
				default: break;
				}

				if( battle_config.show_mob_info&4 ){
					str_p += sprintf( str_p, "Lv. %d | ", md->level );
				}

				if( battle_config.show_mob_info&1 ){
					if (strlen(ele_name))
					str_p += sprintf( str_p, "Ele: %s %d | ", ele_name, md->status.ele_lv);
				}

				if( battle_config.show_mob_info&2 ){
					str_p += sprintf( str_p, "HP: %u%% | ", get_percentage( md->status.hp, md->status.max_hp ) );
				}

				// Even thought mobhp ain't a name, we send it as one so the client can parse it. [Skotlex]
				if( str_p != mobhp ){
					*(str_p-3) = '\0'; //Remove trailing space + pipe.
					safestrncpy( packet.party_name, mobhp, NAME_LENGTH );
				}

				clif_send(&packet, sizeof(packet), src, target);
			}

screenrAthena019.jpg

screenrAthena020.jpg
image.png.07d65ebfed16d10d5bc83c8215ab2945.png

Edited by Louis T Steinhil
Posted
On 11/27/2024 at 4:17 PM, Pyumel said:

bump! someone please tell me, can i change this to mob race view instead of element view? i want change this to race monster view not element monster view

yes that's easy, change the value of elements to race.

Posted (edited)
On 1/4/2025 at 12:17 AM, Louis T Steinhil said:

yes that's easy, change the value of elements to race.

how can i detect this monster have demi-human race or fish race for example?
because if i just change the value of the elements to race it mean i just change the display name not detect the monster race

Edited by Pyumel
Posted
22 minutes ago, Pyumel said:

how can i detect this monster have demi-human race or fish race for example?
because if i just change the value of the elements to race it mean i just change the display name not detect the monster race

 

char race_name[9] = { 0 };

				switch (md->status.race) {
				case 0: strcpy(race_name, "Formless");break;
				case 1: strcpy(race_name, "Undead");break;
				case 2: strcpy(race_name, "Brute");break;
				case 3: strcpy(race_name, "Plant");break;
				case 4: strcpy(race_name, "Insect");break;
				case 5: strcpy(race_name, "Fish");break;
				case 6: strcpy(race_name, "Demon");break;
				case 7: strcpy(race_name, "D-Human");break;
				case 8: strcpy(race_name, "Angel");break;
				case 9: strcpy(race_name, "Dragon");break;
				default: break;
				}

str_p += sprintf( str_p, "Race: %s | ", race_name);

 

Posted
14 minutes ago, Pyumel said:

share please sir

				// Even thought mobhp ain't a name, we send it as one so the client can parse it. [Skotlex]
				if( str_p != mobhp ){
					*(str_p-3) = '\0'; //Remove trailing space + pipe.
					safestrncpy( packet.guild_name, mobhp, NAME_LENGTH );
				}

 

Posted
1 hour ago, Louis T Steinhil said:
				// Even thought mobhp ain't a name, we send it as one so the client can parse it. [Skotlex]
				if( str_p != mobhp ){
					*(str_p-3) = '\0'; //Remove trailing space + pipe.
					safestrncpy( packet.guild_name, mobhp, NAME_LENGTH );
				}

 

thank sir, really appreciated

Posted (edited)
1 hour ago, Louis T Steinhil said:

 

char race_name[9] = { 0 };

				switch (md->status.race) {
				case 0: strcpy(race_name, "Formless");break;
				case 1: strcpy(race_name, "Undead");break;
				case 2: strcpy(race_name, "Brute");break;
				case 3: strcpy(race_name, "Plant");break;
				case 4: strcpy(race_name, "Insect");break;
				case 5: strcpy(race_name, "Fish");break;
				case 6: strcpy(race_name, "Demon");break;
				case 7: strcpy(race_name, "D-Human");break;
				case 8: strcpy(race_name, "Angel");break;
				case 9: strcpy(race_name, "Dragon");break;
				default: break;
				}

str_p += sprintf( str_p, "Race: %s | ", race_name);

 

im sorry for bothering you, i mean i want change the "ele_group" to the race group so i can make icon for an races
is that possible to do? if so what should i rewrite them? "race_group" ? and how much the number for races

 

Screenshot 2025-01-05 213616.png

Edited by Pyumel
  • 3 months later...
Posted (edited)

Hi someone can help me ?

A. I need to copy part of the code inside the .diff with notepad++ and put inside the other file indicated there ?

B. How to insert the code properly in the new file to ovoid an error?

C. How to recompile ?

thank you 

Edited by Boobzilon
  • 5 weeks later...
  • 2 weeks later...

Join the conversation

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

Guest
Reply to this topic...

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