Post Sun Jun 16, 2019 7:43 pm

translocate (tr)

(note: wip)
this command is for moving players around the universe. this is a vast improvement on the previous translocate code.
use ranges from quite simple, to fairly complex and powerful.

the code is littered with checks and error msgs, as well as a few "this isnt implemented yet" msgs.
these msgs are informational and will require dismissal. this verifies that you have seen the error.

Please Note:
for all valid locations, the pilot specified (by various means) will be moved in their currently-active ship.
this could be you, the owner of an item you specify, or an entire fleet.

lets cover full syntax. i will explain a few details afterwards.
  Code:
.tr [required first arg] [optional second arg] [optional third arg] [optional fourth arg]
1st arg = help|me|fleet|player name|shipID|itemID|locationID
2nd arg = help|me|fleet|home|last|shipID|itemID|locationID|x coord|moon|planet
3rd arg = me|fleet|home|last|shipID|itemID|locationID|y coords|moon|planet
4th arg = fleet|home|last|shipID|itemID|locationID|z coords|moon|planet


  Code:
.tr help

this will provide a window with full syntax, and what it expects, as shown above.
this is for reference while ingame


  Code:
.tr <command> help

this will eventually give suggestions on use of <command> and what args are expected, but isnt coded at this time.


basic syntax is simple
  Code:
.tr <locationID>


if the location is valid, this will move you to the specified location. an error will be sent if the location is invalid.
if you specify a solar system without using coordinates, you will be moved to the orbit of a random moon.
specifying a station will dock you to that station.
specifying a space object will put your current ship in orbit with that object.


  Code:
.tr <locationID> <coords>

this will move you to the specified coords in the given locationID, which should be a valid system.
if this is not possible, and error will be sent with the reason.


intermediate syntax examples are as follows:
  Code:
.tr <player name> home

this will move the player named to their home station (where their clone is located)


  Code:
.tr <shipID> last

this one is rather powerful....this will move the OWNER of the given ship to the station YOU last docked to.
this will NOT relocate NPC ships. (which i thought about, then quickly denied...npc docked in your station???wtf???)


  Code:
.tr fleet planet

this will relocate your entire fleet to a random planet in your current system.
why is this useful?
its not....it's "just because i can", and happens to be a side-effect of how the commands are coded.
there are many unintended effects like this. ;)


advanced uses
  Code:
.tr me <itemID>

this will move you within interaction distance to given item, if valid


  Code:
.tr <player name> fleet me home

again, this command can be quite powerful.
this use will move given players fleet to YOUR home station.


last example
  Code:
.tr <itemID> fleet <shipID> last

this one is a bit tricky, but shows the potential power of this command.
this one will find the owner of <itemID>, find the fleet said owner is in (if applicable). this will be referred to as 'fleet'.
then it will find the last station the owner of <shipID> was docked to. this is referred to as 'station'.
if all variables are valid so far (fleet and station), it will then move the entire fleet to the station.


of course, all of these commands are checked for valid items, targets, syntax and other expected things.
please note:
some of these actions will require a privileged account, or fleet commander, or whatever is required to act upon given items. (currently not implemented)

cheers all