搜索
查看: 532|回复: 2

[求助] 红包求助改个LUA给予道具脚本

[复制链接]
发表于 2022-5-17 11:13:50 | 显示全部楼层 |阅读模式
求助哪位大神可以帮忙修改,红包感谢!

我想把首爆这里  给予元宝改成给予指定叠加道具(RMB券等),数量根据设定的即可。有可以改的联系Q:1213605888


        --首爆功能物品添加方法。
        --name   装备名字。
        --price  奖励金额。
        {name="星王战盔",price=200},
        {name="星王法冠",price=200},




--首爆方法显示
function Show_Bao(ActName,g_item)
--检测新区功能
        checkNewSever()
        local HumVar = ActName:getGameGold()  --获取元宝变量值

        if s.share.getVal_G(Get_G) <=Get_D then   --计算开区时间

                for i,k in pairs(ShouBao_item) do
                        if g_item == ShouBao_item.name and s.share.checkListTextEx(file_S.."ItemName.txt",ShouBao_item.name, 0,"Force") == 0 then                       
                                s.share.addTextListEx(file_S.."ItemName.txt",g_item, 1, 0,"Force")
                                HumVar = HumVar + ShouBao_item.price --计算获得货币总额
                                ActName:setGameGold(HumVar)

                                ActName:sendMsg(1,"[货币提示]:元宝+"..ShouBao_item.price..".当前元宝:"..HumVar.."!", 215, 0)
                                ActName:sendMsg(0,"★限时奖励]恭喜:【"..ActName:getCharName().."】第一个打到【"..g_item.."】,获得【"..ShouBao_item.price.."】元宝!!", -1, -1)
                                ActName:sendCenterMsg(251,0,"★限时奖励]恭喜:【"..ActName:getCharName().."】第一个打到【"..g_item.."】,获得【"..ShouBao_item.price.."】元宝!!",1, 2, 3)
                                FileFunc(ActName:getCharName(),i)      --调用文本方法
                        end

发表于 2022-5-17 12:56:39 | 显示全部楼层
--HumVar = HumVar + ShouBao_item.price --计算获得货币总额
--ActName:setGameGold(HumVar) 把这两个注释掉
--换上下面 这个  把你忒波表里的price  后面的200改成 给予的物品名字
ActName:giveItem(ShouBao_item.price, 0, "0|0|0|0", "0|0|0|0", "0|0|0", "0|0|0|0|0|0", 1)
发表于 2022-5-17 13:13:45 | 显示全部楼层
price="物品名字"
忘记了  字符 要打引号
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|HGEM2论坛

GMT+8, 2024-9-22 13:21 , Processed in 0.497659 second(s), 13 queries .

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

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