View unanswered posts | View active topics It is currently Mon Apr 20, 2026 1:05 am



Reply to topic  [ 3 posts ] 
 I'm trying to mape an auto planet move sell script 
Author Message
Private

Joined: Tue May 18, 2004 2:00 am
Posts: 1
Location: USA
Unread post 
I'm trying to write a Zoc Script that will pull sector numbers from .txt. I want the script to start from the top of the list and go to the end in order i have the sectors listed.

any one that can help me with this code please respond, help a trader out...
Aidan

_________________
Corperation above all


Tue May 18, 2004 12:56 pm
Profile YIM
Lieutenant J.G.

Joined: Mon Sep 22, 2003 2:00 am
Posts: 486
Location: USA
Unread post 
a good example of a script that employs a list use function is
the reverends eprobe script you may want to get it and look at it with a txt editor breaking down the processes and isolating the
list reading subroutine and there you will have what your looking for.
i am sure that other more qualified individuals will provide you with other examples but for a zoc script that is the best example i could
find for you.
i hope this helps.

_________________
C.E.O. Corp Noble House
Sysop - Zentock's Realm TWGS
Co-Sysop - Vulcans Forge TWGS

Admin.
Vulcans Forge Forums
Vulcans Forge TeamSpeak


Tue May 18, 2004 2:31 pm
Profile ICQ
Commander

Joined: Thu Feb 20, 2003 3:00 am
Posts: 1529
Location: USA
Unread post 
Hey, a script question in a language I know :) I do it this way:

file1 = "myfile.txt"
myarray. = 0
k = 1
call stream file1, "C", "OPEN READ"
do while lines(file1) = 1
line = linein(file1)
myarray.k = line
k = k + 1
end
call stream file1, "C", "CLOSE"

now myarray.1 = the first line of your file. myarray.32 = line 32 of your file, etc. You could do whatever you want with each line as you pull it it, also. Or if it were a list of sectors (like a fig'd sectors list), you could do myarray.line = 1. Then you could later do a test like:
if myarray.4652 = 1 then do
call zocwriteln "Sector 4652 has a fig"
end

Does this make sense?


Tue May 18, 2004 3:24 pm
Profile ICQ
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

Users browsing this forum: Google [Bot] 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.