|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--twcore.core.BotAction
Defines all the actions your bot may do in the arena. Combinations of these actions define more complex actions.
Constructor Summary | |
BotAction(twcore.core.GamePacketGenerator packetGenerator,
twcore.core.Arena arena,
java.util.Timer timer,
twcore.core.Session botSession)
Constructor for BotAction. |
Method Summary | |
void |
cancelTasks()
Cancels all pending TimerTasks. |
void |
changeAllShips(int shipType)
Issues a *setship to all the players in the arena (who are not in spec). |
void |
changeAllShipsOnFreq(int freq,
int shipType)
Changes all the ships on a freq to a particular ship type. |
void |
changeArena(short arenaNumber)
This method tells the bot to leave the current arena, and join another arena specified by an integer. |
void |
changeArena(short arenaNumber,
short xResolution,
short yResolution)
This is an overloaded function to allow resolution changes |
void |
changeArena(java.lang.String newArenaName)
This method tells the bot to leave the current arena, and join another arena specified by a String. |
void |
changeArena(java.lang.String newArenaName,
short xResolution,
short yResolution)
This is an overloaded change function to allow variations in resolution |
void |
checkAndSpec(int deaths)
Checks every player in the game for X number of deaths, and places them in spectator mode. |
void |
createRandomTeams(int teamSize)
Creates a set of teams of a particular size randomly. |
void |
die()
Tells the bot to go parachuting (without the parachute). |
void |
dropFlags()
Drops all flags the bot is carrying |
void |
fillInTeams(int size)
Unimplemented |
boolean |
freqContainsShip(int freq,
int ship)
Tells if a freq in the arena contains a specific type of ship. |
java.lang.String |
getArenaName()
Gets the name of the arena the bot is in. |
int |
getArenaSize()
Gets the number of players in the arena. |
static twcore.core.BotAction |
getBotAction()
Return the correct BotAction for the running Thread. |
java.lang.String |
getBotName()
Retreives the name of the bot. |
twcore.core.BotSettings |
getBotSettings()
Gets a BotSettings for this bot. |
int |
getBotState()
Gets the state of the bot. |
java.io.File |
getCoreCfg(java.lang.String filename)
|
twcore.core.CoreData |
getCoreData()
|
java.io.File |
getCoreDirectory()
Gets the directory the core is in as a File object. |
java.io.File |
getCoreDirectoryFile(java.lang.String filename)
Gets a file from the core directory. |
java.io.File |
getDataFile(java.lang.String filename)
Gets a file from the Data directory, given the filename as a String. |
twcore.core.EventRequester |
getEventRequester()
Gets the EventRequester object. |
twcore.core.Flag |
getFlag(int flagID)
Gets the Flag object associated with the FlagID provided. |
java.util.Iterator |
getFlagIDIterator()
Gets an Iterator of all the Flags in the game. |
java.util.Iterator |
getFreqPlayerIterator(int freq)
|
twcore.core.Player |
getFuzzyPlayer(java.lang.String playerName)
Searches for players in the arena of which the first part of the name matches with 'playerName'. |
java.lang.String |
getFuzzyPlayerName(java.lang.String playerName)
Searches for players in the arena of which the first part of the name matches with 'playerName'. |
twcore.core.BotSettings |
getGeneralSettings()
Retreives the information from setup.cfg |
twcore.core.InterProcessCommunicator |
getIPC()
|
twcore.core.Objset |
getObjectSet()
Returns the Objset object associated with this bot |
twcore.core.OperatorList |
getOperatorList()
Gets an OperatorList. |
twcore.core.Player |
getPlayer(int playerID)
Gets the Player object associated with the PlayerID provided. |
twcore.core.Player |
getPlayer(java.lang.String playerName)
Gets the Player object associated with the PlayerID provided. |
int |
getPlayerID(java.lang.String playerName)
Translates a player's name into a playerID. |
java.util.Iterator |
getPlayerIDIterator()
Gets the PlayerIDs of all the players in the Iterator. |
java.util.Iterator |
getPlayerIterator()
Gets an Iterator of all the Players playing in the game. |
java.lang.String |
getPlayerName(int playerID)
Translates a playerID into a name, as a String. |
java.util.Iterator |
getPlayingPlayerIterator()
Returns an iterator of all non-specced Players. |
int |
getScoreForFreq(int freq)
Gets the total score for a particular frequency. |
void |
getServerFile(java.lang.String fileName)
Retreives a file from the server. |
java.lang.String |
getServerName()
Retrieves the name of the server the bot is connected to. |
int |
getServerPort()
Retrieves the port of the server the bot is connected to. |
twcore.core.Ship |
getShip()
Gets the Ship class, where ship movements, firing, and flying can be controlled. |
void |
giveBounty(int number)
Gives an amount of bounty to everyone in the arena |
void |
giveBounty(int playerID,
int number)
Gives an amount of bounty to everyone in the arena. |
void |
giveBounty(java.lang.String name,
int number)
Gives an amount of bounty to everyone in the arena. |
void |
grabFlag(int flagID)
Sets the bot to pickup the specified flag |
void |
hideObject(int objID)
Issues an LVZ object off command. |
void |
ipcDestroyChannel(java.lang.String channelName)
Explicitly destroys a channel |
void |
ipcSubscribe(java.lang.String channelName)
Subscribes the current bot to the specified IPC Channel. |
void |
ipcTransmit(java.lang.String channelName,
java.lang.Object o)
Transmits an object to the specified channel over inter-process communication. |
void |
ipcUnSubscribe(java.lang.String channelName)
Unsubscribes this bot from the provided channelName. |
void |
joinArena(short arena)
Causes the bot to join a public arena. |
void |
joinArena(short arena,
short xResolution,
short yResolution)
Overloaded function to joinArena which allows to specify the resolution of the arena |
void |
joinArena(java.lang.String arenaName)
Causes the bot to join an arena. |
void |
joinArena(java.lang.String arenaName,
short xResolution,
short yResolution)
Overloaded function to joinArena which allows to specify the resolution of the arena |
void |
joinRandomPublicArena()
Causes the bot to join a random public arena |
void |
move(int x,
int y)
Moves the bot to position X, Y. |
void |
move(int x,
int y,
int vx,
int vy)
|
void |
moveToTile(int x,
int y)
Moves the bot to the tile (x,y). 512, 512 is the center. |
void |
privateMessageSpam(int playerID,
java.lang.String[] spam)
Sends the contents of the String array to the player in private messages. |
void |
privateMessageSpam(java.lang.String playerName,
java.lang.String[] spam)
Sends the contents of the String array to the player in private messages. |
void |
prize(int playerID,
int prizeNum)
Issues a prize to a specified player |
void |
prize(java.lang.String playerName,
int prizeNum)
Issue a prize to a specific player |
void |
prizeAll(int prizeNum)
Issues a prize to every player in the arena |
void |
prizeFreq(int freqID,
int prizeNum)
Issues a prize to a frequency of players. |
void |
putFile(java.lang.String fileName)
Issues the command *putfile. |
void |
remotePrivateMessageSpam(java.lang.String playerName,
java.lang.String[] spam)
Sends the contents of the String array to the player in remote private messages. |
void |
requestArenaList()
Sends out a request for an ArenaList packet to be sent back. |
void |
resetFlagGame()
Resets the flag game |
void |
scheduleTask(java.util.TimerTask task,
long delayms)
Schedules a TimerTask to occur once at a future time. |
void |
scheduleTaskAtFixedRate(java.util.TimerTask task,
long delayms,
long periodms)
Schedules a TimerTask to occur repeatedly at an interval. |
void |
scoreReset(int playerID)
Resets the scores of an individual player |
void |
scoreReset(java.lang.String playerName)
Resets the scores of an individual player |
void |
scoreResetAll()
Resets the scores of the players in an arena |
void |
sendAlertMessage(java.lang.String type,
java.lang.String message)
Sends a alert command as specified. |
void |
sendArenaMessage(java.lang.String message)
Displays a green arena message to the arena the bot is in. |
void |
sendArenaMessage(java.lang.String message,
int soundCode)
Displays a green arena message to the arena the bot is in, with a sound code. |
void |
sendChatMessage(int chatNumber,
java.lang.String message)
Sends a chat message to a specific chat number. |
void |
sendChatMessage(int chatNumber,
java.lang.String message,
int soundCode)
Sends a chat message to a specific chat number, with a sound code. |
void |
sendChatMessage(java.lang.String message)
Sends a chat message to the first chat. |
void |
sendCheaterMessage(java.lang.String message)
Sends a "? |
void |
sendDeath(int bounty)
Sends a death packet. |
void |
sendHelpMessage(java.lang.String message)
Sends a "? |
void |
sendOpposingTeamMessage(int frequency,
java.lang.String message)
Send a message to a whole frequency of players. |
void |
sendOpposingTeamMessage(int frequency,
java.lang.String message,
int soundCode)
Send a message to a whole frequency of players. |
void |
sendPrivateMessage(int playerID,
java.lang.String message)
Sends a private message to someone in the same arena. |
void |
sendPrivateMessage(int playerID,
java.lang.String message,
int soundCode)
Sends a private message to someone in the same arena. |
void |
sendPrivateMessage(java.lang.String name,
java.lang.String message)
Sends a private message to someone in the same arena. |
void |
sendPrivateMessage(java.lang.String name,
java.lang.String message,
int soundCode)
Sends a private message to someone in the same arena. |
void |
sendPublicMessage(java.lang.String message)
Sends a normal (blue) message to the public chat. |
void |
sendPublicMessage(java.lang.String message,
int soundCode)
Sends a normal (blue) message to the public chat with a sound code. |
void |
sendRemotePrivateMessage(java.lang.String name,
java.lang.String message)
Sends a remote private message. |
void |
sendRemotePrivateMessage(java.lang.String name,
java.lang.String message,
int soundCode)
Sends a remote private message. |
void |
sendSmartPrivateMessage(java.lang.String name,
java.lang.String message)
Sends a smart private message. |
void |
sendSmartPrivateMessage(java.lang.String name,
java.lang.String message,
int soundCode)
Sends a smart private message. |
void |
sendSquadMessage(java.lang.String squadName,
java.lang.String message)
Sends a squad message to a specific squad. |
void |
sendSquadMessage(java.lang.String squadName,
java.lang.String message,
int soundCode)
Sends a squad message to a specific squad with a sound code. |
void |
sendTeamMessage(java.lang.String message)
Send a message to your teammates. |
void |
sendTeamMessage(java.lang.String message,
int soundCode)
Send a message to your teammates. |
void |
sendUnfilteredPrivateMessage(int playerID,
java.lang.String message)
Sends a private message without any filtration. |
void |
sendUnfilteredPrivateMessage(int playerID,
java.lang.String message,
int soundCode)
Sends a private message without any filtration. |
void |
sendUnfilteredPrivateMessage(java.lang.String name,
java.lang.String message)
Sends a private message without any filtration. |
void |
sendUnfilteredPrivateMessage(java.lang.String name,
java.lang.String message,
int soundCode)
Sends a private message without any filtration. |
void |
sendUnfilteredPublicMessage(java.lang.String message)
Sends a private message without any filtration. |
void |
sendUnfilteredPublicMessage(java.lang.String message,
int soundCode)
Sends a private message without any filtration. |
void |
sendZoneMessage(java.lang.String message)
Sends a zone wide advertisement. |
void |
sendZoneMessage(java.lang.String message,
int soundCode)
Sends a zone wide advertisement. |
void |
setAlltoFreq(int destFreq)
Changes the frequency of all the playing players in the game to a specified frequency. |
void |
setDoors(int doors)
Sets the doors in the arena to the specified value. |
void |
setDoors(java.lang.String eightBinaryDigits)
Uses a binary string such as "11010110" to turn specific doors on or off. |
void |
setFreq(int playerID,
int freqNum)
Changes the frequency a player is on. |
void |
setFreq(java.lang.String playerName,
int freqNum)
Changes the frequency a player is on. |
void |
setFreqtoFreq(int initialFreq,
int destFreq)
Changes all the players on one freq to another freq. |
void |
setMessageLimit(int msgsPerMin)
Sets up spam protection for the bot. |
void |
setObjects()
Sets private objects of an individual player |
void |
setObjects(int playerId)
Sets private objects of an individual player |
void |
setPacketSendDelay(int milliseconds)
Adjusts the packet send delay. |
void |
setReliableKills(int var)
Sets the kill message reliability to an integer bounty value. |
void |
setShip(int playerID,
int shipType)
Changes the ship type of a player. |
void |
setShip(java.lang.String playerName,
int shipType)
Changes the ship type of a player. |
void |
setThorAdjust(int thorAdjust)
Sets the power of the thor weapons |
void |
setTimer(int seconds)
Sets the *timer game timer |
void |
shipReset(int playerID)
Issues a *shipreset to a specific player |
void |
shipReset(java.lang.String playerName)
Issues a *shipreset to a specific player |
void |
shipResetAll()
Issues a *shipreset to all players in the arena |
void |
showObject(int objID)
Issues an LVZ object on command. |
void |
smartPrivateMessageSpam(java.lang.String playerName,
java.lang.String[] spam)
This Sends the contents of the String array to the player in smart private messages. |
void |
spec(int playerID)
Issues a /*spec command to the player supplied by the parameter. |
void |
spec(java.lang.String playerName)
Issues a /*spec command to the player supplied by the parameter. |
void |
specAll()
Places all players in the arena into spectator mode. |
void |
spectatePlayer(int playerID)
Sets the bot to spectate the specified player and surrounding area |
void |
spectatePlayer(java.lang.String playerName)
Sets the bot to spectate the specified player and surrounding area |
void |
SQLBackgroundInsertInto(java.lang.String connectName,
java.lang.String tableName,
java.lang.String[] fields,
java.lang.String[] values)
Insert Into helper method. |
void |
SQLBackgroundQuery(java.lang.String connectName,
java.lang.String identifier,
java.lang.String query)
Runs a high priority backround SQL Query. |
void |
SQLHighPriorityBackgroundQuery(java.lang.String connectName,
java.lang.String identifier,
java.lang.String query)
Runs a high priority background query. |
void |
SQLInsertInto(java.lang.String connectName,
java.lang.String tableName,
java.lang.String[] fields,
java.lang.String[] values)
Insert Into helper method. |
boolean |
SQLisOperational()
If the SQL connection pools weren't initialized properly for some reason, this method will return false. |
java.sql.ResultSet |
SQLQuery(java.lang.String connectName,
java.lang.String query)
Runs a direct SQL Query. |
void |
toggleBlueOut()
Starts or ends blue message out, depending on state. |
void |
toggleLocked()
Locks or unlocks the arena, depending on game state. |
void |
toggleWatchDamage(int playerID)
Toggles WatchDamage for this player. |
void |
toggleWatchDamage(java.lang.String playerName)
Toggles WatchDamage for this player. |
void |
warnPlayer(int playerID,
java.lang.String message)
Warns the player with a moderator warning |
void |
warnPlayer(java.lang.String playername,
java.lang.String message)
Warns the player with a moderator warning |
void |
warpAllRandomly()
Warps the warp prize to all playing players in the arena. |
void |
warpAllToLocation(int x,
int y)
Warps all the players in the arena to location X, Y. |
void |
warpFreqToLocation(int freq,
int x,
int y)
Warps all the players on a frequency to location X, Y. |
void |
warpTo(int playerID,
int xTiles,
int yTiles)
Warps a player to the given coordinates |
void |
warpTo(java.lang.String playerName,
int xTiles,
int yTiles)
Warps a player to the given coordinates |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public BotAction(twcore.core.GamePacketGenerator packetGenerator, twcore.core.Arena arena, java.util.Timer timer, twcore.core.Session botSession)
botSession
- Session object describing the sessionpacketGenerator
- Packet generator which is called when packets are sent out.arena
- Arena Tracker object used to represent an arena full of players.Method Detail |
public static twcore.core.BotAction getBotAction()
public void scheduleTask(java.util.TimerTask task, long delayms)
task
- TimerTask to be executed.delayms
- Length of time before execution, in millisecondspublic void scheduleTaskAtFixedRate(java.util.TimerTask task, long delayms, long periodms)
task
- TimerTask to be executed.delayms
- Length of time before execution, in millisecondsperiodms
- Delay between executions after the initial execution, in milliseconds.public void cancelTasks()
public void sendUnfilteredPrivateMessage(java.lang.String name, java.lang.String message)
name
- Name of the person the message is to be sent to.message
- Message to be sent.public void sendUnfilteredPrivateMessage(int playerID, java.lang.String message)
playerID
- Player ID of the player you wish to send the message to.message
- Message to be sent.public void sendUnfilteredPrivateMessage(java.lang.String name, java.lang.String message, int soundCode)
name
- Name of the person the message is to be sent to.message
- Message to be sent.soundCode
- Sound code to be sent along with the message.public void sendUnfilteredPrivateMessage(int playerID, java.lang.String message, int soundCode)
playerID
- Player ID of the player you wish to send the message to.message
- Message to be sent.soundCode
- Sound code to be sent along with the message.public void sendUnfilteredPublicMessage(java.lang.String message)
message
- Message to be sent.public void sendUnfilteredPublicMessage(java.lang.String message, int soundCode)
message
- Message to be sent.soundCode
- Sound code to be sent along with the message.public void sendZoneMessage(java.lang.String message)
message
- The message to be sentpublic void sendZoneMessage(java.lang.String message, int soundCode)
message
- The away message to be sentsoundCode
- Sound code to be sent along with the message.public java.lang.String getServerName()
public int getServerPort()
public twcore.core.OperatorList getOperatorList()
public twcore.core.BotSettings getGeneralSettings()
public int getBotState()
public void sendHelpMessage(java.lang.String message)
message
- The message to be sent along with the alertpublic void sendCheaterMessage(java.lang.String message)
message
- The message to be sent along with the alertpublic void sendAlertMessage(java.lang.String type, java.lang.String message)
type
- The type of alert command to be sentmessage
- The message to be sent along with the alertpublic void sendArenaMessage(java.lang.String message)
message
- The message to be displayed.public void sendArenaMessage(java.lang.String message, int soundCode)
message
- The message to be displayed.soundCode
- Sound code to be sent along with the message.public void sendPublicMessage(java.lang.String message)
message
- The message to be displayed.public void sendPublicMessage(java.lang.String message, int soundCode)
message
- The message to be displayed.soundCode
- Sound code to be sent along with the message.public void sendTeamMessage(java.lang.String message)
message
- The message to be displayed.public void sendTeamMessage(java.lang.String message, int soundCode)
message
- The message to be displayed.soundCode
- Sound code to be sent along with the message.public void sendOpposingTeamMessage(int frequency, java.lang.String message)
frequency
- The frequency this message is to be sent to.message
- The message to be displayed.public void sendOpposingTeamMessage(int frequency, java.lang.String message, int soundCode)
frequency
- The frequency this message is to be sent to.message
- The message to be sentsoundCode
- Sound code to be sent along with the message.public void getServerFile(java.lang.String fileName)
fileName
- Filename of the file requested.public void putFile(java.lang.String fileName)
fileName
- Name of the file to send.public void sendChatMessage(java.lang.String message)
message
- The message to be displayed.public void sendChatMessage(int chatNumber, java.lang.String message)
chatNumber
- Number of the chat to send information to.message
- The message to be displayed.public void sendChatMessage(int chatNumber, java.lang.String message, int soundCode)
chatNumber
- Number of the chat to send information to.message
- The message to be displayed.soundCode
- Sound code to be sent along with the message.public void sendSquadMessage(java.lang.String squadName, java.lang.String message)
squadName
- Name of the squadmessage
- Message to send to that squadpublic void sendSquadMessage(java.lang.String squadName, java.lang.String message, int soundCode)
squadName
- Name of the squadmessage
- Message to send to that squadsoundCode
- Sound code to be sent along with the message.public void sendPrivateMessage(java.lang.String name, java.lang.String message)
name
- The name of the player.message
- The message to be displayed.public void sendPrivateMessage(int playerID, java.lang.String message)
playerID
- Player ID of the player you wish to send the message to.message
- The message to be displayed.public void sendPrivateMessage(java.lang.String name, java.lang.String message, int soundCode)
name
- The name of the player.message
- The message to be displayed.soundCode
- Sound code to be sent along with the message.public void sendPrivateMessage(int playerID, java.lang.String message, int soundCode)
playerID
- Player ID of the player you wish to send the message to.message
- The message to be displayed.soundCode
- Sound code to be sent along with the message.public void sendSmartPrivateMessage(java.lang.String name, java.lang.String message)
name
- The name of the player.message
- The message to be displayed.public void sendSmartPrivateMessage(java.lang.String name, java.lang.String message, int soundCode)
name
- The name of the player.message
- The message to be displayed.soundCode
- Sound code to be sent along with the message.public void sendRemotePrivateMessage(java.lang.String name, java.lang.String message)
name
- The name of the player.message
- The message to be displayed.public void sendRemotePrivateMessage(java.lang.String name, java.lang.String message, int soundCode)
name
- The name of the player.message
- The message to be displayed.public void createRandomTeams(int teamSize)
teamSize
- The size of the team desired.public void spec(java.lang.String playerName)
playerName
- The name of the player.public void spec(int playerID)
playerID
- Player ID of the player you want to spec.public void specAll()
public void setShip(int playerID, int shipType)
playerID
- Player ID of the player you want to change.shipType
- Ship type that you wish to set. Must be a value between 1 and 8.public void setShip(java.lang.String playerName, int shipType)
playerName
- The name of the player.shipType
- Ship type that you wish to set. Must be a value between 1 and 8.public void setFreq(int playerID, int freqNum)
playerID
- Player ID of the player you want to change.freqNum
- Frequency you want this player to be on.public void setFreq(java.lang.String playerName, int freqNum)
playerName
- The name of the player.freqNum
- Frequency you want this player to be on.public void warpTo(int playerID, int xTiles, int yTiles)
playerID
- PlayerID of the player to be warpedxTiles
- X coordinateyTiles
- Y coordinatepublic void warpTo(java.lang.String playerName, int xTiles, int yTiles)
playerName
- The name of the player.xTiles
- X coordinateyTiles
- Y coordinatepublic void showObject(int objID)
objID
- The ID of the object as denoted in the LVZ.public void hideObject(int objID)
objID
- The ID of the object as denoted in the LVZ.public twcore.core.Objset getObjectSet()
public void setObjects()
public void setObjects(int playerId)
public void scoreReset(java.lang.String playerName)
playerName
- Name of player to be resetpublic void scoreReset(int playerID)
playerID
- Player ID of player to be resetpublic void scoreResetAll()
public void shipReset(java.lang.String playerName)
playerName
- Name of the player to be *shipresettedpublic void shipReset(int playerID)
playerID
- Integer reference to the player specifiedpublic void shipResetAll()
public void setThorAdjust(int thorAdjust)
thorAdjust
- Amount to adjust thor power bypublic void prize(java.lang.String playerName, int prizeNum)
playerName
- Name of the playerprizeNum
- Number of the prizepublic void prize(int playerID, int prizeNum)
playerID
- Player IDprizeNum
- Number of the prizepublic void prizeFreq(int freqID, int prizeNum)
freqID
- The frequency of players you wish to issue the prizes to.prizeNum
- Number of the prizepublic void prizeAll(int prizeNum)
prizeNum
- Number of the prizepublic void giveBounty(int number)
number
- Amount of bounty to givepublic void giveBounty(java.lang.String name, int number)
name
- Name of the player to give the bounty to.number
- Amount of bounty you want to give.public void giveBounty(int playerID, int number)
playerID
- PlayerID of the player you want to give the bounty to.number
- Amount of bounty you want to give.public void resetFlagGame()
public void toggleLocked()
public void toggleBlueOut()
public void setTimer(int seconds)
seconds
- Time to game end in secondspublic void warnPlayer(java.lang.String playername, java.lang.String message)
playername
- The name of the playermessage
- The message to be sentpublic void warnPlayer(int playerID, java.lang.String message)
playerID
- The player to be warnedmessage
- The message to be sentpublic twcore.core.Flag getFlag(int flagID)
flagID
- The FlagID of the player you wish to retrieve info for.
public twcore.core.Player getPlayer(int playerID)
playerID
- The PlayerID of the player you wish to retrieve info for.
public twcore.core.Player getPlayer(java.lang.String playerName)
playerName
- The name of the player you wish to retreive info for.
public java.lang.String getPlayerName(int playerID)
playerID
- The PlayerID you want to translate.
public int getPlayerID(java.lang.String playerName)
playerName
- The name of the player.
public twcore.core.Player getFuzzyPlayer(java.lang.String playerName)
playerName
- The partial name of a player
public java.lang.String getFuzzyPlayerName(java.lang.String playerName)
playerName
- The partial name of a player
public java.lang.String getBotName()
public void joinArena(java.lang.String arenaName)
arenaName
- The name or number of the arena to join.public void joinArena(java.lang.String arenaName, short xResolution, short yResolution) throws java.lang.Exception
xResolution
- The X - coordinate resolution for the screenyResolution
- The Y - coordinate resolution for the screen
java.lang.Exception
joinArena(String arenaName)
public void joinArena(short arena)
arena
- The arena number to joinpublic void joinArena(short arena, short xResolution, short yResolution) throws java.lang.Exception
arena
- The arena number to joinxResolution
- The X - coordinate resolution for the screenyResolution
- The Y - coordinate resolution for the screen
java.lang.Exception
(short arena)
public void joinRandomPublicArena()
public void changeArena(java.lang.String newArenaName)
newArenaName
- Name or number of the arena to change to.public void changeArena(java.lang.String newArenaName, short xResolution, short yResolution) throws java.lang.Exception
newArenaName
- Name or number of the arena to change to.xResolution
- The X Max for the screen sizeyResolution
- The Y Max for the screen size
catches
- the resolution mistake for specifying X max and Y
java.lang.Exception
changeArena(String newArenaName)
public void changeArena(short arenaNumber)
arenaNumber
- The number of the public arena to change to.public void changeArena(short arenaNumber, short xResolution, short yResolution) throws java.lang.Exception
arenaNumber
- The number of the public arena to change to.xResolution
- The X Max for the screen sizeyResolution
- The Y Max for the screen size
catches
- the resolution mistake for specifying X max and Y
java.lang.Exception
changeArena(short arenaNumber)
public java.lang.String getArenaName()
public void setReliableKills(int var)
var
- Amount of bounty for kill messages to become reliable.public void spectatePlayer(int playerID)
playerID
- Ident of the player to spectatepublic void spectatePlayer(java.lang.String playerName)
playerName
- Name of the player to spectatepublic void grabFlag(int flagID)
flagID
- ID of flag to pickup.public void dropFlags()
public void warpAllToLocation(int x, int y)
x
- X coordinate to warp the players toy
- X coordinate to warp the players topublic void warpFreqToLocation(int freq, int x, int y)
freq
- Frequency to warpx
- X coordinate to warp the players toy
- Y coordinate to warp the players topublic void changeAllShips(int shipType)
shipType
- Ship type to switch the players into.public void warpAllRandomly()
public void changeAllShipsOnFreq(int freq, int shipType)
freq
- The frequency of the players you wish to changeshipType
- The ship type that you wish to change the players topublic void setFreqtoFreq(int initialFreq, int destFreq)
initialFreq
- Frequency of the players you wish to changedestFreq
- The frequency you wish to change the players topublic void setAlltoFreq(int destFreq)
destFreq
- Frequency to change the players to.public int getScoreForFreq(int freq)
freq
- Frequency of the players to get the score for.
public void setDoors(int doors)
doors
- The value of the doors to be set.public void privateMessageSpam(int playerID, java.lang.String[] spam)
playerID
- PlayerID to send the messages to.spam
- The array of Strings to send to the player in private messages.public void privateMessageSpam(java.lang.String playerName, java.lang.String[] spam)
playerName
- Player name to send the messages to.spam
- The array of Strings to send to the player in private messages.public void remotePrivateMessageSpam(java.lang.String playerName, java.lang.String[] spam)
playerName
- Name of the player to send the messages to.spam
- The array of Strings to send to the player in private messages.public void smartPrivateMessageSpam(java.lang.String playerName, java.lang.String[] spam)
playerName
- Name of the player to send the messages to.spam
- The array of Strings to send to the player in private messages.public boolean freqContainsShip(int freq, int ship)
freq
- Frequency to checkship
- Ship type to look for
public int getArenaSize()
public void checkAndSpec(int deaths)
deaths
- Number of deaths to spec at.public void die()
public void sendDeath(int bounty)
bounty
- Amount of bounty the death is related to.public void fillInTeams(int size)
size
- Maximum size of the freqspublic java.util.Iterator getPlayingPlayerIterator()
public java.util.Iterator getFreqPlayerIterator(int freq)
freq
-
public java.util.Iterator getPlayerIterator()
public java.util.Iterator getPlayerIDIterator()
public java.util.Iterator getFlagIDIterator()
public twcore.core.BotSettings getBotSettings()
public void moveToTile(int x, int y)
x
- X value to move the bot toy
- Y value to move the bot topublic void move(int x, int y)
x
- Position of the bot along the X axis.y
- Position of the bot along the Y axis.public void move(int x, int y, int vx, int vy)
public twcore.core.Ship getShip()
public java.sql.ResultSet SQLQuery(java.lang.String connectName, java.lang.String query) throws java.sql.SQLException
connectName
- The connection name as specified in sql.cfgquery
- The SQL query to be executed
java.sql.SQLException
- SQLExceptionpublic void SQLBackgroundQuery(java.lang.String connectName, java.lang.String identifier, java.lang.String query)
connectName
- The connection name as specified in sql.cfgidentifier
- A unique identifier that describes what this Query is. This identifier will be
found in the SQLEvent when it is returned. This identifier helps you handle
different sorts of background queries differently when they come out the other
end. If the identifier is null, the result of the query will not be delivered.query
- The SQL query to be executedpublic void SQLHighPriorityBackgroundQuery(java.lang.String connectName, java.lang.String identifier, java.lang.String query)
connectName
- The connection name as specified in sql.cfgidentifier
- A unique identifier that describes what this Query is. This identifier will be
found in the SQLEvent when it is returned. This identifier helps you handle
different sorts of background queries differently when they come out the other
end. If the identifier is null, the result of the query will not be delivered.query
- The SQL query to be executedpublic void SQLInsertInto(java.lang.String connectName, java.lang.String tableName, java.lang.String[] fields, java.lang.String[] values)
connectName
- The connection name as specified in sql.cfgtableName
- The name of the table you wish to insert the values into.fields
- The field names you want to enter data into.values
- The corresponding values for the field names.public void SQLBackgroundInsertInto(java.lang.String connectName, java.lang.String tableName, java.lang.String[] fields, java.lang.String[] values)
connectName
- The connection name as specified in sql.cfgtableName
- The name of the table you wish to insert the values into.fields
- The field names you want to enter data into.values
- The corresponding values for the field names.public void requestArenaList()
public twcore.core.EventRequester getEventRequester()
public void ipcTransmit(java.lang.String channelName, java.lang.Object o)
channelName
- Channel name to send the object to.o
- Object to be transmittedpublic void ipcSubscribe(java.lang.String channelName)
channelName
- Name of the IPC channel you wish to subscribe to.public void ipcUnSubscribe(java.lang.String channelName)
channelName
- Name of the IPC channel you wish to unsubscribe from.public void ipcDestroyChannel(java.lang.String channelName)
channelName
- The name of the channel to be destroyedpublic twcore.core.InterProcessCommunicator getIPC()
public void setDoors(java.lang.String eightBinaryDigits)
eightBinaryDigits
- Door state as a Stringpublic void toggleWatchDamage(int playerID)
playerID
- PlayerID of the playerpublic void toggleWatchDamage(java.lang.String playerName)
playerName
- PlayerName of the playerpublic java.io.File getDataFile(java.lang.String filename)
filename
- Filename or pathname to the file in question.
public java.io.File getCoreCfg(java.lang.String filename)
filename
-
public twcore.core.CoreData getCoreData()
public java.io.File getCoreDirectory()
public java.io.File getCoreDirectoryFile(java.lang.String filename)
filename
- Filename or pathname of the file or directory
public void setMessageLimit(int msgsPerMin)
msgsPerMin
- Number of messages per minute you want the bot to allow.public boolean SQLisOperational()
public void setPacketSendDelay(int milliseconds)
milliseconds
- Number of milliseconds between each packet.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |