项目

一般

简介

DelNameList » 历史记录 » 版本 1

machenhe, 2022-04-28 14:52

1 1 machenhe
_*%{color:green}delNameList%*_
2
删除指定文件中玩家角色名
3
4
5
标签:命令定义|delNameList
6
7
*格式*
8
|命令名		|参数1	 |
9
|delNameList	|文件路径|
10
11
*说明*
12
* 参数1: 删除文件路径
13
路径需要基于..\\Mir200\\Envir
14
%{color:lightGrey}举例
15
设定删除路径为
16
\\testlist.txt
17
完整删除路径
18
..\\Mir200\\Envir\\testlist.txt%
19
20
-
21
-
22
23
*%{color:deepskyblue}脚本示例:%*
24
25
26
bq. [<notextile>@</notextile>main]
27
#act
28
mov s$file \\数据文件\\测试非预制数据文件.txt
29
#say
30
<增加角色名/<notextile>@</notextile>添加>\\ \\
31
<删除文件中角色名/<notextile>@</notextile>删除>\\ \\
32
<清理角色名文件/<notextile>@</notextile>清理>\\ \\
33
<检测角色名是否在文件中/<notextile>@</notextile>检测角色名>\\ \\
34
<检测角色名位置/<notextile>@</notextile>检测角色名位置>\\ \\
35
<检测文件存在/<notextile>@</notextile>存在>\\ \\
36
&nbsp;
37
[<notextile>@</notextile>添加]
38
#act
39
addNameList <$str(s$file)>
40
readTxt <$str(s$file)> s0
41
%{color:lightGrey};print命令在控制台输出文件内容%
42
print 文件内容-> s0
43
&nbsp;
44
[<notextile>@</notextile>删除]
45
#if
46
#act
47
%{color:green}delNameList% <$str(s$file)>
48
readTxt <$str(s$file)> s0
49
print 文件内容-> s0
50
&nbsp;
51
[<notextile>@</notextile>清理]
52
#act
53
clearNameList <$str(s$file)>
54
readTxt <$str(s$file)> s0
55
print 文件内容-> s0
56
&nbsp;
57
[<notextile>@</notextile>检测角色名]
58
#if
59
checkNameList <$str(s$file)>
60
#act
61
print 角色名存在
62
#elseAct
63
print 角色名不存在
64
&nbsp;
65
#if
66
#act
67
readTxt <$str(s$file)> s0
68
print 文件内容-> s0
69
&nbsp;
70
[<notextile>@</notextile>检测角色名位置]
71
#if
72
checkNameListPosition <$str(s$file)> < 10 n0
73
#act
74
print 角色当前在前10名
75
print 名次 n0
76
#elseAct
77
print 角色当前不在前10名
78
print 名次 n0
79
&nbsp;
80
[<notextile>@</notextile>存在]
81
#if
82
fileExist <$str(s$file)>
83
#act
84
print 文件存在
85
#elseAct
86
print 文件不存在