PDA

View Full Version : Scripts Library Scripts



Cycrow
18-07-2009, 04:35 PM
Here is a set of library scripts that i use with my other scripts.

I thought i'll release them seperatly encase anyone would like to use them.

:arrow: lib.cycrow.addware
http://www.egosoft.com/img/button_download.gif (http://cycrow.thexuniverse.us/tcscripts/libary/lib.cycrow.addware.rar)

Adds a ware to a group of stations based on station class
Arguments:
StationType: The station type, or class to add to
Race: The owner race of the stations
Ware: The ware to add

All stations in the universe owned by "Race" and matchs type/class of "StationType" will have the ware added


:arrow: lib.cycrow.emp
http://www.egosoft.com/img/button_download.gif (http://cycrow.thexuniverse.us/tcscripts/libary/lib.cycrow.emp.rar)

2 scripts for using EMP:

lib.cycrow.isValidEmp: Returns [TRUE] if emp is installed correctly
lib.cycrow.getusedemp: Returns an arrray of all EMP wares that are currnetly being used


:arrow: lib.cycrow.getinstalledequipment
http://www.egosoft.com/img/button_download.gif (http://cycrow.thexuniverse.us/tcscripts/libary/lib.cycrow.getinstalledequipment.rar)

This script returns an array of all equipment installed on a given ship

Ship: The ship object to get equipment from
Include Equipment: Weather to include equipment wares are well

Returns shields/lasers and any installed equipment


:arrow: lib.cycrow.getnotamt
http://www.egosoft.com/img/button_download.gif (http://cycrow.thexuniverse.us/tcscripts/libary/lib.cycrow.getnotamt.rar)

Get Notority amount for specific rank.


:arrow: lib.cycrow.getrankpage
http://www.egosoft.com/img/button_download.gif (http://cycrow.thexuniverse.us/tcscripts/libary/lib.cycrow.getrankpage.rar)

Returns the pageid for the ranks of a given race


:arrow: lib.cycrow.getresource
http://www.egosoft.com/img/button_download.gif (http://cycrow.thexuniverse.us/tcscripts/libary/lib.cycrow.getresource.rar)

Returns the resource array for a station, either primary or secondary resources


:arrow: lib.cycrow.getshiptypefromclass
http://www.egosoft.com/img/button_download.gif (http://cycrow.thexuniverse.us/tcscripts/libary/lib.cycrow.getshiptypefromclass.rar)

Returns all ship types based on a ship class and race.

Class: The ship class to match, use "-2" for missile frigates
Race: The race filter, will only match ships that are created by this race
Exclude Race: Any races in this array will be skipped



:arrow: lib.cycrow.match.css
http://www.egosoft.com/img/button_download.gif (http://cycrow.thexuniverse.us/tcscripts/libary/lib.cycrow.match.css.rar)

Match an entry in a comma seperated string
If you have a list of items in a single string seperated by commas, this can check if an item is in that list.

IE, if the css is string1,string2,string3. Then you can match if string1 is in the list.


:arrow: lib.cycrow.math
http://www.egosoft.com/img/button_download.gif (http://cycrow.thexuniverse.us/tcscripts/libary/lib.cycrow.math.rar)

Maths Library

lib.cycrow.math.floatcos: Coverts the X3 angels into a float figure for cos
lib.cycrow.math.floatsin: Coverts the X3 angels into a float figure for sin
lib.cycrow.math.forward: Computes a forward vector position to a given distance


:arrow: lib.cycrow.menu.mystations
http://www.egosoft.com/img/button_download.gif (http://cycrow.thexuniverse.us/tcscripts/libary/lib.cycrow.menu.mystations.rar)

Station Menu, creates a menu and returns the selected station.
The menu displays stations matching a given class and race owner.
Stations are split up into thier sectors