Helly Posted April 16, 2016 Group: Members Topic Count: 34 Topics Per Day: 0.01 Content Count: 258 Reputation: 54 Joined: 01/09/12 Last Seen: December 26, 2020 Share Posted April 16, 2016 (edited) Actual rA Emu is: /*========================================== * npctalk (sends message to surrounding area) *------------------------------------------*/ BUILDIN_FUNC(npctalk) { struct npc_data* nd = (struct npc_data *)map_id2bl(st->oid); const char* str = script_getstr(st,2); if (nd) { char message[256]; safesnprintf(message, sizeof(message), "%s", str); clif_disp_overhead(&nd->bl, message); } return SCRIPT_CMD_SUCCESS; } In game example Kafra npc: (No show the name of npc) Hello wold! Old rA emu: BUILDIN_FUNC(npctalk) { const char* str; char name[NAME_LENGTH], message[256]; struct npc_data* nd = (struct npc_data *)map_id2bl(st->oid); str = script_getstr(st,2); if(nd) { safestrncpy(name, nd->name, sizeof(name)); strtok(name, "#"); // discard extra name identifier if present safesnprintf(message, sizeof(message), "%s : %s", name, str); clif_disp_overhead(&nd->bl, message); } return 0; } In Game example Kafra npc: (this show name of npc) Kafra : Hello world! why this? is a error? I try adding "%s : %s" in the actual script of npctalk but not work... Edited April 16, 2016 by Namine210 Link to comment Share on other sites More sharing options...
Radian Posted April 16, 2016 Group: Members Topic Count: 162 Topics Per Day: 0.04 Content Count: 1546 Reputation: 192 Joined: 07/23/14 Last Seen: June 24, 2024 Share Posted April 16, 2016 https://github.com/rathena/rathena/commit/a63604d92a1c8090257277e353fd28464e859c08 1 Link to comment Share on other sites More sharing options...
Helly Posted April 16, 2016 Group: Members Topic Count: 34 Topics Per Day: 0.01 Content Count: 258 Reputation: 54 Joined: 01/09/12 Last Seen: December 26, 2020 Author Share Posted April 16, 2016 oh ok i understand now thank you Link to comment Share on other sites More sharing options...
Recommended Posts