sm

立即登录 | 账号注册

积分: 0 |用户组: 游客

搜索
服务器租用 传奇3一条龙 支付平台源码 无法下载点击此处反馈
查看: 463|回复: 1

[战神引擎] 战神引擎装备加buff脚本完整版

[复制链接]

826

主题

36

回帖

23万

积分

霸王教主

积分
235297
发表于 2023-7-5 00:12:42 | 显示全部楼层 |阅读模式

  1. program Mir2;
  2. var
  3.    TampForVar:integer;

  4. Procedure _exit;
  5. begin
  6.    This_Npc.CloseDialog(This_Player);
  7. end;

  8. procedure P100;
  9. begin
  10. end;

  11. function addSpace( s : string; needLen : Integer ) : string;
  12. var
  13.   i, j : Integer;
  14. begin
  15.   i := Length(s);
  16.   if i < needLen then
  17.   begin
  18.     j := needLen - i;
  19.     for i := 0 to j do
  20.     begin
  21.       s := s + ' ';
  22.     end;
  23.   end;
  24.   Result := s;
  25. end;

  26. function PrintStr(Pstr:string;Pid:integer):string;
  27. var
  28.    index,len:integer;
  29.    GetTempstr,GetConvStr,Outstr:string;
  30. begin
  31.     index:=0;
  32.     GetConvStr:=Pstr;
  33.         len := length(Pstr);
  34.     repeat
  35.             index:=index+1;
  36.             GetConvStr:=GetValidStr(GetConvStr,GetTempstr,',');
  37.             if index = Pid then
  38.         Outstr:=GetTempstr;
  39.         until (GetTempstr = '') or (index >= len);
  40.         result:=Outstr;
  41. end;

  42. function GetBuffItemConfig(MakeItemsID:integer):String;     //以下根据版本自行添加
  43. begin
  44.       case MakeItemsID of
  45.                           //获得物,数量,需要的物品,数量,需要的物品,元宝,灵符,金刚石(打造裁决需要3炼狱+5黑铁+1万元宝+1千灵符+100金刚石)
  46.          1 : result := '首充武器BUFF,                                                        几率触发,1.5倍经验加成,首充获得';
  47.          7 : result := '军鼓LV6以上BUFF,                                                       几率触发,10级技能,合成获得';          //打造力量戒指需1个龙之戒指+1000元宝(若不需要的项目为0即可,逗号不可删除)
  48.          4 : result := '天魔以上武器,                                                       几率触发,攻击伤害提高50%,合成打怪获得';
  49.          6 : result := '魔龙以上衣服,                                                        几率触发,提高100双防,合成打怪获得';
  50.          10 : result := '血石+100以上BUFF,                                                        几率触发,提高20%生命值,合成获得';
  51. //        6 : result := '恶魔铃铛,3,炼狱,5,黑铁矿石,10000,1000,0';
  52.          13 : result := '腰牌1.5-1.8BUFF,                                                        几率触发,召唤垃圾宝宝巨型多角虫1,半兽勇士1,鹰卫召唤高级宝宝天穹使者,恶魔领主,骷髅神兵为你作战直到死亡注:6种其中1种,合成获得';
  53.   //       8 : result := '紫碧螺,3,炼狱,5,黑铁矿石,10000,1000,0';
  54. //        9 : result := '龙纹剑,3,炼狱,5,黑铁矿石,10000,1000,0';
  55.         16 : result := '银光-灵犀重盾BUFF,                                                        几率触发,攻击时触发使敌人流血,合成获得';
  56. //       11 : result := '三眼手镯,3,炼狱,5,黑铁矿石,10000,1000,0';
  57. //       12 : result := '泰坦戒指,3,炼狱,5,黑铁矿石,10000,1000,0';
  58.         19 : result := '军鼓LV6以上BUFF,                                                       几率触发,10级技能,合成获得';
  59.   //      14 : result := '贵族斗笠,3,炼狱,5,黑铁矿石,10000,1000,0';
  60. //       15 : result := '贵族勋章,3,炼狱,5,黑铁矿石,10000,1000,0';
  61.       21 : result := '其他10多种BUFF请游戏研究';
  62.   //      17 : result := '贵族靴子,3,炼狱,5,黑铁矿石,10000,1000,0';
  63.   //      18 : result := '屠龙,3,炼狱,5,黑铁矿石,10000,1000,0';
  64.   //      19 : result := '贵族屠龙,3,炼狱,5,黑铁矿石,10000,1000,0';
  65.   //      20 : result := '魔龙战戒,3,炼狱,5,黑铁矿石,10000,1000,0';
  66. //                21 : result := '烈阳小鸟,3,炼狱,5,黑铁矿石,10000,1000,0';
  67. //                22 : result := '烈阳大棒,3,炼狱,5,黑铁矿石,10000,1000,0';    //runquest里的xx戒指和jj戒指为演示,因此这里没有添加
  68.         else  result := '';
  69.         end;
  70. end;

  71. function GetItemBuffFunc(BuffID : integer) : string;
  72. begin
  73.     case BuffID of
  74.         1 : result := '[首充神剑],攻击时触发1.5倍经验倍数持续600秒';
  75.         2 : result := '[天魔以上武器],攻击时触发提升50%攻击伤害持续10秒30秒冷却';
  76.         3 : result := '[魔龙以上衣服],攻击时触发提升100点双抗持续10秒30秒冷却';
  77.         4 : result := '[军鼓LV6以上BUFF],几率触发10级技能30秒冷却';
  78.                 5 : result := '[血石+100以上BUFF],几率触发提高20%生命值30秒冷却';
  79.                 6 : result := '[腰牌1.5-1.8倍BUFF],几率触发召唤垃圾宝宝巨型多角虫1,半兽勇士1,鹰卫召唤高级宝宝天穹使者,恶魔领主,骷髅神兵为你作战直到死亡注:【6种其中1种】.200秒冷却';
  80.                 7 : result := '[银光-灵犀重盾BUFF],几率触发攻击时触发使敌人流血持续10秒30秒冷却';
  81.                 8 : result := '[腰牌1.9-2.0倍BUFF],几率触发召唤垃圾宝宝巨型多角虫1,半兽勇士1,鹰卫召唤高级宝宝天穹使者,恶魔领主,骷髅神兵召唤终级宝宝?,?,?,?为你作战直到死亡注:【10种其中1种】.200秒冷却';
  82.                 9 : result := '[其他隐藏BUFF请自行研究]';
  83. //           10 : result := '[灵魂项链],死亡时触发原地复活无冷却';
  84. //           11 : result := '[三眼手镯],攻击时触发使敌人流血10秒30秒冷却';
  85. //           12 : result := '[泰坦戒指],攻击时触发使敌人红名30秒冷却';
  86. //           13 : result := '[黑铁头盔],攻击时触发使敌人武器报废30秒冷却';
  87. //           14 : result := '[贵族斗笠],攻击时触发使敌人定身10秒30秒冷却';
  88. //           15 : result := '[贵族勋章],攻击时触发随机掉落敌人背包物品无冷却';
  89. //           16 : result := '[贵族腰带],攻击时触发使敌人卡屏30秒冷却';
  90. //           17 : result := '[贵族靴子],攻击时触发使敌人进入混乱5秒冷却';
  91. //           18 : result := '[屠龙],攻击时触发使敌人降低双抗持续10秒30秒冷却';
  92. //           19 : result := '[贵族屠龙],攻击时触发秒杀敌人30秒冷却';
  93. //           20 : result := '[魔龙战戒],杀人后触发复活敌人进行鞭尸30秒冷却';
  94. //           21 : result := '[烈阳小鸟],攻击时触发移形换影(对怪无效)5秒冷却';
  95. //           22 : result := '[首充神剑],攻击时触发1.5倍经验倍数持续600秒';    //runquest里的xx戒指和jj戒指为演示,因此这里没有添加
  96.         else  result := '';
  97.     end;
  98. end;

  99. procedure P101;
  100. var
  101.    k,Num_1,Num_2,Num_3,Num_4,Num_5:integer;
  102.    MakeItemName,Item_1,Item_2:string;
  103. begin
  104.     k := This_Player.GetS(56,86);
  105.         MakeItemName := PrintStr(GetBuffItemConfig(k),1);
  106.        
  107.     if This_Npc.InputOK then
  108.     begin
  109.        
  110.             if PrintStr(GetBuffItemConfig(k),3) <> '0' then
  111.                 begin
  112.                     Num_1 := StrToIntDef(PrintStr(GetBuffItemConfig(k),2),0);
  113.                         Item_1 := PrintStr(GetBuffItemConfig(k),3);
  114.                     if This_Player.GetBagItemCount(Item_1) < Num_1 then
  115.                         begin
  116.                         This_NPC.InputDialog(This_Player,'                                         合成失败!我要的东西呢?',1,100); exit;
  117.                         end;
  118.                 end;
  119.                
  120.                 if PrintStr(GetBuffItemConfig(k),5) <> '0' then
  121.                 begin
  122.                     Num_2 := StrToIntDef(PrintStr(GetBuffItemConfig(k),4),0);
  123.                         Item_2 := PrintStr(GetBuffItemConfig(k),5);
  124.                     if This_Player.GetBagItemCount(Item_2) < Num_2 then
  125.                         begin
  126.                         This_NPC.InputDialog(This_Player,'                                         合成失败!我要的东西呢?',1,100); exit;
  127.                         end;
  128.                 end;
  129.                
  130.                 if PrintStr(GetBuffItemConfig(k),6) <> '0' then
  131.                 begin
  132.                     Num_3 := StrToIntDef(PrintStr(GetBuffItemConfig(k),6),0);
  133.                     if This_Player.YBNum < Num_3 then
  134.                         begin
  135.                         This_NPC.InputDialog(This_Player,'                                         合成失败!你的元宝不足!',1,100); exit;
  136.                         end;
  137.                 end;
  138.                
  139.                 if PrintStr(GetBuffItemConfig(k),7) <> '0' then
  140.                 begin
  141.                     Num_4 := StrToIntDef(PrintStr(GetBuffItemConfig(k),7),0);
  142.                     if This_Player.MyLFnum < Num_4 then
  143.                         begin
  144.                         This_NPC.InputDialog(This_Player,'                                         合成失败!你的灵符不足!',1,100); exit;
  145.                         end;
  146.                 end;
  147.                
  148.                 if PrintStr(GetBuffItemConfig(k),8) <> '0' then
  149.                 begin
  150.                     Num_5 := StrToIntDef(PrintStr(GetBuffItemConfig(k),7),0);
  151.                     if This_Player.MyDiamondnum < Num_5 then
  152.                         begin
  153.                         This_NPC.InputDialog(This_Player,'                                         合成失败!你的金刚石不足!',1,100); exit;
  154.                         end;
  155.                 end;
  156.                
  157.         if Num_1 > 0 then This_Player.Take(Item_1,Num_1);
  158.         if Num_2 > 0 then This_Player.Take(Item_2,Num_2);
  159.         if Num_3 > 0 then This_Player.ScriptRequestSubYBNum(Num_3);
  160.         if Num_4 > 0 then This_Player.DecLF(0,Num_4,false);
  161.         if Num_5 > 0 then This_Player.TakeDiamond(Num_5,this_npc);
  162.        
  163.         This_Player.Give(MakeItemName,1);
  164.         end;
  165. end;
  166.          
  167. procedure _ShowBuffItem(k:integer);
  168. var
  169.    StrForShow:string;
  170. begin
  171.     StrForShow := addSpace('<'+PrintStr(GetBuffItemConfig(k),1)+'>BUFF属性:',46);
  172.        
  173.         if PrintStr(GetBuffItemConfig(k),3) <> '0' then
  174.            StrForShow := StrForShow + PrintStr(GetBuffItemConfig(k),2) + PrintStr(GetBuffItemConfig(k),3);
  175.           

  176.        
  177.         This_Player.SetS(56,86,k);
  178.     This_NPC.InputDialog(This_Player,addSpace(StrForShow,200) + '      BUFF加成,几率触发',1,101);
  179. end;

  180. procedure _GmPage;
  181. begin
  182.     This_Npc.NpcDialog(This_Player,
  183.         '<哥哥有空就更新,烂了就停更/fcolor=168>|'+
  184.         '增益型BUFF几率:<'+inttostr(GetG(60,31))+'/fcolor=250>^^<[调整几率]/@GmSRChg~31>|'+
  185.         '<↑><该几率控制1-9号BUFF/fcolor=248>|'+
  186.         '对敌型BUFF几率:<'+inttostr(GetG(60,32))+'/fcolor=250>^^<[调整几率]/@GmSRChg~32>|'+
  187.         '<↑><该几率控制11-16、18、19号BUFF/fcolor=248>|'+
  188.         '独立型BUFF几率:<'+inttostr(GetG(60,33))+'/fcolor=250>^^<[调整几率]/@GmSRChg~33>|'+
  189.         '<↑><该几率控制10、15、17、20、21号BUFF/fcolor=248>|'+
  190.         '<所有几率均为百分比,注意合理调整/fcolor=22>|'+
  191.         '{cmd}<返回主页/@main>');
  192. end;

  193. procedure P105;
  194. begin
  195.      if (StrToIntDef(This_Npc.InputStr ,-1) < 100) and (StrToIntDef(This_Npc.InputStr ,-1) >= 0) then
  196.          begin
  197.      SetG(60,TampForVar,StrToIntDef(This_NPC.InputStr,-1));
  198.          _GmPage;
  199.          This_NPC.InputDialog(This_Player,'                                                        修改成功!',1,100);exit;
  200.          end else
  201.          This_NPC.InputDialog(This_Player,'                                            你瞎鸡巴输啥呢?!',1,100);
  202.          exit;
  203. end;

  204. procedure _GmSRChg(VarNum:integer);
  205. begin
  206.     TampForVar:=VarNum;
  207.     This_NPC.InputDialog(This_Player,'请输入0-99之间的数字',0,105);
  208. end;
  209.        
  210. procedure _ShowXQ(v:integer);
  211. var
  212.    k,i:integer;
  213.    Button:string;
  214.    StrForShow:string;
  215. begin
  216.     for k := v to v + 5 do
  217.         begin
  218.             if k mod 2 = 1 then i := 218
  219.                 else i := 22;
  220.             StrForShow := StrForShow +'<'+PrintStr(GetItemBuffFunc(k),1)+'/fcolor='+inttostr(i)+'><'+PrintStr(GetItemBuffFunc(k),2)+'/fcolor=247>|';
  221.         end;
  222.        
  223.         if k < 22 then         //如果添加了装备,此处的22也要对应修改,多少个装备这里就填多少
  224.              Button:='{cmd}<下 一 页/@ShowXQ~'+inttostr(k)+'><返回主页/@main>'
  225.         else Button:='{cmd}<返回首页/@ShowXQ~1><返回主页/@main>';
  226.     This_Npc.NpcDialog(This_Player,StrForShow+Button);
  227. end;
  228.        
  229. procedure _LunTanJian(v:integer);
  230. var
  231.    k,i:integer;
  232.    ShowButton:string;
  233.    StrForShow:string;
  234. begin
  235.     for k := v to v + 11 do
  236.         begin
  237.             if i < 1 then
  238.                 begin
  239.                     StrForShow := StrForShow + '{cmd}';
  240.                 end;
  241.                
  242.                 StrForShow := StrForShow + '<' + PrintStr(GetBuffItemConfig(k),1) + '/@ShowBuffItem~'+ inttostr(k) + '>';
  243.                 i := i + 1;
  244.                
  245.                 if i > 2 then
  246.             begin
  247.                     i := 0;
  248.                         StrForShow := StrForShow + '|';
  249.                 end;
  250.         end;

  251.         if This_Player.GMLevel > 0 then ShowButton := '<后台管理/@GmPage>'
  252.         else ShowButton := '<关闭界面/@exit>';
  253.        
  254.         if k < 22 then         //如果添加了装备,此处的22也要对应修改,多少个装备这里就填多少
  255.              StrForShow := StrForShow + '{cmd}<————————————————————————/@exit>|' + '{cmd}<下 一 页/@LunTanJian~'+inttostr(k)+'><查看详情/@ShowXQ~1>'
  256.     else StrForShow := StrForShow + '{cmd}<————————————————————————/@exit>|' + '{cmd}<返回首页/@LunTanJian~1><查看详情/@ShowXQ~1>';
  257.     This_Npc.NpcDialog(This_Player,StrForShow+ShowButton);
  258. end;
  259.          
  260. begin
  261.     if GetG(60,31) < 1 then SetG(60,31,5);
  262.         if GetG(60,32) < 1 then SetG(60,32,5);
  263.         if GetG(60,33) < 1 then SetG(60,33,30);
  264.     _LunTanJian(1);
  265. end.
复制代码







上一篇:Call原始回收系统,循环回收脚本
下一篇:战神引擎装备自动回收道具脚本
回复

使用道具 举报

1

主题

252

回帖

1070

积分

旋风流星刀

积分
1070
QQ
发表于 2023-12-22 19:19:45 | 显示全部楼层
积分任务
回复

使用道具 举报

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

本版积分规则

手机版|美林GM论坛 ( 蜀ICP备2020030293号-2 )|网站地图

禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.如遇版权问题,请及时QQ联系

GMT+8, 2024-4-28 11:34 , Processed in 0.319371 second(s), 53 queries .

Powered by Discuz! X3.5

Copyright © 2001-2024, Tencent Cloud.

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