row_inc_functions
GLOBAL FUNCTIONS
GetCDKeyID(object oPC)
Returns the Database Record ID of the CDKey for the Playerint
GetPlayerID(object oPC)
Returns the Database Record ID of the Playerint
GetCharacterID(object oPC)
Returns the Database Record ID of the Characterint
GetItemID(object oItem)
Returns the Database Record ID of the Itemint
GetItemOwner(object oItem)
Passes the Database Character ID of the Owner of the Itemint
GetIsPlayerDM(object oPC)
Returns from the Database whether or not this Player Account belongs to a Server DMint
FormatID(int iID)
Returns a (gIDsize) character string based on the integer passed, with leading zeros// Example: 159 is converted to "00000159"
GetRace(object oPC)
Returns the String Value of the Race of the Objectstring
GetRaceSub(object oPC)
Returns the String Value of the Sub Race of the Objectstring
Get PCGender(object oPC)
Returns the String Value of the Gender of the Objectstring
GetAlignment(object oPC)
Returns the String Value of the Alignment of the Objectstring
GetClass(int iPos, object oPC)
Returns the String Value of the Class of the Object, given the position (1-3)
GetLevel(object oPC)
Returns the true level of the object, combining the levels of up to all 3 classes
GetGameDate()
Returns the Current Game Date in the string form of "YYYYMMDD"
GetGameDate()
Returns the Current Game Date and Time in the string form of "YYYYMMDDHHMM"
StringZero(int iNum, int iSize)
Given a number (iNum), converts it to a String and adds leading zeros to make the string iSize long
Example: StringZero(10,5) would return "00010"
GetItemTag(object oItem)
Given an Item Object, returns the Tag of the Item. If the Database Item Tracking Setting is turned on, the function will return the True Tag (not the modified DB Tag).
GetTrackedItemPossessedBy(object oPC, string sTag);
This function returns the object in the Character's (oPC) inventory, given a particular Tag (sTag). This function should be used when Item Tracking is Enabled (gEnableItemTracking = TRUE) in the place of the GetItemPossessedBy() function. Otherwise, this Function acts exactly like the built-in GetItemPossessedBy(object oPC, string sTag)
Row_ModuleStart()
Use in the Module's OnModuleStart Event
Row_ModuleEnter(object oPC=OBJECT_INVALID)
Use in the Modules's OnClientEnter Event
Function Comments
- GATHER THE EVENT TRIGGERING OBJECT IF IT IS NOT PASSED
- ABORT IF THE OBJECT IS NOT A PLAYER OR DM
- DEBUG CODE
- ABORT IF THERE IS NO DATABASE ACCESS
- STORE THE PLAYER'S DATABASE VALUES ONTO THE PLAYER OBJECT
- iPID = GetPlayerID(oPC);
- iCID = GetCharacterID(oPC);
- iIsDM = GetIsPlayerDM(oPC);
- UPDATE THE PLAYER'S TIME STATISTICS
- UPDATE THE CHARACTER'S TIME STATISTICS
- UPDATE THE IP ADDRESS TABLE
- INITALIZE THE PLAYER'S CHARACTER ONLINE STATUS
- SISPLAY LOGIN TO DM'S AND TO LOG FILECHECK IF THE USER IS BANNED
- CHECK IF THE USER IS SIGNED ON AS A DM, BUT THEIR PLAYER ACCOUNT IS NOT DMACTIVE (EXTRA SECURITY AGAINST FAKE DM'S / HACKERS)
- SET THE PLAYER FLAG THAT THEY ARE ONLINE TO TRUE
Row_ModulePlayerLoaded(object oPC=OBJECT_INVALID)
Use in the Module's OnPlayerLoaded Event
Function Comments
- DEBUG CODE
- GATHER THE EVENT TRIGGERING OBJECT IF IT IS NOT PASSED
- ABORT IF THE OBJECT IS NOT A PLAYER OR DM
- ABORT IF THE PLAYER IS NOT READY TO BE TELEPORTED YET
- STORE THE PLAYER'S DATABASE VALUES ONTO THE PLAYER OBJECT
- ABORT IF THE PLAYER IS LOGGING BACK ON (BEFORE THE SERVER WAS RESET)
- CHECK / SET THE CHARACTER'S HIT POINTS
- IF THE CHARACTER IS DEAD IN THE DATABASE, MAKE THE CHARACTER DEAD
- SET FEATS / SPELLS TO NO USES LEFT
- JUMP THE CHARACTER TO THE LAST SAVED LOCATION
Row_ModuleExit(object oPC=OBJECT_INVALID)
Use in the Module's OnClientExit Event Function Comments
Function Comments
- GATHER THE EVENT TRIGGERING OBJECT IF IT IS NOT PASSED
- ABORT IF THE OBJECT IS NOT A PLAYER OR DM
- DEBUG CODE
- SET THE PLAYER FLAG THAT THEY ARE ONLINE TO TRUE
- SET THE CHARACTER'S CURRENT HIT POINTS
- SET THE CHARACTER'S DEATH STATUS
- UPDATE TIME SPENT ONLINE
- UPDATE THE CHARACTER TIME STATISTICS
- SET THE PLAYER/CHARACTER AS OFFLINE
Row_AreaEnter(object oPC=OBJECT_INVALID)
Use in all Areas' OnEnter Event
Row_AreaExit(object oPC=OBJECT_INVALID)
Use in all Areas' OnExit Event
Row_PlayerUpdate(object oPC=OBJECT_INVALID)
Use to store the Character information from the object (oPC) into the Database
Row_PlayerRest(object oPC=OBJECT_INVALID)
Use in the Module's OnPlayerRest
Row_PlayerDead(object oPC=OBJECT_INVALID, object oNPC=OBJECT_INVALID)
Use in the Module's OnPlayerDeath Script
Row_PlayerRaise(int bPortToBind, object oPC=OBJECT_INVALID)
Use in the Module's OnPlayerRespawn Script with bPortToBind set to TRUE
Use in Raise Dead and Ressurrect Spells Scripts, with bPortToBind set to FALSE
Row_AddToLootTable(object oItem)
Use to add an item to the Database, to catalog the items drop, and how many times each item has dropped in the game.
Row_ItemCreate(string strResRef, sting strTag="", object oOwner=OBJECT_INVALID)
Used internally and should not be used.
Row_ItemGain(object oItem=OBJECT_INVALID)
Use in the Module's OnAcquire
Row_ItemLose(object oItem=OBJECT_INVALID)
Use in the Module's OnUnacquire Script
GetNPCID(object oNPC);
Returns the NPC ID for the given NPC (oNPC)
IncreaseNPCkills(object oNPC);
Increases the Total Number of Kills that an NPC type has inflicted upon Player
IncreaseNPCdeaths(object oNPC);
Increases the Total Number of Deaths that the NPC type has suffered.
Row_ResetCharacter(object oPC);
Used to set the character's (oPC) Feats and Spells to all used. This stops people from logging off and back on to get all their spells back.
Row_DiscoverLocation(object oPC, object oPlace=OBJECT_SELF);
Used to reward the character (oPC) when they step into a trigger (oPlace) and discover a new location.
RemoveEffects(object oPC)
Use to remove all negative affects from a character. This function is a direct copy from the NWN script in nw_i0_plot