www.ClassicTW.com
https://mail.black-squirrel.com/

fed surround
https://mail.black-squirrel.com/viewtopic.php?f=15&t=13194
Page 1 of 2

Author:  PHX [ Wed Oct 05, 2005 1:58 am ]
Post subject: 

I want a script to travel all 10 Fedspace sectors and only 1 sector at a time so as not to have to ewarp and I do need to get back to 1 at the end. This is for a surround script.

It seems to me that the sectors have always been able to be traversed in this sequence in any game.
1 3 4 5 6 7 8 2 9 10 2 1

Can anyone contest this? If so, is there a better way?

Author:  Father Cajone [ Wed Oct 05, 2005 6:40 am ]
Post subject: 

Would you like that complete with someone popping chilled peeled grapes in your mouth while you sit in your vibrating relaxer chair at the same time you are getting a full facial and scalpal massage?

Author:  Singularity [ Wed Oct 05, 2005 8:28 am ]
Post subject: 

Uhm. Wow. Uncalled for.

I just took a look in the games I have going and they all seem to work with that order. Good to know. Whether or not that ever changes is beyond me. Cool math problem tho.

Author:  Wildstar [ Wed Oct 05, 2005 8:59 am ]
Post subject: 

Wonder if he is talking about my fed surround script.
It goes to all sectors 1-10 and will drop a fighter in all the sectors off fed then return to sector 1. Will not drop a fighter if dock sector is off fed and it will express back to fed space if there is a 1 way off fed.
If this is what you wanted PHX,and enough people would want it, I could post it at grimy's.
Let me know

Author:  PHX [ Wed Oct 05, 2005 10:37 am ]
Post subject: 

Thats about what im doing, only mine is more...its acutally an AMTRAK script so that is just part of the whole. Though it would be quite usefull on its own as well.

Anyways, the script already works, I just wondered if anyone new if that sequence has hever NOT worked. If so ill have to come up with a different method. I realize that a bored sysop might manually change the warps but that would screw things up anyway so it is not practical.

Thanks for the offer WS but I am happy writing my own. I am sure there are plenty who would use it. Mine will be posted on Grimy when its finished as well. Oh yeah...and I was going to just have it report the 1ways via sub-space or ECHO and not fig them but since yours does it and ewarps back ill have to give mine an option to do the same. Can't be outdone you know!

FC....WTF? I was not asking for code. Byte me.

Author:  PHX [ Wed Oct 05, 2005 11:04 am ]
Post subject: 

SOAB! does anyone know how to decipher this ****???

Script compilation error: Access violation at address 00312405. Read of address 00000001

The numbers seem to change every time.

I just added some crap to the script and it started doing this. It is a TS.

heres the script

Code:
  getword CURRENTLINE $prompt 1
  cuttext CURRENTLINE $var 24 5
  striptext $var "]"
  if ($prompt <> "Command") or ($var <> STARDOCK)
      echo ansi_12 "* You must start this script from the Command prompt at StarDock."
      halt
    end
  setvar $1ways ""
  setvar $report "Sub-space Report"
  gosub :rylos
  gosub :alpha

# -----p][x logo and menu------------------------------------------------------
:logo

:menu
  echo "title"
  echo ansi_14 "* 1 " ansi_12 "Rylos             " ansi_14 $rylos
  echo ansi_14 "* 2 " ansi_12 "Alpha Centauri    " ansi_14 $alpha
  echo ansi_14 "* 3 " ansi_12 "1-way Handeling   " ansi_14 $report
  echo ansi_14 "* ? " ansi_12 "Help" ansi_4 ", " ansi_14 " + " ansi_12 "Start" ansi_4 ", " ansi_14 " - " ansi_12 "Quit* "
  getconsoleinput $menu SINGLEKEY

# -----Menu response-----------------------------------------------------------
:menu_response
  if ($menu = 1)
      gosub :rylos
    elseif ($menu = 2)
      gosub :alpha
    elseif ($menu = 3)
      if ($1ways = "Yes")
          setvar $1ways "No"
        elseif ($1ways = "No")
          setvar $1ways "Yes"
        end
    elseif ($menu = 4)
      if ($report = "Sub-space Report")
          setvar $report "Local Report"
        elseif ($report = "Local Report")
          setvar $report "Express Fig"
        elseif ($report = "Express Fig")
          setvar $report "Sub-space Report")
        end
    elseif ($menu = "+") or ($menu = "=")
      goto :launch
    elseif ($menu = "-") or ($menu = "_")
      gosub :save
    elseif ($menu = "?") or ($menu = "/")
      gosub :help
    end
  goto :menu
      halt

# -----Script Launch-----------------------------------------------------------
:launch
  :route1
    send "m1*"
    gosub :get_path
    setvar $route ":route2"
    goto :run_path
  :route2
    setvar $path "3 4 5 6 7 8 2x 9 10 2 1"
    setvar $route ":route3"
    goto :run_path
  :route3
    send "m" STARDOCK "*"
    gosub :get_path
    setvar $route ":route4"
    goto :run_path
  :route4
  pause


# -----Report 1-ways because they were not figged------------------------------
:report
  if ($report = "Sub-space Report")
      send "'*MSL Runner - Completed*"
      send "The following are 1 ways and were not figged.   Outgoing-1Way*"
      send $1ways "**"
      waitfor "Sub-space comm-link terminated"
    else
      send "'MSL Runner - Completed*"
      waitfor "Message sent on sub-space channel"
      echo ansi_14 "* The following are 1-ways and were not figged." ansi_12 " Outgoing-1Way"
      echo ansi_12 "* " $1ways
    end
  halt

# -----Get path data for the next destination----------------------------------
:get_path
  killalltriggers
  settextlinetrigger 1 :twarp "TransWarp drive?"
  settextlinetrigger 2 :line1 " > "
  settextlinetrigger 3 :engag "Engage the Autopilot?"
  pause
  :twarp
    killtrigger 2
    killtrigger 3
    send "n"
    goto :get_path
  :line1
    killtrigger 1
    setvar $path CURRENTLINE
    getword $path $var 1
    striptext $path $var
  settextlinetrigger 2 :line2 " > "
  pause
  :line2
    mergetext $path CURRENTLINE $path
  settextlinetrigger 2 :line3 " > "
  pause
  :line3
    mergetext $path CURRENTLINE $path
  settextlinetrigger 2 :line4 " > "
  pause
  :line4
    mergetext $path CURRENTLINE $path
  :engag
    killtrigger 2
    striptext $path ">"
    striptext $path "("
    striptext $path ")"
    return

# -----Run the path to the next destination------------------------------------
:run_path
  getword $path $next 1
  if ($next = "")
      goto $route
    end
  striptext $path $next
  striptext $next "x"
  send "m" $next "* za 9999*"
  gosub :surround
  setvar $next ""
  goto :run_path

# -----Surround current sector-------------------------------------------------
:surround
  setvar $surround_loop 1
  if ($next = 1)
      goto $route
    end
  while ($surround_loop <= sector.warpcount[$next])
      setVar $adjacent sector.warps[$next][$surround_loop]
      getDistance $distance $adjacent $next
      if ($distance > 1)
          if ($1ways = "")
              setvar $1ways $next & "-" & $adjacent
            else
              setvar $1ways $1ways & ", " & $next & "-" & $adjacent
            end
        end
      setVar $surround_loop ($surround_loop + 1)
      if ($adjacent <> stardock) and ($adjacent > 10) and ($distance = 1)
           send "m" $adjacent " * za 9999* * f 1* cd < "
        end
    end
  return

# -----Ask for Rylos and Alpha Centauri locations------------------------------
:rylos
  echo ansi_12 "* Where is Rylos? "
  getconsoleinput $rylos
  return
:alpha
  echo ansi_12 "* Where is Alpha Centauri? "
  getconsoleinput $alpha
  return

Author:  Wildstar [ Wed Oct 05, 2005 11:36 am ]
Post subject: 

I have had that happen numerous times before.
I don't know what the error would be called, but here is how I fix it.
You might have to rewrite what you put in to make it error, or slap a pause in so you can look at the info you are getting.
You are pulling in some bad info and it messes with TWX.
But I think EP can explain better.

Author:  Alexio [ Wed Oct 05, 2005 3:03 pm ]
Post subject: 

Check the spelling on all your internal vars. That can cause it to have a access violation.

Author:  kilroy [ Wed Oct 05, 2005 5:07 pm ]
Post subject: 

Dang!! Don't you just hate it when your internal vars. go bad.

Author:  Singularity [ Wed Oct 05, 2005 7:02 pm ]
Post subject: 

Also found if you have an ambiguous trigger and are sending people to more than 1 place you can get that. About the amtrack, how are you planning to handle the MSLs?

Author:  Slim Shady [ Wed Oct 05, 2005 9:31 pm ]
Post subject: 

i can not recall a game i've played where fedspace was not traversed as you said (barring sysop editing)

Author:  Slim Shady [ Wed Oct 05, 2005 9:40 pm ]
Post subject: 

also, as a side note (since i forgot)
i would bet money that what FC was doing, was attempting to use a thing called "humor" to entice a laugh.
i laughed pretty good when i read it, and i got out of it no intended disrespect for PHX.
of course, who knows, maybe FC deep down has an undying hatred for PHX for some unbeknownst to me reason.
i truely doubt it though.

Author:  ElderProphet [ Thu Oct 06, 2005 2:05 am ]
Post subject: 

The Access Violation error here is caused by unpaired parentheses.
Line 42 of what you posted reads:
setvar $report "Sub-space Report")

+EP+

Author:  Zoso [ Thu Oct 06, 2005 10:28 am ]
Post subject: 

Seeing as EP has beat us to the punch, I would like to add that it is very useful to use a good editor. You can set the language that you are working in and if a mistake has been made the code or color of the code will change to let you know that you have made an error.
BTW what does everyone use? I normally stick with EditPadPro.

Zoso

Author:  Traitor [ Thu Oct 06, 2005 12:35 pm ]
Post subject: 

Textpad.

Page 1 of 2 All times are UTC - 5 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/