GA好望角|魔力宝贝私服|魔力私服|魔力私服|GA反外挂

 找回密码
 立即注册
凤凰(QQ:715837)
售前咨询
GA白皮书(客户端)
GA白皮书(服务端)
cgdev.me开发者论坛
放映地(炫斗魔力公益PK服)
新服发布站
欢迎来到GA好望角~
价格公示表
回首页
关于妖城与某些恶意人士对我们恶意抹黑的回应
查看: 7864|回复: 1

[免费]秘境挑战

[复制链接]

135

主题

142

帖子

142

积分

管理员

Rank: 9Rank: 9Rank: 9

金钱
2297
号角币
474
发表于 2019-9-15 17:17:35 | 显示全部楼层 |阅读模式
这是一个秘境挑战的副本功能 完全开源(客户端部分 服务端部分)

(web插件)在线安装秘境挑战脚本
简介 : 可以控制各副本依次挑战顺序 解锁 挑战次数 掉落奖品全名UI化
售价 : ¥0.00
作者 : QQ859729391
引擎 : GA



安装方法 :
  • 登录器与服务端必须更新至2021.3.21版本或以上
  • 启动GA二建单机版 开发者版 或正式版 并且成功登入游戏
  • 点击下面的在线安装
  • 依照游戏中的提示 按流程要求继续即可完成安装

如何使用:妖城在线论坛; A; @! {+ ], T9 f1 p& t8 c
服务端部分
config.lua中引用 mijing_server.lua—魔力私服,魔力宝贝私服技术,DELPHI编程,魔力寶貝, 魔力宝贝, 크로스게이트,クロスゲート5 g+ Q6 W5 K9 `1 w4 A
luac.lua中加入 luac.txt内代码
bbs.mocwww.com7 F5 e# B( u$ u- @
客户端部分
GA二建端:直接把mijing_client.lua 与 image文件夹丢入客户端的lua中
GA商业版:用打包器直接打包以上脚本3 j9 Y0 b( b5 H( v0 j
GE(GXSIM):用打包器GA2GE.exe直接打包以上脚本bbs.mocwww.com0 q4 r/ P7 R+ X
—魔力私服,魔力宝贝私服技术,DELPHI编程,魔力寶貝, 魔力宝贝, 크로스게이트,クロスゲート: O/ ?# X$ a' @: t2 S
妖城在线论坛+ O! B# G' A# c  |* Q5 i: x
呼出界面:
block 3 P$ w" Z8 l  T7 _
         showmj魔力私服,最新魔力私服,魔力宝贝私服,魔力宝贝私服技术,魔力宝贝私服,私服架设技术,妖城,FLASH,电影,黑客,网络,网吧,破解,入侵,注册表2 ^$ @) s) c0 ]
妖城在线论坛% F( u9 T4 R+ ~1 |) k/ U+ f
魔力私服,最新魔力宝贝私服技术交流, y  ]' E8 {) a4 E  k
设定层锁:—魔力私服,魔力宝贝私服技术,DELPHI编程,魔力寶貝, 魔力宝贝, 크로스게이트,クロスゲート! s( ~- B# t4 {9 @7 {9 B8 y/ D& h( I
block—魔力私服,魔力宝贝私服技术,DELPHI编程,魔力寶貝, 魔力宝贝, 크로스게이트,クロスゲート  ]. C4 {) `8 G1 ?* U- n" h
       luac setmj 1,3  设置秘境1开启第三层( K+ t) }0 B+ v) z: ]
—魔力私服,魔力宝贝私服技术,DELPHI编程,魔力寶貝, 魔力宝贝, 크로스게이트,クロスゲート" b; j5 I% O- O2 v' R1 G% @
以上均可以使用道具或NPC脚本设定0 x1 g) A" g, o; B  F
bbs.mocwww.com6 D, g3 ^, |( C+ U
bbs.mocwww.com1 O! |/ c+ t; U+ }% c% l" {
其他配置可以打开mijing_server.lua 查看

以下是代码部分:


      
客户端:
--[[

秘境挑战 客户端lua部分
支持平台:GA、GE(GXSIM)

一个界面化的副本挑战

]]

tbl_mj = {}; --存储秘境配置,数据从服务器传入
mj_thisselect = 1;
mj_thisselect_cs = 1;
tbl_cssetting = {"第一","第二","第三","第四","第五","最终"};
mj_sycs = 0;

function Myrw_init(view)
        if view.IsInit then        
                -- 如果窗体第一次载入,开始摆放控件
                view.settop();        
                -- 摆放关闭按钮
                view.add(new.closebutton("myclose_test"));
                for i=1,6 do
                        -- 摆放锁按钮
                        view.add(new.bmpbutton("mj_suo_".. i,"mijing_suo.bmp"));
                end
                
                for i=1,6 do
                        -- 摆放道具
                        view.add(new.image("mj_itembox_".. tostring(i)));                        
                end                
        
                -- 摆放开始挑战按钮
                view.add(new.bmpbutton("mj_huain","mijing_btn2.bmp"));
                -- 摆放当前挑战背景
                view.add(new.bmpbutton("ditutu","mijing_bg_huayao.bmp"));
                
                
                for i=1,#tbl_mj do
                        view.add(new.bmpbutton("mj_select_" .. tostring(i),"mijing_btn1.bmp"));
                end
                
                view.add(new.bmpbutton("mj_bg","mijing_bg.bmp"));        
                return;
        end
        
        -- 窗体初始显示位置
        view.xpos =  60;
        view.ypos =  60;        
        if Cli.GetHD() then --960*720时
                view.xpos =  180;
                view.ypos =  180;
        end
        
        local close = view.find("myclose_test");
        close.enable = 1;
        close.xpos = 548;
        close.ypos = 8;
        close.event = function(object)
                -- 当关闭按钮被按下时
                Audio.Bell(54,320)
                return 1;
        end
        
        -- 初始奖励道具显示偏移
        local tbl2 = {{425,205},{480,205},{535,205},{425,255},{480,255},{535,255}};
        for i=1,6 do
                local object = view.find("mj_itembox_".. tostring(i));
                object.enable = 1;
                object.sizex = 48;
                object.sizey = 48;
                object.xpos = tbl2[i][1] - 50 ;
                object.ypos = tbl2[i][2] - 50;
                object._select3 = tostring(i);
                object.event = function(object,event)

                        if event == Cevent.mouseover then
                                -- 把道具数据文字画到游戏中
                                if tbl_mj[mj_thisselect]["itemdatainfo_"..mj_thisselect_cs] ~= nil then
                                        local info = tbl_mj[mj_thisselect]["itemdatainfo_"..mj_thisselect_cs][tonumber(object._select3)];
                                        if info ~= nil then
                                                this.spText(view.xpos+373,view.ypos+139,9,info)
                                        end
                                end
                        
                        end
                end
        end
        
        for i=1,6 do
                local object = view.find("mj_suo_" .. tostring(i));
                object.enable = 1;                
                if i == 1 then
                        object.xpos = 135;
                        object.ypos = 220;
                end
                if i == 2 then
                        object.xpos = 172;
                        object.ypos = 193;
                end
                if i == 3 then
                        object.xpos = 215;
                        object.ypos = 220;
                end
                if i == 4 then
                        object.xpos = 255;
                        object.ypos = 193;
                end
                if i == 5 then
                        object.xpos = 290;
                        object.ypos = 235;
                end
                if i == 6 then
                        object.xpos = 215;
                        object.ypos = 275;
                end
                object._select3 = tostring(i);
                object.event = function(object,event)
                        local num = tonumber(object._select3)
                        if num <= tonumber(tbl_mj[mj_thisselect].dqcs) then
                                object.id = "mijing_jiesuo.bmp";
                        else
                                object.id = "mijing_suo.bmp";
                        end
                        
                        if event == Cevent.click then                                        
                                mj_thisselect_cs = num;
                        end
                end
        end
        
        for i=1,#tbl_mj do
                local object = view.find("mj_select_" .. tostring(i));
                object.enable = 1;
                object.xpos = 20;
                object.ypos = 110 + ((i - 1) * 25);
                object._select3 = tostring(i);
                object.event = function(object,event)
                        local num = tonumber(object._select3)
                        local view = object.mainview;
                        local selected = "A";
                        if event == Cevent.mouseover then
                                selected = "5";
                        end
                        if mj_thisselect == num then
                                selected = "4";
                        end                
                        if num ~= nil and tbl_mj[num] ~= nil then
                                this.spText(view.xpos+object.xpos+8,view.ypos+object.ypos+4,9,"$"..selected.. tbl_mj[num].name .."$0")
                        end
                        
                        if event == Cevent.click then        
                                mj_thisselect = tonumber(object._select3);
                                mj_thisselect_cs = 1;
                        end
                end
                
        end
        
        local object = view.find("mj_bg");
        object.enable = 1;
        object.xpos = 0;
        object.ypos = 0;
        object.event = function(object,event)
                local view = object.mainview;
                this.spText(view.xpos + 407,view.ypos + 75,9,"$4"..tbl_cssetting[mj_thisselect_cs].."层:"..tbl_mj[mj_thisselect].name.."$0")
                local itemdata = tbl_mj[mj_thisselect]["itemdata_"..mj_thisselect_cs];
                local tbl = {{425,205},{480,205},{535,205},{425,255},{480,255},{535,255}};
                local is = 1;
                if itemdata ~= nil then
                        for k,v in ipairs(itemdata) do
                                if v ~= nil then
                                        this.spImage(view.xpos + tbl[is][1] -24 ,view.ypos + tbl[is][2] -22,tonumber(v));                                                
                                        is = is + 1;
                                end
                        
                        end
                end        
                local close = view.find("myclose_test_close");        
                this.spImage(view.xpos + close.xpos + 5,view.ypos + close.ypos + 6 ,close.imageID);        
        end
        local object = view.find("ditutu");
        object.enable = 1;
        object.xpos = 130;
        object.ypos = 60;
        object.event = function(object,event)
                object.id = tbl_mj[mj_thisselect].mapid;
        end
        local object = view.find("mj_huain");
        object.enable = 1;
        object.xpos = 470;
        object.ypos = 270;
        object.event = function(object,event)
                local selected = "4";
                if event == Cevent.mouseover then
                        selected = "5";
                end
                if event == Cevent.click then        
                        -- 向服务器请求挑战
                        Cli.Send("MJWARP:"..mj_thisselect..":"..mj_thisselect_cs);        
                end        
                        
                this.spText(view.xpos+object.xpos-95,view.ypos+object.ypos+4,9,"$B本日还剩 $6"..mj_sycs.." $B次$0")
                this.spText(view.xpos+object.xpos+9,view.ypos+object.ypos+4,9,"$"..selected.."开始挑战$0")
        end

        view.sizex = 588;
        view.sizey = 339;        
        view.pxpos = 588;
end


Cli.Send().wait["MIKING_RET1"] = function (tbl)
    mj_sycs = tonumber(tbl["res"])                       
end

Cli.Send().wait["MIKING_RET2"] = function (tbl)
        -- 等待服务器发送数据
    tbl_mj = tbl;
        -- 打开窗体
        new.ShowView(101,Myrw_init)                        
end


      
服务端:

function Split3(szFullString, szSeparator)  
local nFindStartIndex = 1  
local nSplitIndex = 1  
local nSplitArray = {}  
while true do  
   local nFindLastIndex = string.find(szFullString, szSeparator, nFindStartIndex)  
   if not nFindLastIndex then  
    nSplitArray[nSplitIndex] = string.sub(szFullString, nFindStartIndex, string.len(szFullString))  
    break  
   end  
   nSplitArray[nSplitIndex] = string.sub(szFullString, nFindStartIndex, nFindLastIndex - 1)  
   nFindStartIndex = nFindLastIndex + string.len(szSeparator)  
   nSplitIndex = nSplitIndex + 1  
end  
return nSplitArray  
end


tiaozhuanjuanID = 751751;--每次进入秘境所需道具

tbl_mj = 
{
        [1] = {
                ["name"] = "森林秘境",--名字
                ["mapid"] = "huayao.bmp",--图片
                ["itemdata_1"] = {1002970,27312,27442},--奖励图档
                ["itemdatainfo_1"] = {"$6人和宠经验","$6怪物料理*2","$6宠物洗档卷*1"},--奖励名字
                ["itemdata_2"] = {1002970,27547,470440},
                ["itemdatainfo_2"] = {"$6人和宠经验","$6[宠装]花妖蜜晶石","$6魔能宝石*20"},
                ["itemdata_3"] = {1002970,480384},
                ["itemdatainfo_3"] = {"$6人和宠经验","$6樱桃布丁宠物蛋"},
                ["itemdata_4"] = {1002970,470339},
                ["itemdatainfo_4"] = {"$6人和宠经验","$6箭鞘"},
                ["itemdata_5"] = {1002970,1001929,27442},
                ["itemdatainfo_5"] = {"$6人和宠经验","$6初级彩色羽毛*20","$6宠物洗档卷*5"},
                ["itemdata_6"] = {1002970,480668,480630},
                ["itemdatainfo_6"] = {"$6人和宠经验","$6宠物重来种子礼包","$6[魂卡]穴熊"},
                ["dqcs"] = 1,
                ["warp_1"] = {1131,111,31},--传送坐标
                ["warp_2"] = {1132,74,246},
                ["warp_3"] = {1133,8,16},
                ["warp_4"] = {1138,8,16},
                ["warp_5"] = {1136,8,28},
                ["warp_6"] = {1137,8,28},
        },
        
        [2] = {
                ["name"] = "砂石秘境",
                ["mapid"] = "shashi.bmp",
                ["itemdata_1"] = {1002970,99044,1001929},
                ["itemdatainfo_1"] = {"$6人和宠经验","$6[宠技]炎袭玉","$6初级彩色羽毛*10"},
                ["itemdata_2"] = {1002970,480664,1001928},
                ["itemdatainfo_2"] = {"$6人和宠经验","$6宠物变身卡礼包","$6中级彩色羽毛*5"},
                ["itemdata_3"] = {1002970,99699,26537},
                ["itemdatainfo_3"] = {"$6人和宠经验","$6冰蓝冰晶的碎片","$6Q零件碎片"},
                ["itemdata_4"] = {1002970,98502},
                ["itemdatainfo_4"] = {"$6人和宠经验","$6宝石鼠都腿骨"},
                ["itemdata_5"] = {1002970,1003173},
                ["itemdatainfo_5"] = {"$6人和宠经验","$6魔币箱"},
                ["itemdata_6"] = {1002970,99044,480937,480629,480609},
                ["itemdatainfo_6"] = {"$6人和宠经验","$6[宠技]森之气功弹","$6骑士六转卷","$6[魂卡]火焰鼠","$6[魂卡]大地鼠"},
                ["dqcs"] = 0,
                ["warp_1"] = {1141,30,22},
                ["warp_2"] = {1144,15,38},
                ["warp_3"] = {1142,10,18},
                ["warp_4"] = {1125,54,49},
                ["warp_5"] = {1123,10,9},
                ["warp_6"] = {1149,10,20},
        },
        [3] = {
                ["name"] = "火焰秘境",
                ["mapid"] = "huoyan.bmp",
                ["itemdata_1"] = {470025},
                ["itemdatainfo_1"] = {"$6当前没有开放"},
                ["itemdata_2"] = {470025},
                ["itemdatainfo_2"] = {"$6当前没有开放"},
                ["itemdata_3"] = {470025},
                ["itemdatainfo_3"] = {"$6当前没有开放"},
                ["itemdata_4"] = {470025},
                ["itemdatainfo_4"] = {"$6当前没有开放"},
                ["itemdata_5"] = {470025},
                ["itemdatainfo_5"] = {"$6当前没有开放"},
                ["itemdata_6"] = {470025},
                ["itemdatainfo_6"] = {"$6当前没有开放"},
                ["dqcs"] = 0,
                ["warp_1"] = nil,
                ["warp_2"] = nil,
                ["warp_3"] = nil,
                ["warp_4"] = nil,
                ["warp_5"] = nil,
                ["warp_6"] = nil,
        },
        [4] = {
                ["name"] = "寒冰秘境",
                ["mapid"] = "hanbing.bmp",
                ["itemdata_1"] = {470025},
                ["itemdatainfo_1"] = {"$6当前没有开放"},
                ["itemdata_2"] = {470025},
                ["itemdatainfo_2"] = {"$6当前没有开放"},
                ["itemdata_3"] = {470025},
                ["itemdatainfo_3"] = {"$6当前没有开放"},
                ["itemdata_4"] = {470025},
                ["itemdatainfo_4"] = {"$6当前没有开放"},
                ["itemdata_5"] = {470025},
                ["itemdatainfo_5"] = {"$6当前没有开放"},
                ["itemdata_6"] = {470025},
                ["itemdatainfo_6"] = {"$6当前没有开放"},
                ["dqcs"] = 0,
                ["warp_1"] = nil,
                ["warp_2"] = nil,
                ["warp_3"] = nil,
                ["warp_4"] = nil,
                ["warp_5"] = nil,
                ["warp_6"] = nil,
        },
        [5] = {
                ["name"] = "黑暗秘境",
                ["mapid"] = "heian.bmp",
                ["itemdata_1"] = {470025},
                ["itemdatainfo_1"] = {"$6当前没有开放"},
                ["itemdata_2"] = {470025},
                ["itemdatainfo_2"] = {"$6当前没有开放"},
                ["itemdata_3"] = {470025},
                ["itemdatainfo_3"] = {"$6当前没有开放"},
                ["itemdata_4"] = {470025},
                ["itemdatainfo_4"] = {"$6当前没有开放"},
                ["itemdata_5"] = {470025},
                ["itemdatainfo_5"] = {"$6当前没有开放"},
                ["itemdata_6"] = {470025},
                ["itemdatainfo_6"] = {"$6当前没有开放"},
                ["dqcs"] = 0,
                ["warp_1"] = nil,
                ["warp_2"] = nil,
                ["warp_3"] = nil,
                ["warp_4"] = nil,
                ["warp_5"] = nil,
                ["warp_6"] = nil,
        },
        [6] = {
                ["name"] = "星灵秘境",
                ["mapid"] = "xingling.bmp",
                ["itemdata_1"] = {470025},
                ["itemdatainfo_1"] = {"$6当前没有开放"},
                ["itemdata_2"] = {470025},
                ["itemdatainfo_2"] = {"$6当前没有开放"},
                ["itemdata_3"] = {470025},
                ["itemdatainfo_3"] = {"$6当前没有开放"},
                ["itemdata_4"] = {470025},
                ["itemdatainfo_4"] = {"$6当前没有开放"},
                ["itemdata_5"] = {470025},
                ["itemdatainfo_5"] = {"$6当前没有开放"},
                ["itemdata_6"] = {470025},
                ["itemdatainfo_6"] = {"$6当前没有开放"},
                ["dqcs"] = 0,
                ["warp_1"] = nil,
                ["warp_2"] = nil,
                ["warp_3"] = nil,
                ["warp_4"] = nil,
                ["warp_5"] = nil,
                ["warp_6"] = nil,
        }
}


function tbl_copy(orig)
    local orig_type = type(orig)
    local copy
    if orig_type == "table" then
        copy = {}
        for orig_key, orig_value in next, orig, nil do
            copy[tbl_copy(orig_key)] = tbl_copy(orig_value)
        end
    else -- number, string, boolean, etc
        copy = orig
    end
    return copy
end


Delegate.RegDelTalkEvent("mijingTalkEvent");



function mijingTalkEvent(player,msg,color,range,size)
        

        if(msg == "123") then 
                local retbl1 = {
                        ["res"] = Char.ItemNum(player,tiaozhuanjuanID);
                }
                Protocol.PowerSend(player,"MIKING_RET1",retbl1)
                
                local tbl_mj2 = tbl_copy(tbl_mj)
        
                for i=1,#tbl_mj do
                        
                        local dqcs = Field.Get(player,"MKTZ_"..i);
                        
                        if tonumber(dqcs) == nil then
                                if i == 1 then
                                        Field.Set(player,"MKTZ_"..i,"1");
                                else
                                        Field.Set(player,"MKTZ_"..i,"0");
                                end
                                --tbl_mj2[i]["dqcs"] = tonumber(dqcs);
                                --NLG.SystemMessage(player, dqcs)
                        else
                                --NLG.SystemMessage(player, dqcs)
                                tbl_mj2[i]["dqcs"] = tonumber(dqcs);
                        end
                end
                
                Protocol.PowerSend(player,"MIKING_RET2",tbl_mj2)
        end
        
end

function Event.Recv.mijing(player,packet)
      if string.find(packet,"MJWARP:") then
                        
                        --NLG.SystemMessage(player, packet)
            local sv = Split3(packet,":")
                        if tbl_mj[tonumber(sv[2])]["warp_"..sv[3]] ~= nil then
                                
                                
                                local dqcs = Field.Get(player,"MKTZ_"..sv[2]);
                                if tonumber(dqcs) < tonumber(sv[3]) then
                                        NLG.SystemMessage(player, "您还未能开启本副本的挑战。")
                                        return
                                end
                                        
                                -- 道具是否足够
                                if Char.ItemNum(player,tiaozhuanjuanID) > 0 then
                                        Char.DelItem(player,tiaozhuanjuanID,1)
                                else
                                        NLG.SystemMessage(player, "您的挑战道具不足。")
                                        return
                                end
                                
                                Char.DischargeParty(player)
                                local warpinfo = tbl_mj[tonumber(sv[2])]["warp_"..sv[3]];
                                Char.Warp(player,0,warpinfo[1],warpinfo[2],warpinfo[3]);
                                NLG.SystemMessage(player, "已成功进入副本。")
                        else
                                NLG.SystemMessage(player, "此副本尚未开放。")
                        end
      end
end

相关下载地址:点击下载


回复

使用道具 举报

1

主题

191

帖子

191

积分

注册会员

Rank: 2

金钱
104
号角币
0
发表于 2022-3-4 10:49:12 | 显示全部楼层

希望论坛越办越好,会员越来越多,越来越活跃
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|GA好望角

GMT+8, 2024-12-22 00:14 , Processed in 0.083185 second(s), 25 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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