View unanswered posts | View active topics It is currently Sun Apr 19, 2026 10:03 pm



Reply to topic  [ 7 posts ] 
 Zoc/REXX Sector info 
Author Message
Lieutenant J.G.

Joined: Mon Feb 26, 2001 3:00 am
Posts: 441
Location: In your girlfriend's bed
Unread post Zoc/REXX Sector info
I'm trying to write REXX scripts for ZOC again after so many years of being away. It's slowly coming back to me, but one issue I'm having is this:

What's the line for a script to grab the current sector that the player is in and use that information in the script? There are many ways to get sector info such as sending "/" or "I".

Using that line (or lines) as a template, I can continue writing my scripts.

Thanks :)


Tue Jun 15, 2010 8:39 pm
Profile
Gameop
User avatar

Joined: Thu Mar 08, 2001 3:00 am
Posts: 886
Location: USA
Unread post Re: Zoc/REXX Sector info
given the line "Command [TL=00:00:00]:[1234] (?=Help)? :", here is a start:

Code:
call zocwait "Command ["
call zocwait "]:["
call zocwait "]"
sector = zoclastline()


the above will give you sector = "1234]" because zoclastline() gives you everything from the current line or the latest zocwait. the following code is an improvement because it strips out the "]".

Code:
call zocwait "Command ["
call zocwait "]:["
call zocwait "]"
parse value zoclastline() with sector "]"


the above will give you sector = "1234". you can refine more by handling the return values from the zocwait calls. zocwait will return the number 640 on a timeout. you can define the timeout period in seconds with the zoctimeout function.

Code:
call zoctimeout 60
if zocwait("Command [") = 640 then exit
if zocwait("]:[") = 640 then exit
if zocwait("]") = 640 then exit
parse value zoclastline() with sector "]"

_________________
twgs : telnet://twgs.thereverend.org:5023
web : http://www.thereverend.org
games : http://www.thestardock.com/twgssearch/i ... verend.org
helper : http://svn.thereverend.org:8080/revhelper/


Tue Jun 15, 2010 9:15 pm
Profile
Lieutenant J.G.

Joined: Mon Feb 26, 2001 3:00 am
Posts: 441
Location: In your girlfriend's bed
Unread post Re: Zoc/REXX Sector info
Thanks, Rev. Much appreciated.


Tue Jun 15, 2010 9:28 pm
Profile
Lieutenant J.G.

Joined: Mon Feb 26, 2001 3:00 am
Posts: 441
Location: In your girlfriend's bed
Unread post Re: Zoc/REXX Sector info
I don't get that line from the Citadel prompt. So what's my option here?


Wed Jun 16, 2010 4:33 am
Profile
Veteran Op
User avatar

Joined: Thu Jun 02, 2005 2:00 am
Posts: 5558
Location: USA
Unread post Re: Zoc/REXX Sector info
Timberwolf wrote:
I don't get that line from the Citadel prompt. So what's my option here?


/, I, S or qdc

_________________
May the unholy fires of corbomite ignite deep within the depths of your soul...

1. TWGS server @ twgs.navhaz.com
2. The NavHaz Junction - Tradewars 2002 Scripts, Resources and Downloads
3. Open IRC chat @ irc.freenode.net:6667 #twchan
4. Parrothead wrote: Jesus wouldn't Subspace Crawl.

*** SG memorial donations via paypal to: dpocky68@booinc.com
Image


Wed Jun 16, 2010 6:00 am
Profile ICQ WWW
Chief Warrant Officer
User avatar

Joined: Sun Jan 20, 2008 5:15 am
Posts: 142
Unread post Re: Zoc/REXX Sector info
Singularity wrote:
Timberwolf wrote:
I don't get that line from the Citadel prompt. So what's my option here?


/, I, S or qdc


You can also activate your computer from the citadel prompt and parse it from the computer prompt:

Computer command [TL=11:32:11]:[466] (?=Help)? ?


Wed Jun 16, 2010 7:07 pm
Profile
Lieutenant J.G.

Joined: Mon Feb 26, 2001 3:00 am
Posts: 441
Location: In your girlfriend's bed
Unread post Re: Zoc/REXX Sector info
Thanks, Scrat...i'll give it a shot.


Sat Jun 19, 2010 6:07 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 7 posts ] 

Who is online

Users browsing this forum: No registered users and 8 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.