Skip to content

Commit 612cccb

Browse files
committed
update
1 parent 3d09fa9 commit 612cccb

File tree

5 files changed

+101
-4
lines changed

5 files changed

+101
-4
lines changed

script.toml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4966,6 +4966,28 @@ Channel="helllua"
49664966
ReverseSpeedwalk = false
49674967
OmitFromOutput = false
49684968
OmitFromCommandHistory = false
4969+
[[Aliases]]
4970+
ID = "d1d3ic3aqkn74872jkrj8n"
4971+
Name = "alias_fight"
4972+
Enabled = true
4973+
Match = "^#fight\\s{0,1}(.*)$"
4974+
Send = ""
4975+
Script = "alias_fight"
4976+
SendTo = 0
4977+
Sequence = 0
4978+
ExpandVariables = false
4979+
Temporary = false
4980+
OneShot = false
4981+
Regexp = true
4982+
Group = ""
4983+
IgnoreCase = true
4984+
KeepEvaluating = true
4985+
Menu = false
4986+
OmitFromLog = false
4987+
Variable = ""
4988+
ReverseSpeedwalk = false
4989+
OmitFromOutput = false
4990+
OmitFromCommandHistory = false
49694991

49704992
[[Aliases]]
49714993
ID = "d1d3ic3aqkna4h71jkrj8o"

script/mods/alias.mod

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,39 @@ alias_kill=function(m,l,w)
197197
do_killnpc(t.id,tonumber(t.loc),aliasaftercmd,aliasaftercmd)
198198
end
199199

200+
alias_kill=function(m,l,w)
201+
w[1]=getaftercmd(w[1],w[0])
202+
s,e,t=npclocre:match(w[1])
203+
print(t.id)
204+
print(t.loc)
205+
if t==nil then
206+
busytest(aliasaftercmd)
207+
return
208+
end
209+
210+
if t.id==nil or t.id==false or t.id=="" then
211+
busytest(aliasaftercmd)
212+
return
213+
end
214+
do_killnpc(t.id,tonumber(t.loc),aliasaftercmd,aliasaftercmd)
215+
end
216+
alias_fight=function(m,l,w)
217+
w[1]=getaftercmd(w[1],w[0])
218+
s,e,t=npclocre:match(w[1])
219+
print(t.id)
220+
print(t.loc)
221+
if t==nil then
222+
busytest(aliasaftercmd)
223+
return
224+
end
225+
226+
if t.id==nil or t.id==false or t.id=="" then
227+
busytest(aliasaftercmd)
228+
return
229+
end
230+
do_fightnpc(t.id,tonumber(t.loc),aliasaftercmd,aliasaftercmd)
231+
end
232+
200233
makere=rex.new("(?<name>\\S+)(\\s(?<num>\\d+)){0,1}")
201234
alias_make=function(m,l,w)
202235
w[1]=getaftercmd(w[1],w[0])

script/mods/blocker.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ blocker["采花子"]={id="caihua zi",exp=0}
88
blocker["衙役"]={id="ya yi",exp=50000}
99
blocker["摘星子"]={id="zhaixing zi",exp=800000}
1010
blocker["出尘子伸手"]={id="wuchen zi",exp=-1}
11-
blocker["劳德诺"]={id="lao denuo",exp=1500000}
11+
--blocker["劳德诺"]={id="lao denuo",exp=1500000}
1212
blocker["鳌府侍卫"]={id="shi wei",exp=50000}
1313
blocker["鳌拜"]={id="ao bai",exp=200000}
1414
blocker["心砚"]={id="xin yan",exp=790000}

script/mods/kill.mod

Lines changed: 44 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,15 @@ do_kill=function(npc,kill_ok,kill_fail)
6666
kill.cmd()
6767
end
6868

69+
do_fight=function(npc,kill_ok,kill_fail)
70+
kill["ok"]=kill_ok
71+
kill["fail"]=kill_fail
72+
kill.npc=npc
73+
hook(hooks.fight,pfm)
74+
hook(hooks.hurt,pfm)
75+
kill.fightcmd()
76+
end
77+
6978
kill["end"]=function(s)
7079
hook(hooks.fight,nil)
7180
hook(hooks.hurt,nil)
@@ -98,6 +107,21 @@ kill.cmd=function()
98107

99108
busytest(kill.test)
100109
end
110+
kill.fightcmd=function()
111+
run("yun recover;yun regenerate")
112+
if (me.score.xingge=="心狠手辣")or(me.score.xingge=="光明磊落")and(tonumber(GetVariable("nuqimin"))>2000) then run("burning") end
113+
cmd=GetVariable("fightcuff")
114+
prewield()
115+
if cmd~=nil and cmd~="" then
116+
npchere(kill.npc,"fight "..kill.npc)
117+
fightcuff()
118+
pfm()
119+
else
120+
npchere(kill.npc,getfightpreper()..";fight "..kill.npc..';'..getpfm())
121+
end
122+
123+
busytest(kill.test)
124+
end
101125

102126
kill.test=function()
103127
if npc.nobody==1 then
@@ -136,6 +160,22 @@ killnpc["ok"]=nil
136160
killnpc["fail"]=nil
137161
killnpc["id"]=""
138162
killnpc["loc"]=nil
163+
do_fightnpc=function(npcid,loc,killnpc_ok,killnpc_fail)
164+
killnpc["ok"]=killnpc_ok
165+
killnpc["fail"]=killnpc_fail
166+
killnpc["id"]=npcid
167+
killnpc["loc"]=loc
168+
killnpc.resumefight()
169+
end
170+
171+
killnpc.resumefight=function()
172+
if killnpc["loc"]==nil then
173+
174+
busytest(killnpc.fightcmd)
175+
else
176+
go(killnpc["loc"],killnpc.fightcmd,killnpc.fightcmd)
177+
end
178+
end
139179

140180
do_killnpc=function(npcid,loc,killnpc_ok,killnpc_fail)
141181
killnpc["ok"]=killnpc_ok
@@ -157,7 +197,10 @@ killnpc.cmd=function()
157197
fightpreper()
158198
do_kill(killnpc["id"],killnpc_end_ok,killnpc_end_ok)
159199
end
160-
200+
killnpc.fightcmd=function()
201+
fightpreper()
202+
do_fight(killnpc["id"],killnpc_end_ok,killnpc_end_ok)
203+
end
161204
killnpc["end"]=function(s)
162205
if ((s~="")and(s~=nil)) then
163206
call(killnpc[s])
@@ -173,4 +216,3 @@ end
173216
killnpc_end_fail=function()
174217
killnpc["end"]("fail")
175218
end
176-

script/mods/update.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ updateversion=function()
111111
addtri("l_54","^ 这是南城门,城墙被当成了广告牌,贴满了花花绿绿各行各业的广告,","locate","on_locate")
112112
addtri("l_34","^ 这是北城门,因为曾经失火,到现在城墙还是黑乎乎的,因此白纸","locate","on_locate")
113113
addtri("jiqu_fail","^(> )*(你的实战经验太浅,还无法领会通过实战获得的心得。|你感觉自己的实战经验还有欠缺,还无法领会更高境界的武学修养。|你现在精神不济,难以抓住实战体会中的秘要!|你现在没有充足的体力用来吸收实战的心得。)","system","jiqu_fail")
114-
addtri("study_needweapon","^(> )*你必须先找一.*才能练.*法。","study","study_needweapon")
114+
addtri("study_needweapon","^(> )*你必须先找一.*才能.*法。","study","study_needweapon")
115115
addtri("items_onbagsstart","^(> )*设定环境变数:no_more = \"getbag-(.+)\"$","bagitem","on_bagsstart")
116116
addtri("items_onbagsend","^(> )*设定环境变数:no_more = \"getbagend\"$","bagitem","on_bagsend")
117117
addtri("walk_maxstep","^(> )*设定环境变数:no_more = \"maxstep\"$","system","walk_maxstep")

0 commit comments

Comments
 (0)