Category : BBS Programs+Doors
Archive   : TONSMOD.ZIP
Filename : CLRCHAT.MOD

 
Output of file : CLRCHAT.MOD contained in archive : TONSMOD.ZIP
The Mafia Man #111 @3509
110/08/90 7at 19:58 pm 2
7[2Msg Status7] 3No reply needed.
7~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

ok this chat will now use cntrl-p in chat to change colors its very easy
to install. load up conio.c and search for two_way_chat(



| existing line
+ add
C change

/------------------search for------------------------\

|void two_way_chat(char *s, char *rollover, int maxlen, int crend)
|{
| char s2[100], temp1[50], side0[12] [80], side1[12] [80];
| int side, cnt, cnt2, cntr;
| int i,i1,done,cm,begx;
| char s1[255];
C unsigned char ch,cd,ct; /* add cd,ct */
| col=0;
|
| cm=chatting;
| begx=wherex();
| if (rollover[0]!=0) {
| if (charbufferpointer) {
| strcpy(s1,rollover);
strcat(s1,&charbuffer[charbufferpointer]);
| strcpy(&charbuffer[1],s1);
| charbufferpointer=1;
| } else {
| strcpy(&charbuffer[1],rollover);
| charbufferpointer=1;
| }
| rollover[0]=0;
| }
|
| done=0;
| side = 0;
| do {
| ch=getkey();
| if (lastcon)
| {
| if (wherey() == 11)
| {
| outstr("\x1b[12;1H");
| ansic(1);
| for(cnt=0;cnt<=thisuser.screenchars;cnt++)
| s2[cnt]=205;
| strcpy(temp1,"4 HIDDEN ALLEY 3");
| cnt=(((thisuser.screenchars-strlen(temp1)) /2));
| strncpy(&s2[cnt+1],temp1,(strlen(temp1)));
| s2[thisuser.screenchars]=0;
| outstr(s2);
| s2[0]=0;
| temp1[0]=0;
| for(cntr=1;cntr<12;cntr++)
| {
| sprintf(s2,"\x1b[%d;%dH",cntr,1);
| outstr(s2);
| ansic(1);
| if ((cntr >=0) && (cntr <5))
| {
| outstr(side0[cntr+6]);
| }
| ansic(1);
| outstr("\x1b[K");
| s2[0]=0;
| }
| sprintf(s2,"\x1b[%d;%dH",5,1);
| outstr(s2);
| s2[0]=0;
| }
| else
| if (wherey() > 11)
| {
| x2=(wherex()+1);
| y2=(wherey()+1);
| sprintf(s2,"\x1b[%d;%dH",y1,x1);
| outstr(s2);
| s2[0]=0;
| }
| side = 0;
| }
| else
| {
| if (wherey() >= 23)
| {
| for(cntr=13;cntr<25;cntr++)
| {
| sprintf(s2,"\x1b[%d;%dH",cntr,1);
| outstr(s2);
| if ((cntr >= 13) && (cntr <17))
| {
| ansic(1);
| outstr(side1[cntr-7]);
| }
| outstr("\x1b[K");
| s2[0]=0;
| }
| sprintf(s2,"\x1b[%d;%dH",17,1);
| outstr(s2);
| s2[0]=0;
| }
| else
| if ((wherey() < 12) && (side == 0))
| {
| x1=(wherex()+1);
| y1=(wherey()+1);
| sprintf(s2,"\x1b[%d;%dH",y2,x2);
| outstr(s2);
| s2[0]=0;
| }
| side=1;
| }
| if (cm)
| if (chatting==0)
| ch=13;
+ switch(ch) {
+ case 16:{
+ if (side==0) { cd=getkey();}
+
+
+ else { ct=getkey(); }
+ }
+ break;}
| if ((ch>=32)) {
| if (side==0)
| {
|
| if ((wherex()<(thisuser.screenchars-1)) && (cp0 | {
| if (wherey() < 11)
| {
+ switch(cd) {
+ case '1': { ansic(1); break; }
+ case '2': { ansic(2); break; }
+ case '3': { ansic(3); break; }
+ case '4': { ansic(4); break; }
+ case '5': { ansic(5); break; }
+ case '6': { ansic(6); break; }
+ case '7': { ansic(7); break; }}
| side0[wherey()][cp0++]=ch;
| outchr(ch);
| }
| else
| {
| side0[wherey()][cp0++]=ch;
| side0[wherey()][cp0]=0;
| for(cntr=0;cntr<12;cntr++)
| {
| sprintf(s2,"\x1b[%d;%dH",cntr,1);
| outstr(s2);
| if ((cntr >=0) && (cntr <6))
| {
| outstr(side0[cntr+6]);
| y1=wherey()+1;
| x1=wherex()+1;
| }
| outstr("\x1b[K");
| s2[0]=0;
| }
| sprintf(s2,"\x1b[%d;%dH",y1,x1);
| outstr(s2);
| s2[0]=0;
| }
| if (wherex()==(thisuser.screenchars-1))
| done=1;
| } else {
| if (wherex()>=(thisuser.screenchars-1))
| done=1;
| }
| }
| else
| {
| if ((wherex()<(thisuser.screenchars-1)) && (cp1 | {
+ switch(ct) {
+ case '1': { ansic(1); break; }
+ case '2': { ansic(2); break; }
+ case '3': { ansic(3); break; }
+ case '4': { ansic(4); break; }
+ case '5': { ansic(5); break; }
+ case '6': { ansic(6); break; }
+ case '7': { ansic(7); break; }}
| if (wherey() < 23)
| {
| side1[wherey()-13][cp1++]=ch;
| outchr(ch);
| }
| else
| {
| side1[wherey()-13][cp1++]=ch;
| side1[wherey()-13][cp1]=0;
| for(cntr=13;cntr<25;cntr++)
| {
| sprintf(s2,"\x1b[%d;%dH",cntr,1);


VERY IMPORTANT you must now search threw your void and TAKE OUT
all 'ansic( )' in the void that dont have any thing to do with the
line in the middle of chat(in the beggining of mod)
remove all ansic's after ch=getkey in the beginning

i think you cna figure that out otherwise IT WILL NOT WORK!!
BUT DONT TAKE ansic(0) out of the cases in the end!
or just use the begging of my void


to use,in chat hit cntrl-p and then number(just like message section)

waring try to do it quick or when you hit cntrl-p then the other user types
before you hit number,well it wont turn out the way you wanted
nothing bad will happen but you wont get your color

ok there it is!!!!


The Night Hawk

Cosysop,Modder-The Dark Realm(two node,line) torture chamber
contact me at 305-753-5773


  3 Responses to “Category : BBS Programs+Doors
Archive   : TONSMOD.ZIP
Filename : CLRCHAT.MOD

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/