diff options
author | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-05-25 20:54:47 +0000 |
---|---|---|
committer | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-05-25 20:54:47 +0000 |
commit | 54385260051f2b09138aed6c57b1f889ce766c7a (patch) | |
tree | ac5e21d3da44008cede2fcaaa84f448425c0043f /src/map/script.c | |
parent | 604aa8ea6b8691e0b886bc55830930c65226e600 (diff) | |
download | hercules-54385260051f2b09138aed6c57b1f889ce766c7a.tar.gz hercules-54385260051f2b09138aed6c57b1f889ce766c7a.tar.bz2 hercules-54385260051f2b09138aed6c57b1f889ce766c7a.tar.xz hercules-54385260051f2b09138aed6c57b1f889ce766c7a.zip |
- Fixed @statall giving you +99 stats instead of setting them to 99
- Fixed npctalk and @npctalk displaying the # part of the name
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10619 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/script.c')
-rw-r--r-- | src/map/script.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/map/script.c b/src/map/script.c index 8dd8cf071..e2395aab4 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -11006,16 +11006,17 @@ BUILDIN_FUNC(message) *------------------------------------------*/ BUILDIN_FUNC(npctalk) { - const char *str; + const char* str; char message[255]; - struct npc_data *nd=(struct npc_data *)map_id2bl(st->oid); - str=script_getstr(st,2); + struct npc_data* nd = (struct npc_data *)map_id2bl(st->oid); + str = script_getstr(st,2); if(nd) { memcpy(message, nd->name, NAME_LENGTH); - strcat(message," : "); - strncat(message,str, 254); //Prevent overflow possibility. [Skotlex] + strtok(message, "#"); // discard extra name identifier if present + strcat(message, " : "); + strncat(message, str, 254); //Prevent overflow possibility. [Skotlex] clif_message(&(nd->bl), message); } |