| www.ClassicTW.com https://mail.black-squirrel.com/ |
|
| Gathering Port Info https://mail.black-squirrel.com/viewtopic.php?f=15&t=33122 |
Page 1 of 1 |
| Author: | Helix [ Mon Mar 26, 2012 4:53 pm ] |
| Post subject: | Gathering Port Info |
I am writing a script to clear all the Bxx ports from a list of sectors and at the same time max upgrading all of the SBx, SBB, and SxB ports in the list. Whats the easiest way to recognize each type of port? I have the array for the list of sectors. The script will step through each sector either destroying the port because it is Bxx or upgrading the port (I will be using the bot's MAX command for this) because it is one of the following types: SBx, SBB, and SxB. I don't even need the code for this (I'd like to work that out myself) I do need an algorithm for identifying the port as I step through each sector. 1. Move to sector This will work in conjunction with the planet shopper, farm and the planet stripper scripts I use for planet farming in an unlimited game. H |
|
| Author: | T0yman [ Mon Mar 26, 2012 5:29 pm ] |
| Post subject: | Re: Gathering Port Info |
Helix wrote: I am writing a script to clear all the Bxx ports from a list of sectors and at the same time max upgrading all of the SBx, SBB, and SxB ports in the list. Whats the easiest way to recognize each type of port? I have the array for the list of sectors. The script will step through each sector either destroying the port because it is Bxx or upgrading the port (I will be using the bot's MAX command for this) because it is one of the following types: SBx, SBB, and SxB. I don't even need the code for this (I'd like to work that out myself) I do need an algorithm for identifying the port as I step through each sector. 1. Move to sector This will work in conjunction with the planet shopper, farm and the planet stripper scripts I use for planet farming in an unlimited game. H I have used PORT.CLASS[sector] if your going to sort your figged universe and pullout only the class ports your want if return = 3 4 or 5 add sector to list...then sort list for shortest route and conserve some ore. |
|
| Author: | Helix [ Mon Mar 26, 2012 6:32 pm ] |
| Post subject: | Re: Gathering Port Info |
T0yman wrote: Helix wrote: I am writing a script to clear all the Bxx ports from a list of sectors and at the same time max upgrading all of the SBx, SBB, and SxB ports in the list. Whats the easiest way to recognize each type of port? I have the array for the list of sectors. The script will step through each sector either destroying the port because it is Bxx or upgrading the port (I will be using the bot's MAX command for this) because it is one of the following types: SBx, SBB, and SxB. I don't even need the code for this (I'd like to work that out myself) I do need an algorithm for identifying the port as I step through each sector. 1. Move to sector This will work in conjunction with the planet shopper, farm and the planet stripper scripts I use for planet farming in an unlimited game. H I have used PORT.CLASS[sector] if your going to sort your figged universe and pullout only the class ports your want if return = 3 4 or 5 add sector to list...then sort list for shortest route and conserve some ore. So first run if PORT.EXISTS[sector] = 0/1 to weed out the sectors with no ports Then step through the PORT.EXISTS[sector] = 1 Then PORT.CLASS[sector] = 1, 2, 6 or 8 destroy it $bot_name mac pay9999* But if PORT.CLASS[sector] = 3, 4, 5, 7 upgrade it 3 = SBB $bot_name max f $bot_name max o $bot_name max e 4 = SSB $bot_name max f $bot_name max e 5 = SBS $bot_name max f $bot_name max o 7 = SSS $bot_name max f |
|
| Author: | Vid Kid [ Mon Mar 26, 2012 6:48 pm ] |
| Post subject: | Re: Gathering Port Info |
Helix wrote: T0yman wrote: Helix wrote: I am writing a script to clear all the Bxx ports from a list of sectors and at the same time max upgrading all of the SBx, SBB, and SxB ports in the list. Whats the easiest way to recognize each type of port? I have the array for the list of sectors. The script will step through each sector either destroying the port because it is Bxx or upgrading the port (I will be using the bot's MAX command for this) because it is one of the following types: SBx, SBB, and SxB. I don't even need the code for this (I'd like to work that out myself) I do need an algorithm for identifying the port as I step through each sector. 1. Move to sector This will work in conjunction with the planet shopper, farm and the planet stripper scripts I use for planet farming in an unlimited game. H I have used PORT.CLASS[sector] if your going to sort your figged universe and pullout only the class ports your want if return = 3 4 or 5 add sector to list...then sort list for shortest route and conserve some ore. So if PORT.CLASS[sector] = 1, 2, 6 or 8 destroy it $bot_name mac pay9999* But if PORT.CLASS[sector] = 3, 4, 5, 7 upgrade it 3 = SBB $bot_name max f $bot_name max o $bot_name max e 4 = SSB $bot_name max f $bot_name max e 5 = SBS $bot_name max f $bot_name max o 7 = SSS $bot_name max f Just a few observations .. To destroy a port : you will need to know max wave of your ship and offensive odds (to make sure you are able to blow a maxed port) This may take a few waves sometimes. Next , you going to blow all BXX ports regardless of the MCIC ? Regardless of the potential in its cashing ability ? Next , I do not know M()m Bot too well , but can't you use multiple parramiters in the command ? Kbot and zbot both allow : maxport f o e hope that helps. |
|
| Author: | Kaus [ Mon Mar 26, 2012 6:51 pm ] |
| Post subject: | Re: Gathering Port Info |
Helix wrote: So first run if PORT.EXISTS[sector] = 0/1 to weed out the sectors with no ports Then step through the PORT.EXISTS[sector] = 1 Then PORT.CLASS[sector] = 1, 2, 6 or 8 destroy it $bot_name mac pay9999* But if PORT.CLASS[sector] = 3, 4, 5, 7 upgrade it 3 = SBB $bot_name max f $bot_name max o $bot_name max e You should also consider doing a fig check of the sector as you progress through the if port exists list. Will save you hassles in the long run. |
|
| Author: | Helix [ Mon Mar 26, 2012 7:23 pm ] |
| Post subject: | Re: Gathering Port Info |
Kaus wrote: Helix wrote: So first run if PORT.EXISTS[sector] = 0/1 to weed out the sectors with no ports Then step through the PORT.EXISTS[sector] = 1 Then PORT.CLASS[sector] = 1, 2, 6 or 8 destroy it $bot_name mac pay9999* But if PORT.CLASS[sector] = 3, 4, 5, 7 upgrade it 3 = SBB $bot_name max f $bot_name max o $bot_name max e You should also consider doing a fig check of the sector as you progress through the if port exists list. Will save you hassles in the long run. Thanks |
|
| Author: | T0yman [ Mon Mar 26, 2012 7:27 pm ] |
| Post subject: | Re: Gathering Port Info |
That was why I suggested using fig list. But he didn't ask me to write it so I only answered the question he ask These are things as the script goes he can start adding in, all part of learning. Need anymore help just ask, plenty of people here to help... but if you ask 10 scripters be ready for 10 ways or more |
|
| Author: | Helix [ Mon Mar 26, 2012 7:42 pm ] |
| Post subject: | Re: Gathering Port Info |
T0yman wrote: That was why I suggested using fig list. But he didn't ask me to write it so I only answered the question he ask These are things as the script goes he can start adding in, all part of learning. Need anymore help just ask, plenty of people here to help... but if you ask 10 scripters be ready for 10 ways or more I know. I will be using a bubble list from swath to start with, it will already be figged, and the door will be blocked. So, I check the sectors for ports, then figs where those ports are. Then the type of port. Finally Step through the qualified array, blowing some ports and upgrading others. Sing rewrote the majority of my shopper script and left a part at the bottom that said "Put what you want to do at each port here" so I did. This time I want to work it out myself H |
|
| Author: | Kaus [ Mon Mar 26, 2012 9:05 pm ] |
| Post subject: | Re: Gathering Port Info |
T0yman wrote: That was why I suggested using fig list. But he didn't ask me to write it so I only answered the question he ask These are things as the script goes he can start adding in, all part of learning. Need anymore help just ask, plenty of people here to help... but if you ask 10 scripters be ready for 10 ways or more Heh, I wanted to contribute without writing any code and you had it mostly covered. The fig thing used to be a major pain for me, figured I'd save him some headache in the long run. @Helix Best of luck with your script, let us know if we can be of any help. |
|
| Page 1 of 1 | All times are UTC - 5 hours |
| Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |
|