Issue information

Issue ID
#6664
Status
Working as Intended
Severity
None
Started
Hercules Elf Bot
Sep 10, 2012 7:00
Last Post
Hercules Elf Bot
Sep 10, 2012 11:39
Confirmation
N/A

Hercules Elf Bot - Sep 10, 2012 7:00

Originally posted by [b]Emistry[/b]
[img]http://i.imgur.com/PIuSw.png[/img]
[hr]

strnpcinfo(0) should return this...
[CODE]Sample#Emistry[/CODE]

as stated in
[svn=trunk/doc/script_commands.txt]
[CODE]
*strnpcinfo(<type>)

This function will return the various parts of the name of the calling NPC.
Whatever it returns is determined by type.

0 - The NPC's display name (visible#hidden)
1 - The visible part of the NPC's display name
2 - The hidden part of the NPC's display name
3 - The NPC's unique name (::name)
4 - The name of the map the NPC is in.
[/CODE]

i have tested it in Revision 16767 ...still same results...

Hercules Elf Bot - Sep 10, 2012 7:17

Originally posted by [b]Brian[/b]
It works fine for me in [wiki='debugmes'] and [wiki='dispbottom'].
[codebox]poring_w01,100,110,0 script test#hide::unique 910,{
debugmes "strnpcinfo(0) = " + strnpcinfo(0);
debugmes "strnpcinfo(1) = " + strnpcinfo(1);
debugmes "strnpcinfo(2) = " + strnpcinfo(2);
debugmes "strnpcinfo(3) = " + strnpcinfo(3);
debugmes "strnpcinfo(4) = " + strnpcinfo(4);

dispbottom "strnpcinfo(0) = " + strnpcinfo(0);
dispbottom "strnpcinfo(1) = " + strnpcinfo(1);
dispbottom "strnpcinfo(2) = " + strnpcinfo(2);
dispbottom "strnpcinfo(3) = " + strnpcinfo(3);
dispbottom "strnpcinfo(4) = " + strnpcinfo(4);

announce "strnpcinfo(0) = " + strnpcinfo(0), bc_all;
announce "strnpcinfo(1) = " + strnpcinfo(1), bc_all;
announce "strnpcinfo(2) = " + strnpcinfo(2), bc_all;
announce "strnpcinfo(3) = " + strnpcinfo(3), bc_all;
announce "strnpcinfo(4) = " + strnpcinfo(4), bc_all;

end;
}[/codebox]

It seems to be a problem with how clients display [wiki='announce']s that have # symbols. :(
[code]announce "1#2#3", bc_all;[/code]

This post has been edited by Brian on Sep 10, 2012 7:20

Hercules Elf Bot - Sep 10, 2012 8:22

Originally posted by [b]Emistry[/b]
erm...maybe it's the client problem....anyway thx for the reply...
and damn...i totally forgot about the debugmes ..xD

Hercules Elf Bot - Sep 10, 2012 11:39

Originally posted by [b]GreenBox[/b]
Yes, the client seems to handle the # character in a weird way. If I remember right, with two # the broadcast message begins to repeat itself.