Score table

Posted by USER007 on Wed 08 Oct 2003 09:13 PM — 30 posts, 103,237 views.

#0
How do you change the score table? I want to remove some things that appear in it.
USA #1
You can't, since it seems you don't have a compiler. You need to edit player.c, and then recompile, but you can't. Or can you?
#2
Nope I dont have a compiler. :/ I need a free one! :D
USA #3
Cygwin would be your best bet. I never used it though.
#4
Ok but cygwin suckzOrs! :P How do you change the color of the description and the color when the commands are executed? IE: &Ysave is in yellow I want it to be white.
USA #5

save
Saved...

Which one, the command "save" or the result "Saved..."?
You can't change "save" because it depends on the client your using. "Saved..." can be changed by editing and compiling, which you'll be needing a compiler again, to make the change.
Amended on Sat 11 Oct 2003 01:18 AM by Zeno
#6
Damn, I wanted to change the result, so Saved... would be white instead of yellow, so how would I change it into white text? And I think I'm going to get me a shell. :P
Amended on Sat 11 Oct 2003 12:21 AM by USER007
USA #7
In act_comm.c there should be something that looks like this.

void do_save( CHAR_DATA *ch, char *argument )
{
    if ( IS_NPC(ch) )
	return;
    if ( ch->level < 2 ) {
	send_to_char_color( "&BYou must be at least second level to save.\n\r", ch );
	return;
    }
    WAIT_STATE( ch, 2 ); /* For big muds with save-happy players, like RoD */
    update_aris(ch);     /* update char affects and RIS */
    save_char_obj( ch );
    saving_char = NULL;
    send_to_char( "Saved...\n\r", ch );
    return;
}

The bold line is what you want to change. You said white right? Well, white is &W, so change it to this:

send_to_char( "&WSaved...\n\r", ch );

That would be the simple way.
#8
Ok thanks.
#9
Just thought I'd throw this in remember...no compile....no actuall changes appear, anyway cygwin wasnt so bad learning to code (wich I sought of still am in the process of doing..heh getting better)...thou if you think cygwin sucks, I learned soon after getting one, the shell aint all too different save for a few new commands to learn anyway later, thou honestly I suggest learning on your box using a really good txt editor like syn and cygwin, then work your way up when you got a feel for it, anyway just some advice later.
United Kingdom #10
Okay since this about the Score Table... who would u get it to to check the pfile for 'Tier' data and then show it... i dont understand how it works... im confushed and am a n00bie which dont help!!! Someone help please!

Rash
USA #11
You would need to change it to:

send_to_char_color( "&WSaved...\n\r", ch );

Otherwise you would just get the color code displayed to the user.
USA #12
Cygwin is an excellent tool! I've been using it as my compiler under Windows for years now, and I don't know what I'd do without it. If you can get the bloody thing to install properly and work, then you're set.

In the src dir, you type 'make' and it compiles. How does that suckzOrz?
USA #13
Cygwin *USED* to suck. Badly. But somewhere along the way they've improved dramatically. To the point where I'm able to use it as a primary environment for development when I'm at work with nothing better to do than code. All you need to do is download the latest version of their nifty setup too, pick the stuff you need, and you're set.

What do you need I hear you asking? Usually the following:

GCC, Make, Crypt, and if you're using MCCP, Zlib. In some cases you may also need to install the tcsh shell. Aside from that, install the Cygwin base stuff and you're set. Takes about 10 minutes to download on a broadband link. The problem obviously comes from being stuck on dial-up.
#14
Whats MCCP? And when I try to compile where does the whole code/areas/etc. need to be? In the src folder of cygwin?
USA #15
Maybe you shouldn't be using Cygwin...... but, well, if you insist. :)

I think that Nick has a guide here that gives a pretty good explanation of how to set things up.

http://www.gammon.com.au/smaug/installingcygwin.htm

http://www.gammon.com.au/smaug/howtocompile.htm

I suggest that if you truly do want to venture down this path, you read those FULLY and follow them to the letter.

To answer your question, no, don't put the SMAUG stuff into Cygwin's source dir... that's the source dir for Cygwin stuff. You probably want to make a subdir "smaug" inside your home directory, and stick things in there.

MCCP is MUD client compression protocol, or something like that. It takes text, compresses it, sends out the compressed version, and the client decompresses it. It saves bandwidth (both on server and client) and so is generally a good thing. It's also fast enough where the extra processor load on the server is not signficiant. It just needs to be implemented... and that's not always easy, especially if you don't know how to code.
#16
Thanks for the address but I keep getting these errors on cygwin:
$ tar xzf smaug1.4a_mxp.tar
tar (child): smaug1.4a_mxp.tgz: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error exit delayed from previous errors


Any help on how to fix this or what to do?
USA #17
If you can't open the file because it can't find the file, then obviously it's not there and you should put it there. :)

Put the tar file wherever it is you're running that command. To find out, type "pwd" at the Cygwin prompt - that will give you the Cygwin path. You'll need to translate that into a Windows path.
#18
Lol. I put it in the home/owner direc and I typed ls and it found the file but it still gaves me the errors when I typed the tar thing. And I did what the guide told me to do, any other help? And what do you mean by translate windows path, as in: C:\cygwin... etc.?
Amended on Sat 01 Nov 2003 02:41 PM by USER007
USA #19
Well obviously you didn't do something right, since it's not working...

Could you paste what you get when you typed ls? You're probably not entering the tar command in the right spot, or you're not using the right file, or something to that effect.

ls isn't a search command, by the way, it just lists the directory contents.

Translating paths means changing:
/home/myUser/something
to
c:\[cygwin]\home\myUser\something
or something similar.
#20
Heres what it says:

Owner@Anavel~
$ls
smaug1.4a_mxp.tar

Owner@Anavel~
$ tar xzf smaug1.4a_mxp.tar
tar (child): smaug1.4a_mxp.tgz: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error exit delayed from previous errors


Do I have to type the direc and then the tar thing?
USA #21
Just look at what it's telling you... it's saying it can't open smaug1.4a_mxp.tgz, not smaug1.4a_mxp.tar - which means that your file is not there.

You probably unzipped the .tgz file and put the tar file there.

If you don't have a .tgz file and can't find one (even though that should be the standard Unix distribution format), you can try entering
tar xf smaug1.4a_mxp.tar
instead. Note that without the z, it won't think it's zipped.

Here, you have a .tgz file, which is probably the one you downloaded but unzipped:
http://www.gammon.com.au/downloads/dlsmaug.htm
So you might want to check that out. You'll obviously have to adjust your file accordingly.
#22
Thanks that solved that problem but I hate to say this, it gave me another error. : |

Owner@Starblazer ~
$ tar xf smaug1.4a_mxp.tar
tar: This does not look like a tar archive
tar: Skipping to next header
tar: Archive contains obsolescent base-64 hea
tar: Error exit delayed from previous errors
USA #23
Then use the .tgz file and use the original instruction, like the guide says. I'm not sure how you got the .tar there instead of the .tgz in the first place...
Australia Forum Administrator #24
Despite the suffix it might still be compressed. Try:

tar xzf smaug1.4a_mxp.tar

rather than

tar xf smaug1.4a_mxp.tar
USA #25
And it's entirely possible his browser renamed it on him. If you don't watch, sometimes that will happen when there's something on the system that's associated with the particular type of file. Winzip associations for .tgz, .gz, and .tar.gz often end up trying to be named with just a .tar extention. Leaving you with what Nick said. A .tar file that's actually still compressed. Rather annoying behaviour :P
#26
I tried what Nick said and I got this:

Owner@Starblazer ~
$ tar xzf smaug1.4a_mxp.tar

Owner@Starblazer ~
$

This is all it did. It took 5 secs for it to proccess the tar thing with no result. :|
Australia Forum Administrator #27
Quote:

And it's entirely possible his browser renamed it on him. If you don't watch, sometimes that will happen ...


It almost always happens to me. One of Windows' quirks. The "rename the file to something you didn't want" function. :P


Quote:

I tried what Nick said and I got this:

Owner@Starblazer ~
$ tar xzf smaug1.4a_mxp.tar

Owner@Starblazer ~
$


No error message? Sounds like it worked. Do a "ls" and see if the directory that was in the archive is now there.
#28
OMG! It worked! Thanks :o Ok now I'm going to use smaugwiz instead of the one that I just opened. Just one problem... I can't open the SmaugWizard Builder folder even though I type ls. I typed cd SmaugWizard Builder and it gave me something about bash. Do I have to tar a file for cd to work on it?


=Edit= Ok nvm for some reason it wasn't working th first time now it is... :o
Amended on Tue 04 Nov 2003 06:47 PM by USER007
USA #29
On Unix based systems you need to be exact. This is a problem most notably for case-sensitive files:
cd MyDirectory
is NOT the same at all as:
cd myDirectory
is not the same as
cd mydirectory

So you just need to watch out for that. It's probably why your directory wasn't working.

I would suggest that you do all file manipulation under Windows explorer, in your cygwin/home/myuser/blablabla directories, and then only use cygwin to compile and run. No point in creating additional headaches for yourself.