View unanswered posts | View active topics It is currently Mon Apr 27, 2026 5:05 am



Reply to topic  [ 3 posts ] 
 Controlling CK’s and others scripts 
Author Message
Lieutenant J.G.
User avatar

Joined: Sun Mar 13, 2005 3:00 am
Posts: 387
Location: USA
Unread post 
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


Tue Dec 19, 2006 10:01 pm
Profile ICQ
Gameop
User avatar

Joined: Sun Oct 08, 2006 2:00 am
Posts: 991
Unread post 
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.


Wed Dec 20, 2006 12:21 am
Profile ICQ
Lieutenant Commander
User avatar

Joined: Sun Jan 29, 2006 3:00 am
Posts: 801
Location: Iowa
Unread post 
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.
#---


Wed Dec 20, 2006 1:19 am
Profile ICQ YIM
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

Users browsing this forum: No registered users and 37 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by wSTSoftware.