About ASCII

Posted by Feijiyeye on Sun 18 Sep 2016 07:54 AM — 16 posts, 60,261 views.

#0
Hello, everyone. I am from China. I recently played mud with mushclient.The mushclient is very great.since use this,I don't want to use zmud any more.
But some of the ASCII pattern can not be displayed with mushclient, It is very difficult for me.

who can help me?thanks a lot
Amended on Mon 19 Sep 2016 03:02 AM by Feijiyeye
USA Global Moderator #1
Please provide more information.
#2
Draw a two-dimensional coordinates, and then use the ASCII symbol to mark the ship's position. because the mush trigger can not catch the ASCII tab, so you can not determine the location of the ship
#3
thanks
Amended on Sun 18 Sep 2016 09:19 AM by Feijiyeye
#4
In the same place, we can see the ship by zmud, but can't see anyting by mushclient.

http://115.28.138.173/data/attachment/forum/201609/18/232917jpspposysd95pcrc.jpg

http://115.28.138.173/data/attachment/forum/201609/18/232916xube9dbd62ouq26m.jpg


who can help me?thanks
USA Global Moderator #5
I don't see anything like
Quote:
> 你往北方看去:
in the MUSHclient picture.
#6
Fiendish said:

I don't see anything like
Quote:
> 你往北方看去:
in the MUSHclient picture.


That is the problem, it can not be displayed in the mushclient.
USA Global Moderator #7
I can get it to display just fine. See: http://i.imgur.com/KwWfs5X.png

Note: I am using Fedora 24 Linux, and to test this I ran MUSHclient in UTF8 mode with:

LANG=zh_CN.UTF-8 wine MUSHclient.exe


Can you please copy + paste the whole message from zMUD* into a chinese text file and link the file here?
* - all of the messages that do not show for you in MUSHclient

We need the actual messages for testing, not just pictures of them.
Amended on Tue 20 Sep 2016 08:53 AM by Fiendish
#8
yes,I find this code.
Function look, how can be displayed in the mush!!


void look(object me,int idx,int team,int way)
{
	int x,y,i,j,k,a,cur,size,tsize,x1,x2,y1,isshow;
	string str;
	
	if(!me || !userp(me)) return;
	
	if(team==1) {
		x = sea[idx]["x2"] - sea[idx]["x1"];
		y = sea[idx]["y2"] - sea[idx]["y1"];
	}
	else {
		x = sea[idx]["x1"] - sea[idx]["x2"];
		y = sea[idx]["y1"] - sea[idx]["y2"];
	}
	
	// get ruler
	size = 1;
	switch(way) {
		case 6: if(x<0) size = 0; break;
		case 4: if(x>0) size = 0; break;
		case 8: if(y<0) size = 0; break;
		case 2: if(y>0) size = 0; break;
	}

	i = MAX( ABS(x) , ABS(y) );
	if( i > 7500 || size == 0 ) { size = 1000; str = "?"; }
	else if( i > 3750 ) { size = 500; str = "?"; }
	else if( i > 1875 ) { size = 250; str = "????"; }
	else { size = 125; str = "????"; }
	
	x /= size;
	y /= size;
	
	// get shot to be showed
	tsize = 0;
	for(i=0;i<MAX_SHOTS;i++) {
		if( shot[i]["x"]==0 || shot[i]["job"]!=idx ) continue;
	
		if(team==1) {
			tshot[tsize]["x"] = shot[i]["x"] - sea[idx]["x1"];
			tshot[tsize]["y"] = shot[i]["y"] - sea[idx]["y1"];
		}
		else {
			tshot[tsize]["x"] = shot[i]["x"] - sea[idx]["x2"];
			tshot[tsize]["y"] = shot[i]["y"] - sea[idx]["y2"];
		}
		
		tshot[tsize]["x"] /= size;
		tshot[tsize]["y"] /= size;
		tshot[tsize]["team"] = shot[i]["team"];
		
		switch(way) {
			case 6: if(tshot[tsize]["x"]>0 && ABS(tshot[tsize]["y"])<15) tsize++; break;
			case 4: if(tshot[tsize]["x"]<0 && ABS(tshot[tsize]["y"])<15) tsize++; break;
			case 8: if(tshot[tsize]["y"]>0 && ABS(tshot[tsize]["x"])<15) tsize++; break;
			case 2: if(tshot[tsize]["y"]<0 && ABS(tshot[tsize]["x"])<15) tsize++; break;
		}
	}
		
	// first line
	isshow = 1;
	switch(way) {
		case 6: 
			tell_object(me,CYN"??????:\n"NOR);
			tell_object(me,"  010203040506070809101112131415\n");
			if(x<1 || x>15) isshow = 0;
			x1 = 0; x2 = 30; y1 = -15;
			break;
		case 4: 
			tell_object(me,CYN"??????:\n"NOR);
			tell_object(me,"  151413121110090807060504030201\n"); 
			if(x<-15 || x>-1) isshow = 0;
			x1 = 30; x2 = 30; y1 = -15;
			break;
		case 8: 
			tell_object(me,CYN"??????:\n"NOR);
			tell_object(me,"  151413121110090807060504030201**010203040506070809101112131415\n");
			if(x<-15 || x>15) isshow = 0;
			x1 = 30; x2 = 62; y1 = 1;
			break;
		case 2: 
			tell_object(me,CYN"??????:\n"NOR);
			tell_object(me,"  151413121110090807060504030201"+showship(idx,team)+"010203040506070809101112131415\n");
			if(x<-15 || x>15) isshow = 0;
			x1 = 30; x2 = 62; y1 = 1;
			break;
	}
		
	a = -1;
	for(k=15;k>=y1;k--) {
		if(way==2) i=k-16; else i=k;
		if(i==0 && way==6)	
			tell_object(me,showship(idx,team));
		else
			tell_object(me,sprintf("%.2d",ABS(i)));
		cur = 0;
		
		for(j=0;j<tsize;j++) {
			if( tshot[j]["y"] != i ) continue;
			
			if(cur>0) tell_object(me,ANSI_CHAR+sprintf("%d",cur)+ANSI_LEFT);
			cur = x1 + tshot[j]["x"]*2;
			tell_object(me,ANSI_CHAR+sprintf("%d",cur)+ANSI_RIGHT);	
			
			if(tshot[j]["team"]==1) tell_object(me,HIW); else tell_object(me,CYN);
			tell_object(me,"?"NOR);
			cur += 2;
		}
		
		if( y==i && isshow ) a = 0;
				
		if(cur<x2) tell_object(me,ANSI_CHAR+sprintf("%d",x2-cur)+ANSI_RIGHT);
		if(i==0 && way==4)	
			tell_object(me,showship(idx,team)+"\n");
		else
			tell_object(me,sprintf("%.2d\n",ABS(i)));
		
		if(a>=0) a++;
	}

/*
	for(k=15;k>=y1;k--) {
		if(way==2) i=k-16; else i=k;
		if(i==0 && way==6)	
			tell_object(me,showship(idx,team));
		else
			tell_object(me,sprintf("%.2d",ABS(i)));
		cur = 0;
		
		for(j=0;j<tsize;j++) {
			if( tshot[j]["y"] != i ) continue;
			
			if(cur>0) tell_object(me,ANSI_CHAR+sprintf("%d",cur)+ANSI_LEFT);
			cur = x1 + tshot[j]["x"]*2;
			tell_object(me,ANSI_CHAR+sprintf("%d",cur)+ANSI_RIGHT);	
			
			if(tshot[j]["team"]==1) tell_object(me,HIW); else tell_object(me,CYN);
			tell_object(me,"?"NOR);
			cur += 2;
		}
		
		if( y==i && isshow ) {
			if(cur>0) tell_object(me,ANSI_CHAR+sprintf("%d",cur)+ANSI_LEFT);
			cur = x1 + x*2;
			if(cur>0) tell_object(me,ANSI_CHAR+sprintf("%d",cur)+ANSI_RIGHT);
			tell_object(me,showship(idx,3-team));
			cur += 2;
		}
		
		if(cur<x2) tell_object(me,ANSI_CHAR+sprintf("%d",x2-cur)+ANSI_RIGHT);
		if(i==0 && way==4)	
			tell_object(me,showship(idx,team)+"\n");
		else
			tell_object(me,sprintf("%.2d\n",ABS(i)));
	}
*/	
	// last line
	switch(way) {
		case 6: tell_object(me,"  010203040506070809101112131415\n"); break;
		case 4: tell_object(me,"  151413121110090807060504030201\n"); break;
		case 8: tell_object(me,"  151413121110090807060504030201"+showship(idx,team)+"010203040506070809101112131415\n"); break;
		case 2: tell_object(me,"  151413121110090807060504030201**010203040506070809101112131415\n"); break;
	}

	// show ruler
	tell_object(me,"???:"+str+" ?????");
	if(wizardp(me) && me->query("env/test"))
		tell_object(me,sprintf("    ??:%d,%d ; ??:%d,%d",sea[idx]["x1"],sea[idx]["y1"],sea[idx]["x2"],sea[idx]["y2"]));
	tell_object(me,"\n");
	
	// show ship
	if( a > 0 ) {
		tell_object(me,ANSI_CHAR+sprintf("%d",a+2)+ANSI_UP);
		
		if(y==0 && way==6)	
			tell_object(me,showship(idx,team));
		else
			tell_object(me,"?");

		cur = x1 + x*2;
		if(way==6) cur-=2;
		if(cur>0) tell_object(me,ANSI_CHAR+sprintf("%d",cur)+ANSI_RIGHT);
		tell_object(me,showship(idx,3-team));
		cur += 2;
		
		if(cur<x2) tell_object(me,ANSI_CHAR+sprintf("%d",x2-cur)+ANSI_RIGHT);
		if(y==0 && way==4)	
			tell_object(me,showship(idx,team)+"\n");
		else
			tell_object(me,"?\n");

		tell_object(me,ANSI_CHAR+sprintf("%d",a+1)+ANSI_DOWN);
	}
}
Amended on Fri 23 Sep 2016 09:30 PM by Nick Gammon
Australia Forum Administrator #9
I tried to put your post into code tags but lost the Chinese characters. Can you edit your post and paste it again please?
Australia Forum Administrator #10
Also see: http://www.gammon.com.au/forum/?id=13797
#11
Nick Gammon said:

I tried to put your post into code tags but lost the Chinese characters. Can you edit your post and paste it again please?

thank you very much!

IN THE MushClient:
watch north:
151413121110090807060504030201**010203040506070809101112131415
1515
1414
1313
1212
1111
1010
0909
0808
0707
0606
0505
0404
0303
02●02
0101
151413121110090807060504030201舢010203040506070809101112131415

In the zmud
Strange, I can not copy the pattern here, please look at here
http://115.28.138.173/forum.php?mod=viewthread&tid=977&extra=

How can I see the same pattern in mush?
Amended on Sun 25 Sep 2016 08:06 AM by Feijiyeye
USA Global Moderator #12
By wrapping it in [code][/code] tags

watch north:

   151413121110090807060504030201**010203040506070809101112131415
15                                                                                                                    15
14                                                                                                                    14
13                                                                                                                    13
12                                                                                                                    12
11                                                                                                                    11
10                                                                                                                    10
09                                                                                                                    09
08                                                                                                                    08
07                                                                                                                    07
★                                      船                                                                            ★
05                                                                                                                    05
04                                                                                                                    04
03                                                                                                                    03
02                        ●                                                                                          02
01                                                                                                                    01
   151413121110090807060504030201舢010203040506070809101112131415


Though this spacing does not look right. Too wide. The whole thing should be a box.
Amended on Sat 24 Sep 2016 07:36 PM by Fiendish
#13
yes IT's like a box.
Amended on Sun 25 Sep 2016 02:35 PM by Feijiyeye
#14
Fiendish said:

By wrapping it in [code][/code] tags

watch north:

   151413121110090807060504030201**010203040506070809101112131415
15                                                                                                                    15
14                                                                                                                    14
13                                                                                                                    13
12                                                                                                                    12
11                                                                                                                    11
10                                                                                                                    10
09                                                                                                                    09
08                                                                                                                    08
07                                                                                                                    07
★                                      船                                                                            ★
05                                                                                                                    05
04                                                                                                                    04
03                                                                                                                    03
02                        ●                                                                                          02
01                                                                                                                    01
   151413121110090807060504030201舢010203040506070809101112131415


Though this spacing does not look right. Too wide. The whole thing should be a box.


but in the mushClient,IT's this
watch north:
151413121110090807060504030201**010203040506070809101112131415
1515
1414
1313
1212
1111
1010
0909
0808
0707
0606
0505
0404
0303
02●02
0101
151413121110090807060504030201舢010203040506070809101112131415

so,i can't see it clearly.
#15
Fiendish said:

I can get it to display just fine. See: http://i.imgur.com/KwWfs5X.png

Note: I am using Fedora 24 Linux, and to test this I ran MUSHclient in UTF8 mode with:

LANG=zh_CN.UTF-8 wine MUSHclient.exe


Can you please copy + paste the whole message from zMUD* into a chinese text file and link the file here?
* - all of the messages that do not show for you in MUSHclient

We need the actual messages for testing, not just pictures of them.

I have recorded the information in zmud and mushclient. In zmud, it shows like a box.
http://115.28.138.173/forum.php?mod=attachment&aid=NDIzfDY1YWY5MDQwfDE0NzQ4MTgzODN8MTA4Nzl8OTc3