SASA 扩展NewOpcodes

杂项 Misc

内存拷贝、线程变量、结构体与字符串

sa · 扩展 NewOpcodes · 需 CLEO + NewOpcodes

写法见 Lua / Redux。部分号与 CLEO+ 重叠,以实际加载插件为准。

内存 / 时间

MEMCPY · 0D27

内存块拷贝 size 字节。

0D27 MEMCPY
in: source, destination, size
GET_LOCAL_TIME · 0D2D

取本机时间:年/月/星期/日/时/分/秒/毫秒。

0D2D GET_LOCAL_TIME
out: year, month, dayOfWeek, day, hour, minute, second, milliseconds

线程变量

SET_THREAD_VAR · 0D2E

写另一脚本线程的局部变量槽。

0D2E SET_THREAD_VAR
in: thread, var, value
GET_THREAD_VAR · 0D2F

读另一脚本线程局部变量。

0D2F GET_THREAD_VAR
in: thread, var
out: result

结构体槽 / 字段

SET_STRUCT_PARAM · 0D37

按元素下标写结构体 4 字节槽(裸内存)。

0D37 SET_STRUCT_PARAM
in: struct, param, value
GET_STRUCT_PARAM · 0D38

按元素下标读结构体 4 字节槽。

0D38 GET_STRUCT_PARAM
in: struc, param
out: value
GET_STRUCT_FIELD · 0D4E

按字节偏移读结构体字段(可指定 size,支持串)。

0D4E GET_STRUCT_FIELD
in: struct, offset, size
out: result
SET_STRUCT_FIELD · 0D4F

按字节偏移写结构体字段。

0D4F SET_STRUCT_FIELD
in: struct, offset, size, value

字符串

STRING_LEN · 0D4C

字符串长度(strlen)。

0D4C STRING_LEN
in: string
out: length
STRING_CPY · 0D4D

拷贝字符串到目标缓冲(strcpy)。

0D4D STRING_CPY
in: source, destination

On this page