Forum

Notifications
Clear all

Adding chat to Color 64

3 Posts
1 Users
0 Reactions
241 Views
 mike
(@mike)
Eminent Member
Joined: 2 months ago
Posts: 16
Topic starter  

Thought I would share this with everyone. I added my own chat routine to Color 64. Rudimentary and duplicative code - I will need to clean up, but this should give those with little programming experience something to go off of. My hope is to add some cursor saving code and make the chat split screen, but may be too challenging for 2400 baud when it comes to scrolling text.... 

F1 will enter, and F1 will exit.

Observed bugs:

  • First F1 seems to run in and immediately exit out. Second F1 doesn't do it.
  • After exiting chat, if user attempts logoff, system says "Bye" and then pops them back at main menu. Second logoff works. May be something between the overlays?? Or I stomped on a variable....

I have additional code in mine right after line 

 

v8.0

1. add a line before line 13127 "ifpeek(197)=6....." with

13126 ifpeek(197)=4then35700

2. add chat code at 35700

35700 a$=cr$+chr$(14)="<clr screen> --------------":#
35701 a$="<create an entry text like SYSOP is here!>";poke197,0:#
35702 rem - future application, save user time.....
35705 get a$:if a$="" then 35801
35706 a=asc(a$)
35709 if a>12 and a<96 then 35735
35719 if a>182 and a<219 then 35735
35735 REM option, add a color for remote user a$="<color>"+a$
35736 $
35801 if peek(197)=4 then 35900
35802 a$=@4;if a$="" then 35705
35803 a=asc(a$)
35804 if a>12 and a<96 then 35825
35805 if a>182 and a <219 then 35825
^^^  yeah, that's the duplicate... clean up for later on.....

35806 goto 35705
35825 rem option, add a different color for local user a$="<different color>"+a$
35826 goto 35736
35900 rem - future application - restore user's time
35901 a$=cr$+@<departure message SYSOP is leaving...>":#;goto 13100

The above needs to be replicated with bbs.ov2 8XXX, bbs.xfer 8XXX, and bbs.msgs 8XXX

For color 7.37 -

Replace "a$=@4" with "get#5,a$" 
Replace "#" with "sysc(0)"
Replace "$" with "sysc(1)" with mention that I believe a$ must be set to whatever SYSC(1) is to print.

Please don't bash my programming - I'm not super-stud like many of you... hopefully this  helps someone out.
7.37 guys, let me know if I got conversion wrong for "#" and "$"

=-= Nuke =-=

 

This topic was modified 2 months ago 2 times by ][avok

   
Quote
 mike
(@mike)
Eminent Member
Joined: 2 months ago
Posts: 16
Topic starter  

missed a line....

35720 goto 35801

This is needed if key entry doesn't pass the two checks in lines 35709 and 35719, it will then jump to the local user key checks.
Also I mean to say up top that I added my own extras in there - but included them in the above anyway (adding color depending on which user is typing).


   
ReplyQuote
 mike
(@mike)
Eminent Member
Joined: 2 months ago
Posts: 16
Topic starter  

Additional edit - can't edit my entries above, so will post full edit below... lines 35701, 35802 and 35901 had semicolon vs colons. So, now listing should be:

13126 ifpeek(197)=4then35700
35700 a$=cr$+chr$(14)="<clr screen> --------------":#
35701 a$="<create an entry text like SYSOP is here!>":poke197,0:#
35702 rem - future application, save user time.....
35705 get a$:if a$="" then 35801
35706 a=asc(a$)
35709 if a>12 and a<96 then 35735
35719 if a>182 and a<219 then 35735
35720 goto 35801
35735 REM option, add a color for remote user a$="<color>"+a$
35736 $
35801 if peek(197)=4 then 35900
35802 a$=@4:if a$="" then 35705
35803 a=asc(a$)
35804 if a>12 and a<96 then 35825
35805 if a>182 and a <219 then 35825
35806 goto 35705
35825 rem option, add a different color for local user a$="<different color>"+a$
35826 goto 35736
35900 rem - future application - restore user's time
35901 a$=cr$+@<departure message SYSOP is leaving...>":#:goto 13100
This post was modified 2 months ago by mike

   
ReplyQuote
Share: