Jump to content
  • 0

MvP Tomb - how to do not show minutes?


Nagad

Question


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.01
  • Content Count:  54
  • Reputation:   0
  • Joined:  06/04/15
  • Last Seen:  

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


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  265
  • Reputation:   95
  • Joined:  09/30/14
  • Last Seen:  

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


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  265
  • Reputation:   95
  • Joined:  09/30/14
  • Last Seen:  

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


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.01
  • Content Count:  54
  • Reputation:   0
  • Joined:  06/04/15
  • Last Seen:  

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


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.01
  • Content Count:  54
  • Reputation:   0
  • Joined:  06/04/15
  • Last Seen:  

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


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  265
  • Reputation:   95
  • Joined:  09/30/14
  • Last Seen:  

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


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.01
  • Content Count:  54
  • Reputation:   0
  • Joined:  06/04/15
  • Last Seen:  

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


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  265
  • Reputation:   95
  • Joined:  09/30/14
  • Last Seen:  

You missed make server

(After make clean)

Edited by Nova
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.01
  • Content Count:  54
  • Reputation:   0
  • Joined:  06/04/15
  • Last Seen:  

But in this procedure:

 

http://herc.ws/wiki/Installation_(CentOS)

 

there isn't "make server"... (yes I'm noob, sorry for that xD)

Edited by Nagad
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  265
  • Reputation:   95
  • Joined:  09/30/14
  • Last Seen:  

Did you try it? :]

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.01
  • Content Count:  54
  • Reputation:   0
  • Joined:  06/04/15
  • Last Seen:  

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


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  265
  • Reputation:   95
  • Joined:  09/30/14
  • Last Seen:  

Haha that makes sense, awesome, glad it finally worked!

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