ClearGuildList » 历史记录 » 版本 3
tejie, 2025-07-03 11:42
| 1 | 3 | tejie | h4. _*%{color:green}clearGuildList%*_ |
|---|---|---|---|
| 2 | |||
| 3 | 1 | machenhe | 删除指定文件 |
| 4 | |||
| 5 | |||
| 6 | 3 | tejie | 标签:命令定义^clearGuildList |
| 7 | 1 | machenhe | |
| 8 | *格式* |
||
| 9 | |命令名 |参数1 | |
||
| 10 | |clearGuildList |文件路径 | |
||
| 11 | |||
| 12 | *说明* |
||
| 13 | 3 | tejie | |参数1|处理文件路径 |
| 14 | 2 | yangdefeng | 路径需要基于..\Mir200\Envir |
| 15 | 1 | machenhe | %{color:lightGrey}举例 |
| 16 | 设定处理路径为 |
||
| 17 | 2 | yangdefeng | \testlist.txt |
| 18 | 1 | machenhe | 完整处理路径 |
| 19 | 3 | tejie | ..\Mir200\Envir\testlist.txt%| |
| 20 | 1 | machenhe | |
| 21 | - |
||
| 22 | - |
||
| 23 | |||
| 24 | 3 | tejie | h4. *%{color:deepskyblue}特戒引擎脚本示例:%* |
| 25 | 1 | machenhe | |
| 26 | bq. [<notextile>@</notextile>main] |
||
| 27 | #act |
||
| 28 | 2 | yangdefeng | mov s$file \数据文件\测试非预制数据文件.txt |
| 29 | 1 | machenhe | #say |
| 30 | 2 | yangdefeng | <添加行会名称/<notextile>@</notextile>添加>\ \ |
| 31 | <清理行会名文件/<notextile>@</notextile>清理>\ \ |
||
| 32 | <检测所在行会是否在文件中/<notextile>@</notextile>检测行会名>\ \ |
||
| 33 | <检测文件存在/<notextile>@</notextile>存在>\ \ |
||
| 34 | 1 | machenhe | |
| 35 | [<notextile>@</notextile>添加] |
||
| 36 | #if |
||
| 37 | [[haveGuild]] |
||
| 38 | #act |
||
| 39 | [[addGuildList]] <$str(s$file)> |
||
| 40 | [[readTxt]] <$str(s$file)> s0 |
||
| 41 | %{color:lightGrey};print命令在控制台输出文件内容% |
||
| 42 | print 文件内容-> s0 |
||
| 43 | #elseAct |
||
| 44 | print 尚未加入行会 |
||
| 45 | |
||
| 46 | [<notextile>@</notextile>清理] |
||
| 47 | #if |
||
| 48 | #act |
||
| 49 | *%{color:green}clearGuildList%* <$str(s$file)> |
||
| 50 | readTxt <$str(s$file)> s0 |
||
| 51 | print 文件内容-> s0 |
||
| 52 | |
||
| 53 | [<notextile>@</notextile>检测行会名] |
||
| 54 | 2 | yangdefeng | %{color:lightGrey};玩家没加入行会,执行checkGuildList会报错% |
| 55 | 1 | machenhe | #if |
| 56 | not haveGuild |
||
| 57 | #act |
||
| 58 | print 尚未加入行会 |
||
| 59 | |
||
| 60 | #if |
||
| 61 | [[checkGuildList]] <$str(s$file)> |
||
| 62 | #act |
||
| 63 | print 所在行会存在于文件中 |
||
| 64 | #elseAct |
||
| 65 | print 所在行会不存在于文件中 |
||
| 66 | |
||
| 67 | #if |
||
| 68 | #act |
||
| 69 | readTxt <$str(s$file)> s0 |
||
| 70 | print 文件内容-> s0 |
||
| 71 | |
||
| 72 | [<notextile>@</notextile>存在] |
||
| 73 | #if |
||
| 74 | [[fileExist]] <$str(s$file)> |
||
| 75 | #act |
||
| 76 | print 文件存在 |
||
| 77 | #elseAct |
||
| 78 | print 文件不存在 |