| Author |
Message |
|
Lostone
Staff Sergeant
Joined: Wed Oct 10, 2001 2:00 am Posts: 10 Location: USA
|
I am tyring to figure out some of the more complex versions of scripting so I decided to try and take a look at this and see what I could find from this program. I had originally intended to just go ahead and try and get a script that I could use to upgrade a single sector but I didn't know enough about the included files so I used this script as a model. While trying to figure it out I found a bug in this script that I am wondering if anyone else has encountered. IT seems that it will start fine and work on getting a sector but when it goes into the make planets subroutine it locks up if it doesn't build enough of the wanted planets before it runs out of credits to build. Once it gets below the credit limit it jsut locks itself into a loop and keeps going through a sector display loop. I tried to add some lines to the 2_build script to track down the loop but it appears that the loop isn't where I thought it was in the routine and it might be in the actual include file? anyone else work on this script at all or could point me in a direction I might be able to figure out?
_________________ "All Dreams Are fullfillments of Wishes!"
Freud
|
| Fri Mar 03, 2006 10:11 am |
|
 |
|
Singularity
Veteran Op
Joined: Thu Jun 02, 2005 2:00 am Posts: 5558 Location: USA
|
Most of the routines are in the include files. You can download the source at:
http://twxproxy.com/download.php
At the very top before the download links there's a link to the
source release. One of the best lessons in scripting there.
_________________ 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
|
| Fri Mar 03, 2006 5:49 pm |
|
 |
|
Lostone
Staff Sergeant
Joined: Wed Oct 10, 2001 2:00 am Posts: 10 Location: USA
|
yeah I have the source file I have been tearing apart the makeplanet subroutine to try and find where the loop is. That is my problem I vcan't find the problem with the loop in the actual script I think the probnlem with the loop might be with the actual include file. Can you change the include files anbd leave them uncomilied or do they have to be compiled to run? I added a line to print a client message in the actual build script after it is supposed to be kicked out of the makeplanet subroutine when it has failed( that is the first problem I found in the script the variable returned is called failed in makeplanet but in the build script it was called failure) But the client message never shows up so it apperas that the script never gets kicked out of the makeplanet script when you run out of money whiel trying to resupply. It works fine if you have a lot of money on you so that ti can just go to stardock but when the actual makeplanet include routine runs out of money it just loops intos a display sector and display info routine. So the best I can figure is that when it runs out of money it won't kick out of the makeplanet include file and jsut loops in the getting player info include. So the real question is how do you edit the include files so I can track down the endless loop and do you have to compile them to get them to run properly.
_________________ "All Dreams Are fullfillments of Wishes!"
Freud
|
| Sat Mar 04, 2006 8:05 am |
|
 |
|
Vulcan
Gameop
Joined: Fri Sep 03, 2004 2:00 am Posts: 2041 Location: Acworth, Georgis USA
|
It is things like this that encourage not running some scripts afk, and be at the keys to stop the script when it fails and find the script maker and let him know about the bug, although Exide isn't available for it any more, there are others out there who are taking up the Quest of TWX Proxy that may be able to help, you just have to get with them, they will try to help you, I am just learning the TWX Proxy scripting my self, and find myself asking questions to some of them a bit myself, so hit them up.
_________________ Vulcan's Forge v1 TWGS telnet://vulcansforge.homeip.net:2002 v2 TWGS telnet://vulcansforge.homeip.net:23 Forum and site down for now. my Email is vulcan219@comcast.net now
|
| Sat Mar 04, 2006 7:13 pm |
|
 |
|
Lostone
Staff Sergeant
Joined: Wed Oct 10, 2001 2:00 am Posts: 10 Location: USA
|
I thought that is what I was trying to do here? I am looking for people with more knowledge to help me out a bit. I am hoping to get a hit or two from this so that I can figure out waht I need to do 
_________________ "All Dreams Are fullfillments of Wishes!"
Freud
|
| Sat Mar 04, 2006 11:25 pm |
|
 |
|
Singularity
Veteran Op
Joined: Thu Jun 02, 2005 2:00 am Posts: 5558 Location: USA
|
Debugging TWX is pretty much like debugging everything else. Set what are known as
"watch points" ... basically echo the value of variables at various stages in the
script. As you see them appear you can then trace the flow of the program. It sounds
like you've already found the problem. All you need to do is write a small handler
to escape the script when the credit amount gets too low, or kick off to another
include that gets cash from another cit and then checks for a re-cash failure.
As for running scripts afk, it's generally not a good idea to sleep thru any kind
of script. You'd be suprised what things can happen.
_________________ 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
|
| Sun Mar 05, 2006 1:28 am |
|
 |
|
Wildstar
Lieutenant
Joined: Fri Apr 05, 2002 3:00 am Posts: 580 Location: USA
|
If you get a scripter like me who knows some things, we can exploit peoples scripts while afk.
One that comes to mind is screwing with people who run save me.
There is a bug that you can use even over fed.
So be careful.
_________________ My scripts can be downloaded at http://www.grimytrader.com/.
Ore *****.
Even in my signature it's blocked out.
|
| Sun Mar 05, 2006 1:39 am |
|
 |
|
Singularity
Veteran Op
Joined: Thu Jun 02, 2005 2:00 am Posts: 5558 Location: USA
|
Laff... one reason why scripts are meant to remain private. =)
There's a bug in ck saveme? Can you callsaveme on fed? I have a hard time
believing that since it does check the corpie list when it loads. Is that
the bug?
_________________ 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
|
| Sun Mar 05, 2006 3:30 am |
|
 |
|
ElderProphet
Commander
Joined: Tue Oct 07, 2003 2:00 am Posts: 1134 Location: Augusta, GA
|
To answer your question about includes Lostone, no, they do not have to be compiled or encrypted, though they can be.
Send me a private message with detailed script excerpts, and I'll fix it in the upcoming release.
+EP+
_________________ Claim to Fame: only guy to ever crack the TW haggle algorithm, and fig/shield/hold price formula, twice.
|
| Tue Mar 07, 2006 12:36 am |
|
 |
|
Lostone
Staff Sergeant
Joined: Wed Oct 10, 2001 2:00 am Posts: 10 Location: USA
|
Thank you prophet that is the answer to the question I needed if include files needed to be compiled or not [:D] Now that I know that I can try and really find the bug in the script on a test server. As to solving the problem in later releases why would I want to do that hehe that would make it just as easy for other people to do this as it would for me.
As to the other suggestion about scripting afk. I am normally at keys while I am running a script. I have also found out the hard way about leaving scripts running while not around. it isn't pleasant. lol
_________________ "All Dreams Are fullfillments of Wishes!"
Freud
|
| Wed Mar 08, 2006 6:35 pm |
|
 |
|