Skip to content

Commit c5d2bca

Browse files
committed
update
1 parent 6aab141 commit c5d2bca

File tree

8 files changed

+366
-391
lines changed

8 files changed

+366
-391
lines changed

script.toml

Lines changed: 337 additions & 375 deletions
Large diffs are not rendered by default.

script/config.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ maxstep=10
4242
stepmaxstep=6
4343
--多步搜索的最大步数,0为不多步
4444

45-
walkecho=false
45+
walkecho=true
4646
--是否回显命令
4747

4848
mudsettings="set no_more;unset prompt;set auto_drinkout;set combatd self;set auto_regenerate;set wimpy 25;unset map_prompt"

script/main.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,4 @@ if configcmd~=nil then
4444
configcmd()
4545
end
4646
loadmod("update.mod")
47-
loadmod("queue.lua")
47+
loadmod("queue.lua")

script/mods/beiqi.mod

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ beiqi["askend"]=function()
121121
busytest(beiqi.main)
122122
return
123123
end
124+
busytest(beiqi.main)
124125
end
125126

126127
beiqi_infook=function(n,l,w)

script/mods/letter.mod

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ letter.questok=function()
5050
do_npcinpath(city[letter.city].path,letter.npcfind,letter_end_fail)
5151
end
5252
letter.npcfind=function()
53+
Note(npc.name)
5354
if npc.id==nil or npc.id=="" then
5455
npc.id=getcnname(npc.name)
5556
end

script/mods/status.mod

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ me.hp={}
55
me.fam={"None"}
66
me.special={}
77
checkstatus=function()
8-
run("special;who -n -fam;score1;league;")
8+
run("special;who -n -fam;score;league;")
99
end
1010

1111
score=function()
1212
me.score={}
13-
catch("charinfo","score1")
13+
catch("charinfo","score")
1414
end
1515

1616
status_on_score1=function (name, line, wildcards)
@@ -29,6 +29,10 @@ status_on_teacher=function (name, line, wildcards)
2929
me.score["xingge"]=wildcards[1]
3030
me.score["teacher"]=wildcards[2]
3131
end
32+
status_onteachernew=function(name, line, wildcards)
33+
me.score["sex"]=wildcards[1]
34+
me.score["teacher"]=wildcards[2]
35+
end
3236
status_noteacher=function (name, line, wildcards)
3337
me.score["xingge"]=wildcards[1]
3438
me.score["teacher"]="none"
@@ -85,13 +89,13 @@ status_onhpwater=function(name, line, wildcards)
8589
end
8690

8791
status_onhptihui=function(name, line, wildcards)
88-
me.hp.nuqi=wildcards[2]
89-
if me.hp.nuqi=="怒火中烧" or me.hp.nuqi=="竖发冲冠" then
90-
me.hp.nuqi=10000
91-
else
92-
me.hp.nuqi=tonumber(me.hp.nuqi)
93-
end
94-
me.hp["tihui"]=tonumber(wildcards[3])
92+
--me.hp.nuqi=wildcards[2]
93+
--if me.hp.nuqi=="怒火中烧" or me.hp.nuqi=="竖发冲冠" then
94+
-- me.hp.nuqi=10000
95+
--else
96+
-- me.hp.nuqi=tonumber(me.hp.nuqi)
97+
--end
98+
me.hp["tihui"]=tonumber(wildcards[1])
9599
end
96100

97101
getfam=function()

script/mods/update.mod

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ updateversion=function()
8181
addtri("event_dragonfind","^(> )*【(明教|天地会)】.{1,4}\\[(.*)\\]:helllua.dragon-(.*)-(.*)-(.*)","dragon","event_dragonfind")
8282
addtri("event_dragonfind2","^(> )*【(明教|天地会)】.{1,4}\\[(.*)\\]:Dragon:()().+\\.(.*)","dragon","event_dragonfind")
8383
SetTriggerOption("jiqu_fail","group","system")
84-
addtri("status_onhptihui","^(【 平 和 】|【 愤 怒 】)\\s*(.*?)\\s*【 体 会 】(.*)$","hp","status_onhptihui")
84+
addtri("status_onhptihui","^│\\s*│【体会】\\s*(\\d+)\\s*$","hp","status_onhptihui")
8585
addtri("study_fail","^(> )*(你今天太累了,结果什么也没有研究成。|然而你今天太累了|也许是缺乏实战经验|你要向谁求教?|你的.*火候不够|你的.*水平有限|这项技能你的程度已经不输你师父了。|这项技能你恐怕必须找别人学了|[^a-zA-Z0-9、 ()【】.。,,::;;??!!]+说:嗯.... 你的.*功力已经是非同凡响了,我就不再教你,你自己多研究吧。|你对.*的掌握程度还未到研究的程度。)","study","study_fail")
8686
--SetOption("wrap_column",400)
8787
addvar("fightcuff","")
@@ -121,7 +121,7 @@ updateversion=function()
121121
addtri("items_onbagitems","^ ([^a-z!@#$%\\^&*()\\\\/.,<> ]+)\\((\\w*\\s{0,1}\\w+)\\)$","bagitem","on_bagitems")
122122
addtri("heal_danbusy","^(> )*你的内力不足,无法运满一个周天。$","dispel","on_dispelneilifail")
123123
addtri("heal_neilifail","^(> )*你刚服用过药,需药性发挥完效用以后才能继续服用。$","eatdan","on_danbusy")
124-
addtri("status_onhptihui","^(【 平 和 】|【 愤 怒 】)\\s*([^/ ]*).*【 体 会 】(.*)$","hp","status_onhptihui")
124+
addtri("status_onhptihui","^│\\s*│【体会】\\s*(\\d+)\\s*│$","hp","status_onhptihui")
125125
addtri("on_getweapon","^(> )*你手腕一麻,手中(.*)不由脱手而出!","system","on_getweapon")
126126
addtri("study_gold","^(> )*(朱熹|厨娘|戚长发)(说道:您太客气了,这怎么敢当?|笑着说道:您见笑了,我这点雕虫小技怎够资格「指点」您什么?|像是受宠若惊一样,说道:请教?这怎么敢当?)","study","study_gold")
127127
addtri("askyouok","^(> )*游讯嘿嘿奸笑两声,对你小声道:“没有问题,不过得要50两黄金,不二价!”","askyou","askyouok")
@@ -143,8 +143,8 @@ updateversion=function()
143143
addtri("walkdogkill","^(> )*看起来(.*)想杀死你!","system","dogkill")
144144
addtri("flyfail","^(> )*^(> )*(你已经超过17岁了,无法再使用这个指令回到客店了。|你身上带著密函,不能施展。|你要召唤什么物品?|你不知道如何召唤这个物品|你已经在扬州客店了。|你摸着.*,发了半天的呆。|你觉得.*的感觉相当飘忽,看来精力不济,难以感应。|你瞪着.*,看啥?|你摸着.*,发了半天的呆。)","system","walk_on_flyfail")
145145
addtri("lianrest","^(> )*(你的内力不够练.*。|你现在太累了,结果一行也没有看下去。)$","lian","lianrest")
146-
addtri("on_objend","^(> )+","roomobj","on_objend")
147-
addtri("on_obj","^ (.+)\\(([A-Za-z0-9_ ]+)\\)$","roomobj","on_obj")
146+
-- addtri("on_objend","^(> )+","roomobj","on_objend")
147+
-- addtri("on_obj","^ (.+)\\(([A-Za-z0-9_ ]+)\\)$","roomobj","on_obj")
148148
addtri("on_drunk2","^(> )*你觉得脑中昏昏沉沉,身子轻飘飘地,大概是醉了。$","system","on_drunk2")
149149
addtri("on_drunk","^(> )*你觉得一阵酒意上冲,眼皮有些沉重了。$","system","on_drunk")
150150
addtri("dazuofull","^(> )*你的内力修为似乎已经达到了瓶颈。$","dazuoneili","dazuofull")

script/mods/walk.mod

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ walk_on_room=function (name, line, wildcards,styles)
115115
if ((#wildcards[1])~=0)and((#wildcards[1])==styles[1]["length"]) then
116116
__textindex=2
117117
end
118-
if ((#styles)==__textindex)and(styles[__textindex]["textcolour"]==ColourNameToRGB("Cyan")) then
118+
if ((#styles)==__textindex)and(styles[__textindex]["textcolour"]==ColourNameToRGB("cyan")) then
119119
_roomname=((styles[__textindex]["text"]))
120120
end
121121
end
@@ -339,6 +339,7 @@ convpath=function(path)
339339
end
340340

341341
on_obj=function(name, line, wildcards)
342+
wildcards[2]=string.lower(wildcards[2])
342343
_item,num=getitemnum(wildcards[1])
343344
if room_obj[wildcards[2]]~=nil then
344345
room_obj[wildcards[2]]["num"]=room_obj[wildcards[2]]["num"]+num
@@ -348,8 +349,14 @@ on_obj=function(name, line, wildcards)
348349
room_obj[_item]=room_obj[wildcards[2]]
349350
end
350351
on_objend=function(name, line, wildcards)
352+
--callhook(hooks.step)
351353
EnableTriggerGroup("roomobj",false)
352354
end
355+
on_objga=function()
356+
if GetTriggerOption("on_obj","enabled") then
357+
on_objend()
358+
end
359+
end
353360
walk_npc=function(n,l,w)
354361
room_obj[w[2]]={num=1,id=nil}
355362
end

0 commit comments

Comments
 (0)