[灌水] MUSHclient 進階法師讀冊自動換冊

看板mud_sanc (Sanctuary - 聖殿)作者 (hmml)時間12年前 (2014/01/05 15:59), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
  花俏的自動換書讀觸發 -進階法師專用-   灌水用!   -==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==- <triggers> <trigger enabled="y" group="BookStore" keep_evaluating="y" match="^(&gt; )?你....了《(\S+)》裡頭....的文字,得到了..些心得\.\.\.$" regexp="y" send_to="12" sequence="100" > <send> --技能對應表 local adv2skill = { ['runes'] = [[戎文研究]], ['disaster-wall'] = [[災難之牆]], ['frozen-orb'] = [[冰封球]], ['ragnarok'] = [[諸神黃昏]], ['gate'] = [[時空之門]], ['speed-cast'] = [[快速施法]], ['absorb'] = [[魂力吸取]], ['biotech'] = [[生化技術]], ['legendary'] = [[劇滅強擊]], ['multi-cast'] = [[多重施法]], ['creator-key'] = [[造物者之鑰]], ['sagepower'] = [[秘法力量]], } --遍歷上表 for k,v in pairs (adv2skill) do --如果在書名中找到表中相同的技能關鍵字 if string.match('%2',v) then --看技能熟練狀態。總之,這個觸發只是監控用。 Send ("sk "..k) break end end </send> </trigger> <trigger enabled="y" group="BookStore" match="你已經不需要再在書店讀《(.*)》囉\!$" regexp="y" send_to="12" sequence="100" > <send> --技能對應表,因為加local的關係,要再寫一遍。 local adv2skill = { ['runes'] = [[戎文研究]], ['disaster-wall'] = [[災難之牆]], ['frozen-orb'] = [[冰封球]], ['ragnarok'] = [[諸神黃昏]], ['gate'] = [[時空之門]], ['speed-cast'] = [[快速施法]], ['absorb'] = [[魂力吸取]], ['biotech'] = [[生化技術]], ['legendary'] = [[劇滅強擊]], ['multi-cast'] = [[多重施法]], ['creator-key'] = [[造物者之鑰]], ['sagepower'] = [[秘法力量]], } --建立一個用完即刪觸發,用來將當前技能值寫入SkV。 AddTriggerEx("Temp", [[你技能中的.+值是 (.+)/.+.$]], [[SkV = %%1]], 32801, -1, 0, "", "", 12, 100) --啟用觸發BookList。 SetTriggerOption("BookList", "Enabled", 1) -- 遍歷adv2skill表 for k,v in pairs (adv2skill) do --如果在書名中找到表中相同的技能關鍵字 if string.match('%1',v) then --技能中文名寫入advskill。 advskill = v --下指令sk 技能英文名,這時,所建立的觸發就能取得技能值。 Send ('sk '..k) break end end Execute ('s;list') </send> </trigger> <trigger back_colour="8" bold="y" enabled="y" group="BookStore" match="藥水販賣機" match_back_colour="y" match_bold="y" match_text_colour="y" regexp="y" sequence="100" text_colour="8" > <send>s--不慎走過頭就回頭,沒什麼途</send> </trigger> <trigger group="BookStore" match="(\S+)\s+\d+\s+int$" name="BookList" regexp="y" send_to="12" sequence="100" > <send> --三個判斷條件: --1. 技能值未達3000。 --2. advskill 內容不為nil。防錯用。 --3. 書名中的技能名與advskill中的技能名相同。 --會繼續讀同一套技能書。 if SkV ~=3000 and advskill and string.match('%1',advskill) then Send ('read %1') SkV,advskill = nil,nil SetTriggerOption("BookList", "Enabled", 0) --兩個判斷條件: --1. 技能值未達3000。 --2. advskill 內容不為nil。防錯用。 --換讀書籍列表的第一本書。 elseif SkV == 3000 and advskill then Send ('read %1') SkV,advskill = nil,nil SetTriggerOption("BookList", "Enabled", 0) end </send> </trigger> </triggers> -==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==- -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 220.132.196.45
文章代碼(AID): #1IoH3rNs (mud_sanc)
文章代碼(AID): #1IoH3rNs (mud_sanc)