summaryrefslogtreecommitdiff
path: root/src/map/npc.c
diff options
context:
space:
mode:
authorgreenboxal2 <greenboxal2@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-04-21 14:00:23 +0000
committergreenboxal2 <greenboxal2@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-04-21 14:00:23 +0000
commit7475d4859a56a988fc36372a277c0c007d0123a5 (patch)
tree34cab3771144109052aeb96ed6c64779d354663b /src/map/npc.c
parent8877d3c6dcd9dbd203fd72924b60f3dcf448e5e9 (diff)
downloadhercules-7475d4859a56a988fc36372a277c0c007d0123a5.tar.gz
hercules-7475d4859a56a988fc36372a277c0c007d0123a5.tar.bz2
hercules-7475d4859a56a988fc36372a277c0c007d0123a5.tar.xz
hercules-7475d4859a56a988fc36372a277c0c007d0123a5.zip
Added mvp tomb system.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15908 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/npc.c')
-rw-r--r--src/map/npc.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/map/npc.c b/src/map/npc.c
index 661406c95..d0defdf88 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -1078,6 +1078,31 @@ int npc_globalmessage(const char* name, const char* mes)
return 0;
}
+// 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(657), nd->u.tomb.md->db->name);
+ clif_scriptmes(sd, nd->bl.id, buffer);
+
+ clif_scriptmes(sd, nd->bl.id, msg_txt(658));
+
+ snprintf(buffer, sizeof(buffer), msg_txt(659), time);
+ clif_scriptmes(sd, nd->bl.id, buffer);
+
+ clif_scriptmes(sd, nd->bl.id, msg_txt(660));
+
+ snprintf(buffer, sizeof(buffer), msg_txt(661), nd->u.tomb.killer_name ? nd->u.tomb.killer_name : "Unknown");
+ clif_scriptmes(sd, nd->bl.id, buffer);
+
+ clif_scriptclose(sd, nd->bl.id);
+}
+
/*==========================================
* クリック時のNPC処理
*------------------------------------------*/
@@ -1107,6 +1132,8 @@ int npc_click(struct map_session_data* sd, struct npc_data* nd)
case SCRIPT:
run_script(nd->u.scr.script,0,sd->bl.id,nd->bl.id);
break;
+ case TOMB:
+ run_tomb(sd,nd);
}
return 0;