function list

This is a moderated forum that collects tutorials, guides, and references for creating Transcendence extensions and scripts.
Post Reply
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
itmGetCount

Syntax:
(itmGetCount itemStruct)

Argument List:
itemStruct: The itemStruct of the item you want to get the number of items from.

Returns:
The number of items.

Category:
item

Description:
Returns the number of items.

Example:

Code: Select all

(itmGetCount (itmCreate 0x4001 3))
Returns the number 3.

Comment:
Basic get function for items.
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
itmGetDamageType

Syntax:
(itmGetDamageType itemStruct)

Argument List:
itemStruct: The itemStruct of the item you want to get the damage type from.

Returns:
The number of the items damage type if it is a weapon. Nil otherwise.

Category:
item

Description:
Returns the items damge type.

Example:

Code: Select all

(itmGetDamageType (itmCreate 0x400f 3))
Returns the number 2.

Comment:
Basic get function for items.
0 = laser
1 = kinetic
2 = particle
3 = blast
4 = ion
5 = thermo
6 = positron
7 = plasma
8 = antimatter
9 = nano
10 = graviton
11 = singularity
12 = dark acid
13 = dark steel
14 = dark lightning
15 = dark fire
Last edited by Betelgeuse on Mon Dec 17, 2007 8:40 pm, edited 1 time in total.
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
itmGetFrequency

Syntax:
(itmGetFrequency itemStruct)

Argument List:
itemStruct: The itemStruct of the item you want to get the frequency from.

Returns:
The number of the frequency (the lower the rarer).

Category:
item

Description:
Returns the frequency of the item.

Example:

Code: Select all

(itmGetFrequency (itmCreate 0x4001 1))
Returns the number 20.

Comment:
Basic get function for items.
Common = 20
uncommon = 10
rare = 4
veryrare = 1
notrandom = 0
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
itmGetInstallCost

Syntax:
(itmGetInstallCost itemStruct)

Argument List:
itemStruct: The itemStruct of the item you want to get the install cost of.

Returns:
The cost to install the item.

Category:
item

Description:
Returns the cost to install the item.

Example:

Code: Select all

(itmGetInstallCost (itmCreate 0x4001 3))
Returns the number 25.

Comment:
Basic get function for items.
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
itmGetLevel

Syntax:
(itmGetLevel itemStruct)

Argument List:
itemStruct: The itemStruct of the item you want to get the level of.

Returns:
The level of the item.

Category:
item

Description:
Returns the level of the item.

Example:

Code: Select all

(itmGetLevel (itmCreate 0x4001 3))
Returns the number 1.

Comment:
Basic get function for items.
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
itmGetMass

Syntax:
(itmGetMass itemStruct)

Argument List:
itemStruct: The itemStruct of the item you want to get the mass of.

Returns:
The mass of the item.

Category:
item

Description:
Returns the mass of the item.

Example:

Code: Select all

(itmGetMass (itmCreate 0x4001 3))
Returns the number 750.

Comment:
Basic get function for items.
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
itmGetMaxAppearing

Syntax:
(itmGetMaxAppearing itemStruct)

Argument List:
itemStruct: The itemStruct of the item you want to get the max number of appearing.

Returns:
The max that will appear per item.

Category:
item

Description:
Returns the max that will appear per random selection of the item.

Example:

Code: Select all

(itmGetMaxAppearing (itmCreate 0x4001 1))
Returns the number 4.

Comment:
It is just the max value of the numberAppearing attribute.
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
itmGetName

Syntax:
(itmGetName itemStruct flag)

Argument List:
itemStruct: The itemStruct of the item you want to get the name of.
flag: The flags to determine what form of the name is to be used.

Returns:
The name of the item.

Category:
item, name

Description:
Returns the name of the item.

Example:

Code: Select all

(itmGetName (itmCreate 0x4001 3) 4)
Returns the string a segment of light titanium armor.

Comment:
Here are the values of the flags just add them if you need more than one.
1 = capitalize
2 = pluralize
4 = prefix with 'the' or 'a'
8 = prefix with count
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
itmGetPrice

Syntax:
(itmGetPrice itemStruct)

Argument List:
itemStruct: The itemStruct of the item you want to get the value of.

Returns:
If unknown returns the value of the unknown type otherwise returns the value of the item.

Category:
item

Description:
Returns the value of the item.

Example:

Code: Select all

(itmGetPrice (itmCreate 0x4001 3))
Returns the number 20.

Comment:
This differs from itmGetAcualPrice if the item is unknown.
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
itmGetTypeData

Syntax:
(itmGetTypeData itemStruct)

Argument List:
itemStruct: The itemStruct of the item you want to get the data from.

Returns:
The data of the item.

Category:
item

Description:
Returns the data of the item.

Example:

Code: Select all

(itmGetTypeData (itmCreate 0x403E 1))
Returns ablative.

Comment:
A very helpful function for items due to how few items use data and that it is parsed as an expression. You can put lists strings or numbers in there and you can get it in code.
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
itmGetUNID

Syntax:
(itmGetUNID itemStruct)

Argument List:
itemStruct: The itemStruct of the item you want to get the itmGetUNID from.

Returns:
The itmGetUNID of the item.

Category:
item

Description:
Returns the itmGetUNID of the item.

Example:

Code: Select all

(itmGetUNID (itmCreate 0x403E 1))
Returns the number 16446.

Comment:
Basic get function for items. Useful for things that you need the UNID for like creating more of the same item or seeing if two itemstructs are the same kind of item.
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
itmGetUseScreen

Syntax:
(itmGetUseScreen itemStruct)

Argument List:
itemStruct: The itemStruct of the item you want to get the use screen from.

Returns:
The use screen of the item.

Category:
item

Description:
Returns the use screen of the item.

Example:

Code: Select all

(itmGetUseScreen (itmCreate 0x403E 1))
Returns the number 0x0000A00D.

Comment:
Basic get function for items. I don't know why it displays the number in hex on the debug console.
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
itmHasModifier

Syntax:
(itmHasModifier itemStruct string)

Argument List:
itemStruct: The itemStruct of the item you want to see if it has the modifier.
string:

Returns:
True if the item has teh modifier Nil otherwise

Category:
item

Description:
Finds out if the item has the modifier and returns the result.

Example:

Code: Select all

(itmHasModifier (itmCreate 0x403E 1) 'ArmorEnhance)
Returns True.

Comment:
Useful if you are only checking for only one modifier. If looking for more use itmMatches. I don't know the speed vs itmMatches can someone test that for me?
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
itmIsDamaged

Syntax:
(itmIsDamaged itemStruct)

Argument List:
itemStruct: The itemStruct of the item you want to get whether it is damaged or not from.

Returns:
True if the item is damaged Nil otherwise.

Category:
item

Description:
Returns whether or not the item is damaged or not.

Example:

Code: Select all

(itmIsDamaged (itmCreate 0x4001 3))
Returns Nil. (well of course new items will not be damaged)

Comment:
Basic query function for items.
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
itmIsEnhanced

Syntax:
(itmIsEnhanced itemStruct)

Argument List:
itemStruct: The itemStruct of the item you want to get the enhancement status from.

Returns:
The enhancement if it is enhanced, Nil otherwise.

Category:
item, enhance

Description:
Gets the enhancement flag for the item and returns it.

Example:

Code: Select all

(block (testArm)
	(setq testArm (itmCreate 0x4001 1))
	(itmSetEnhanced testArm 0x0105)
	(itmIsEnhanced testArm)
	)
Returns 261.

Comment:
A get function in the disguise of a query function.
Have to make the enhancement list later.
Basic get function for items.
Crying is not a proper retort!
Post Reply