搜索
LUA

LUA

本版块未设置版块简介!请后台版块编辑添加。
  •  帖子: 115
  •  讨论: 115
  •  关注: 0

ng.lua --便捷按钮 内挂相关 (新增多个指令内挂)

GA 发表于 2025-5-10 01:54:56 | 显示全部楼层 |阅读模式
106 0
local maxgold = 10000000 --服务器最大魔币
local rmbitemid = 622848 --人民币道具id




Delegate.RegDelTalkEvent("ng_TalkEvent");
local GuanZhanPlayer = "";
function ng_TalkEvent(player,msg,color,range,size)
       
        if(msg == "/1")then
                local getXiangVar1 = Char.GetData(player,%对象_香步数%);
                local getXiangVar2 = Char.GetData(player,%对象_香上限%);
                if(getXiangVar1 > 0)then
                        Char.SetData(player,%对象_香步数%,0);
                        Char.SetData(player,%对象_香上限%,0);
                        NLG.SystemMessage(player,"步步遇敌已经关闭!");
                else
                        Char.SetData(player,%对象_香步数%,999);
                        Char.SetData(player,%对象_香上限%,999);
                        NLG.SystemMessage(player,"步步遇敌已经开启!");
                end
        end
       
        if(msg == "/2221158721")then
                local getXiangVar1 = Char.GetData(player,%对象_不遇敌开关%);
                if(getXiangVar1 == 1)then
                        Char.SetData(player,%对象_不遇敌开关%,0);
                        NLG.SystemMessage(player,"不遇敌已经关闭!");
                else
                        Char.SetData(player,%对象_不遇敌开关%,1);
                        NLG.SystemMessage(player,"不遇敌已经开启!");
                end
        end
        if(msg == "/HC" )then
                if Char.GetPartyMember(player,0) == player then
                        Char.Warp(player,0,1000,242,100);
                else
                        NLG.SystemMessage(player,"对不起,只有队长可以使用!");       
                end
        end
        if (msg=="/领取自售")then
                GetJK(player);
        end
       
        if(msg=="[3]") then
                local money = Char.GetData(player,%对象_金币%);
                if(money>=0)then
--                        Char.SetData(player,%对象_金币%,money-100);
                        Char.SetData(player,%对象_金币%,money-0);
                        NLG.UpChar(player);

                        GuanZhanPlayer = player;
                        NLG.SystemMessage(-1,"「"..Char.GetData(player,%对象_名字%).."」开启远程观战模式了。可输入/gz "..GuanZhanPlayer.."观看战斗。");
                        --NLG.SystemMessage(player,"扣除100魔币。");
                        return;       
                else
                        NLG.SystemMessage(player,"对不起!您的魔币不足100!");       
                end
        end

        if( check_msg(msg,"/gz ") ) then
                GuanZhanPlayer = tonumber(string.sub(msg,5))
                NLG.WatchBattle(player,GuanZhanPlayer);
        end       
       
        if(msg == "[2]")then
       
                                NLG.SystemMessage(player,"当前没有开放功能!");
        end
       
        if(msg == "[5]")then
                NLG.SetOfflinePlayer(player, 9999999);
        end

        if(msg == "[lxgj]")then
                NLG.SetOfflinePlayer(player, 9999999);
        end

        if msg=="[6]" then
                open_url(player,"http://www.baidu.com");
        end
        if msg=="[7]" then
                open_url(player,"http://www.baidu.com");
        end
       
end
function GetJK(player)
        local playerCDK = Char.GetData(player,%对象_CDK%);
        local playerWZ = Char.GetData(player,48);
        local query = "SELECT PetMoney,PetMB FROM tbl_user WHERE CdKey='"..playerCDK.."'";
        local resset = SQL.Run(query);
        if(type(resset)=="table")then--如果返回结果是table类型的值
                local GetMB = tonumber(resset["0_1"]);
                local PlayerMoney = Char.GetData(player,%对象_金币%);
                Char.SetData(player,%对象_金币%,PlayerMoney+GetMB);
                NLG.UpChar(player);
                NLG.SystemMessage(player,"您本次领取了"..GetMB.."魔币。");

                local query = "Update tbl_user Set PetMB=0 WHERE CdKey='"..playerCDK.."'";
                local result = SQL.Run(query);

                if(Char.ItemSlot(player)>19) then
                        NLG.SystemMessage(player,"请至少留1个背包位置!");
                        return;
                end
                local GetNum = tonumber(resset["0_0"]);
                if GetNum == 0 then
                        NLG.SystemMessage(player,"您当前没有可领取的金币!");
                        return;
                end
                local _itemindex = Char.HaveItem(player,622848);
                if (_itemindex == -1) then
                        Char.GiveItem(player,622848,GetNum);
                else
                        local duidie = Item.GetData(_itemindex,%道具_堆叠数%);
                        Item.SetData(_itemindex,%道具_堆叠数%,duidie+GetNum);
                        Item.UpItem(player, -1);
                        NLG.SystemMessage(player,"您本次领取了"..GetNum.."金币。");
                end

                local query = "Update tbl_user Set PetMoney=0 WHERE CdKey='"..playerCDK.."'";
                local resset = SQL.Run(query);
        end
end


回复

使用道具 举报

全部评论

暂无评论,期待您打破宁静

TA的帖子
相关帖子
  • admin 2025-5-10

    用本目录下文件"内容"覆盖服务器data目录下同名文件相应"内容" 请勿直接覆盖文件本身 ...

  • admin 2025-5-11

    首先到教堂招魂的那个地方找到NPC牧师乌咝 和她对话 (年轻人,你相信爱情会是永远的 ...

  • admin 2025-5-11

    ############## 城城的武器强化系统 ############## #剑1 block StrCmpChat == 700 W ...

  • admin 2025-5-11

    魔力宝贝手动架设中遇到的问题及解决方法魔力宝贝手动架设教程—魔力私服,魔力宝贝私 ...

  • admin 2025-5-12

    起始地点法兰城的竞技场的贝贝(34.36)头目战╳ 必要条件---必要等级Lv1 职业限定---建 ...

  • admin 2025-5-12

    1.与里谢里雅堡的H1N1防疫宣传员(28,77)说话,取得"防疫小口罩"。 图例物品名称等级种 ...

  • admin 2025-5-12

    魅惑的哈密瓜无取得宠物「哈密瓜公主」╳╳○ 起始地点魔法大学头目战╳ 必要条件--- ...

  • admin 2025-5-12

    起始地点法兰城的里谢里雅堡头目战○ 必要条件---必要等级--- 职业限定---建议等级--- ...

  • admin 2025-5-12

    起始地点法兰城的里谢里雅堡头目战○ 必要条件---必要等级--- 职业限定---建议等级--- ...

  • admin 2025-5-12

    起始地点法兰城的冒险者旅馆头目战○ 必要条件---必要等级--- 职业限定---建议等级LV8 ...

发布 联系QQ