File Constants:
//Apply*Damage constants
const DAMAGE_USE_REPSYS := 1;
const DAMAGE_NO_REPSYS := 0;
const DAMAGE_NO_SHOW := 0;
const DAMAGE_SHOW := 1;
const DAMAGE_USE_DEFAULT := 2;
//RecalcVital constants
const RECALC_INTRINSIC_MOD := 1;
const RECALC_NO_INTRINSIC_MOD := 0;
const RECALC_VITALS := 1;
const RECALC_NO_VITALS := 0;
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
ApplyDamage( mobile, damage, userepsys := DAMAGE_USE_REPSYS, send_damage := DAMAGE_USE_DEFAULT ) | |
---|---|
Parameters: | |
Name | Type |
mobile | Character Reference |
damage | Real (0.0 to 30000.0) |
userepsys | Integer (optional, default DAMAGE_USE_REPSYS) |
send_damage | Integer (optional, default DAMAGE_USE_DEFAULT) |
Explanation | |
Decreases a character's hit points, after reducing damage due to armor. | |
Notes: vitals.em constants for userepsys: | |
const DAMAGE_USE_REPSYS := 1; const DAMAGE_NO_REPSYS := 0; const DAMAGE_NO_SHOW := 0; const DAMAGE_SHOW := 1; const DAMAGE_USE_DEFAULT := 2; | |
DAMAGE_USE_DEFAULT uses the SendDamagePacket setting from combat.cfg | |
(Old notes:) The steps taken are as follows: A piece of armor is chosen randomly, based on probabilities in ARMRZONE.CFG. Damage is reduced by 50% to 100% of the armor's AR. Remaining damage is halved. "I'm Hit" animation is played. Damage is applied. Mobile is killed if hit points are now zero. Invokes Reputation system effects. | |
Return values | |
Real damage applied to mobile on success | |
Errors | |
"Invalid parameter type" | |
"Damage is out of range" | |
Related | |
Character |
ApplyRawDamage( Character, Hits, userepsys := DAMAGE_USE_REPSYS, send_damage := DAMAGE_USE_DEFAULT ) | |
---|---|
Parameters: | |
Name | Type |
Character | Character Reference |
Hits | Integer (0..255) |
userepsys | Integer (optional, default DAMAGE_USE_REPSYS) |
send_damage | Integer (optional, default DAMAGE_USE_DEFAULT) |
Explanation | |
Decreases a character's hit points. If this causes hit points to drop to zero, kills the character. | |
Notes: Armor is ignored. | |
Invokes Reputation system effects. | |
Notes: vitals.em constants for userepsys: | |
const DAMAGE_USE_REPSYS := 1; const DAMAGE_NO_REPSYS := 0; const DAMAGE_NO_SHOW := 0; const DAMAGE_SHOW := 1; const DAMAGE_USE_DEFAULT := 2; | |
DAMAGE_USE_DEFAULT uses the SendDamagePacket setting from combat.cfg | |
Return values | |
1 on success | |
Errors | |
none (returns 0 on invalid parameter) | |
Related | |
Character |
ConsumeMana( who, spellid ) | |
---|---|
Parameters: | |
Name | Type |
who | Character Reference |
spellid | Integer |
Explanation | |
Consumes amount of "Mana" for "who" for the spell as defined in spells.cfg | |
Notes: spells.cfg files define spells and spell ids. | |
Consumes from "Mana" vital. | |
Return values | |
1 on success | |
Errors | |
"Invalid parameter" | |
"No such spell" | |
"Spell ID out of range" | |
Related | |
Character | |
Related Configs | |
spells.cfg |
ConsumeVital( who, vital, hundredths ) | |
---|---|
Parameters: | |
Name | Type |
who | Character Reference |
vital | String (vital name) |
hundredths | Integer |
Explanation | |
Consumes an amount of vital "vital" in hundreths. for example, ConsumeVital(who, "Stamina", 100) consumes one point of stamina. | |
Return values | |
1 on consume success or 0 on failure (insufficient value for the vital) | |
Errors | |
"Invalid parameter type" including if vital was not found as a vital name | |
Related | |
Character | |
Related Configs | |
vitals.cfg |
GetVital( character, vitalname ) | |
---|---|
Parameters: | |
Name | Type |
character | Character Reference |
vitalname | String (vital name) |
Explanation | |
Gets the current value of "vitalname" on "character". | |
Return values | |
Integer current value of the vital on success or Error | |
Errors | |
"Invalid parameter type" including if vitalname was not found as a vital | |
Related | |
Character | |
Related Configs | |
vitals.cfg |
GetVitalMaximumValue( character, vitalname ) | |
---|---|
Parameters: | |
Name | Type |
character | Character Reference |
vitalname | String (vital name) |
Explanation | |
Gets the maximum value of "vitalname" on "character" | |
Return values | |
Integer maximum value of the vital on success or Error | |
Errors | |
"Invalid parameter type" including if vitalname was not found as a vital | |
Related | |
Character | |
Related Configs | |
vitals.cfg |
GetVitalName( alias_name ) | |
---|---|
Parameters: | |
Name | Type |
alias_name | String |
Explanation | |
Returns the real vital name from an alias | |
Return values | |
String | |
Errors | |
"Invalid parameter type" | |
Related | |
Character | |
Related Configs | |
vitals.cfg |
GetVitalRegenRate( character, vitalname ) | |
---|---|
Parameters: | |
Name | Type |
character | Character Reference |
vitalname | String (vital name) |
Explanation | |
Returns the regeneration rate for "vitalname" on "character" | |
Return values | |
Integer regeneration rate of the vital on success | |
Errors | |
"Invalid parameter type" including if vitalname was not found as a vital | |
Related | |
Character | |
String | |
Related Configs | |
vitals.cfg |
HealDamage( Character, Hits ) | |
---|---|
Parameters: | |
Name | Type |
Character | Character Reference |
Hits | Integer (0..255) |
Explanation | |
Increases a character's hit points, up to the character's maximum. | |
Notes: Invokes Reputation system effects. | |
Return values | |
1 if some part of the damage could be healed. | |
Errors | |
"Invalid parameter" | |
Related | |
Character |
RecalcVitals( character, calc_attribute := RECALC_INTRINSIC_MOD, calc_vital := RECALC_VITALS ) | |
---|---|
Parameters: | |
Name | Type |
character | Character Reference |
calc_attribute | Integer/String (attribute name) |
calc_vital | Integer/String (vital name) |
Explanation | |
if default values are passed recalculates regen rates and maximum values from the exported functions in vitals.cfg for all vitals on a mobile and the intrinsic modifier from the exported functions in attributes.cfg for all attributes | |
if calc_attribute is set to RECALC_NO_INTRINSIC_MOD it skips the recalculation of attributes | |
if calc_attribute is set to an attribute name it only calculates for given attribute | |
if calc_vital is set to RECALC_NO_VITALS it skips the recalculation of vitals | |
if calc_vital is set to an vital name it only calculates for given vital | |
Notes: vitals.em constants: | |
const RECALC_INTRINSIC_MOD := 1; const RECALC_NO_INTRINSIC_MOD := 0; const RECALC_VITALS := 1; const RECALC_NO_VITALS := 0; | |
Return values | |
1 on success | |
Errors | |
"Mobile must be online." | |
"Invalid parameter type" | |
"Vital not defined: {given name}" | |
"Attribute not defined: {given name}" | |
Related | |
Character | |
Related Configs | |
vitals.cfg | |
attributes.cfg |
SetVital( character, vitalname, value ) | |
---|---|
Parameters: | |
Name | Type |
character | Character Reference |
vitalname | String (vital name) |
value | Integer (in hundreths) |
Explanation | |
Sets the current value for "vitalname" on "character" in hundreths. | |
Return values | |
1 on success | |
Errors | |
"Invalid parameter type" including if vitalname was not found as a vital | |
Related | |
Character | |
Related Configs | |
vitals.cfg |