The NavHaz Junction Forum Index
Front Page | Forum Root | Downloads | FAQ | Search | Memberlist | Profile | Login to check messages | Log in | Register
Author Message
<  Ever had an itch and wanted something to scratch it with?
PostPosted: Sun Feb 18, 2007 8:51 pm  Reply with quote

Joined: 18 Feb 2007
Posts: 1
Location: Nowhere Nebraska

I have been sitting on this script for over a year and finally think it might be ready for the masses to use.

I call it AlienHunt and all it does is triggers on Alien Space. It has been successfully tested in subzero games and I think that any game that has aliens with up 2 names should work. It will write to a file named GAMENAME.aliens, sends a SubSpace message and also if you have the ding.wav sound file in your TWX Directory will also make a sound.

I am releasing this in source format because I believe that the source should be examined by anyone who runs the script.

The only guarantee I am willing to put on the table is that it works for me, if it don't work for you; the source is there fix it.

Maniac's AlienHunter Version 1.0.3

 Filename:  AlienHunt.ts
 Filesize:  2.32 KB
 Downloaded:  2381 Time(s)

Back to top
View user's profile Send private message
PostPosted: Mon Feb 19, 2007 11:56 am  Reply with quote
Site Admin

Joined: 29 Jan 2007
Posts: 70


We had a small convo afew months ago and Prome mentioned that the # info (who's online) isn't needed, and isn't as reliable as we hoped. Ever been in a game where aliens were supposed to have been turned off? But the ships were still there? Sometimes they still have a space too.

Turns out there are only 2 times the word "Space" appears in the Sector line.
1 it's uncharted.
2 when it's alien.

Looks like this:
Sector : xxxx in Ferrengi Space.
Sector : xxxx in Ascian Wanderers Space.
Sector : xxxx in SubterFuge Space.

So that formed the basis of the little print alien space snippet I posted here a while back. I adapted that to this concept (a resident checker for)...

I haven't tested it at all...

# -----------------------------------------------
# Quick script to detect aliens as they come in.
# Based on the script by Maniac.
# -----------------------------------------------
# -----------------------------------------------

# Set the filename
setvar $file GAMENAME & "-aliens.txt"
fileexists $sound "ding.wav"

# Set the triggers
killtrigger parse_sector
setTextLineTrigger parse_sector :parse_sector "Sector  :"

# Parse it and check for aliens...
killtrigger parse_sector
# Check for spoofs - _[1;32mSector
getWord CURRENTLINE $spoof_test 1
getWord CURRENTANSILINE $ansi_spoof_test 1
getWordPos $ansi_spoof_test $ansi_spoof_pos #27 & "[1;32m"
if ($spoof_test <> "Sector") OR ($ansi_spoof_pos < 1)
     # It's a spoof, blah!
     goto :set_the_triggers

# Get the sector number
getWord CURRENTLINE $alien_sector 3

# Get the constellation name from the trigger
getText CURRENTLINE $constellation "in " "."
stripText $constellation " (unexplored)"
stripText $constellation "uncharted space"
stripText $constellation "."

# With all of this, is it a particular alien "space" ?
getWordPos $constellation $pos "Space"
if ($pos > 0)
     # It is!

     # Here we make a padding variable. Makes it easier to read
     # the file output by spacing things out better.
     getLength $alien_sector $sector_size
     if ($sector_size = 1)
          setVar $pad "       "
     elseif ($sector_size = 2)
          setVar $pad "      "
     elseif ($sector_size = 3)
          setVar $pad "     "
     elseif ($sector_size = 4)
          setVar $pad "    "
     elseif ($sector_size = 5)
          setVar $pad "   "
          setVar $pad "   "

     # Write it all to the file defined above as $file.
     write $file $alien_sector & $pad & $constellation

     # Echo to screen
     echo ANSI_14 & "**" & $constellation & " found at " & $alien_sector & "*"

     # Play the sound
     if ($sound)
          sound "ding.wav"

# end if...

# Set the triggers again.
goto :set_the_triggers

I don't do the "script?" reply, but you can add that I guess if you want. The output is to the screen and a file, could add a subspace report too for corpie coordination. Changed the alien file name to a .txt file for easier loading in winblows XP, but other than that... same basic thing really.

Test it, see if it does the same thing. Should, but, well, no guarantees. =)
Shoo! No signature here! Muhahaha!
The NavHaz Junction
Back to top
View user's profile Send private message
Display posts from previous:   
All times are GMT

View next topic
View previous topic
Page 1 of 1
The NavHaz Junction Forum Index -> TWXproxy Scripts

Post new topic   Reply to topic

Jump to:  
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 vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum

Powered by phpBB