Aller au contenu

Photo

New Scripting Commands


  • Veuillez vous connecter pour répondre
6 réponses à ce sujet

#1
Sunjammer

Sunjammer
  • Members
  • 925 messages
Added by v1.02:

/** @brief This returns an object associated with the specified command
*
*   @returns object
*   @param cCommand - The command
*   @param nIndex - The nth object requested. Defaults to 0
*   @author Jose
*/
object GetCommandObject(command cCommand, int nIndex = 0) = 550;


/** @brief This sets an object associated with the specified command
*
*   @returns VOID
*   @param cCommand - The command
*   @param nCommandObject - The object being set on the command
*   @param nIndex - The nth object being set. Defaults to 0
*   @author Jose
*/
command SetCommandObject(command cCommand, object nCommandObject, int nIndex = 0) = 551;

Added by v1.03:

/** @brief Returns a list of ability IDs for non-item abilities active on the given creature.
*
* @param oCreature - the creature to query
* @param nType - the type of ability to query for. INVALID (0) returns all non-item abilities.
* @param bOnlyCoolingDown - return only abilities that are currently cooling down
* @returns Returns a list of integer ability IDs.
* @author Sebastian Hanlon
*/
int[] GetAbilityList( object oCreature, int nType = ABILITY_INVALID, int bOnlyCoolingDown = FALSE ) = 859;


/** @brief Put the game into target request mode. If the user selects a target (or if a valid target is already available) the specified event will be fired back to scripting.
*
* @param nTargetType - The type of target to request  (Target types are defined inside targettype.xls). Hostile: 4, AoE: 16
* @param fAOEParamater1 - This is used to specify the radius of a circular AoE. It should be zero if you only wish to target single objects
* @param fAOEParamater2 - _NOT CURRENTLY USED_. This should be 0.0f
* @param nEventID - ID of the event fired to the specified object(or overriden script).  The event returned has an Object[0] value of the creature targeted (if any creature) and a Vector[0] value indicating the position of the target. Note if a creature is targeted the position is the position of the targeted creature.
* @param oObject - The object to signal the event to.
* @param scriptname - If specified overides the default script
*
* @author John Fedorkiw
*/
void RequestTarget(int nTargetType, float fAOEParamater1, float fAOEParamater2, int eventID, object oObject, string scriptname = "") = 860;


/** @brief Returns the global conversation line or action script parameter
*
* Returns the script parameter for a conversation line.
*
* @returns The script parameter
* @author JamesG
*/
int GetConversationEntryParameter( ) = 443;


/** @brief Determines if a package is currently loaded.
*
* Returns TRUE if the package identified is currently loaded.
*
* @param sPackageUID - The package UID.
* @returns Returns TRUE if the package identified is currently loaded, FALSE otherwise.
* @author Gavin Burt
*/
int IsPackageLoaded( string sPackageUID ) = 862;


/** @brief Set a cooldown for the indicated plot action. When the cooldown is finished an Event sporting the indicated event ID & the PlotActionID (in Integer argument 0) will be fired to the specified location)
* @param nPlotActionID: Id of the plot action
* @param fCooldownTime: amount of cooldown
* @param nEventID - The ID of the Even fired back to script when the cooldown has completed. This event will have an Integer[0] value identifying the PlotActionID that has finished cooling down
* @param oObject - The object to signal the event to.
* @param scriptname - If specified overides the default script
* @author John Fedorkiw
*/
void SetPlotActionCooldown(int nPlotActionId, float fCooldownTime, int nEventID, object oObject, string scriptname = "") = 861;

Enjoy!

Modifié par Sunjammer, 20 mars 2010 - 12:07 .


#2
fluffyamoeba

fluffyamoeba
  • Members
  • 264 messages
Also CommandFly() has an extra parameter

/** @brief This function is a fly command constructor. The flying creature will use both the position and orientation of the target location.
*
* @param lLocation - the location the command should fly the creature to
* @param bIgnorePathing - (optiona) set to true if being able to path to the lLocation is not a requirement
* @returns a valid command
* @author Jose
*/
command CommandFly(location lLocation, int bIgnorePathing = FALSE) = 811;

#3
Magic

Magic
  • Members
  • 187 messages
1. Thanks.

2. RequestTarget() and SetPlotActionCooldown() - wow nice?

3. No StringToResource() yet?

#4
Sunjammer

Sunjammer
  • Members
  • 925 messages
The new functions have been added to the Lexicon.

I've also added new "function by version" categories (1.02 functions and 1.03 functions) however it's going to take a little time for the wiki to recategorise all the function pages (it is currently about 1/2 through the 700 or so pages that make up the v1.00 functions) so don't be alarmed if those categories are empty.

Modifié par Sunjammer, 20 mars 2010 - 03:49 .


#5
ladydesire

ladydesire
  • Members
  • 1 928 messages
Any indication of when the toolset update will show?

#6
Sunjammer

Sunjammer
  • Members
  • 925 messages
None but the scripting new/updated commands are already available.

#7
FollowTheGourd

FollowTheGourd
  • Members
  • 572 messages
I'm not sure where the toolset gets its function list from, but I've noticed that there were already some available functions before the expansion that didn't show up in it (like some of the quickbar related functions IIRC).