Spinning Cursor Mod for 4.22, NO MESSING W/ THE USER LIST! Fancy Me Mad #1 @7706 Sun Apr 04 23:41:27 1993 Updated for 4.22 -- YES I MOD ON SUNDAYS! ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³Name : SWAMPGAS.MOD Date : March 9, 1993 ³ ³Author : Gemini, 1@9985, Chaos! BBS Revision: 2.0 I suppose. ³ ³Difficulty: ÛÛÛÛ±± WWIV vsn: 4.20e, but should work on³ ³Desc : Spinning Cursor for EVERY USER almost any verson ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ 6/* YOU DO NOT HAVE TO MESS WITH YOUR USER LIST!! */0 The Author is Gemini, 1@9985, I don't know which net, the origional mod didn't say, but that was the time of 4.20e, so I assume it's WWIVnet. I have updated it for 4.22 (really easy, fix a type 'o', and changed it so that you do not have to edit your user list to get this thing to work (although you can if you really want to :)). If you use this, please tell me about, I'd like to know! Here's some ideas for some cursors: "_,-,~,-" "ù,ø,ù,." and I'm sure you can think of a load of 'em. Disclaimer: If it's my fault, I'm sorry. If it's your fault, I'm sorry. Either way, I'm pretty sorry. Step 1: Back up your source code. Make sure you can restore what you(or me) screwed up. Step 2: Load COM.C and search for "unsigned char getkey(" Make the following changes: /*%%*/ unsigned char getkey(int do_spc_fx) /*==*/ unsigned char ch; /*%%*/ int beepyet, i; /*==*/ long dd,tv,tv1; /*==*/ beepyet = 0; /*==*/ timelastchar1=timer1(); /*++*/ i=curatr; Ok, go down to: /*==*/ nl(); /*==*/ hangup = 1; /*==*/ } /*==*/ checkhangup(); And then add right after that: /*++*/ if (do_spc_fx==1) { /*++*/ if (thisuser.sysstatus & sysstatus_spincurser) { /*++*/ npr("1%c\x1b[1D",thisuser.callsign[1]); //Change the colors to0 /*++*/ npr("2%c\x1b[1D",thisuser.callsign[2]); //whatever you want.0 /*++*/ npr("3%c\x1b[1D",thisuser.callsign[3]);0 /*++*/ npr("7%c\x1b[1D",thisuser.callsign[4]);0 /*++*/ npr(" \x1b[1D"); /*++*/ setc(i); /*++*/ } /*++*/ } Step 3: Open VARDEC.H. Add the line specified: /*==*/ /* userrec.sysstatus */ /*==*/ #define sysstatus_ansi 0x0001 /*==*/ #define sysstatus_color 0x0002 /*++*/ #define sysstatus_spincurser 0x0400 Step 5: Save COM.C Step 6: Save VARDEC.H Step 4: Open up DEFAULTS.C Add this somewhere in the begining: /*start block copy*/ void change_spin(void) { npr("Current spinning curser: %c,%c,%c,%c\r\n", thisuser.callsign[1],thisuser.callsign[2],thisuser.callsign[3], thisuser.callsign[4]); npr("\r\n1Character 1 : ");0 thisuser.spin[1]=getkey(0); outchr(thisuser.callsign[1]); npr("\r\n2Character 2 : ");0 thisuser.spin[2]=getkey(0); outchr(thisuser.callsign[2]); npr("\r\n3Character 3 : ");0 thisuser.callsign[3]=getkey(0); outchr(thisuser.spin[3]); npr("\r\n7Character 4 : ");0 thisuser.callsign[4]=getkey(0); outchr(thisuser.callsign[4]); } /*end block copy*/ Step 7: Still in DEFAULTS.CSearch and add these lines: /*++*/ npr("S. Spinning Cursor : %s\r\n", /*You can use a get_string thing i f you like */ /*++*/ (thisuser.sysstatus & sysstatus_spincurser)?"On":"Off"); /*==*/ outstr(get_string(401)); /*==*/ if (thisuser.wwiv_regnum) /*==*/ npr("%ld\r\n",thisuser.wwiv_regnum); /*==*/ else /*==*/ pl(get_string(402)); /*==*/ pl(get_string(403)); Step 8: STILL in DEFAULTS.C search for: /*==*/ if (okansi()) { /*==*/ if (thisuser.sysstatus & sysstatus_spincurser) { /*%%*/ prt(2,"Defaults: (1-9,A-Z,?,Q) : "); /*%%*/ ch=onek("Q?123456789ABCSW"); /* <--- Add S */ /*==*/ } else { /*%%*/ prt(2,"Defaults: (1-9,A-Z,?,Q) : "); /*%%*/ ch=onek("Q?123456789ABCSW"); /* <--- Add S */ Step 9: Cloase and save DEFAULTS.C Step 10: Open DEFAULTS.C and add this case: case 'B': if (thisuser.sysstatus & sysstatus_spincurser) thisuser.sysstatus ^= sysstatus_spincurser; nl(); prt(5,"Use Spinning Cursor? "); if (yn()) { thisuser.sysstatus |= sysstatus_spincurser; change_spin(); } break; Step 10-20: Ok, done there. Now, here is the fun part. You have to go through all of the files that have getkey() in them, and replace that with either getkey(1) to use spinning cursor, or getkey(0) to not use it.. Do whatever you want here. This is a list of files where getkey() is called: BBS.C BBSUTL.C COM.C CONIO.C EXTRN.C UTILITY.C UEDIT.C DIREDIT.C DEFAULTS.C You might have other mods that use the getkey() function, you have to change those too. getkey() only shows up every now and then. The mod is finished. /* NOTE */ You must compile your source code for this to work. /* NOTE */ I have used the callsign in this mod. So if you use the callsign for some reason, or just like to have it there (I know that I don't use it, and many other sysops donm't either, so I thought that it would work okay) then either don't install this mod, or find something else to use. You could use the last parts of the real names if you were REALLY desperate... Like have the line say: thisuser.realname[21], and then use thisuser.realname[20] for the second one etc... untill you use up characters. If you don't have any voting questions, then you can probably take it from votes[20], /* user's votes */ that line... and just say thisuser.votes[17], thisuser.votes[18].. .etc... So you have a lot of options. Now, this may not work, because the original mod wanted me to add a spin[4] somewhere in there, so I just took it from the callsign... but you might even be able to take it from the res_gp[100]; /* reserved for whatever */ line. But I could be totaly wrong, hey, maybe that's what I should have tried to do, instead of using the callsign. But at any rate, do whatever you want. If you have no idea what I am talking about, then you haven't modded WWIV very long because the day I got my registration number in the mail, I knew NOTHING about C... and I still know nothing about C, but I've learned a lot. But anyways, basicly what I am trying to say is: If you don't know what you are doing, then if you install this mod, you will not be able to have users use the callsign. If you know what I am talking about, then you can change it around so that you do not have to use the callsign. And if you STILL don't know what I am talking about, I don't blame you, I often don't know what I am talking about. /* BTW */ This is my first mod ever, and it's really not mine, I am just re-putting it out because I haven't seen one out there and I think it's really really really neat. I tested it, and it works -- Locally. Haven't tried with a user on line, but there shouldn't be a problem. You can E-mail me, 1@7706 IceNET, or SWAMP GAS @7711 WWIVnet (I don't know my number there). From the guy who doesn't know what he just did, but did it anyways-- 1-3Swamp Gas0