Functions summary
| acceptMissionSOS |
Accept an SOS mission to be added to passengers in ship cargo bay. A new type and mission description can be added based on acceptance conditions. |
| actionPoints |
Add/Decrease user action points. if ($points<0) decrease. Also adds a log entry [$descr] |
| activateBox |
Activate and popup a modal window using Javascript |
| addCargo |
Add cargo to a ship. |
| BadFilter |
Run a pgrase trough a bad words filter defined in words.php |
| badWords |
Check a string for bad words. Return string with *** in it. |
| between |
Check if number $n is between number $a and $b |
| calcOfficerTime |
Reduce timer by officer skill. |
| calcUnitFatigue |
|
| cancelManufactureTask |
Cancel a ship manufacturing task. |
| capturePrisoners |
|
| check_name |
Add slashes and convert HTML into string |
| checkCargoBayIntegrity |
Check the cargo bay integrity of a ship. |
| checkCargoLoad |
Check a ship or station cargo bay integrity to see if it is over the max. |
| checkFleetSlot |
Check if a slot can be installed on a ship |
| checkHangarIntegrity |
Check the integrity of a hangar bay on a ship. |
| checkHangarLoad |
Check a ship's hangar bay integrity |
| checkIfEarthOrbit |
|
| checkKickVIP |
Check if user can be kicked from the corporation. |
| checkPermission |
Check the permission of the user. |
| checkPlanetSlot |
Check if a module slot can exist or not depending on planet level |
| checkReferer |
|
| checkStationSlot |
Check if a module can be installed on a station slot |
| clearSEATasks |
Clear all SEA steps for active user. |
| cloningFacilityUnLoad |
Unload a cloning facility module. |
| combatInitiative |
Determine who goes first depending on the combat speeds |
| commandMiningFacility |
Change production on a mining / harvesting facility on a planet. |
| commandProspectFacility |
Change production on a prospecting facility on a planet. |
| compSEAstep |
Set a Space Exploration Academy step to DONE for user session. |
| corporationLog |
Add a corporation log string |
| crematoriumLoad |
Load a crematorium module with personnel. |
| crematoriumUnLoad |
Unload a crematorium module type. |
| damageUnit |
Damage a unit in battle. |
| deliverManufactureTask |
Deliver a completed manufacturing task to ship cargo bay. |
| delNavData |
Remove nav computer database entry. |
| delShip |
Destroy a ship completely. |
| delStation |
Destroy a station completely. |
| deployFortressToPlanet |
Deploy a fortress module on a planet. |
| deployPlanetModule |
Deploy a module to a planet |
| destroyModule |
Destroy a module completely. |
| dockHangar |
Action, dock a ship to another ship's hangar bay |
| encode |
|
| escapeJavaScriptText |
JS helper function. |
| exploredQuadrant |
Check if a Quadrant is explored or not. |
| extrage1 |
Extract a field value from a table |
| fuelShipOpt |
|
| fuelShipOpt2 |
|
| gainGrHPD |
|
| gainSolars |
Add some Solars to a user. Also adds log entry. |
| generateNPCShip |
Generate and NPC ship at a star and planet / moon coordinates |
| generateNPCStation |
Generate and NPC station |
| get_polar |
|
| get_polarStarMap |
|
| getAlert |
Bootstrap alert html. |
| getAngleDegreeAtoB |
Angle for point A to B |
| getAvailableFuel |
Return fleet_cargo ID and amount_m3 |
| getAxisCoords |
|
| getAxisPoints |
Get all rectangle points on an x,y axis, given upper left points and grid size |
| getCardinalByDegree |
Return the cardinal point the degree is pointing towards. e.g. "E" for east |
| getCargoBay |
Return total cargo bay space on a ship |
| getCirclePoints |
|
| getClusterQuadsMatrix |
Return an array with the cluster quadrants |
| getCoordinatesByVector |
Get target X,Y coordinates |
| getDistance |
Distance from point A to B |
| getDistanceAU |
Astronomical Units distance from point A to B |
| getDonAmount |
Get total donation amount in the last 30 days |
| getDonFileName |
|
| getFortressStats |
Planetary fortress stats data. |
| getGasMining |
Get gas mining production data |
| getGrNewMemCost |
|
| getGrNewSrvCost |
|
| getGroupTax |
Deduct corporation tax rate. |
| getHangarBay |
Total size of a ship's hangar bay. |
| getImageCoords |
Get X,Y coordinates within an image |
| getJumpRange |
Get light years jump range of a ship. |
| getLastInsertID |
Utility function get LAST_INSERT_ID() |
| getLYDistance |
Light Years distance from point A to B |
| getMarinesDamage |
|
| getMessage |
Get a formatted message string. |
| getMinMining |
Get mining facility production data |
| getMisImage |
Get a random person image |
| getModPower |
Return the module power modified by module level. |
| getModTime |
Return how old in seconds is a file, by file pointer |
| getModTypeSQL |
Return module categy type for SQL usage. |
| getNPCShipSize |
Used for generation of ships. |
| getNPCShipTalk |
Return NPC html ship talk button. |
| getObjectsInQuad |
GEt all objects of type from a quadrant. |
| getOfficer |
Check if the user has an officer. |
| getOnline |
Get online status of a user |
| getOutpostMod |
Returns mod values for quantities and power of the outpost |
| getPlanetHiddenInfo |
Get planet hidden gas / mineral data information. |
| getPlanetLevel |
Get an absolute planet level |
| getPlanetModulePos |
Get an empty planet slot to install a module |
| getPlanetSlots |
Get possible planet slots |
| getPledgeAmount |
Get all the pledges dollar value in the last 30 days |
| getQPForm |
Get the QP / AP html form |
| getQuadX |
Get the quadrant X coordinate from absolute X |
| getQuadY |
Get the quadrant Y coordinate from absolute Y |
| getRandAlienModule |
Get a random alien module. |
| getRandomCoordinates |
Generate random basic coordinates in a default quadrant. Used when spawning a star / event within a quadrant. |
| getRangeCoords |
Range used for ship navigation computer. |
| getRealCoords |
Get absolute coordinates from local coordinates |
| getRectCenter |
Get the center x,y of a rectangle. |
| getShipHangarSize |
Calculate the total ship size in m3 while docked in a hangar bay |
| getShipLRCourse |
Get long range course day for a ship. |
| getShipModulePos |
Get an empty ship slot to install a module |
| getShipOpt |
Get optimization details data. |
| getShipSlots |
Return the possible slots on a ship by level |
| getSimpleCoords |
Get local coordinates from absolute coordinates |
| getStarMaxWidth |
|
| getStarsInRange |
Get all the stars in range of an ellipse with $scanRange Light Years radius. |
| getStarTypeStr |
Get a star type / name |
| getStationModulePos |
Get an empty station slot to install a module |
| getStationSlots |
Returns an array with possible slots on a station |
| getStatPower |
Get a module stats / power |
| getStCargoBay |
Return total cargo bay space on a station |
| getStUsedCargoBay |
Return used cargo bay space on a station |
| getTargetHit |
|
| getTargetPlanetDetails |
Returns the details of a planet at a certain star. If the planet is a moon, it also return the parent planet ID and name. |
| getTimeLeft |
Return time left from now to end. e.g. 50h 25m 10s |
| getUnitStats |
Return a unit stats and installed modules array |
| getUnitWeapons |
|
| getUnusedAP |
Get user remaining Action Points |
| getUnusedQP |
Get user remaining Quantum Points |
| getUsedCargoBay |
Return used cargo bay space on a ship |
| getUsedHangarBay |
Total used hangar bay of a mothership |
| getUtilPower |
Get a module utility power |
| getWeaponDamage |
|
| instModule |
Install a module on a ship for the active user session. Only use when spawning a new ship with modules for a user. |
| instShipModule |
Install a module on a ship. |
| instStationModule |
Install a module on a station. |
| isAlienStructure |
Check if module is alien in type. |
| isLeader |
If a user is the leader of a corporation. |
| isRangedWeapon |
Check if module type is a ranged weapon. |
| keygen |
Generate a random key |
| loadFortressToCargoBay |
Load a fortress module from planet to a ship or station. |
| LoadGif |
Load a GIF and return the image resource |
| LoadJpeg |
Load a JPG and return the image resource |
| LoadPNG |
Load a PNG and return the image resource |
| logCargo |
Add a cargo log entry to a ship / station ID = $sourceID |
| logCargoDetails |
Add cargo details based on a cargo log ID. |
| LogError |
Log any game errors to daemon/soerrors.log |
| logMessageX |
Write a log string to a global $file pointer |
| makeLink |
Create an HTML link from a string |
| MakePages |
HTML pagination |
| MakeReducedPages |
HTML pagination |
| managePersonnel |
Manage personnel. |
| navShipOpt |
Reduce time left to based on active user ship optimization. |
| navShipOpt2 |
Reduce time left to based on optimization ID / mark. |
| pledgeLog |
Add a pledge log string |
| projectLongRangeCourse |
Project a long range course and return course data array. |
| q |
Execute a direct querry on the database |
| quantPoints |
Add / Decrease quantum points for a user. If($points<0) decrease. Also adds a log entry [$descr] |
| redirect |
Redirect to specified page |
| regenMap |
Refresh the temporary star navigation view map from the session |
| regenSysMap |
Refresh the temporary system view map from the session |
| removePlanetModule |
Remove a module from a planet |
| romanNumerals |
Get roman numeral string |
| saveNewLRCourse |
Set / save the long range course projection. |
| SEA_Check |
Check if the user has started the SEA course yet. |
| sellPlanetModule |
Sell a module that is deployed on a planet. |
| sellShipModule |
Sell a module that is installed on a ship. |
| settingModuleDisable |
Set a module as disabled. |
| showShipHTML |
HTML of units on left and right of battle screen. |
| showUseQP |
User Action Points HTML helper. |
| stationChangeModPos |
|
| stationInstallModule |
Install a module from station cargo bay |
| stationMoveToCargo |
moves a station module to cargo bay. |
| stripQuotes |
|
| systemTravel |
Return false if no engines, else return data for interplanetary jump. |
| timeLeft |
Return time string. e.g. 50h 25m 10s |
| timeLeftDays |
Return time string. e.g. 3d 20h 25m |
| timeLeftDaysH |
Return time string. e.g. 3d 20h |
| undockHangar |
Action: Undock a ship from another ship's hangar bay. |
| unitLockingText |
|
| unloadMiningShip |
Unload mining / gas production to a ship cargo bay. Can also loot another player's module. |
| unloadMiningStation |
Unload mining / gas production to a station cargo bay. Can also loot another player's module. |
| up_add |
Update a value from a table by adding |
| up_add2 |
Update a value from a table by adding with two conditions |
| up_desc |
Update a value from a table by substracting |
| up_desc2 |
Update a value from a table by substracting with two conditions |
| upChildShipVol |
Update ship volume space, if ship is docked inside a mothership |
| updateNavStar |
Add / Update nav computer database entry. |
| updateNavStarAstral |
Update nav computer astral data. |
| updateNavSysOrbSt |
Update nav combute orbital data. |
| updateNavSysPlMod |
Update nav computer system data. |
| updateNavSysSurvey |
Update navigation computer survey data. |
| upPlanetsMods |
Update user planetary modules count |
| useGrHPD |
|
| useSolars |
Spend some Solars from a user. Also adds log entry. |
| usleep_win |
Usleep function for Windows |
| validateString |
Validate a string / prepare it for use in SQL |
| vipNavComp |
Reduce time left to calculation for VIP members. |
| vipNavComp2 |
Reduce time left to calculation for VIP members. |
| WHDetector |
Add wormhole detection / logs data. |
| wormHoleTravel |
Return false if no engines, else return wormhole data for interstellar jump. |