Functions:
Modules:
-
[+] Attribute
- AlterAttributeTemporaryMod
- BaseSkillToRawSkill
- CheckSkill
- GetAttribute
- GetAttributeBaseValue
- GetAttributeCap
- GetAttributeDefaultCap
- GetAttributeIntrinsicMod
- GetAttributeLock
- GetAttributeName
- GetAttributeTemporaryMod
- RawSkillToBaseSkill
- SetAttributeBaseValue
- SetAttributeCap
- SetAttributeLock
- SetAttributeTemporaryMod
- [+] Basic
- [+] BasicIO
- [+] Boat
- [+] CfgFile
- [+] CliLoc
- [+] DataFile
- [+] File
- [+] Guild
- [+] Http
- [+] Math
-
[+] Npc
- CanMove
- Face
- GetProperty
- IsLegalMove
- MakeBoundingBox
- Move
- RunAwayFrom
- RunAwayFromLocation
- RunToward
- RunTowardLocation
- Say
- SayUC
- Self
- SetAnchor
- SetOpponent
- SetProperty
- SetWarMode
- TurnAwayFrom
- TurnAwayFromLocation
- TurnToward
- TurnTowardLocation
- WalkAwayFrom
- WalkAwayFromLocation
- WalkToward
- WalkTowardLocation
- Wander
-
[+] OS
- Clear_Event_Queue
- Create_Debug_Context
- Debugger
- Events_Waiting
- GetPid
- GetProcess
- HTTPRequest
- Is_Critical
- OpenConnection
- OpenURL
- PerformanceMeasure
- Run_Script
- Run_Script_To_Completion
- Set_Critical
- Set_Debug
- Set_Event_Queue_Size
- Set_Priority
- Set_Script_Option
- Sleep
- Sleepms
- Start_Script
- Start_Skill_Script
- SysLog
- System_RPM
- Unload_Scripts
- Wait_For_Event
- [+] Party
- [+] PolSys
- [+] Storage
- [+] MySQL
- [+] Unicode
-
[+] UO
- Accessible
- AddAmount
- AddMenuItem
- ApplyConstraint
- AssignRectToWeatherRegion
- Attach
- Broadcast
- CanWalk
- CancelTarget
- CheckLineOfSight
- CheckLosAt
- CheckLosBetween
- CloseGump
- CloseTradeWindow
- CloseWindow
- ConsumeReagents
- ConsumeSubstance
- CoordinateDistance
- CoordinateDistanceEuclidean
- CreateAccount
- CreateItemAtLocation
- CreateItemCopyAtLocation
- CreateItemInBackpack
- CreateItemInContainer
- CreateItemInInventory
- CreateMenu
- CreateMultiAtLocation
- CreateNpcFromTemplate
- DestroyItem
- DestroyMulti
- Detach
- DisableEvents
- DisconnectClient
- Distance
- DistanceEuclidean
- EnableEvents
- EnumerateItemsInContainer
- EnumerateOnlineCharacters
- EquipFromTemplate
- EquipItem
- EraseGlobalProperty
- EraseObjProperty
- FindAccount
- FindObjtypeInContainer
- FindPath
- FindSubstance
- GetAmount
- GetCommandHelp
- GetCoordsInLine
- GetEquipmentByLayer
- GetFacing
- GetGlobalProperty
- GetGlobalPropertyNames
- GetHarvestDifficulty
- GetMapInfo
- GetMenuObjTypes
- GetMidpointCircleCoords
- GetMultiDimensions
- GetObjProperty
- GetObjPropertyNames
- GetObjType
- GetObjTypeByName
- GetRegionLightLevelAtLocation
- GetRegionName
- GetRegionNameAtLocation
- GetRegionString
- GetSpellDifficulty
- GetStandingHeight
- GetStandingLayers
- GetWorldHeight
- GrantPrivilege
- HarvestResource
- IsStackable
- ListAccounts
- ListEquippedItems
- ListGhostsNearLocation
- ListHostiles
- ListItemsAtLocation
- ListItemsNearLocation
- ListItemsNearLocationOfType
- ListItemsNearLocationWithFlag
- ListMobilesInBox
- ListMobilesInLineOfSight
- ListMobilesNearLocation
- ListMobilesNearLocationEx
- ListMultisInBox
- ListObjectsInBox
- ListOfflineMobilesInRealm
- ListStaticsAtLocation
- ListStaticsInBox
- ListStaticsNearLocation
- MoveItemToContainer
- MoveItemToSecureTradeWin
- MoveObjectToLocation
- OpenPaperdoll
- POLCore
- PerformAction
- PlayLightningBoltEffect
- PlayMovingEffect
- PlayMovingEffectEx
- PlayMovingEffectXYZ
- PlayMovingEffectXYZEx
- PlayMusic
- PlayObjectCenteredEffect
- PlayObjectCenteredEffectEx
- PlaySoundEffect
- PlaySoundEffectPrivate
- PlaySoundEffectXYZ
- PlayStationaryEffect
- PlayStationaryEffectEx
- PrintTextAbove
- PrintTextAbovePrivate
- ReadGameClock
- RegisterForSpeechEvents
- ReleaseItem
- RequestInput
- ReserveItem
- RestartScript
- Resurrect
- RevokePrivilege
- SaveWorldState
- SecureTradeWin
- SelectColor
- SelectMenuItem2
- SendBuyWindow
- SendCharProfile
- SendCharacterRaceChanger
- SendDialogGump
- SendEvent
- SendHousingTool
- SendInstaResDialog
- SendOpenBook
- SendOpenSpecialContainer
- SendOverallSeason
- SendPacket
- SendPopUpMenu
- SendQuestArrow
- SendSellWindow
- SendSkillWindow
- SendStatus
- SendStringAsTipWindow
- SendSysMessage
- SendTextEntryGump
- SendViewContainer
- SetGlobalProperty
- SetName
- SetObjProperty
- SetRegionLightLevel
- SetRegionWeatherLevel
- SetScriptController
- Shutdown
- SingleClick
- SpeakPowerWords
- StartSpellEffect
- SubtractAmount
- SystemFindObjectBySerial
- Target
- TargetCoordinates
- TargetMultiPlacement
- UpdateItem
- UpdateMobile
- UseItem
- [+] Util
- [+] Vitals
AppendConfigFileElem( filename, elemtype, elemkey, properties ) | |
---|---|
Parameters: | |
Name | Type |
filename | String |
elemtype | String |
elemkey | Int or String |
properties | Array of Arrays {propname,value}, or array of structs { name, value } |
Explanation | |
Appends an element to the config file specified. Properties must be an array of structures, where each element is a structure containing a name member first, and a value member second. | |
filename uses normal package descriptor format (see ReadConfigFile). | |
elemtype is the string before the key in the config file, i.e. 'MyType' in the following: | |
MyType 0x34F { MyProp 3.1 } | |
elemkey is 0x34F in the above example. It can be a string or integer (as in that case) | |
properties must be an array of arrays with the following format: | |
var props := array; var a := {"MyProp1",1}; var b := {"MyProp2",2}; props.append(a); props.append(b); AppendConfigFileElem( ":mypkg:mycfg", "MyType", 0x34F, props ); | |
Return values | |
1 on success | |
Errors | |
"Unable to find package X" | |
"Poorly formed config file descriptor: X" | |
"Invalid parameter type" |
FindConfigElem( config_file, key ) | |
---|---|
Parameters: | |
Name | Type |
config_file | ConfigFileRef |
key | String or Integer |
Explanation | |
Finds a Config Element matching 'key' in the given config_file. In the following sample entry, 'applepie' is the key: | |
Dessert applepie { Cost 8 Calories 1004 MadeLike grandma Ingredient flour Ingredient butter Ingredient apples Deliciousness 3.6 } | |
Return values | |
A Config Element Reference on success | |
Errors | |
"Parameter 0 must be a Config File" | |
"Param 1 must be an Integer or a String" | |
"Element not found" |
GetConfigInt( element, property_name ) | |
---|---|
Parameters: | |
Name | Type |
element | ConfigElementRef |
property_name | String |
Explanation | |
Gets a piece of Integer data from a config file element reference. For example, to get the value of 'Calories' in the following element: | |
Dessert applepie { Cost 8 Calories 1004 MadeLike grandma Ingredient flour Ingredient butter Ingredient apples Deliciousness 3.6 } Use: 'var cals := GetConfigInt(element,"Calories");' | |
Return values | |
An Integer value for the property | |
Errors | |
"Invalid type in config file! (internal error)" | |
"Property not found" | |
"Invalid parameter type" |
GetConfigIntArray( element, property_name ) | |
---|---|
Parameters: | |
Name | Type |
element | ConfigElementRef |
property_name | String |
Explanation | |
For elements with multiple occurrences of a given property, returns an array containing each occurrence. | |
Value of the properties are always returned as integers. | |
Return values | |
An array of integers. | |
Errors | |
"Invalid parameter type" |
GetConfigIntKeys( config_file ) | |
---|---|
Parameters: | |
Name | Type |
config_file | ConfigFileRef |
Explanation | |
Gets an array of only all the Integer keys in the config file. | |
Return values | |
An array of integers | |
Errors | |
"GetConfigIntKeys param 0 must be a Config File" |
GetConfigMaxIntKey( config_file ) | |
---|---|
Parameters: | |
Name | Type |
config_file | ConfigFileRef |
Explanation | |
Gets the value of the highest value integer key in the config file. This is useful if all the keys are sequentially numbered and need to be looped over. | |
Return values | |
The maximum integer key in the file | |
Errors | |
"Parameter 0 must be a Config File" |
GetConfigReal( element, property_name ) | |
---|---|
Parameters: | |
Name | Type |
element | ConfigElementRef |
property_name | String |
Explanation | |
Gets a piece of Real (float) data from a config file element reference. For example, to get the value of 'Deliciousness' in the following element: | |
Dessert applepie { Cost 8 Calories 1004 MadeLike grandma Ingredient flour Ingredient butter Ingredient apples Deliciousness 3.6 } Use: 'var yum := GetConfigReal(element,"Deliciousness");' | |
Return values | |
An Real value for the property | |
Errors | |
"Invalid type in config file! (internal error)" | |
"Property not found" | |
"Invalid parameter type" |
GetConfigString( element, property_name ) | |
---|---|
Parameters: | |
Name | Type |
element | ConfigElementRef |
property_name | String |
Explanation | |
Gets a piece of String data from a config file element reference. For example, to get the value of 'MadeLike' in the following element: | |
Dessert applepie { Cost 8 Calories 1004 MadeLike grandma Ingredient flour Ingredient butter Ingredient apples Deliciousness 3.6 } Use: 'var madelike := GetConfigString(element,"MadeLike");' | |
Return values | |
An Real value for the property | |
Errors | |
"Invalid type in config file! (internal error)" | |
"Property not found" | |
"Invalid parameter type" |
GetConfigStringArray( element, property_name ) | |
---|---|
Parameters: | |
Name | Type |
element | ConfigElementRef |
property_name | String |
Explanation | |
For elements with multiple occurrences of a given property, returns an array containing each occurrence. | |
For example, to get all the ingredients in the following element: | |
Dessert applepie { Cost 8 Calories 1004 MadeLike grandma Ingredient flour Ingredient butter Ingredient apples Deliciousness 3.6 } Use: 'var ingredients := GetConfigStringArray(element,"Ingredient");' 'ingredients' now contains 'flour', 'butter', and 'apples'. | |
Value of the properties are always returned as strings. If the values are ints or reals, use CInt() or CDbl() to cast the values to the correct type. | |
Return values | |
An array of strings. | |
Errors | |
"Invalid parameter type" |
GetConfigStringDictionary( element, property_name ) | |
---|---|
Parameters: | |
Name | Type |
element | ConfigElementRef |
property_name | String |
Explanation | |
Works similarly to GetConfigStringArray() but will take the first word on the line and use it for the key. | |
For example, to get all the ingredients in the following element: | |
Dessert applepie { Cost 8 Calories 1004 MadeLike grandma Ingredient flour 1 kg Ingredient butter 2 kg Ingredient apples 3 kg Deliciousness 3.6 } Use: 'var ingredients := GetConfigStringDictionary(element,"Ingredient");' 'ingredients' now contains ['flour'] = '1 kg', ['butter'] = '2 kg', and ['apples'] = '3 kg'. | |
Value of the properties are always returned as strings. If the values are ints or reals, use CInt() or CDbl() to cast the values to the correct type. | |
Return values | |
Dictionary with Strings | |
Errors | |
"Invalid parameter type" |
GetConfigStringKeys( config_file ) | |
---|---|
Parameters: | |
Name | Type |
config_file | ConfigFileRef |
Explanation | |
Gets an array of all the String keys, AND integer keys (returned as strings) in the config file. | |
Return values | |
An array of strings | |
Errors | |
"GetConfigStringKeys param 0 must be a Config File" |
ListConfigElemProps( element ) | |
---|---|
Parameters: | |
Name | Type |
element | ConfigElementRef |
Explanation | |
Gets an array of the element's property-names (as unique strings) | |
Return values | |
An array of strings | |
Errors | |
"Invalid parameter type" |
LoadTusScpFile( filename ) | |
---|---|
Parameters: | |
Name | Type |
filename | String, see explaination |
Explanation | |
Very Old Function - may not work any longer! | |
// // Load a TUS .SCP file as a config file // // Filename must be alphanumeric only. The file must exist // in pol/import/tus. So LoadTusScpFile( "grayacct" ) will // try to load "/pol/import/tus/grayacct.scp" // // Header properties, if any, in cfgfile[0] // Other elements numbered sequentially from 1 // The part in brackets ("[WORLDITEM 04000]") will appear in two ways: // 1) as a "_key" property // 2) as a property itself (name=WORLDITEM, value=0x4000) // // // So,if you had the following as the first element // [WORLDITEM 04000] // SERIAL=080 // P=1,2,3 // And 'var tusfile' was the result of LoadTusScpFile, then // tusfile[1]._key is "WORLDITEM 04000" // tusfile[1].worlditem is 0x4000 // tusfile[1].serial is 0x80 // tusfile[1].p is "1,2,3" // | |
Return values | |
A Config File Reference | |
Errors | |
"Invalid parameter type" | |
"Filename cannot include path information or special characters" | |
"File not found" |
ReadConfigFile(filename) | |
---|---|
Parameters: | |
Name | Type |
filename | String (not including '.cfg') |
Explanation | |
Reads a given config file and returns a reference to it for use with other functions in this EM file. | |
Note, takes the usual package filespec: '::cfgfile' is in /pol/config, '::regions/cfgfile' is in /pol/regions, ':*:cfgfile' is a combination of all configs named 'cfgfile' in all pacakages, and ':pkgname:cfgfile' is a specific cfgfile inside a package. If only 'cfgfile' is passed, POL looks for it first in /pol/config and then in each package sequentially. | |
Return values | |
A ConfigFileRef on success. | |
Errors | |
"Unable to find package X" | |
"Poorly formed config file descriptor: X" | |
"Config file not found" | |
"Invalid parameter type" |
UnloadConfigFile( filename ) | |
---|---|
Parameters: | |
Name | Type |
filename | String |
Explanation | |
Unloads a config file from memory. If other scripts reference the config file specified, it will remain in memory until they no longer reference it. Scripts which call ReadConfigFile() after this, however, will re-read the config file and use the newer version. | |
Has no effect on most core-read config files like itemdesc.cfg, npcdesc.cfg, etc (See ReloadConfiguation in polsys.em) | |
filename uses the normal package descriptor format (see ReadConfigFile) | |
Return values | |
Integer number of files unloaded | |
Errors | |
"Unable to find package X" | |
"Poorly formed config file descriptor: X" | |
"Invalid parameter" |