From ae9b77e69e4655866b40e257248581553aa7608b Mon Sep 17 00:00:00 2001 From: admin Date: Wed, 24 Jun 2026 02:03:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B9=9D=E7=A7=98=E7=8F=A0?= =?UTF-8?q?=E5=90=88=E6=88=90/=E9=87=8D=E7=BD=AE=E8=8E=B7=E5=BE=97?= =?UTF-8?q?=E7=9A=84=E5=B1=9E=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../游戏功能/A2_二大陆/九秘珠合成.lua | 53 +++++++++++++------ client/env.json | 2 +- 2 files changed, 39 insertions(+), 16 deletions(-) diff --git a/Mirserver/Mir200/Envir/QuestDiary/游戏功能/A2_二大陆/九秘珠合成.lua b/Mirserver/Mir200/Envir/QuestDiary/游戏功能/A2_二大陆/九秘珠合成.lua index 6c3b7d56..b8a04b7b 100644 --- a/Mirserver/Mir200/Envir/QuestDiary/游戏功能/A2_二大陆/九秘珠合成.lua +++ b/Mirserver/Mir200/Envir/QuestDiary/游戏功能/A2_二大陆/九秘珠合成.lua @@ -28,6 +28,15 @@ JiuMiZhuOBJ.cfg = { gem = 5000, }, attributeSet = { + { name = "", Attribute = "3#13#5" }, + { name = "", Attribute = "3#82#300" }, + { name = "", Attribute = "3#83#500" }, + { name = "", Attribute = "3#36#500" }, + { name = "", Attribute = "3#73#300" }, + { name = "", Attribute = "3#75#500" }, + { name = "", Attribute = "3#214#3" }, + { name = "ǰ", Attribute = "3#60#500" }, + { name = "", Attribute = "3#219#5" }, }, reset = { { "ǧʯ", 2000, 0 }, @@ -44,7 +53,7 @@ Player.sycCfg[JiuMiZhuOBJ._name] = JiuMiZhuOBJ.cfg JiuMiZhuOBJ.CaChe = {} ---* ǰ˵õĺ -JiuMiZhuOBJ.allowFunc = { "main","hecheng", "reset" } +JiuMiZhuOBJ.allowFunc = { "main", "hecheng", "reset" } function JiuMiZhuOBJ:hecheng(actor, p1, p2, p3, data) @@ -68,36 +77,52 @@ function JiuMiZhuOBJ:hecheng(actor, p1, p2, p3, data) end function JiuMiZhuOBJ:settingAttr(actor, itemobj) - if not itemobj then return end - - delitemattr(actor, itemobj, 6, 0) + local attr = self.cfg.attributeSet or {} + if #attr <= 0 then + return + end - local attr = {} - for i, v in ipairs(JiuMiOBJ.cfg.up or {}) do - table.insert(attr, { v.attrId, v.addatt }) + local randomStr = {} + for i, v in ipairs(attr or {}) do + table.insert(randomStr, string.format("%d#1", i)) + end + + local function addAttribute(get_att, Attribute) + if type(Attribute) ~= "string" then + return + end + for attrGroup, attrId, value in string.gmatch(Attribute, "(%d+)#(%d+)#(%d+)") do + attrId = tonumber(attrId) + value = tonumber(value) + if attrId and value and value > 0 then + get_att[attrId] = (get_att[attrId] or 0) + value + end + end end local remaining = nil local get_att = {} - for i = 1, 5, 1 do - local result1, result2 = ransjstr(remaining and remaining or "1#1|2#1|3#1|4#1|5#1|6#1|7#1|8#1|9#1", 1, 3) + local count = math.min(5, #attr) + for i = 1, count, 1 do + local result1, result2 = ransjstr(remaining and remaining or table.concat(randomStr, "|"), 1, 3) remaining = result2 - get_att[attr[tonumber(result1)][1]] = self:getattValue(actor, attr[tonumber(result1)][1], - attr[tonumber(result1)][2]) + local cfg = attr[tonumber(result1)] + if cfg then + LOGDump(cfg.Attribute) + addAttribute(get_att, cfg.Attribute) + end end additemattrEX(actor, itemobj, 6, 3, get_att) end - function JiuMiZhuOBJ:reset(actor) - if not Npc.CheckNPCRange(actor, 190) then return end @@ -123,6 +148,4 @@ function JiuMiZhuOBJ:reset(actor) -- body end - - return JiuMiZhuOBJ diff --git a/client/env.json b/client/env.json index e457df0a..fed46f6b 100644 --- a/client/env.json +++ b/client/env.json @@ -1 +1 @@ -{"gm":0,"signkey":"634eff98723b31da43ed35f0dd4edf36","oper_mode":1,"modlist":"http://list.dhsf.xqhuyu.com/testmodlist/modlist_tool_16934.txt","resolution":"1024x768","channel":1} +{"gm":0,"signkey":"634eff98723b31da43ed35f0dd4edf36","oper_mode":1,"modlist":"http://list.dhsf.xqhuyu.com/testmodlist/modlist_tool_11557.txt","resolution":"1024x768","channel":1}