Openkore.com
http://forums.openkore.com/

Non-breaking space in guild name
http://forums.openkore.com/viewtopic.php?f=56&t=17618
Page 1 of 2

Author:  rocknroll [ 14 Jul 2012, 10:32 ]
Post subject:  Non-breaking space in guild name

Why Openkore can't detect Guild name until now? (well i use new openkore r8049) .
Is there any solution for this issue? or because console (dos) can't read a non-breaking space (0160)?? i have try on wxstart too but it same.

i have try to manipulate function on src to trim whitespace in perl command, like
Code:
s/^\s+// and s/\s+$//

so when openkore read (eg. • Dragon •) in config, it will be manipulate before sending a packet to server (which a string of guild name has change).

any idea for this?? sory for my bad english...

Author:  EternalHarvest [ 15 Jul 2012, 11:01 ]
Post subject:  Re: [ASK]Openkore can't detect Guild with non-breaking space

rocknroll wrote:
so when openkore read (eg. • Dragon •) in config, it will be manipulate before sending a packet to server (which a string of guild name has change).

Why do you need to send it to server? Which guild name "can't be detected"? Your own, other players? How it "can't be detected"? There's empty name, or malformed name, or what?

Author:  rocknroll [ 17 Jul 2012, 09:43 ]
Post subject:  Re: [ASK]Openkore can't detect Guild with non-breaking space

EternalHarvest wrote:
rocknroll wrote:
so when openkore read (eg. • Dragon •) in config, it will be manipulate before sending a packet to server (which a string of guild name has change).

Why do you need to send it to server? Which guild name "can't be detected"? Your own, other players? How it "can't be detected"? There's empty name, or malformed name, or what?


my own and others too, because my server is enabling of use ascii on guild or party name. so openkore can't detect.
example : "R e b o r n" << that using non-breaking space (alt+0610) not normally space.

if i write in config.txt, openkore can't buff that player
Code:
partySkill Blessing {
lvl 10
sp > 10%
target_isGuild R e b o r n
target_whenStatusInactive Blessing
notPartyOnly 1

i just try to filter the guild name before openkore send data to server so config.txt can be simply of buffing on guild name with ascii non-breaking space name.

so i got an idea to filter guild name on misc.pm, like this
Code:
if ($config{$prefix."_isGuild"}) {
      my $xchange = $player->{guild}{name};
      $xchange =~ s/^\s+//;
      $xchange =~ s/\s+$//;
      $xchange =~ s/\s+/ /g;
      return 0 unless ($player->{guild} && existsInList($config{$prefix . "_isGuild"}, $xchange));
}

well, i just filter it to trim the white-blank space on guild name which openkore can't detect it.
any idea for this??
*sory my bad english :(

Author:  EternalHarvest [ 17 Jul 2012, 18:50 ]
Post subject:  Re: [ASK]Openkore can't detect Guild with non-breaking space

The following fixes that problem for me:
Code:
Index: Utils/DataStructures.pm
===================================================================
--- Utils/DataStructures.pm   (revision 8060)
+++ Utils/DataStructures.pm   (working copy)
@@ -226,7 +226,8 @@
   foreach (@array) {
      s/^\s+//;
      s/\s+$//;
-      s/\s+/ /g;
+      # breaks non-space-symbol whitespace
+      #s/\s+/ /g;
      next if ($_ eq "");
      return 1 if (lc($_) eq $val);
   }

Author:  kLabMouse [ 17 Jul 2012, 20:05 ]
Post subject:  Re: [ASK]Openkore can't detect Guild with non-breaking space

EternalHarvest wrote:
The following fixes that problem for me:
I wonder why such whitespace reduction is there in the first place...

May-be Because someone planned to have a multi param strings?

Author:  rocknroll [ 18 Jul 2012, 01:36 ]
Post subject:  Re: [ASK]Openkore can't detect Guild with non-breaking space

EternalHarvest wrote:
I wonder why such whitespace reduction is there in the first place...


hmm... well if i run with start.exe (console windows) openkore can't read the symbol of • (dot) or non-breaking space, like "• R e b o r n •". on the screen it looks like " R e b o r n ".
if i run with wxstart.exe, the openkore read the symbol of • (dot) but not to non-breaking space (alt+0160).
i think whitespace reduction in the frist place is to remove that • (dot), haha..

Author:  EternalHarvest [ 18 Jul 2012, 03:06 ]
Post subject:  Re: [ASK]Openkore can't detect Guild with non-breaking space

But it only reduces it in values from config here, not from the game. Inability to display that symbol is windows-specific bug I think, and it's not whitespace?

Quote:
May-be Because someone planned to have a multi param strings?

In existsInList?

Author:  rocknroll [ 18 Jul 2012, 09:31 ]
Post subject:  Re: [ASK]Openkore can't detect Guild with non-breaking space

EternalHarvest wrote:
But it only reduces it in values from config here, not from the game. Inability to display that symbol is windows-specific bug I think, and it's not whitespace?


well i guess the non-breaking space (alt+0160) similar like whitespace :D

Author:  EternalHarvest [ 18 Jul 2012, 10:19 ]
Post subject:  Re: [ASK]Openkore can't detect Guild with non-breaking space

So, did that patch fix the issue for you?

Author:  rocknroll [ 19 Jul 2012, 09:23 ]
Post subject:  Re: [ASK]Openkore can't detect Guild with non-breaking space

no, i use openkore r8074 and it same like before. but working on symbol • (dot alt+7). i think the function of string can't read the non-breaking space (alt+0160) in config, and why that problem running in macros?

hmm with variabel in macros it's look like
Code:
$guildname = • R e b o r n •
the plugin can read that variable. but my problem is like put on config so i don't need to write many line in macros to buff a guild with 'non-breaking space' name, because in macros we have to write what should be the trigger of that. actually in config just put on target_isGuild and norPartyOnly to trigger that. :(

Page 1 of 2 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/