Jump to content
  • 0
Nagad

MvP Tomb - how to do not show minutes?

Question

Like title says, I want to delete the minutes from the MvP Tomb, showing just the hour. How to do that? 

 

Thanks :)

Link to comment
Share on other sites

11 answers to this question

Recommended Posts

Oh sorry, I didn't read that properly. Give me a minute, I'll edit this post.

 

Ctrl+F MvP tomb in your npc.c file to find this segment. 

// MvP tomb [GreenBox]
void run_tomb(struct map_session_data* sd, struct npc_data* nd)
{
	char buffer[200];
	char time[10];

	strftime(time, sizeof(time), "%H:%M", localtime(&nd->u.tomb.kill_time));

	// TODO: Find exact color?
	snprintf(buffer, sizeof(buffer), msg_txt(sd,657), nd->u.tomb.md->db->name);
	clif_scriptmes(sd, nd->bl.id, buffer);

	clif_scriptmes(sd, nd->bl.id, msg_txt(sd,658));

	snprintf(buffer, sizeof(buffer), msg_txt(sd,659), time);
	clif_scriptmes(sd, nd->bl.id, buffer);

	clif_scriptmes(sd, nd->bl.id, msg_txt(sd,660));

	snprintf(buffer, sizeof(buffer), msg_txt(sd,661), nd->u.tomb.killer_name[0] ? nd->u.tomb.killer_name : "Unknown");
	clif_scriptmes(sd, nd->bl.id, buffer);

	clif_scriptclose(sd, nd->bl.id);
}

Change the line

strftime(time, sizeof(time), "%H:%M", localtime(&nd->u.tomb.kill_time));

to

strftime(time, sizeof(time), "%H", localtime(&nd->u.tomb.kill_time));

You'll likely want to change the line from map_msg.conf to 

659: Hour of Death : ^EE0000%s^000000  
Edited by Nova
Link to comment
Share on other sites

From a quick googling it appears it's here:

 

https://github.com/rathena/rathena/blob/master/conf/msg_conf/map_msg.conf

 

// MvP Tomb  

// Added here so it can be easily translated  

656: Tomb  

657: [ ^EE0000%s^000000 ]  

658: Has met its demise  

659: Time of death : ^EE0000%s^000000  

660: Defeated by  

661: [^EE0000%s^000000]

 

Just make that 659 line a blank.

Edited by Nova
  • Upvote 1
Link to comment
Share on other sites

Hi Nova

 

I do not want to delete it entirely, just the minutes... so for example, 19:30 became 19 :)

Link to comment
Share on other sites

Thank you Nova :)

 

I even tried to remove this row just to do an experiment (found in map/npc.c):

strftime(time, sizeof(time), "%H:%M", localtime(&nd->u.tomb.kill_time)); 

I recomplied all and the tomb was exactly the same, I don't understand how it is possible..

 

EDIT: most probably I wrong something recompling, I will try again now and I will let you know! :)

Edited by Nagad
Link to comment
Share on other sites

Edited already :] Tested it on my test server and it worked just fine.

And you're very welcome.

Edited by Nova
  • Upvote 2
Link to comment
Share on other sites

In this case I think I'm doing something wrong when recompiling then...

 

I have CentOS, to recompile I follow this procedure:

 

Quote

 

./athena-start stop
 
./configure --enable-packetver=20140416
 
make clean
 
make sql

 

 
After that I get this message:

 

Quote

 

checking...
Check complete.
Looks good, a nice Athena!
Now Started Athena.

 

 

So no errors. Then I restart the server with ./athena-start start and I log-in... If the MvP Tomb is not changing for me, means that the code is not recompiled for real.

 

Is it possible that because it is a sub-server (login-server is disabled, only char-server and map-server are loaded) there are conflicts?

 

Actually my server is organized in this way:

 

Main (login+char+map)

Dev (char+map only, using the same login used by Main)

 

Actually I'm recompiling "Dev" (and no, I'm not recompilng "Main" by mistake ahahaha I triple-checked the path)

Edited by Nagad
Link to comment
Share on other sites

I found the problem, my friend renamed map-server and char-server to map-server2 and char-server2 -.-''


 


Now everything is working fine, thanks for you help and patience Nova! <3


Link to comment
Share on other sites

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

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.