先声明下,本人不会写代码,这个补丁的原作者是冰糖戀。原补丁有一个不足,就是大部分的挑战都是主角单挑的,不能上队友。鉴于本人玩苍炎,最大的爱好就是培养队友去挑战NPC,于是稍稍做了点修改,更改了几个战斗参数的调用。因为Starshine暂时还没有添加挑战功能,喜欢挑战的玩家先将就着用这个补丁爽一下。过一段时间,Star就会把挑战功能加上的。
这是效果图:
这是代码:
- local function SZXG(r)
- SetS(5,1,6,5,r)
- JY.SZJPJC[1] = "" .. GetS(5,1,6,5)
- end
- local function Menu_QZ()
- local menu={}
- for i=1,7 do
- menu[i]={JY.Thing[i+85]["名称"],nil,200,1,i+85}
- end
- for i=9,27 do
- menu[i-1]={JY.Thing[i+85]["名称"],nil,200,1,i+85}
- end
- Cls();
- local r=ShowMenu(menu,26,9,CC.MainSubMenuX,CC.MainSubMenuY+CC.SingleLineHeight,0,0,1,1,CC.DefaultFont,C_ORANGE, C_WHITE);
- local szjy=GetS(5,1,6,5);
- if r>0 then
- if szjy < menu[r][3] then
- TalkEx("非常抱歉,您实战经验不足.",5,0);
- else
- TalkEx("这是您的奖励,请您收好。",5,0);
- instruct_2(menu[r][5],1);
- szjy=szjy-menu[r][3]
- SZXG(szjy)
- end
- end
- end
- local function Menu_JF()
- local menu={}
- for i=1,22 do
- menu[i]={JY.Thing[i+112]["名称"],nil,200,1,i+112}
- end
- menu[23]={JY.Thing[78]["名称"],nil,200,1,78}
- Cls();
- local r=ShowMenu(menu,23,9,CC.MainSubMenuX,CC.MainSubMenuY+CC.SingleLineHeight,0,0,1,1,CC.DefaultFont,C_ORANGE, C_WHITE);
- local szjy=GetS(5,1,6,5);
- if r>0 then
- if szjy < menu[r][3] then
- TalkEx("非常抱歉,您实战经验不足.",5,0);
- else
- TalkEx("这是您的奖励,请您收好。",5,0);
- instruct_2(menu[r][5],1);
- szjy=szjy-menu[r][3]
- SZXG(szjy)
- end
- end
- end
- local function Menu_DF()
- local menu={}
- for i=1,9 do
- menu[i]={JY.Thing[i+134]["名称"],nil,200,1,i+134}
- end
- for j=1,9 do
- menu[j+9]={JY.Thing[j+157]["名称"],nil,200,1,j+157}
- end
- Cls();
- local r=ShowMenu(menu,18,9,CC.MainSubMenuX,CC.MainSubMenuY+CC.SingleLineHeight,0,0,1,1,CC.DefaultFont,C_ORANGE, C_WHITE);
- local szjy=GetS(5,1,6,5);
- if r>0 then
- if szjy < menu[r][3] then
- TalkEx("非常抱歉,您实战经验不足.",5,0);
- else
- TalkEx("这是您的奖励,请您收好。",5,0);
- instruct_2(menu[r][5],1);
- szjy=szjy-menu[r][3]
- SZXG(szjy)
- end
- end
- end
- local function Menu_TS()
- local menu={}
- for i=1,7 do
- menu[i]={JY.Thing[i+166]["名称"],nil,200,1,i+166}
- end
- for i=9,16 do
- menu[i-1]={JY.Thing[i+166]["名称"],nil,200,1,i+166}
- end
- for i=17,20 do
- menu[i-2]={JY.Thing[i+166]["名称"],nil,200,1,i+166}
- end
- Cls();
- local r=ShowMenu(menu,18,9,CC.MainSubMenuX,CC.MainSubMenuY+CC.SingleLineHeight,0,0,1,1,CC.DefaultFont,C_ORANGE, C_WHITE);
- local szjy=GetS(5,1,6,5);
- if r>0 then
- if szjy < menu[r][3] then
- TalkEx("非常抱歉,您实战经验不足.",5,0);
- else
- TalkEx("这是您的奖励,请您收好。",5,0);
- instruct_2(menu[r][5],1);
- szjy=szjy-menu[r][3]
- SZXG(szjy)
- end
- end
- end
- local function Menu_NG()
- local menu={}
- for i=1,14 do
- menu[i]={JY.Thing[i+63]["名称"],nil,200,1,i+63}
- end
- for i=16,22 do
- menu[i-1]={JY.Thing[i+63]["名称"],nil,200,1,i+63}
- end
- menu[22]={JY.Thing[93]["名称"],nil,200,1,93}
- for i=23,29 do
- menu[i]={JY.Thing[i+164]["名称"],nil,200,1,i+164}
- end
- Cls();
- local r=ShowMenu(menu,29,9,CC.MainSubMenuX,CC.MainSubMenuY+CC.SingleLineHeight,0,0,1,1,CC.DefaultFont,C_ORANGE, C_WHITE);
- local szjy=GetS(5,1,6,5);
- if r>0 then
- if szjy < menu[r][3] then
- TalkEx("非常抱歉,您实战经验不足.",5,0);
- else
- TalkEx("这是您的奖励,请您收好。",5,0);
- instruct_2(menu[r][5],1);
- szjy=szjy-menu[r][3]
- SZXG(szjy)
- end
- end
- end
- local function Menu_JFCX()
- DrawStrBoxWaitKey(string.format("您的实战经验为%d",JY.SZJPJC[1]-2),C_WHITE,CC.DefaultFont);
- end
- local function Menu_JFZY()
- TalkEx("消耗100实战经验,请选择你想要的战友。",5,0);
- local menu={
- {"胡斐",nil,JY.Person[1]["声望"]+1,100,1,1},
- {"程灵素",nil,JY.Person[2]["声望"]+1,100,1,2},
- {"阎基",nil,JY.Person[4]["声望"]+1,100,1,4},
- {"张无忌",nil,JY.Person[9]["声望"]+1,100,1,9},
- {"胡青牛",nil,JY.Person[16]["声望"]+1,100,1,16},
- {"王难姑",nil,JY.Person[17]["声望"]+1,100,1,17},
- {"蓝凤凰",nil,JY.Person[25]["声望"]+1,100,1,25},
- {"平一指",nil,JY.Person[28]["声望"]+1,100,1,28},
- {"田伯光",nil,JY.Person[29]["声望"]+1,100,1,29},
- {"郭靖(南山)",nil,JY.Person[30]["声望"]+1,100,1,30},
- {"令狐冲",nil,JY.Person[35]["声望"]+1,100,1,35},
- {"林平之",nil,JY.Person[36]["声望"]+1,100,1,36},
- {"狄云",nil,JY.Person[37]["声望"]+1,100,1,37},
- {"石破天",nil,JY.Person[38]["声望"]+1,100,1,38},
- {"岳老三",nil,JY.Person[44]["声望"]+1,100,1,44},
- {"薛慕华",nil,JY.Person[45]["声望"]+1,100,1,45},
- {"阿紫",nil,JY.Person[47]["声望"]+1,100,1,47},
- {"游坦之",nil,JY.Person[48]["声望"]+1,100,1,48},
- {"虚竹",nil,JY.Person[49]["声望"]+1,100,1,49},
- {"慕容复",nil,JY.Person[51]["声望"]+1,100,1,51},
- {"花铁干",nil,JY.Person[52]["声望"]+1,100,1,52},
- {"段誉",nil,JY.Person[53]["声望"]+1,100,1,53},
- {"袁承志",nil,JY.Person[54]["声望"]+1,100,1,54},
- {"郭靖(降龙)",nil,JY.Person[55]["声望"]+1,100,1,55},
- {"黄蓉",nil,JY.Person[56]["声望"]+1,100,1,56},
- {"杨过",nil,JY.Person[58]["声望"]+1,100,1,58},
- {"小龙女",nil,JY.Person[59]["声望"]+1,100,1,59},
- {"程瑛",nil,JY.Person[63]["声望"]+1,100,1,63},
- {"小昭",nil,JY.Person[66]["声望"]+1,100,1,66},
- {"田归农",nil,JY.Person[72]["声望"]+1,100,1,72},
- {"任盈盈",nil,JY.Person[73]["声望"]+1,100,1,73},
- {"霍青桐",nil,JY.Person[74]["声望"]+1,100,1,74},
- {"陈家洛",nil,JY.Person[75]["声望"]+1,100,1,75},
- {"王语嫣",nil,JY.Person[76]["声望"]+1,100,1,76},
- {"萧中慧",nil,JY.Person[77]["声望"]+1,100,1,77},
- {"梅超风",nil,JY.Person[78]["声望"]+1,100,1,78},
- {"岳灵珊",nil,JY.Person[79]["声望"]+1,100,1,79},
- {"张召重",nil,JY.Person[80]["声望"]+1,100,1,80},
- {"朱九真",nil,JY.Person[81]["声望"]+1,100,1,81},
- {"宋青书",nil,JY.Person[82]["声望"]+1,100,1,82},
- {"何铁手",nil,JY.Person[83]["声望"]+1,100,1,83},
- {"霍都",nil,JY.Person[84]["声望"]+1,100,1,84},
- {"贝海石",nil,JY.Person[85]["声望"]+1,100,1,85},
- {"阿珂",nil,JY.Person[86]["声望"]+1,100,1,86},
- {"苏荃",nil,JY.Person[87]["声望"]+1,100,1,87},
- {"祖千秋",nil,JY.Person[88]["声望"]+1,100,1,88},
- {"人厨子",nil,JY.Person[89]["声望"]+1,100,1,89},
- {"钟灵",nil,JY.Person[90]["声望"]+1,100,1,90},
- {"温青青",nil,JY.Person[91]["声望"]+1,100,1,91},
- };
- local nexty=CC.MainSubMenuY+CC.SingleLineHeight;
- local r=ShowMenu(menu,49,10,CC.MainSubMenuY,nexty,0,0,1,1,CC.DefaultFont,C_ORANGE,C_WHITE);
- Cls();
- local szjy=GetS(5,1,6,5);
- if r>0 then
- if szjy < menu[r][4] then
- TalkEx("非常抱歉,您实战经验不足.",5,0);
- else
- if JY.Base["队伍2"]==-1 then DrawStrBoxWaitKey("队友"..JY.Person[menu[r][6]]["姓名"].."加入",C_WHITE,CC.DefaultFont);
- JY.Base["队伍2"]=menu[r][6];
- JY.Person[menu[r][6]]["声望"]=-1;
- szjy=szjy-menu[r][4]
- SZXG(szjy)
- else if JY.Base["队伍3"]==-1 then DrawStrBoxWaitKey("队友"..JY.Person[menu[r][6]]["姓名"].."加入",C_WHITE,CC.DefaultFont);
- JY.Base["队伍3"]=menu[r][6];
- JY.Person[menu[r][6]]["声望"]=-1;
- szjy=szjy-menu[r][4]
- SZXG(szjy)
- else if JY.Base["队伍4"]==-1 then DrawStrBoxWaitKey("队友"..JY.Person[menu[r][6]]["姓名"].."加入",C_WHITE,CC.DefaultFont);
- JY.Base["队伍4"]=menu[r][6];
- JY.Person[menu[r][6]]["声望"]=-1;
- szjy=szjy-menu[r][4]
- SZXG(szjy)
- else if JY.Base["队伍5"]==-1 then DrawStrBoxWaitKey("队友"..JY.Person[menu[r][6]]["姓名"].."加入",C_WHITE,CC.DefaultFont);
- JY.Base["队伍5"]=menu[r][6];
- JY.Person[menu[r][6]]["声望"]=-1;
- szjy=szjy-menu[r][4]
- SZXG(szjy)
- else if JY.Base["队伍6"]==-1 then DrawStrBoxWaitKey("队友"..JY.Person[menu[r][6]]["姓名"].."加入",C_WHITE,CC.DefaultFont);
- JY.Base["队伍6"]=menu[r][6];
- JY.Person[menu[r][6]]["声望"]=-1;
- szjy=szjy-menu[r][4]
- SZXG(szjy)
- else TalkEx("您的队伍已满",5,0);
- end
- end
- end
- end
- end
- end
- end
- end
- local function Menu_MJDH()
- TalkEx("小兄弟,这里可以用您的实战兑换秘籍,每本秘籍消耗200实战",5,0);
- local menu={
- {"拳掌秘籍",Menu_QZ,1},
- {"剑法秘籍",Menu_JF,1},
- {"刀法秘籍",Menu_DF,1},
- {"特殊秘籍",Menu_TS,1},
- {"内功秘籍",Menu_NG,1},};
- local nexty=CC.MainSubMenuY+CC.SingleLineHeight;
- local r=ShowMenu(menu,5,0,CC.MainSubMenuY,nexty,0,0,1,1,CC.DefaultFont,C_ORANGE,C_WHITE);
- Cls();
- end
- local function Menu_JFSL()
- TalkEx("请选择您要进行的试练",5,0);
- --最后三个数据为战斗编号、钱数和积分
- local menu={
- {"初级挑战",nil,1,102+math.random(6),math.random(40),math.random(40)},
- {"高级挑战",nil,1,108+math.random(13) or 149,math.random(100),math.random(100)},
- {"挑战李秋水",nil,1,202,math.random(100),math.random(100)},
- {"挑战成昆",nil,1,237,math.random(100),math.random(100)},
- {"挑战萧半和",nil,1,137,math.random(100),math.random(100)},
- {"挑战鸠摩智",nil,1,100,math.random(100),math.random(100)},
- {"挑战欧阳锋",nil,1,171,math.random(100),math.random(100)},
- {"挑战东方不败",nil,1,236,math.random(100),math.random(100)},
- {"挑战四大恶人",nil,1,191,math.random(100),math.random(100)},
- {"挑战天罡北斗阵",nil,1,73,math.random(100),math.random(100)},
- {"挑战圣火三绝阵",nil,1,14,math.random(100),math.random(100)},
- {"挑战光明圣火阵",nil,1,15,math.random(100),math.random(100)},
- {"挑战丐帮四帮主",nil,1,83,math.random(100),math.random(100)},
- {"挑战十大恶人",nil,1,133,math.random(100),math.random(100)},
- {"新华山论剑",nil,1,238,math.random(150),math.random(150)},
- };
- local r=ShowMenu(menu,15,0,CC.MainSubMenuX,CC.MainSubMenuY+CC.SingleLineHeight,0,0,1,1,CC.DefaultFont,C_ORANGE, C_WHITE);
- local szjy=GetS(5,1,6,5);
- if r>0 then
- TalkEx("祝您好运!",5,0);
- if WarMain(menu[r][4],1)==true then
- instruct_13();
- instruct_32(CC.MoneyID,menu[r][5]); --银子减少
- szjy=szjy+menu[r][6];
- SZXG(szjy)
- DrawStrBoxWaitKey(string.format("战斗胜利,恭喜您获得%d兩银子和%d点实战经验!",menu[r][5],menu[r][6]),C_WHITE,CC.DefaultFont);
- else
- instruct_13();
- DrawStrBoxWaitKey("战斗失败,您没有获得银子和实战经验!",C_WHITE,CC.DefaultFont);
- end
- end
- Cls();
- end
- instruct_3(70,64,1,0,1088,0,0,5380,5380,5380,-2,-2,-2);
- OEVENTLUA[1088]=function()
- TalkEx("小兄弟,欢迎你来到试练场!请选择:",5,0);
- Cls();
- local menu={ {"实战查询",Menu_JFCX,1},
- {"秘籍兑换",Menu_MJDH,1},
- {"侠义试练",Menu_JFSL,1},
- {"永恒战友",Menu_JFZY,1},
- }
- local nexty=CC.MainSubMenuY+CC.SingleLineHeight;
- local r=ShowMenu(menu,4,0,CC.MainSubMenuY,nexty,0,0,1,1,CC.DefaultFont,C_ORANGE,C_WHITE);
- Cls();
- end
复制代码
|