# Script Name : The Cabal's Primary Tripple SDT Script (_01_3_Primary_SDT.ts) # Author : Traitor # Where to get : www.tw-cabal.com in the scripts section. or e-mail the author. # this script : If you didn't get this script from www.tw-cabal.com, then I make NO # : promises that it will work, nor will I care. See the licence below. # Language/App : This script was written for TWX version 2.01 or higher # : See www.twxproxy.com for more information about TWX. # What it does : This script is an advanced SDT script. # : This script runs two reds at the same time through a 3 sector SDT field # : with bust clearing. Makes tons of cash fast. Options for self furbing, # : or with a blue running furbs. See Notes for more detail. # Description : The Cabal's Secondary Tripple SDT script must be started FIRST by the other # : Red. Then this script is started. You must know the COLT ship numbers, # : and enter them when it propmts you, and you must know the name of the # : other Red running the script with you, and enter that in too. # : IF you are also planning on having a blue run furbs out to you, you must # : also have your blue run the Furber Tripple SDT script. The Furber script # : must be run before the Secondary SDT script, and before this script. # : The Red's name is case sensitive, and you must enter the whole name. # : The Blue Furber's name is case sensitive, and you must enter the whole name. # : This helps prevent spoofing. # : You start SDT in the FIRST ship number you entered and with the # : SECOND ship number you entered. The other red will start in the THIRD # : ship number you entered. Pay attention to where you AND the other red last # : robbed, and where you both last busted and make sure that the ships you # : both start in are in sectors that you can safely rob from. # : When you bust, it will auto kill the furb, and then tell the other red what # : sector you busted in, and he will SDT in his starting sector and the sector # : you just busted in until he busts. Then you will switch off, clearing # : busts until one of you runs low on turns. # : This script will run until you get low on turns, or when you run out of furbs. # : Or if you are using the furber script, it will hail the furber, and he will # : deliver a furb to you, so you will keep going until you run low on turns. # : Low turns is 24-20 turns left. See notes on how to adjust this value. # Step by Step : This script needs the following things setup before you can run this script: # Starting : 1) You need 3 XXB ports and you need a colt and a planet in each sector. # notes, or : The ports must ALL be within range of the x-porters on the colts, # How to run it : or you will end up NOT x-porting, and you will fake bust!! # : ALSO, if you are using the companion Furber script, the ports # : MUST be SxB ports, so the blue can get fuel!! Be sure that there # : are enough holds in the blue ship to make the trip BOTH ways. # : You may need to move the SDT area closer to SD if the blue ship can't # : make it back to dock! # : 2) You need to make sure that the ports are pre-upgraded. The script # : doesn't care or check how much you upgrade them, but I recommend # : that it there are at least 1000 units of EQ available on each port. # : Since you are bust clearing, there really is no limit to how much you # : upgrade them. The more the better. There are no stupid cycle counting # : in THESE scripts. They go till they nearly run out of product before a # : selloff. 5000+ is good. More turn efficient # : 3) You need to be sure that there are at least 20-30 figs on each COLT so # : they have enough figs to kill the furbs. (this is for 1000 turns. Put # : more figs on each colt if you have more turns.) # : 4) You need to be sure that there are plenty of shields on the colts, since # : this script creates Hazz when it furbs. If you get disconnected for # : some reason, you want to have the shields on the colt to take a Hazz # : hit when you log back in again. This is particularly dangerous in # : unlimited games, with a furber, since you can end up with 100% Hazz in # : the sector if you let it run long enough. Be careful. This was designed # : with 1000 turn games in mind. # : 5) There should only be 1 planet in each sector. Also, make sure that there # : are no planet scanners in the COLTS. I may fix this later. If there # : is more than one planet, or planet scanners in the colts, the script # : will hang. THE PLANETS MUST BE NAMED "." If you want to call them # : something else, change the text trigger in line 713 to be the new # : planet name. Or, you can rewrite that part of the code so it # : just uses the first thing on the list. Your call. It was easier to # : name them all "." :) # : 6) The COLTS all need to be at 250 holds. If you have less holds in them # : this script won't work properly, and you will end up stealing a lot # : less than you should be. Keep them at 250 holds! Check your COLTS # : before you run this script. # : 7) TURN OFF your helper AI before you run this script. (i.e. hit the light # : bulb icon in SWATH, or whatever) And turn off any sort of Haggle scripts # : or you will end up going on a ride in a colt. # : 8) It is advisable to leave your Havoc or CFS or whatever ship you normally # : cloak in in another sector besides the ones you are doing the SDT in. # : Nothing is worse than trying to furb your havoc :) Later versions of # : this script only attack Merfs, but this version is pretty dense. # : 9) Throughout the script, there are places where you can hardcode certain # : values if you want to save on typing. There are notes within the # : script that indicate how and where to do this. # : 10) The following is a walkthrough on how to use these scripts: # : I) Prep the COLTS and the sectors before you run the script. # : 1. Colts must have 250 holds. You need 3 of them, one per sector. # : 2. One and only one planet per sector. Planet name must be "." # : 3. Must have XXB ports in each sector, and you have to upgrade them # : before you start. (must be SxB ports if using the furbing # : script too!) # : 4. You must have several Furbs left in each sector unless you are # : also using the Furber script too. # : a) Each furb must have at least 63 holds # : b) Each furb must be personal (but they can be anyone's # : Personal furb) # : c) You should have about 1 furb per 100 turns in EACH sector. # : MOST of the time, this is sufficient for 2 reds, unless # : one of you is having a BAD day. i.e 10 furbs in each # : sector if there are 1000 turns per day # : II) You and the other Red start in YOUR ships, NOT the colts! # : 1. Your ships must be in x-port range of your colts, but # : NOT in the same sectors as the COLTS. # : III) The Furber (if you are using one...) starts his script first. # : IV) The other red starts his script next. # : V) You start your script, and enter all the information it asks for. # : VI) The scripts will synchronize up, and you are making $$$! # : VII) When one of you gets low on turns, or you run out of furbs, # : ths scripts stop. # Notes and : Requires The Cabal's Secondary Tripple SDT script to be run by another # Warnings : Red in your corp. (_01_3_Secondary_SDT.ts) # : Optionally requires The Cabal's Furber Tripple SDT script if you want to have # : a blue run furbs out to you. (_01_3_Furber_SDT.ts) # : YOU MUST TURN OFF THE HELPER FUNCTION IN YOUR HELPER (i.e. Swath), or you # : get hosed. # : You must turn off Animations and ANSI (CN1 and CN2 MUST be OFF) # : You MAY want to also silence FEDCOM (CN5) to help prevent spoofing. # : Do NOT silence ALL messages, since you need to recieve hails for this # : script to work. # : Do NOT set Abort display on keys to ALL!! (CN9) It must be set to "Space"! # : Requires that there be furbs available in the sectors. I recommend at least # : 1 per sector for each 100 turns per day. So if you have 1000 turns per day, # : then you will want 10 furbs at each sector. You PROBABLY won't use all the # : furbs, but I have seen cases where both reds kept busting in the SAME sector, # : and ended up using 10 furbs in 1000 turns, even though they only had 5 busts # : each, which is not bad, really. This is not necessary if you have a corpie # : running the furbing script. # : This script assumes that you have full holds in each COLT. # : If you do not have enough experience to steal full holds, it will steal # : as much as your experience allows. It checks your experience at the start # : and after every sell-off and after busts. # : If you plan on running this in an unlimited game, it will work just fine, # : but you need to keep in mind that each time you kill a furb, it makes # : 1% Nav Hazz. This is a problem if you are using a furber to run furbs # : out to you, because eventually the Hazz gets to 100%, and you will loose # : lots of figs to the hazz, and possibly pod your blue. I don't recommend # : this script for games with more than 10,000 turns, unless you move around # : occasionally. # : This script stops running when one of the reds gets low on turns. That setting # : is the $lowturns variable, located in line 257. By default, the setting is # : 20, but that means that you will stop running the script with between 20 and # : 16 turns left, depending on when you hit the check for low turns. If you are # : want to leave more turns for yourself, then change the value. # : This script creates files on your computer! It creates a bust log, so you can # : track your busts. It's timestamped. The file is called bustfile1.txt, and it # : will appear in your default TWX directory. If you don't want the file placed # : on your PC, then you should remark out lines 193 to 196 and lines 408,425,491, # : 508, and 840. I find the logging useful, but whatever... # : This script uses a very aggressive Haggle Routine. The VERY FIRST time you # : haggle with each port, it may spend a few turns trying to figure out the maximum # : price that the port will accept. The better the port, the less turns it uses # : trying to figure this part out. A port with a -65 MCIC (The best possible!) # : will buy product at 1.34 times their offer, so if it offers 100,000 creds, it # : may take 134,000 credits as your first counter offer. I call that 1.34 number # : the Asking Price Multiplier, or APM. Once the script determines the APM, it # : will use that value every other time it haggles. It is always worth the few # : extra turns spent calculating this value, as it maximizes your profit over # : the long term. # Disclaimer : As always, if you end up getting killed using this script, don't come crying to # : me about it. I make no promises that it will work as intended, or that you # : are smart enough to figure out how to properly use it. Don't e-mail me with # : your problems, cause I don't care. If you think you have found a bug with my # : script, then send me the error message, the line number and a brief description # : of what you were doing when the error happened, and I'll look into it. # : But if it sends you off to some random sector, or you die from hazz, or whatever, # : that is your problem, not mine. You have been warned. # License info : This script is freeware, and it can be modified and distributed as you see fit as # : provided a) you don't claim that YOU originally wrote this script. b) if you do # : distribute modified versions of this script that you put your name and # : contact info in the documentation part of this script, and you document ANY # : changes you make. c) You may NOT use this in any way for profit of any kind. # : If you are playing for money, DO NOT USE MY SCRIPT! You may use this script in # : tournaments as long as there are no prizes other than bragging rights. # ----====[ Prompt Check! ]====---- # Checks to make sure you are starting at the Command Prompt cutText CURRENTLINE $location 1 7 if ($location <> "Command") echo ANSI_12 "Must be run from the command menu, moron!" halt end # ----====[ Turn off Logging ]====---- # Turning off TWX logging logging off # ----====[ Get Timestamp Info ]====---- getdate $date gettime $time replacetext $date "/" "-" write bustfile1.txt $date & " " & $time # ----====[ show EGO banner :-) ]====---- echo "**" ANSI_1 " --" ANSI_9 "===| " ANSI_11 "The Cabal's Primary Tripple SDT Script v1.1.0" ANSI_9 " |===" ANSI_1 "--*" echo ANSI_1 " --" ANSI_9 "===| " ANSI_11 "Last edited March 31, 2003" ANSI_9 " |===" ANSI_1 "--*" echo ANSI_1 " --" ANSI_9 "===| " ANSI_11 "By " ANSI_12 "Traitor" ANSI_9 " |===" ANSI_1 "--**" echo ANSI_10 " This script is freeware and may be distributed or revised.*" echo ANSI_10 " But check the notes first.*" echo ANSI_13 "!! Please read the Notes and Warnings at the top of the script before using !!*" echo ANSI_12 " !!! IF YOU ARE RUNNING SWATH, TURN OFF THE HELPER NOW !!!*" ANSI_10 echo ANSI_10 " NOW TWX V2.X compatable!!**" ANSI_7 # ----====[ GET USER DATA]====---- # User enters data manually here :getdata # The next three lines are for the steal factor. If you want, you can rem out the # next two lines and un-remark the third line if you usually only play MBBS or # Gold. Personally I just hardcode the value for the game. # So, you want to remark out line 217 and un-remark line 218 and change the # number on line 218 to match the games steal settings. echo "**" ANSI_15 "The steal factor is 21 for MBBS, or 30 for Classic*" getinput $stealfactor "Enter the Steal factor:" 0 # setvar $stealfactor 21 # these are the Ship numbers. getinput $colt1num "Enter the ship number of colt1:" 0 getinput $colt2num "Enter the ship number of colt2:" 0 getinput $colt3num "Enter the ship number of colt3:" 0 # This section gets your other corpie's names. You can hardcode these if you # want by remarking out the getinput lines and unremarking the line # below them. # So, you want to remark out line 229 and un-remark line 230 and change the # name on line 230 to match your Red corpie's name. echo "**Remember, the names are CASE SENSITIVE!!!**" getinput $red2name "Enter the name of the other red: " 0 # setvar $red2name "Traitor" # The getlength line below is to deal with people who put spaces in their names. # There may be a better way of dealing with this, but this does work. getlength $red2name $rednamelen echo "**Will there be a Blue furbing you? (y/n):*" getconsoleinput $isfurber 1 if $isfurber = "y" echo "**Remember, the names are CASE SENSITIVE!!!**" # The following line get's your Furber's name (if you are using a furber) # If you want to hardcode this player's name, you want to remark out # line 242 and un-remark line 243 and change the name on line 243 # to match your Furber's name. getinput $furbername "Enter the name of the furber: " 0 # setvar $furbername "Traitor" getlength $furbername $furbernamelen goto :othervars else goto :othervars end # ----====[ Get Other Variables ]====---- # Setting up the other variables here :othervars # Here is where you can adjust the minimum number of turns that you leave yourself # Set $lowturns to however many turns you want to have left, +4 turns. (i.e. if # you NEED a minimum of 20 turns left, then you should set $lowturns to 24, and the # script will stop when you have between 24 and 20 turns left) setvar $lowturns 20 # These variables are here to keep track of the colts, and who is in what colt. setvar $lastship $colt2num setvar $currship $colt1num setvar $waitship $colt3num setvar $tempship1 $currship setvar $tempship2 $lastship # These variables are here to keep track of the Asking Price Multiplier (APM) # of each port. setvar $ship1APM 134 setvar $ship2APM 134 setvar $ship3APM 134 # ----====[ Sync up with the other Red ]====---- # ====[ Hail other red and pass on ship and furber info ]==== send "=" & $red2name & "*" send "You are Red 2*" send "You get into ship " & $waitship & "*" send "All Ship Numbers: " & $colt1num & " " & $colt2num & " " & $colt3num "*" send "Stealfactor is " & $stealfactor & "*" if $isfurber = "y" send "Furber ON " & $furbername " :::**" else send "Furber OFF**" end # ====[ Wait for other red to respond and check for spoofing ]==== :checkforred settextlinetrigger 30 :Red2AckShipInfo "Incoming transmission from" pause :Red2AckShipInfo killtrigger 30 # This section checks the red's name, and here is how I deal with spaces, # by getting the length of the name, I can make sure someone else isn't # trying to spoof. It's still possible to spoof, but it's more trouble # than it's worth in my opinion, so it shouldn't be an issue. cuttext currentline $tempname 28 $rednamelen if $tempname = $red2name settextlinetrigger 31 :red2ready "I am in ship " pause :red2ready killtrigger 31 getword CURRENTLINE $red2ship 5 echo "**" $red2ship if $isfurber = "y" goto :setupfurber else send "x" $currship "*q" goto :start end else # if the name doesn't match, then it resets and waits for the proper person # to hail you. killalltriggers echo "*Name Mismatch, ignoring" echo "**tempname " $tempname echo "**red2name " $red2name goto :checkforred end # ====[ Hail Furber and pass on ship, sector and other red name ]==== :setupfurber send "=" & $furbername & "*" send "You are the furber*" send "ship1 ID " & $colt1num & "*" send "ship2 ID " & $colt2num & "*" send "ship3 ID " & $colt3num & "*" # The line below appends 3 :'s at the end of the redname. This is so I can deal # with the possible spaces in their names. If your corpie has 3 :'s in his name # then he needs to change his name, or you need to change the following line # to some other pattern in this script AND in the furber script. send "Red2 name is: " & $red2name & " :::**" # ====[ Wait for Furber to respond and check for spoofing ]==== :checkforfurber settextlinetrigger 32 :furberAck "Incoming transmission from" pause :furberAck killtrigger 32 cuttext currentline $tempname 28 $furbernamelen if $tempname = $furbername settextlinetrigger 33 :furberready "I am ready" pause :furberready killtrigger 33 send "x" $currship "*q" goto :start else killalltriggers echo "*Name Mismatch, ignoring" echo "**tempname " $tempname echo "**furbername " $furber goto :checkforfurber end # ----====[ MAIN Routine ]====---- # This is the main routine # ====[ Start ]==== # short and sweet! :start gosub :turnsandexp goto :robcycle halt # ----====[ Subroutines ]====---- # ====[ Rob Cycle Subroutine ]==== # This is the heart of the program, the robcycle. :robcycle killalltriggers # The first steal attempt send "pr*s" settextlinetrigger 5 :checkavaileq1 "Equipment Buying" pause :checkavaileq1 # This section checks your experience and checks to see how many holds # you can steal. If you can steal more than 250 holds, it sets it to # 250. This is based off the stealfactor value you entered. killtrigger 5 getword CURRENTLINE $eqondock 4 setvar $holds $experience divide $holds $stealfactor if $holds > 250 setvar $holds 250 end # This checks to make sure there are enough holds on the dock to steal # the maximum amount for the NEXT time you steal. If there is not, it # sets a flag to go to the selloff routine before you try to steal there # again. This is how it knows to run the sell offs. subtract $eqondock $holds if $eqondock < $holds setvar $sell1flag 1 end # This is where it actually steals the EQ, and waits for the results. send "3" $holds "*" settexttrigger 1 :nobust "Success!" settexttrigger 2 :busted "Suddenly you're Busted!" settexttrigger 6 :notenougheq1 "There aren't that many holds of Equipment" pause # [ Not Enough EQ on port! ] # There isn't enough eq on the port. Takes you to Selloff # then back to the beginning of the robcycle. :notenougheq1 killtrigger 2 killtrigger 1 killtrigger 6 gosub :planettrade goto :robcycle # [ Busted! At First Port ] # You busted. Logs the bust to the log file, and either autofurbs, # or hails the furber if you have one. It then tells the other red # to go active. :busted killtrigger 2 killtrigger 1 killtrigger 6 gettime $time write bustfile1.txt $time & " Busted: " & $currship if $isfurber = "y" gosub :hailfurb else gosub :refurb end send "x" $lastship "*q" gosub :planettrade goto :makeRed2active # [ Not Busted At First Port ] # You didn't bust. Logs the success to the logfile, and dumps # the equipment on the planet, then x-ports to the other COLT. # If it is necessary to do a selloff, it does that here. :nobust killtrigger 2 killtrigger 1 killtrigger 6 gettime $time write bustfile1.txt $time & " Success: " & $currship send "ltnl3*q" waitfor "Blasting off from" # If it is necessary to do a selloff, it does that here. if $sell1flag = 1 setvar $sell1flag 0 gosub :planettrade gosub :turnsandexp end send "x" $lastship "*q" setvar $lastship $tempship1 setvar $currship $tempship2 goto :robcyclepart2 # [ Part 2 of Robcycle ] # this is where you attempt to rob from the second port. :robcyclepart2 send "pr*s" settextlinetrigger 8 :checkavaileq2 "Equipment Buying" pause :checkavaileq2 # This section checks your experience and checks to see how many holds # you can steal. If you can steal more than 250 holds, it sets it to # 250. This is based off the stealfactor value you entered. # this is just like the routine above, and I could have made them # subroutines, but it's easier to cut and paste than it is to figure # out a way to use subroutines and still keep track of the ship numbers. # Feel free to rewrite this if you want... killtrigger 8 getword CURRENTLINE $eqondock 4 setvar $holds $experience divide $holds $stealfactor if $holds > 250 setvar $holds 250 end # This checks to make sure there are enough holds on the dock to steal # the maximum amount for the NEXT time you steal. If there is not, it # sets a flag to go to the selloff routine before you try to steal there # again. This is how it knows to run the sell offs. subtract $eqondock $holds if $eqondock < $holds setvar $sell2flag 1 end # This is where it actually steals the EQ, and waits for the results. send "3" $holds "*" settexttrigger 3 :nobust2 "Success!" settexttrigger 4 :busted2 "Suddenly you're Busted!" settexttrigger 7 :notenougheq2 "There aren't that many holds of Equipment" pause # [ Not Enough EQ on port! ] # There isn't enough eq on the port. Takes you to Selloff # then back to the 2nd part of the robcycle. :notenougheq2 killtrigger 3 killtrigger 4 killtrigger 7 gosub :planettrade goto :robcyclepart2 # [ Busted! At Second Port ] # You busted. Logs the bust to the log file, and either autofurbs, # or hails the furber if you have one. It then tells the other red # to go active. :busted2 killtrigger 3 killtrigger 4 killtrigger 7 gettime $time write bustfile1.txt $time & " Busted: " & $currship if $isfurber = "y" gosub :hailfurb else gosub :refurb end send "x" $lastship "*q" gosub :planettrade goto :makeRed2active # [ Not Busted At Second Port ] # You didn't bust. Logs the success to the logfile, and dumps # the equipment on the planet, then x-ports to the other COLT. # If it is necessary to do a selloff, it does that here. :nobust2 killtrigger 3 killtrigger 4 killtrigger 7 gettime $time write bustfile1.txt $time & " Success: " & $currship send "ltnl3*q" waitfor "Blasting off from" # If it is necessary to do a selloff, it does that here. if $sell2flag = 1 setvar $sell2flag 0 gosub :planettrade gosub :turnsandexp end send "x" $lastship "*q" setvar $lastship $tempship2 setvar $currship $tempship1 if $turnsleft = "Unlimited" goto :robcycle elseif $turnsleft < $lowturns goto :cloakout else subtract $turnsleft 4 goto :robcycle end # ====[ Make Red 2 Active and wait for Red 2 to bust ]==== # This is the subroutine that makes the second red active, and # puts you in waiting mode. :makeRed2active killalltriggers # these echos help you keep track of where you were in the event that # the scripts get interuppted for whatever reason. They aren't necessary # but I find them handy. Feel free to delete lines 540, 541, 542, and # 546 if they bug you. echo "**At Make Red 2 Active" echo "*Current ship: " & $currship echo "*Last Ship: " & $lastship setvar $lastbust $currship setvar $currship $lastship setvar $tempship1 $currship echo "*New Current ship: " & $currship # this is where you actually tell the other red where you busted, # and what ship they should use besides the one they are already in. send "=" & $red2name & "*" send "I busted in ship " & $lastbust & "*" send "Waiting for you to bust**" # [ Waiting ] # Now you wait for the other red to hail you and tell you they busted, # or that they are out of turns. settextlinetrigger 50 :waitforredbust "Incoming transmission from" pause :waitforredbust killtrigger 50 cuttext currentline $tempname 28 $rednamelen if $tempname = $red2name # did they bust, or run low on turns? settextlinetrigger 51 :getnewshipnum "I busted in ship " settextlinetrigger 52 :otherlowturns "I am low on turns" pause :getnewshipnum killtrigger 52 killtrigger 51 # This is where you get your new ship number from. getword CURRENTLINE $lastship 5 setvar $tempship2 $lastship goto :start else echo "*Name Mismatch, ignoring" echo "**Got this for tempname " $tempname echo "**Expected this instead red2name " $red2name goto :waitforredbust end # ====[ SELF Furbing Subroutine ]==== # This is where you furb your COLT. It's not real bright tho # it expects there to be a merf at the top of the attack display # list. If one is not there, it will pause and wait for manual # user intervention. :refurb send "d" settexttrigger 40 :furbthere "Merchant Freighter" settexttrigger 41 :nofurbsthere "Warps to Sector(s)" pause :furbthere killtrigger 40 killtrigger 41 send "a" waitfor "unmanned Merchant Freighter" send "y9*" settexttrigger 42 :gotfurb "salvaged these cargo holds:" pause :gotfurb killtrigger 42 return # ====[ NO FURBS!! ]==== # if there are no furbs waiting for you, the script halts. # Try to be better prepared next time :) :nofurbsthere killtrigger 40 killtrigger 41 echo ANSI_12 "****There are no more furbs!!! Halting script!!!***" halt # ----====[ Call for Furb ]====---- # If you are using a Furber, this routine is activated and your blue # will deliver a shiny new furb to your location. # ====[ Call in a Furb ]==== # this section calls the furber, then waits for him to leave. # it is assumed that he left you a furb. :hailfurb send "=" & $furbername & "*" send "I busted in ship " & $currship "**" settexttrigger 70 :furbergone "ship vanishes from scanners" pause :furbergone # now that the furber is gone, you furb the COLT. killtrigger 70 send "a" settexttrigger 72 :checkiffurb "(Y/N)" pause :checkiffurb killtrigger 72 # this part checks to see if there really is a furb there, and # not some other kind of ship. If there is no furb there at all, # the script hangs and waits for manual user input. gettext CURRENTLINE $testiffurb "unmanned " " (" if $testiffurb = "Merchant Freighter" send "y9*" settexttrigger 71 :gotfurb2 "salvaged these cargo holds:" pause :gotfurb2 killtrigger 71 return else send "n" settexttrigger 72 :checkiffurb "(Y/N)" pause end # ====[ Check Turns and Experience Subroutine ]==== # this is the routine that checks your experience and sets the # turn counter. It is checked everytime you do a selloff. :turnsandexp killalltriggers send "i" waitfor "" settexttrigger 20 :getexp "Rank and Exp" pause :getexp killtrigger 20 getword CURRENTLINE $experience 5 striptext $experience "," waitfor "Corp" settexttrigger 21 :getturns "Turns left" pause :getturns killtrigger 21 getword CURRENTLINE $turnsleft 4 if $turnsleft = "Unlimited" return end if $turnsleft > $lowturns return else goto :cloakout end # ====[ Out Of Turns Subroutines ]==== # there was some code here that had the furber cloak tow you to fed, # but that has been removed, and now all it does is stop the script # It's up to you to figure out how to park yourself. :cloakout killalltriggers send "=" & $red2name & "*" send "I am low on turns**" if $isfurber = "y" send "=" & $furbername & "*" send "I am low on turns**" end echo ANSI_12 "***LOW ON TURNS!! STOPPING SCRIPT***" ANSI_7 halt :otherlowturns killalltriggers echo ANSI_10 "***Other Red low on turns. Stopping script!***" ANSI_7 halt # ----====[ NEW IMPROVED PLANET TRADE SUBROUTINE ]====---- # ====[ Grab Port's Asking Price Multiplier (APM) values ]==== # This part checks for the ship number, and associates it # with a port's APM :planettrade killalltriggers if $currship = $colt1num setvar $APMvar $ship1APM elseif $currship = $colt2num setvar $APMvar $ship2APM else setvar $APMvar $ship3APM end :dockatport # This is where you dock at the port and start negociation send "pn" waitfor "Registry#" settextlinetrigger 90 :planetid "." pause :planetid # this is where you grab the planet number killtrigger 90 gettext CURRENTLINE $planetnum "<" ">" send $planetnum "*" # these triggers determine if there is any product on the port # if there is, it grabs starting credits settexttrigger 91 :getstartcreds "credits." settexttrigger 92 :nonetobuy "You don't have anything on that planet they want to buy" pause :nonetobuy # The planet has nothing on it, so the script goes back killtrigger 91 killtrigger 92 echo "**NONE TO BUY!!! Returning!!**" return :getstartcreds # this picks up your starting credits killtrigger 91 killtrigger 92 getword CURRENTLINE $startcreds 3 # this checks to see if you have anything to sell on the planet settextlinetrigger 93 :howmanybuy "We are buying up to" pause :howmanybuy # this grabs the number of units the port is buying, and how many you can sell killtrigger 93 getword CURRENTLINE $portbuyqty 6 getword CURRENTLINE $planetqty 9 settexttrigger 94 :howmanysell "]?" pause :howmanysell killtrigger 94 gettext CURRENTLINE $wesellqty "[" "]" send "*" # this part grabs the price the port is offering settextlinetrigger 95 :haggle "We'll buy them for" pause :haggle killtrigger 95 getword CURRENTLINE $portoffer1 5 # this part removes the extra characters from the variables. striptext $portoffer1 "," striptext $portbuyqty "." striptext $startcreds "," # this is the overly complicated math part :) # I'm basically figuring out the per unit cost, then # multiplying that by the APM variable, then multiplying # that by the total number of holds you are selling. # then sending that offer to the port setvar $perunitcost $portoffer1 divide $perunitcost $wesellqty setvar $ouroffer1 $perunitcost multiply $ouroffer1 $APMvar divide $ouroffer1 100 multiply $ouroffer1 $wesellqty send $ouroffer1 & "*" :counteroffer # This part waits for the response from the port to see if # the port takes my initial offer. settextlinetrigger 96 :haggle2 "We'll buy them for" settextlinetrigger 97 :finaloffer "Our final offer is" settextlinetrigger 98 :tradedone "You have" pause :haggle2 # The port didn't take my offer, but it's still willing to haggle # So, I'm dropping my price some. I am taking the difference between # their first offer, and their second offer, multiplying it by .6, # then subtracting whatever is left from my first offer. # i.e. 1st offer is 90,000 creds, 2nd offer is 100,000 creds, # I take 100,000 - 90,000 = 10,000. 10,000 * .6 = 6,000 # I drop my offer by 6,000. # Then setting up the variables to keep track of their last offer, # so I can compare that to their NEXT offer. # then I'm sending my offer to them again killtrigger 96 killtrigger 97 killtrigger 98 getword CURRENTLINE $portoffer2 5 striptext $portoffer2 "," setvar $oldoffer $portoffer2 subtract $portoffer2 $portoffer1 multiply $portoffer2 6 divide $portoffer2 10 subtract $ouroffer1 $portoffer2 send $ouroffer1 & "*" setvar $portoffer1 $oldoffer goto :counteroffer :finaloffer # The port didn't take my offer, and is offering it's final price. # Now, I'm dropping my price as above, but buy 2.5 times the difference # i.e. 1st offer is 90,000 creds, 2nd offer is 100,000 creds, # I take 100,000 - 90,000 = 10,000. 10,000 * 2.5 = 25,000 # I drop my offer by 25,000. # Trust me, this works! killtrigger 96 killtrigger 97 killtrigger 98 getword CURRENTLINE $portoffer2 5 striptext $portoffer2 "," setvar $oldoffer $portoffer2 subtract $portoffer2 $portoffer1 multiply $portoffer2 25 divide $portoffer2 10 subtract $ouroffer1 $portoffer2 send $ouroffer1 & "*" setvar $portoffer1 $oldoffer goto :counteroffer :tradedone # Well, they either took my last offer, or totally rejected it. # I compare the amount of starting cash and compare that to the # amount of ending cash. If they are the same, then they didn't # take my offers at all, and I redo the port trade. # BUT, I now lower the APM by 1. killtrigger 96 killtrigger 97 killtrigger 98 getword CURRENTLINE $endcreds 3 striptext $endcreds "," subtract $endcreds $startcreds if $endcreds > 0 gettime $time # This is another file write! Tracks profit. write bustfile1.txt $time & " Profit from trade: " & $endcreds & " ship #: " & $currship goto :setnewAPM halt else subtract $APMvar 1 goto :dockatport end :setnewAPM # here is where I set the APM numbers in case there was a change. # So the next time it does a trade, it will use the number that works, # and not waste turns. if $currship = $colt1num setvar $ship1APM $APMvar elseif $currship = $colt2num setvar $ship2APM $APMvar else setvar $ship3APM $APMvar end return # End of Script # Congrads for making it this far. Hopefully you learned something in the process! # Happy Hunting! -Traitor 4/27/03