|
Maniac
Lieutenant J.G.
Joined: Sun Mar 13, 2005 3:00 am Posts: 387 Location: USA
|
Ok forgive me for asking.
I have noticed other scripts that make use of _ck_buydown/pneg scripts by setting a twx variable that apparently ck's script reads ....
For example telling ck's script to buydown fuel the variable
$_CK_BUYDOWN_FUELROUNDS=# of rounds can be set and the buydown script will use it.
Does anyone have a listing of what variables that can be used that way for any other of ck's scripts.
I am lazy; consider ck's scripts to be well tested and good, and don't want to reinvent the wheel badly.
_________________ Find out just what any people will quietly submit to and you have the exact measure of the injustice and wrong which will be imposed on them. Frederick Douglas
|
|
Cerne
Gameop
Joined: Sun Oct 08, 2006 2:00 am Posts: 991
|
If you look one of his packs on grimy's there is a txt file called bot instructions that give a list of the variables.
He gives all the info in that file
Cernnunos
_________________ "All warfare is based on deception..." - Art of War "Time will tell all tales" - SG Any advanced tactic in TW is indistinguishable from cheating.
|
|
Crosby
Lieutenant Commander
Joined: Sun Jan 29, 2006 3:00 am Posts: 801 Location: Iowa
|
To incorporate CK Buydown or CK Planet Nego into a bot/controller script, you need to take 3 steps.
1. Set up the parameter variables the scripts expect (details below) by using setVar and saveVar to store the appropriate values into the games config file. Please read the TWX Scripting reference if you've never user saveVar.
2. Set a trigger to wait for the message that CK Buydown or CK Planet Nego have exited. These messages are: "'CK Buydown exiting" (use the initial quote to make sure that it is the current player sending that string on subspace). "'CK Planet Nego exiting" (use the initial quote to make sure that it is the current player sending that string on subspace).
3. Use the load command to start up CK Buydown or CK Planet Nego
That's it... your script will now be able to pass the parameters that CK Buydown and CK Planet Nego need to operate, and they can be loaded and used with no further coding on your part.
CK Buydown requires the following 4 variables:
$_CK_BUYDOWN_FUELROUNDS - number of rounds to port, buy fuel ore, and drop it on the planet. This must be set every time CK Buydown is loaded. $_CK_BUYDOWN_ORGROUNDS - number of rounds to port, buy organics, and drop it on the planet. This must be set every time CK Buydown is loaded. $_CK_BUYDOWN_EQUIPROUNDS - number of rounds to port, buy equipment, and drop it on the planet. This must be set every time CK Buydown is loaded. $_CK_BUYDOWN_MODE - allowable values are "s" for speedbuy, "b" for best price, or "w" for worst price. This must be set every time CK Buydown is loaded.
For the 3 "rounds" variables, If you do NOT wish to sell that product, set this to "-1", NOT zero. Setting it to zero results in the user being prompted for the number of units to buy. If you wish to buy the maximum, you can just specify "max" as the value and CK Buydown will automatically calculate the maximum number of rounds per product that can be purchased.
CK Planet Nego requires the following 4 variables:
$_CK_PTRADESETTING -- this can be set once per game, but must be set to a value between 20 and 100 before CK Planet Nego will be able to operate without user input.
$_CK_PNEGO_FUELTOSELL -- this is the number of units of fuel ore the script should sell. This must be set every time CK Planet Nego is loaded. $_CK_PNEGO_ORGTOSELL -- this is the number of units of organics the script should sell. This must be set every time CK Planet Nego is loaded. $_CK_PNEGO_EQUIPTOSELL -- this is the number of units of equipment the script should sell. This must be set every time CK Planet Nego is loaded.
For the 3 "tosell" variables, If you do NOT wish to sell that product, set this to "-1", NOT zero. Setting it to zero results in the user being prompted for the number of units to sell. If you wish to sell the maximum, you can just specify "max" as the value and CK Planet Nego will automatically calculate the maximum number of units that can be sold.
This info is included in ck's scripts. I'm just posting it here to save a step, and to highlight the incredible forsight in making these globals available. CK, your scripts are definately standing up to the test of time...
_________________ #+++ The early bird may get the worm, but the second mouse gets the cheese. #---
|