www.ClassicTW.com
http://www.classictw.com/

Update of Botlink functionality
http://www.classictw.com/viewtopic.php?f=52&t=32825
Page 1 of 1

Author:  John Pritchett [ Tue Jan 31, 2012 8:09 pm ]
Post subject:  Update of Botlink functionality

Here's a current list of Botlink functions and fields:

>show functions

Game

createPlayer(Partial: Boolean = False)
createShip(Sector: Number = 0)
createPlanet(Sector: Number = 0)
createPort(Sector: Number;
Class: PortClass;
Name: String)
createAlien(RaceIndex: Number;
Sector: Number = 0;
Manual: Boolean = False)
createCorp(CEO: Number;
Name: String)
plotCourse(Source: Number;
Target: Number)
showWarps(ReportType: WarpReportType = All;
RaceIndex: Number = 0)

Boolean = {False, True}

PortClass = {BBS, BSB, SBB, SSB,
SBS, BSS, SSS, BBB}

WarpReportType = {All, MSL, Federation, Rogue,
Ferrengi, GoldRace}

User

Deactivate(LeaveAssets: Boolean = False)
Kill(KillerType: KillerType = Admin;
KillerIndex: Number = 0;
LeaveShip: Boolean = False;
Silent: Boolean = True)
Move(Sector: Number;
Silent: Boolean = True)
LandOnPlanet(Planet: Number;
Silent: Boolean = True)
LeavePlanet(Silent: Boolean = True)
LandOnPort(Port: Number;
Silent: Boolean = True)
LeavePort(Silent: Boolean = True)
Transport(ToShip: Number)

Boolean = {False, True}

KillerType = {Admin, Player, GoldRace}

Ship

Deactivate()
Kill(KillerType: KillerType = Admin;
KillerIndex: Number = 0;
Pod: Boolean = True;
Silent: Boolean = True)
Move(ToSector: Number)
Claim(ClaimType: OwnerType;
ClaimIndex: Number = 0)

Boolean = {False, True}

KillerType = {Admin, Player, GoldRace}

OwnerType = {Player, Corp, Federation, Rogue,
Pirate, Ferrengi, AlienTrader, Abandoned,
GoldRace}

Sector

claim(OwnerType: OwnerGroup = None;
OwnerIndex: Number = 0)
setFighters(Amount: Number;
Kind: FighterKind = Defensive;
OwnerType: OwnerType = Player;
OwnerIndex: Number = 0)
setArmidMines(Amount: Number;
OwnerType: OwnerType = Player;
OwnerIndex: Number = 0)
setLimpetMines(Amount: Number;
OwnerType: OwnerType = Player;
OwnerIndex: Number = 0)
clearPort()

FighterKind = {Defensive, Toll, Offensive}

OwnerGroup = {None, Player, Corp, Federation,
Rogue, Pirate, Ferrengi, AlienTrader,
GoldRace, MSL}

OwnerType = {Player, Corp, Federation, Rogue,
Pirate, Ferrengi, AlienTrader, Abandoned,
GoldRace}

Port

Deactivate()
Kill(KillerType: KillerType = Admin;
KillerIndex: Number = 0;
Silent: Boolean = True)
Move(ToSector: Number)

Boolean = {False, True}

KillerType = {Admin, Player, GoldRace}

Planet

Deactivate()
Kill(KillerType: KillerType = Admin;
KillerIndex: Number = 0;
Silent: Boolean = True)
Move(ToSector: Number;
Silent: Boolean = True)
Claim(ClaimType: OwnerType;
ClaimIndex: Number = 0)

Boolean = {False, True}

KillerType = {Admin, Player, GoldRace}

OwnerType = {Player, Corp, Federation, Rogue,
Pirate, Ferrengi, AlienTrader, Abandoned,
GoldRace}

Corp

Deactivate()

Alien

Deactivate()
Kill(KillerType: KillerType = Admin;
KillerIndex: Number = 0;
Silent: Boolean = True)
Move(Sector: Number;
Silent: Boolean = True)
LandOnPlanet(Planet: Number;
Silent: Boolean = True)
LeavePlanet(Silent: Boolean = True)
LandOnPort(Port: Number;
Silent: Boolean = True)
LeavePort(Silent: Boolean = True)

Boolean = {False, True}

KillerType = {Admin, Player, GoldRace}

Boss

Move(Sector: Number;
Silent: Boolean = True)

Boolean = {False, True}

Faction

addLongOath(Oath: String)
delLongOath(OathIndex: Number)
addShortOath(Oath: String)
delShortOath(OathIndex: Number)

Terra

Move(ToSector: Number;
Silent: Boolean = True)

Boolean = {False, True}

Class0

None

StarDock

Move(ToSector: Number)

Fed

Move(Sector: Number;
Silent: Boolean = True)

Boolean = {False, True}




>show fields

Game

AlphaCentauriSector : Number [READONLY]
BankCapacity : Number [50000, 1000000000]
ClearBustDays : Number [1, 28]
CloakFailPercent : Number [0, 100]
ColoReproductionPercent : Number [1, 50000]
CorpCount : Number [READONLY]
CorpMax : Number [READONLY]
CostAnnounce : Number [25, 400]
CostArmid : Number [250, 4000]
CostAtomicDetonator : Number [3750, 60000]
CostBeacon : Number [25, 400]
CostCloak : Number [6250, 62500]
CostCorbomite : Number [250, 4000]
CostDensityScanner : Number [500, 8000]
CostEtherProbe : Number [750, 65000]
CostGenesis : Number [5000, 80000]
CostHoloScanner : Number [6250, 100000]
CostLimpet : Number [2500, 40000]
CostLimpetRemoval : Number [1250, 20000]
CostMineDisrupter : Number [1500, 24000]
CostPhotonMissile : Number [10000, 160000]
CostPlanetScan : Number [7500, 120000]
CostPsychicProbe : Number [2500, 40000]
CostRegister : Number [1250, 20000]
CostTrans : Number [12500, 200000]
CostTransUp : Number [6250, 100000]
CostTWarp1 : Number [12500, 200000]
CostTWarp2 : Number [20000, 320000]
CostTWarpUp : Number [2500, 40000]
DaysUntilDeletion : Number [1, 255]
DeathsPerDay : Number [0, 255]
EntryLogViewDelay : LogViewDelay
FedspaceShipLimit : Number [0, 255]
FigLockDecay : Number [0, 1440]
FigLockDecayMode : FigLockDecayMode
GameLogViewDelay : LogViewDelay
HighscoreMode : HighScoreMode
HighScoreType : HighScoreType
InactivityTimeout : Number [120, 14400]
InitialAssetDropoff : Number [0, 100]
InitialCredits : Number [0, 1000000]
InitialFighters : Number [1, 2500]
InitialHolds : Number [1, 75]
InputBandwidth : BandwidthModes
InputSpeed : Number [300, 1048576]
Latency : Number [0, 500]
LimitTimeOnline : Boolean
MaxCorpMembers : Number [0, 255]
MaxCourseLength : Number [20, 255]
MaxPlanetsPerSector : Number [1, 255]
MaxPortRegen : Number [10, 100]
MaxTerraColonists : Number [10000, 100000000]
MicroLoginPenalty : Number [0, 20]
NavHaxLossPercent : Number [0, 100]
OutputBandwidth : BandwidthModes
OutputSpeed : Number [300, 1048576]
PhotonMissileDuration : Number [0, 60]
PlanetCount : Number [READONLY]
PlanetMax : Number [READONLY]
PodlessCaptureMode : PodlessCaptureMode
PortCount : Number [READONLY]
PortMax : Number [READONLY]
PortProductionMax : Number [10000, 65530]
PortReportDelay : Number [0, 1440]
ProductionRate : Number [1, 200]
RadiationHalfLife : Number [1, 255]
RankingsMode : HighScoreMode
RankingsType : RankingsType
RobFactor : Number [10, 850]
RylosSector : Number [READONLY]
SectorCount : Number [READONLY]
SelfDestructProbability : Number [0, 100]
ShipCount : Number [READONLY]
ShipMax : Number [READONLY]
SpecialPortPower : Number [10, 1000]
StandardPortPower : Number [10, 1000]
StardockSector : Number [READONLY]
StealFactor : Number [10, 850]
TimeOnline : Number [20, 1440]
TournamentDaysToEnter : Number [0, 65535]
TournamentMaxDestroyed : Number [0, 255]
TournamentMode : Boolean
TradePercent : Number [20, 100]
TurnBankDays : Number [1, 52]
TurnBase : Number [0, 65520]
TWVersion : String [READONLY]
UndergroundPassword : String[25]
UserCount : Number [READONLY]
UserMax : Number [READONLY]

User

Active : Boolean [READONLY]
Alignment : Number [-4500000, 4500000]
BankBalance : Number [0, 500000]
BBSName : String[41]
Corp : Number [READONLY]
Credits : Number [0, 1000000000]
Experience : Number [0, 4500000]
GameName : String[41]
ID : Number [READONLY]
OnPlanet : Number [READONLY]
OnPort : Number [READONLY]
Password : String[8]
Sector : Number [READONLY]
SectorAvoid : Array[sector : Number] of Boolean
SectorKnown : Array[sector : Number] of Boolean
Ship : Number [READONLY]
Turns : Number [0, 1250]

Ship

Active : Boolean [READONLY]
ArmidMines : Number [0, 255]
AtomicDetonators : Number [0, 255]
Beacons : Number [0, 65535]
Class : Number [0, 25]
Cloaks : Number [0, 255]
Colonists : Number [0, 255]
CorbomiteDevices : Number [0, 65535]
Corp : Number [READONLY]
EtherProbes : Number [0, 65535]
Fighters : Number [0, 2147483647]
GenesisTorps : Number [0, 255]
Holds : Number [0, 255]
ID : Number [READONLY]
InvEqu : Number [0, 255]
InvOre : Number [0, 255]
InvOrg : Number [0, 255]
LimpetMines : Number [0, 255]
Make : Number [0, 27]
MineDisruptors : Number [0, 65535]
Occupied : Boolean [READONLY]
OwnerIndex : Number [READONLY]
OwnerType : OwnerType [READONLY]
Password : String[10]
Photons : Number [0, 255]
PlanetScanner : Boolean
PsychicProbe : Boolean
ScannerType : Number [0, 255]
Sector : Number [READONLY]
Shields : Number [0, 2147483647]
ShipName : String[30]
TransWarpType : Number [0, 255]

Sector

ArmidMines : Number [READONLY]
ArmidOwnerIndex : Number [READONLY]
ArmidOwnerType : OwnerType [READONLY]
Beacon : String[41]
DomainIndex : Number [READONLY]
DomainType : OwnerGroup [READONLY]
FighterKind : FighterKind [READONLY]
FighterOwnerIndex : Number [READONLY]
FighterOwnerType : OwnerType [READONLY]
Fighters : Number [READONLY]
ID : Number [READONLY]
LimpetMines : Number [READONLY]
LimpetOwnerIndex : Number [READONLY]
LimpetOwnerType : OwnerType [READONLY]
NavHaz : Number [0, 100]
Nebulae : String[41]
Port : Number [READONLY]
TollCollected : Number [0, 999999999]

Port

Active : Boolean [READONLY]
Class : PortClass
ID : Number [READONLY]
InvEqu : Number [0, 65535]
InvOre : Number [0, 65535]
InvOrg : Number [0, 65535]
LastPorted : String[30]
PortName : String[25]
Power : Number [0, 65535]
ProdEqu : Number [0, 3276]
ProdOre : Number [0, 3276]
ProdOrg : Number [0, 3276]
Profit : Number [0, 999999999]
Sector : Number [READONLY]
VarEqu : Number [-128, 128]
VarOre : Number [-128, 128]
VarOrg : Number [-128, 128]

Planet

Active : Boolean [READONLY]
Class : Number [0, 6]
ColEqu : Number [0, 2147483647]
ColOre : Number [0, 2147483647]
ColOrg : Number [0, 2147483647]
Corp : Number [READONLY]
Creator : String[41]
Defenses : CitadelLevel
FighterReact : Number [0, 100]
Fighters : Number [0, 2147483647]
ID : Number [READONLY]
Interdictor : Toggle
InvEqu : Number [0, 2147483647]
InvOre : Number [0, 2147483647]
InvOrg : Number [0, 2147483647]
OwnerIndex : Number [READONLY]
OwnerType : OwnerType [READONLY]
PlanetName : String[41]
QuasarAtmos : Number [0, 100]
QuasarSect : Number [0, 100]
Sector : Number [READONLY]
Shields : Number [0, 65535]
TransporterLevel : Number [0, 65535]
Treasury : Number [0, 999999999999999]

Corp

Active : Boolean [READONLY]
CEO : String [READONLY]
ID : Number [READONLY]
Name : String[41]
Password : String[8]

Alien

Active : Boolean [READONLY]
Alignment : Number [-4500000, 4500000]
ArmidMines : Number [0, 255]
AtomicDetonators : Number [0, 255]
Cloak : Number [0, 255]
Colonists : Number [0, 255]
CorbomiteDevices : Number [0, 65535]
Credits : Number [0, 1000000000]
Experience : Number [0, 4500000]
Fighters : Number [0, 2147483647]
GenesisTorp : Number [0, 255]
Holds : Number [0, 255]
ID : Number [READONLY]
InvEqu : Number [0, 255]
InvOre : Number [0, 255]
InvOrg : Number [0, 255]
Kills : Number [0, 65535]
LimpetMines : Number [0, 255]
Manual : Boolean
Name : String[25]
OnPlanet : Number [READONLY]
OnPort : Number [READONLY]
Photons : Number [0, 255]
PlanetScanner : Number [0, 255]
Ports : Number [0, 2147483647]
PsychicProbe : Boolean
Race : String[25]
Scanner : Number [0, 255]
Sector : Number [READONLY]
Shields : Number [0, 2147483647]
ShipManufacturer : Number [0, 255]
ShipName : String[30]
ShipType : Number [0, 255]
TWarpDrive : Number [0, 255]
XNonType : Number [READONLY]

Boss

Density : Number [0, 60000]
Fighters : Number [0, 10000000]
ID : Number [READONLY]
Make : String[126]
MovePercent : Number [0, 255]
Name : String[41]
PrimaryAttack : String[41]
SecondaryAttack : String[41]
Sector : Number [READONLY]
ShipClass : String[126]
ShipName : String[30]

Faction

Alias : String[41]
Group : String[41]
ID : Number [READONLY]
Name : String[41]
OathsLong : Array[index : Number] of String
OathsShort : Array[index : Number] of String
ShipAlias : String[41]
Title : String[41]

Terra

Active : Boolean [READONLY]
Class : Number
ID : Number [READONLY]
PlanetName : String[41]
Sector : Number [READONLY]

Class0

Active : Boolean [READONLY]
ID : Number [READONLY]
PortName : String[25]
Power : Number [0, 65535]
Sector : Number [READONLY]

StarDock

Active : Boolean [READONLY]
Class : PortClass
ID : Number [READONLY]
InvEqu : Number [0, 65535]
InvOre : Number [0, 65535]
InvOrg : Number [0, 65535]
LastPorted : String[30]
PortName : String[25]
Power : Number [0, 65535]
ProdEqu : Number [0, 3276]
ProdOre : Number [0, 3276]
ProdOrg : Number [0, 3276]
Profit : Number [0, 999999999]
Sector : Number [READONLY]
VarEqu : Number [-128, 128]
VarOre : Number [-128, 128]
VarOrg : Number [-128, 128]

Fed

Density : Number [0, 60000]
Fighters : Number [0, 10000000]
ID : Number [READONLY]
Make : String[126]
MovePercent : Number [0, 255]
Name : String[41]
PrimaryAttack : String[41]
SecondaryAttack : String[41]
Sector : Number [READONLY]
ShipClass : String[126]
ShipName : String[30]

BandwidthModes = {Other, 1200, 2400, 4800,
9600, 14.4, 28.8, 33.6,
56K, 64Kbit, 128Kbit, 144Kbit,
256Kps, 512Kps, 768Kps, 1Mps}

Boolean = {False, True}

CitadelLevel = {None, Unarmed, Combat, Quasar,
PWarp, Shields, PIG}

FighterKind = {Defensive, Toll, Offensive}

FigLockDecayMode = {None, 1Minute, Random}

HighScoreMode = {OnDemand, Extern, Hourly, HalfDaily}

HighScoreType = {Values, Titles}

LogViewDelay = {NoDelay, MinuteDelay, HourDelay, NoLog}

OwnerGroup = {None, Player, Corp, Federation,
Rogue, Pirate, Ferrengi, AlienTrader,
GoldRace, MSL}

OwnerType = {Player, Corp, Federation, Rogue,
Pirate, Ferrengi, AlienTrader, Abandoned,
GoldRace}

PodlessCaptureMode = {Always, Never, Unoccupied}

PortClass = {BBS, BSB, SBB, SSB,
SBS, BSS, SSS, BBB}

RankingsType = {ValuesAndTitles, TitlesOnly}

Toggle = {On, Off}


Also, the word substitution feature

GET TRANS [TEXT] [FOR|LIKE "Word"]
SET TRANS "Word"="NewWord"
RESET TRANS "Word"

And the search functions

FIND SHIPS|PLANETS|FIGHTERS|ARMIDS|LIMPETS FOR PLAYER Index
FIND SHIPS|PLANETS|FIGHTERS|ARMIDS|LIMPETS FOR CORP Index
FIND SHIPS|PLANETS|FIGHTERS|ARMIDS FOR FERRENGI
FIND SHIPS|PLANETS|FIGHTERS|ARMIDS|LIMPETS FOR GOLDRACE Index
FIND ABANDONED|ROGUE|PIRATE SHIPS|PLANETS|FIGHTERS|ARMIDS|LIMPETS

FIND PLAYERS|FEDS|FERRENGI|ALIENTRADERS|GOLDALIENS IN SECTOR Index
FIND SHIPS|PLANETS IN SECTOR Index
FIND PLAYERS|GOLDALIENS ON PLANET Index
FIND PLAYERS|GOLDALIENS ON PORT Index
FIND PLAYERS WHERE NAME IS|LIKE "Name"

Author:  ElderProphet [ Thu Feb 02, 2012 10:55 pm ]
Post subject:  Re: Update of Botlink functionality

Great progress! plotCourse and showWarps probably satisfy most needs, but it would be great to have warpCount (int) and warps (space-delimited string) under the Sector object. Possible? Also, I'm guessing you didn't mean RaceIndex as a parameter for showWarps, but rather just Index.

Something I added to TWX was the ability to add voids, which are taken into account when plotting. Might be worth looking into long term for Botlink too.

I'll try to put some of this into practice soon, which will be when the real feedback comes :)

Author:  John Pritchett [ Thu Feb 02, 2012 11:35 pm ]
Post subject:  Re: Update of Botlink functionality

I've added a few more things since I posted this. There is now a Sector.warps array that you can access by index to get and set. So if you do a view on the sector record, you'll get something like

warps = (102, 42, 974, 64)

And if you want to change a warp, you could do something like

mysect.warps[2] = 50

Probably should add a warpcount field.

I also added a new function for sector to trigger a photon wave in that sector. You can make it silent or notify players with a custom message. The photon effect is the same as it normally would be, lasting for the game-configured duration and posting events to players in that sector until it's done. It's freeform enough that you could have it coming from anywhere. Maybe a custom planet launches a Photon into the sector, or you could have a Fed do it, whatever you want.

For the sector.showWarps function, one of the report types is GoldRace, and if you specify that, you'll need to include the race index. If you don't use GoldRace, you can ignore that parameter.

Yes, avoids would probably be useful. Although, I could probably take it even a step further and allow you to provide some script to test for each sector in plotting a course. Suppose you want to plot a course that avoids any fighters. An avoid test could be called that's passed a sector record as a parameter, and you could test the sector fighter count to determine if the sector should be avoided. I'll have to experiment with that kind of thing, but it would be so powerful. But even just the ability to specify a raw list of avoid sectors would be useful.

Author:  Kaus [ Sat Feb 04, 2012 8:37 pm ]
Post subject:  Re: Update of Botlink functionality

Starting to sound promising, did you make a decision on whether to include two area's for this service? one for monitoring one for processing commands.

Author:  John Pritchett [ Sat Feb 04, 2012 9:03 pm ]
Post subject:  Re: Update of Botlink functionality

I haven't done anything to implement it, but I'd like to explore the idea.

I just finished adding a ton of new game toggle settings in a game.flags array, game.classicaliens array, and game.modes array. You can access these flags like >get game.modes[Gold] or >set game.flags[ISP] = false.

I also added functionality to the Terra object so you can set colonist reproduction rate, max colonists, current colonists, and owner.

I'm in the process of adding all kinds of messaging functions. You'll be able to generate a custom message either to everyone who's online, everyone in a sector, on a planet, or on a port. There will also be Comms functions so you can send various comms messages from any entity in the game. Imaging getting FedComms or even a private hail from Zyrain ;) Then I'll be adding the ability to send mail to players and also add daily log entries.

Author:  Micro [ Sun Feb 05, 2012 4:47 am ]
Post subject:  Re: Update of Botlink functionality

Is there a way to list all deployed figs?

Author:  Vid Kid [ Sun Feb 05, 2012 8:37 am ]
Post subject:  Re: Update of Botlink functionality

Micro wrote:
Is there a way to list all deployed figs?


Not yet ...

find fighters for goldrace 0

will only show you

FIND FIGHTERS FOR PLAYER Index
FIND FIGHTERS FOR CORP Index
FIND FIGHTERS FOR FERRENGI
FIND FIGHTERS FOR GOLDRACE Index

but not all deployed , or all deployed where type = (TOLL, DEF, OFF)

Those might be good as well.

Author:  John Pritchett [ Sun Feb 05, 2012 10:59 am ]
Post subject:  Re: Update of Botlink functionality

Yeah, this stuff will be easy enough to add.

Page 1 of 1 All times are UTC - 5 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/