View unanswered posts | View active topics It is currently Tue Dec 23, 2025 12:20 am



Reply to topic  [ 134 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6 ... 9  Next
 ability to publish game logs to a blogger account. 
Author Message
Commander
User avatar

Joined: Mon Oct 29, 2001 3:00 am
Posts: 1096
Location: Tucson, AZ
Post Re: ability to publish game logs to a blogger account.
The game logs are in TWOPENG.DAT.

What if I wrote something that would take everything from that log between two given dates (or in the past 24 hours, or something like that) and output it as a fragment of HTML with color tags so it looks like it does in the game? Would that do what you want?

_________________
Suddenly you're Busted!


Wed Aug 17, 2011 9:14 pm
Profile WWW
Gameop
User avatar

Joined: Wed Jun 15, 2011 1:26 am
Posts: 165
Location: Martensville SK Canada
Post Re: ability to publish game logs to a blogger account.
Mongoose wrote:
The game logs are in TWOPENG.DAT.

What if I wrote something that would take everything from that log between two given dates (or in the past 24 hours, or something like that) and output it as a fragment of HTML with color tags so it looks like it does in the game? Would that do what you want?


Yes exactly. now we are getting somewhere. as that would be perfect.

but the only problem is my game server went down and i could not get it to come back up. i even tried to reinstall it. but it would not come online. (it would come online but i could not access it remotely) so even though your help would be welcome i will not be able to use the script untill Version 2.08 comes out.

_________________
http://bbs.slother3x.info
http://www.slother3x.info My own website, hosted by myself.

"it only takes one to ruin it for all"
"The promises of our youth will always haunt us in the wisdom of our old age"


Thu Aug 18, 2011 11:15 am
Profile YIM
Gameop
User avatar

Joined: Wed Jun 15, 2011 1:26 am
Posts: 165
Location: Martensville SK Canada
Post Re: ability to publish game logs to a blogger account.
my server is back online and i am now able to use any scripts you have, thanks for being so helpful.

_________________
http://bbs.slother3x.info
http://www.slother3x.info My own website, hosted by myself.

"it only takes one to ruin it for all"
"The promises of our youth will always haunt us in the wisdom of our old age"


Thu Aug 18, 2011 10:26 pm
Profile YIM
Gameop
User avatar

Joined: Wed Jun 15, 2011 1:26 am
Posts: 165
Location: Martensville SK Canada
Post Re: ability to publish game logs to a blogger account.
just to bump an old question... is programmming those scripts as hard as i thought they were? because i have not heard back since i last posted on this thread.

i could give you my blog email address for posting perpouses to see if they would help PM me and i'll "lend" you my posting email address.

_________________
http://bbs.slother3x.info
http://www.slother3x.info My own website, hosted by myself.

"it only takes one to ruin it for all"
"The promises of our youth will always haunt us in the wisdom of our old age"


Thu Aug 25, 2011 7:24 pm
Profile YIM
Commander
User avatar

Joined: Mon Oct 29, 2001 3:00 am
Posts: 1096
Location: Tucson, AZ
Post Re: ability to publish game logs to a blogger account.
Ha, you posted that comment right as I was typing this.

I got around to working on this today. I've created a class that parses each log entry from a byte array. That was the easy part.

Now it's a question of how to use it. I'm thinking of a command line program that stores its last-run timestamp in a file. Every time you run it, it will produce a HTML fragment containing the log entries between the last time it was run, and now. It could also have command line options to override that behavior.

If I remember correctly, you're visually impaired, right? Does that make any difference for command line programs? Or, what kind of interface would be best for you?

_________________
Suddenly you're Busted!


Thu Aug 25, 2011 7:25 pm
Profile WWW
Commander
User avatar

Joined: Mon Oct 29, 2001 3:00 am
Posts: 1096
Location: Tucson, AZ
Post Re: ability to publish game logs to a blogger account.
Almost done. I'll post it tomorrow.

_________________
Suddenly you're Busted!


Fri Aug 26, 2011 3:14 am
Profile WWW
Commander
User avatar

Joined: Mon Oct 29, 2001 3:00 am
Posts: 1096
Location: Tucson, AZ
Post Re: ability to publish game logs to a blogger account.
Okay... here's a preliminary version. Sorry it's in Java. I don't know any other languages well enough to do this as quickly and easily... particularly the date parsing. Maybe somebody can port it to perl or something.

Like many UNIX text processing commands, it reads from standard input and writes to standard output. So you cat your TWOPENG.DAT, pipe it to this program, and redirect the output to a file, e.g.,

Code:
cat TWOPENG.DAT | java -jar TWOPENG.jar > log.html


You can run it with zero, one, or two date arguments. With zero arguments, it converts the entire log file. With one argument, it converts all log entries on that date. With two arguments, it converts all log entries between the two dates, inclusive, i.e., from 00:00:00 on date1 to 23:59:59 on date2. The date format is mm/dd/yy. Remember to use the game year, not the real year.

Limitations:

TWOPENG.DAT uses weird little codes to set the text color, e.g., ~1 means bright cyan. I only know what a few of the codes mean. Text with an unrecognized color code will be displayed as gray on black. If someone sends me a log containing other color codes, I'll add them in.


Attachments:
File comment: Rename this file to TWOPENG.jar.
TWOPENG.zip [12.27 KiB]
Downloaded 528 times

_________________
Suddenly you're Busted!
Fri Aug 26, 2011 6:23 pm
Profile WWW
Gameop
User avatar

Joined: Wed Jun 15, 2011 1:26 am
Posts: 165
Location: Martensville SK Canada
Post Re: ability to publish game logs to a blogger account.
it turns out that i am playing Tradewars from a linux machine but i am hosting from a vista machine. i am assuming that these are the source codes. does any of you guys know of a cool program to convert these to a program .exe .com or .bat file that i can use in the automation of Tradewars Game server. or if i looked up java to .exe on the net would it help? i am a programming newbe. as i have not programmed in ages. and it was in qbasic lol.

_________________
http://bbs.slother3x.info
http://www.slother3x.info My own website, hosted by myself.

"it only takes one to ruin it for all"
"The promises of our youth will always haunt us in the wisdom of our old age"


Fri Aug 26, 2011 7:35 pm
Profile YIM
Gameop
User avatar

Joined: Wed Jun 15, 2011 1:26 am
Posts: 165
Location: Martensville SK Canada
Post Re: ability to publish game logs to a blogger account.
i am reading this web site to try to figure out how to do the question i just asked. bare with me.
http://www.excelsior-usa.com/articles/java-to-exe.html

_________________
http://bbs.slother3x.info
http://www.slother3x.info My own website, hosted by myself.

"it only takes one to ruin it for all"
"The promises of our youth will always haunt us in the wisdom of our old age"


Fri Aug 26, 2011 7:42 pm
Profile YIM
Gameop
User avatar

Joined: Wed Jun 15, 2011 1:26 am
Posts: 165
Location: Martensville SK Canada
Post Re: ability to publish game logs to a blogger account.
i found this program that compiles Java. AFAIK. what do you think about it?
http://www.cygwin.com/

_________________
http://bbs.slother3x.info
http://www.slother3x.info My own website, hosted by myself.

"it only takes one to ruin it for all"
"The promises of our youth will always haunt us in the wisdom of our old age"


Fri Aug 26, 2011 8:09 pm
Profile YIM
Commander
User avatar

Joined: Mon Oct 29, 2001 3:00 am
Posts: 1096
Location: Tucson, AZ
Post Re: ability to publish game logs to a blogger account.
Cygwin is a POSIX compatibility layer built on top of Win32, so you can run Linux/UNIX programs on Windows. It's sort of like the opposite of WINE, but the compatibility isn't as complete. I think programs have to be compiled specifically to run in Cygwin.

The file I posted is an executable jar. Change the extension from zip to jar and run it with the java command. You will need to install the JRE (Java Runtime Environment) which you can download from Oracle.

Edit: here's the source in case anyone's interested in porting it to another language. It's only two files.


Attachments:
TWOPENG-src.zip [2.48 KiB]
Downloaded 539 times

_________________
Suddenly you're Busted!
Fri Aug 26, 2011 8:19 pm
Profile WWW
Commander
User avatar

Joined: Mon Oct 29, 2001 3:00 am
Posts: 1096
Location: Tucson, AZ
Post Re: ability to publish game logs to a blogger account.
Crap, I just found a bug. Here's the fixed executable. Again, rename it from zip to jar.

The bug is in LogRecord.java, line 46. It should read:

Code:
date = new String(data, offset + 174, 8);


Attachments:
TWOPENG.zip [12.27 KiB]
Downloaded 501 times

_________________
Suddenly you're Busted!
Fri Aug 26, 2011 8:26 pm
Profile WWW
Gameop
User avatar

Joined: Wed Jun 15, 2011 1:26 am
Posts: 165
Location: Martensville SK Canada
Post Re: ability to publish game logs to a blogger account.
as you can tell then i have no idea what i am doing. lol. but i am reserching it to get out of "newbie island" and join you guys

_________________
http://bbs.slother3x.info
http://www.slother3x.info My own website, hosted by myself.

"it only takes one to ruin it for all"
"The promises of our youth will always haunt us in the wisdom of our old age"


Fri Aug 26, 2011 8:31 pm
Profile YIM
Commander
User avatar

Joined: Mon Oct 29, 2001 3:00 am
Posts: 1096
Location: Tucson, AZ
Post Re: ability to publish game logs to a blogger account.
I wish I could help you more, but I don't know how to set up paths and stuff on Windows.

What happens if you type "java" on the command line?

_________________
Suddenly you're Busted!


Fri Aug 26, 2011 8:56 pm
Profile WWW
Gameop
User avatar

Joined: Wed Jun 15, 2011 1:26 am
Posts: 165
Location: Martensville SK Canada
Post Re: ability to publish game logs to a blogger account.
Mongoose wrote:
I wish I could help you more, but I don't know how to set up paths and stuff on Windows.

What happens if you type "java" on the command line?

this...
Code:
C:\Users\Ryan Harrison>java
Usage: java [-options] class [args...]
           (to execute a class)
   or  java [-options] -jar jarfile [args...]
           (to execute a jar file)

where options include:
    -client       to select the "client" VM
    -server       to select the "server" VM
    -hotspot      is a synonym for the "client" VM  [deprecated]
                  The default VM is client.

    -cp <class search path of directories and zip/jar files>
    -classpath <class search path of directories and zip/jar files>
                  A ; separated list of directories, JAR archives,
                  and ZIP archives to search for class files.
    -D<name>=<value>
                  set a system property
    -verbose[:class|gc|jni]
                  enable verbose output
    -version      print product version and exit
    -version:<value>
                  require the specified version to run
    -showversion  print product version and continue
    -jre-restrict-search | -jre-no-restrict-search
                  include/exclude user private JREs in the version search
    -? -help      print this help message
    -X            print help on non-standard options
    -ea[:<packagename>...|:<classname>]
    -enableassertions[:<packagename>...|:<classname>]
                  enable assertions
    -da[:<packagename>...|:<classname>]
    -disableassertions[:<packagename>...|:<classname>]
                  disable assertions
    -esa | -enablesystemassertions
                  enable system assertions
    -dsa | -disablesystemassertions
                  disable system assertions
    -agentlib:<libname>[=<options>]
                  load native agent library <libname>, e.g. -agentlib:hprof
                    see also, -agentlib:jdwp=help and -agentlib:hprof=help
    -agentpath:<pathname>[=<options>]
                  load native agent library by full pathname
    -javaagent:<jarpath>[=<options>]
                  load Java programming language agent, see java.lang.instrument

    -splash:<imagepath>
                  show splash screen with specified image

C:\Users\Ryan Harrison>

_________________
http://bbs.slother3x.info
http://www.slother3x.info My own website, hosted by myself.

"it only takes one to ruin it for all"
"The promises of our youth will always haunt us in the wisdom of our old age"


Fri Aug 26, 2011 9:03 pm
Profile YIM
Display posts from previous:  Sort by  
Reply to topic   [ 134 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6 ... 9  Next

Who is online

Users browsing this forum: No registered users and 47 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by wSTSoftware.