Openkore.com

OpenKore Forums
It is currently 22 Apr 2018, 23:44

All times are UTC - 5 hours [ DST ]





Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 14 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Non-breaking space in guild name
PostPosted: 14 Jul 2012, 10:32 
Offline
Been there done that!
Been there done that!

Joined: 19 Sep 2011, 07:30
Posts: 119
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...

_________________
Sorry, my english is very bad !


Top
 Profile  
 
 Post subject: Re: [ASK]Openkore can't detect Guild with non-breaking space
PostPosted: 15 Jul 2012, 11:01 
Offline
Developers
Developers

Joined: 05 Dec 2008, 05:42
Posts: 1811
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?


Top
 Profile  
 
 Post subject: Re: [ASK]Openkore can't detect Guild with non-breaking space
PostPosted: 17 Jul 2012, 09:43 
Offline
Been there done that!
Been there done that!

Joined: 19 Sep 2011, 07:30
Posts: 119
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 :(

_________________
Sorry, my english is very bad !


Top
 Profile  
 
 Post subject: Re: [ASK]Openkore can't detect Guild with non-breaking space
PostPosted: 17 Jul 2012, 18:50 
Offline
Developers
Developers

Joined: 05 Dec 2008, 05:42
Posts: 1811
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);
   }


Top
 Profile  
 
 Post subject: Re: [ASK]Openkore can't detect Guild with non-breaking space
PostPosted: 17 Jul 2012, 20:05 
Offline
Administrator
Administrator
User avatar

Joined: 24 Apr 2008, 12:02
Posts: 1299
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?

_________________
Join our Team. Click here.
Image


Image


Top
 Profile  
 
 Post subject: Re: [ASK]Openkore can't detect Guild with non-breaking space
PostPosted: 18 Jul 2012, 01:36 
Offline
Been there done that!
Been there done that!

Joined: 19 Sep 2011, 07:30
Posts: 119
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..

_________________
Sorry, my english is very bad !


Top
 Profile  
 
 Post subject: Re: [ASK]Openkore can't detect Guild with non-breaking space
PostPosted: 18 Jul 2012, 03:06 
Offline
Developers
Developers

Joined: 05 Dec 2008, 05:42
Posts: 1811
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?


Top
 Profile  
 
 Post subject: Re: [ASK]Openkore can't detect Guild with non-breaking space
PostPosted: 18 Jul 2012, 09:31 
Offline
Been there done that!
Been there done that!

Joined: 19 Sep 2011, 07:30
Posts: 119
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

_________________
Sorry, my english is very bad !


Top
 Profile  
 
 Post subject: Re: [ASK]Openkore can't detect Guild with non-breaking space
PostPosted: 18 Jul 2012, 10:19 
Offline
Developers
Developers

Joined: 05 Dec 2008, 05:42
Posts: 1811
So, did that patch fix the issue for you?


Top
 Profile  
 
 Post subject: Re: [ASK]Openkore can't detect Guild with non-breaking space
PostPosted: 19 Jul 2012, 09:23 
Offline
Been there done that!
Been there done that!

Joined: 19 Sep 2011, 07:30
Posts: 119
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. :(

_________________
Sorry, my english is very bad !


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 14 posts ]  Go to page 1, 2  Next

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group