New for 1.69

Edit: the GeSHi file can be found here.

The site’s back from over a year of it just sitting here collecting spam. I’ll try to post a bit more often (every 6 months maybe :D ). Like NWN1, it’s back and shiny and looks prettier than before. It also has proper nwscript highlighting thanks to Jasperre kindly giving me a copy of the nwscript pastebin’s GeSHi file.

So here’s the new functions from 1.69 as a test…

// Get the description of oObject.
// - oObject: the object from which you are obtaining the description. 
//            Can be a creature, item, placeable, door, trigger or module object.
// - bOriginalDescription:  if set to true any new description specified via a SetDescription scripting command
//                   is ignored and the original object's description is returned instead.
// - bIdentified: If oObject is an item, setting this to TRUE will return the identified description,
//                setting this to FALSE will return the unidentified description. This flag has no
//                effect on objects other than items.
string GetDescription(object oObject, int bOriginalDescription=FALSE, int bIdentifiedDescription=TRUE);
 
// Set the description of oObject.
// - oObject: the object for which you are changing the description 
//            Can be a creature, placeable, item, door, or trigger.
// - sNewDescription: the new description that the object will use.
// - bIdentified: If oObject is an item, setting this to TRUE will set the identified description,
//                setting this to FALSE will set the unidentified description. This flag has no
//                effect on objects other than items.
// Note: Setting an object's description to "" will make the object
//       revert to using the description it originally had before any
//       SetDescription() calls were made on the object.
void SetDescription(object oObject, string sNewDescription="", int bIdentifiedDescription=TRUE);
 
// Get the PC that sent the last player chat(text) message.
// Should only be called from a module's OnPlayerChat event script.
// * Returns OBJECT_INVALID on error.
// Note: Private tells do not trigger a OnPlayerChat event.
object GetPCChatSpeaker();
 
// Get the last player chat(text) message that was sent.
// Should only be called from a module's OnPlayerChat event script.
// * Returns empty string "" on error.
// Note: Private tells do not trigger a OnPlayerChat event.
string GetPCChatMessage();
 
// Get the volume of the last player chat(text) message that was sent.
// Returns one of the following TALKVOLUME_* constants based on the volume setting
// that the player used to send the chat message.
//                TALKVOLUME_TALK
//                TALKVOLUME_WHISPER
//                TALKVOLUME_SHOUT
//                TALKVOLUME_SILENT_SHOUT (used for DM chat channel)
//                TALKVOLUME_PARTY
// Should only be called from a module's OnPlayerChat event script.
// * Returns -1 on error.
// Note: Private tells do not trigger a OnPlayerChat event.
int GetPCChatVolume();
 
// Set the last player chat(text) message before it gets sent to other players.
// - sNewChatMessage: The new chat text to be sent onto other players.
//                    Setting the player chat message to an empty string "",
//                    will cause the chat message to be discarded 
//                    (i.e. it will not be sent to other players).
// Note: The new chat message gets sent after the OnPlayerChat script exits.
void SetPCChatMessage(string sNewChatMessage="");
 
// Set the last player chat(text) volume before it gets sent to other players.
// - nTalkVolume: The new volume of the chat text to be sent onto other players.
//                TALKVOLUME_TALK
//                TALKVOLUME_WHISPER
//                TALKVOLUME_SHOUT
//                TALKVOLUME_SILENT_SHOUT (used for DM chat channel)
//                TALKVOLUME_PARTY
//                TALKVOLUME_TELL (sends the chat message privately back to the original speaker)
// Note: The new chat message gets sent after the OnPlayerChat script exits.
void SetPCChatVolume(int nTalkVolume=TALKVOLUME_TALK);
 
// Get the Color of oObject from the color channel specified.
// - oObject: the object from which you are obtaining the color. 
//            Can be a creature that has color information (i.e. the playable races).
// - nColorChannel: The color channel that you want to get the color value of.
//                   COLOR_CHANNEL_SKIN
//                   COLOR_CHANNEL_HAIR
//                   COLOR_CHANNEL_TATTOO_1
//                   COLOR_CHANNEL_TATTOO_2
// * Returns -1 on error.
int GetColor(object oObject, int nColorChannel);
 
// Set the color channel of oObject to the color specified.
// - oObject: the object for which you are changing the color.
//            Can be a creature that has color information (i.e. the playable races).
// - nColorChannel: The color channel that you want to set the color value of.
//                   COLOR_CHANNEL_SKIN
//                   COLOR_CHANNEL_HAIR
//                   COLOR_CHANNEL_TATTOO_1
//                   COLOR_CHANNEL_TATTOO_2
// - nColorValue: The color you want to set (0-175).
void SetColor(object oObject, int nColorChannel, int nColorValue);
 
// Returns Item property Material.  You need to specify the Material Type.
// - nMasterialType: The Material Type should be a positive integer between 0 and 77 (see iprp_matcost.2da).
// Note: The Material Type property will only affect the cost of the item if you modify the cost in the iprp_matcost.2da.
itemproperty ItemPropertyMaterial(int nMaterialType);
 
// Returns Item property Quality. You need to specify the Quality.
// - nQuality:  The Quality of the item property to create (see iprp_qualcost.2da).
//              IP_CONST_QUALITY_*
// Note: The quality property will only affect the cost of the item if you modify the cost in the iprp_qualcost.2da.
itemproperty ItemPropertyQuality(int nQuality);
 
// Returns a generic Additional Item property. You need to specify the Additional property.
// - nProperty: The item property to create (see iprp_addcost.2da).
//              IP_CONST_ADDITIONAL_*
// Note: The additional property only affects the cost of the item if you modify the cost in the iprp_addcost.2da.
itemproperty ItemPropertyAdditional(int nAdditionalProperty);

Also, for comparison…

//::///////////////////////////////////////////////
//:: Confusion Heartbeat Support Script
//:: NW_G0_Confuse
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
    This heartbeat script runs on any creature
    that has been hit with the confusion effect.
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: Sept 27, 2001
//:://////////////////////////////////////////////
#include "x0_inc_henai"
 
 
void main()
{
    SendForHelp();
 
    //Make sure the creature is commandable for the round
    SetCommandable(TRUE);
    //Clear all previous actions.
    ClearAllActions(TRUE);
    int nRandom = d10();
    //Roll a random int to determine this rounds effects
    if(nRandom  == 1)
    {
        ActionRandomWalk();
    }
    else if (nRandom >= 2 && nRandom  <= 6)
    {
        ClearAllActions(TRUE);
    }
    else if(nRandom >= 7 && nRandom <= 10)
    {
        ActionAttack(GetNearestObject(OBJECT_TYPE_CREATURE));
    }
    SetCommandable(FALSE);
}
 

Download code: nw_g0_confuse.nss