功能: 从文件中随机获取一行字符串
格式:
GetCacheRandomText 文件路径 变量(S0--S99) 指定行(1-10000)
说明:
没有指定行时随机取某一行的字符串.
变量可以是S0--S99或者A0--A499
例如:随机取一行字符串到S10中.
[@Main]
#IF
#ACT
GetCacheRandomText
..\QuestDiary\测试.txt S10
SendMsg 5
取出的字符串是:<$STR(S10)>
例如:取特定行的字符串.
[@Main]
#IF
#ACT
GetCacheRandomText
..\QuestDiary\测试.txt S10 5
SendMsg 5
取出的字符串是:<$STR(S10)>
GetCacheRandomText 为缓存模式 比 GetRandomText 更为高效!
注:
新增的GetCacheRandomText同GetRandomText 用法一致,区别就是GetCacheRandomText从缓存检测。会更快。
启动后不动态发生变化又要求速度的,可以用缓存检测(引擎启动后不会去手动修改)