- UID
- 9279
- 阅读权限
- 255
- 注册时间
- 2006-7-7
- 最后登录
- 2024-11-17
- 在线时间
- 9707 小时
- 性别
- 男
- 生日
- 1991 年 12 月 8 日
教皇
- 耕战
- 13421
- 鹰币
- 41665
- 天龙币
- 18
- 回帖
- 6021
|
上个星期的更新中,游戏增加了一些触发,还允许制作者编写XS脚本,然后在触发中调用自己创作的条件或效果。我在更新游戏后也于第一时间尝试了脚本功能,但是无论我在游戏目录中如何寻找,都找不到常量以外的关于XS的内容。后来又尝试用十六进制编辑器打开程序文件,在其中发现了一些字符串,看样子应该是XS脚本的信息。
通过这些内容我发现,除了一些基本的数学运算和数据类型存取,就只有少数几个能改变游戏内容的函数了。这与我所预想的有很大差距,譬如最常用的单位属性就没有对应的函数。如果这就是全部内容的话,那么XS脚本能做的事情就太少了,只能存取变量和玩家的资源值,或者像ETP一样送出有数字的聊天。莫非还有其它函数,或者是通过调用xsAddRuntimeEvent和xsGetFuntionID来实现更多功能?
以下为提取的内容,包括了函数定义及其功能解释。
void xsDisableRule( string ruleName ): Disables the given rule.
void xsDisableSelf( void ): Disables the current rule.
void xsEnableRule( string ruleName ): Enables the given rule.
bool xsIsRuleEnabled( string ruleName ): Returns true if the rule is enabled.
void xsSetRulePriority( string ruleName, int priority ): Sets the priority of the given rule.
void xsSetRulePrioritySelf( int priority ): Sets the priority of the current rule.
void xsSetRuleMinInterval( string ruleName, int interval ): Sets the min interval of the given rule.
void xsSetRuleMinIntervalSelf( int interval ): Sets the min interval of the current rule.
void xsSetRuleMaxInterval( string ruleName, int interval ): Sets the max interval of the given rule.
void xsSetRuleMaxIntervalSelf( int interval ): Sets the max interval of the current rule.
void xsEnableRuleGroup( string ruleGroupName ): Enables all rule in the given rule group.
void xsDisableRuleGroup( string ruleGroupName ): Disables all rules in the given rule group.
void xsIsRuleGroupEnabled( string ruleGroupName ): Returns true if the rule group is enabled.
float xsVectorGetX( vector v ): Returns the x.ocmponent of the given vector.
float xsVectorGetY( vector v ): Returns the y component of the given vector.
float xsVectorGetZ( vector v ): Returns the z component of the given vector.
float xsVectorSetX( vector v, float x ): Set the x.ocmponent of the given vector, returns the new vector.
float xsVectorSetY( vector v, float y ): Set the y component of the given vector, returns the new vector.
float xsVectorSetZ( vector v, float z ): Set the z component of the given vector, returns the new vector.
float xsVectorSet( float x, float y, float z ): Set the 3 components into a vector, returns the new vector.
float xsVectorLength( vector v ): Returns the length of the given vector.
float xsVectorNormalize( vector v): Returns the normalized version of the given vector.
int xsArrayCreateInt(int size, int defaultValue, string name): creates a sized and named integer array, returning an arrayID.
int xsArraySetInt(int arrayID, int index, int value): Sets a value at the specified index in the requested array.
int xsArrayGetInt(int arrayID, int index): Gets the value at the specified index in the requested array.
int xsArrayResizeInt(int arrayID, int newSize): Resize the requested array.
int xsArrayCreateFloat(int size, float defaultValue, string name): creates a sized and named float array, returning an arrayID.
int xsArraySetFloat(int arrayID, int index, float value): Sets a value at the specified index in the requested array.
float xsArrayGetFloat(int arrayID, int index): Gets the value at the specified index in the requested array.
int xsArrayResizeFloat(int arrayID, int newSize): Resize the requested array.
int xsArrayCreateBool(int size, bool defaultValue, string name): creates a sized and named boolean array, returning an arrayID.
int xsArraySetBool(int arrayID, int index, bool value): Sets a value at the specified index in the requested array.
bool xsArrayGetInt(int arrayID, int index): Gets the value at the specified index in the requested array.
int xsArrayResizeBool(int arrayID, int newSize): Resize the requested array.
int xsArrayCreateString(int size, string defaultValue, string name): creates a sized and named string array, returning an arrayID.
int xsArraySetString(int arrayID, int index, string value): Sets a value at the specified index in the requested array.
string xsArrayGetString(int arrayID, int index): Gets the value at the specified index in the requested array.
int xsArrayResizeString(int arrayID, int newSize): Resize the requested array.
int xsArrayCreateVector(int size, vector defaultValue, string name): creates a sized and named vector array, returning an arrayID.
int xsArraySetVector(int arrayID, int index, vector value): Sets a value at the specified index in the requested array.
vector xsArrayGetVector(int arrayID, int index): Gets the value at the specified index in the requested array.
int xsArrayResizeVector(int arrayID, int newSize): Resize the requested array.
int xsArrayGetSize(int arrayID): Gets the specified array's size.
int xsDumpArrays(): blogs out all XS arrays.
int xsGetContextPlayer( void ): Returns the current context player ID.
void xsSetContextPlayer( int playerID ): Sets the current context player ID (DO NOT DO THIS IF YOU DO NOT KNOW WHAT YOU ARE DOING).
int xsGetTime( void ): Returns the current gametime (in milliseconds).
bool xsAddRuntimeEvent( string foo, string bar, int something ): Setups a runtime event. Don't use this.
int xsGetFuntionID( string functionName ): Runs the secret XSFID for the function. USE WITH CAUTION.
float abs(float x)
float sqrt(float x)
float pow(float x, float y)
float sin(float x)
float cos(float x)
float tan(float x)
float asin(float x)
float acos(float x)
float atan(float x)
float atan2(float x)
long xsTriggerVariable(long x)
void xsSetTriggerVariable(long x, long value)
float xsPlayerAttribute(long playerId, long attribute)
float xsSetPlayerAttribute(long playerId, long attribute, float value)
xsChatData(const char* text, long value);
|
评分
-
查看全部评分
|