搜索
查看: 1929|回复: 5

[求助] lua盛大经典回归显示

[复制链接]
发表于 2020-9-14 12:35:06 | 显示全部楼层 |阅读模式
         
请大神指点下如何将炼化属性设置和左边图片一样啊?lua要怎么写啊?

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x
发表于 2020-9-14 23:11:49 | 显示全部楼层
function itemInfo.getItemInfo(item, dbitem, actor, itemFrom, itemPos)这个方法中 添加
=========================================================
--神秘属性 --by andrew01
        local function getSecretValue()
                local function getValue(v)
                        local ret = ""
                        if item:getIdentify(1) > 0 and item:getIdentify(1) < 5 then
                                if v > 0 then
                                        if v == 1 then ret = "\\"..hintHelper.text("重生技能", const.cllime)
                                        elseif v == 2 then ret = "\\"..hintHelper.text("八卦护身神技", const.cllime)
                                        elseif v == 3 then ret = "\\"..hintHelper.text("麻痹神技", const.cllime)
                                        elseif v == 4 then ret = "\\"..hintHelper.text("魔道麻痹技能", const.cllime)
                                        elseif v == 5 then ret = "\\"..hintHelper.text("战意麻痹技能", const.cllime)
                                        elseif v == 6 then ret = "\\"..hintHelper.text("探测技能", const.cllime)
                                        elseif v == 7 then ret = "\\"..hintHelper.text("传送技能", const.cllime)
                                        elseif v >= 11 and v <= 20 then ret = "\\攻击上限+"..(v-10)
                                        elseif v >= 21 and v <= 30 then ret = "\\魔法上限+"..(v-20)
                                        elseif v >= 31 and v <= 40 then ret = "\\道术上限+"..(v-30)
                                        elseif v >= 41 and v <= 50 then ret = "\\魔防上限+"..(v-40)
                                        elseif v >= 51 and v <= 60 then ret = "\\物防上限+"..(v-50)
                                        elseif v >= 61 and v <= 70 then ret = "\\主属性+"..(v-60)
                                        elseif v >= 71 and v <= 80 then ret = "\\内力恢复+"..(v-70)
                                        elseif v >= 81 and v <= 90 then ret = "\\聚魔等级+"..(v-80)
                                        elseif v >= 91 and v <= 100 then ret = "\\强身等级+"..(v-90)
                                        elseif v >= 101 and v <= 110 then ret = "\\吸血上限+"..(v-100)
                                        elseif v >= 111 and v <= 120 then ret = "\\内伤等级+"..(v-110)
                                        elseif v >= 121 and v <= 130 then ret = "\\暴击等级+"..(v-120)
                                        elseif v >= 131 and v <= 140 then ret = "\\防爆+"..(v-130)
                                        elseif v >= 141 and v <= 150 then ret = "\\准确+"..(v-140)
                                        elseif v >= 151 and v <= 160 then ret = "\\敏捷+"..(v-150)
                                        elseif v >= 161 and v <= 180 then ret = "\\麻痹抗性+"..(v-160)
                                        elseif v >= 181 and v <= 230 then ret = "\\合击威力+"..(v-180)
                                        elseif v >= 231 and v <= 250 then
                                                ret = "\\ \\"..hintHelper.text("宝物灵媒 品质"..math.round(11.4 * (v-230)), const.clyellow)
                                                if item:getAura() > 0 then
                                                        ret = ret.." "..hintHelper.text("灵气值"..item:getAura().."/"..item:getMaxAura(), const.clyellow)
                                                else
                                                        ret = ret.." "..hintHelper.text("灵气值0/"..item:getMaxAura(), const.clred)
                                                end
                                        elseif v == 255 then ret = "\\"..hintHelper.text("神秘属性(待解读)", const.clred)
                                        --以下为20200505版新增加和修改
                                        elseif v >= 256 and v <= 265 then _v = v-255; ret = "\\刺术上限+".._v
                                        elseif v >= 266 and v <= 275 then _v = v-265; ret = "\\攻击速度+".._v
                                elseif v >= 276 and v <= 305 then _v = v-275; ret = "\\击破+".._v
                                elseif v >= 306 and v <= 326 then _v = v-305; ret = "\\麻痹强化+".._v
                                elseif v >= 327 and v <= 2327 then _v = v-326; ret = "\\神圣防御+".._v
                                elseif v >= 2328 and v <= 4328 then _v = v-2327; ret = "\\神圣属性上限+".._v
                                elseif v >= 4329 and v <= 6329 then _v = v-4328; ret = "\\魔血值+".._v
                                elseif v >= 6330 and v <= 8330 then _v = v-6329; ret = "\\主属性+".._v
                                       
                                elseif v >= 8331 and v <= 10331 then _v = v-8330; ret = "\\腕力+".._v
                                elseif v >= 10332 and v <= 10532 then _v = v-10331; ret = "\\目标爆率+".._v                                       
                                        --20200505版增加结束
                                --以下为20200811版增加
                                elseif v >= 10533 and v <= 20533 then _v = v-10532; ret = "\\神圣暴击率+"..(_v/100).."%"
                                elseif v >= 20534 and v <= 30534 then _v = v-20533; ret = "\\神圣暴击倍率+"..(_v/100).."%"                                       
                                --20200811版增加结束                                       
                                        end
                                end
                        end
                        return ret
                end
                local ret = ""
                for i=6, 9 do
                        ret = ret..getValue(item:getIdentify(i))
                end
               
                if ret ~= "" then
                        local num = 0
                        for i=6, 9 do
                                if item:getIdentify(i) > 0 --[[20200505版注释and item:getIdentify(i) < 255--]] then
                                        num = num+1
                                end
                        end
                        ret = "\\ \\"..hintHelper.text("附加神秘属性("..num.."/"..item:getIdentify(1)..")", const.clyellow)..ret
                end;
               
                return ret
        end
=======================================
后面返回修改
       
        ret = itemInfo.title.."\\"..ret
        ret = ret.."\\"..c.item.getItemDesc(item:getName())
        ret = ret..getSecretValue() --by andrew01
       
        ret = ret..itemInfo.getState(item, dbitem, true)
       
       
       
        ret = ret..itemInfo.getLeftTime(item)
       
       
       
        ret = ret..itemInfo.getItemFrom(item)
               
        --print(ret)

        return ret

评分

参与人数 1金钱 +100 热心值 +1 收起 理由
花落似无情 + 100 + 1 很给力!

查看全部评分

发表于 2020-9-14 15:54:40 | 显示全部楼层
bucuo11111111111
发表于 2020-9-14 23:07:35 | 显示全部楼层
修改iteminfo 里的 展示总方法
发表于 2020-9-15 06:00:50 | 显示全部楼层
andrew01 发表于 2020-9-14 23:11
function itemInfo.getItemInfo(item, dbitem, actor, itemFrom, itemPos)这个方法中 添加
=============== ...

6666666666666
 楼主| 发表于 2020-9-15 21:39:11 | 显示全部楼层
andrew01 发表于 2020-9-14 23:11
function itemInfo.getItemInfo(item, dbitem, actor, itemFrom, itemPos)这个方法中 添加
=============== ...

大神,加了神秘属性后改变名字和颜色变成盛大那样的要怎么写啊?
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|HGEM2论坛

GMT+8, 2024-9-20 17:38 , Processed in 0.639443 second(s), 20 queries .

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表