sm

立即登录 | 账号注册

积分: 0 |用户组: 游客

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

[战神引擎] 战神引擎沙城捐献脚本加百分比攻击

[复制链接]

826

主题

36

回帖

23万

积分

霸王教主

积分
235297
发表于 2022-12-31 21:15:01 | 显示全部楼层 |阅读模式
  1. program mir2;
  2. var
  3. s1,s2,s3,s4,s5 : integer;
  4. l1,l2,l3,l4,l5 : integer; //次数限制-变量
  5. n1,n2,n3,n4,n5,n6 : string;
  6. m1,m2,m3,m4,m5,m6 : string;
  7. num,num1,num2,num3,num4,today  :integer;
  8. sxz1,sxz2,sxz3,sxz4,sxz5,sxz6,sxz7,sxz8,sxz9: integer;
  9. ybjx1,ybjx2,ybjx3,ybjx4,ybjx5,ybjx6,ybjx7,ybjx8,ybjx9: integer;
  10. zswj1,zswj2,zswj3,zswj4,zswj5,zswj6,zswj7: integer;
  11. ltsx6,ltsx7,txdy4,txdy5,sccjl: integer;
  12. procedure _DoExit;

  13. begin
  14.   This_Npc.CloseDialog(This_Player);
  15. end;

  16. procedure _Exit;
  17. begin
  18.   This_Npc.CloseDialog(This_Player);
  19. end;


  20. procedure domain;
  21. begin
  22.     today := GetDateNum(GetNow);   //定义today为当前日期值        
  23.     if This_Player.GetV(78,10) <> today then //查询个人变量78,10 不等于当前日期则清理其他数据
  24.     begin
  25.        This_Player.SetV(78,10,today);  
  26.        This_Player.SetV(78,1,0);
  27.        This_Player.SetV(78,2,0);
  28.     end;

  29.     if getg(78,10) <> today then //查询个人变量78,10 不等于当前日期则清理其他数据
  30.         begin
  31.             num3 := GetG(78,6);
  32.             num4 := GetG(78,7);
  33.                 SetG(78,7,num4+num3);
  34.             SetG(78,10,today);
  35.         SetG(78,1,0);
  36.         SetG(78,2,0);
  37.         SetG(78,3,0);
  38.         SetG(78,4,0);
  39.         SetG(78,5,0);
  40.         SetG(78,6,0);               
  41.          end;  
  42.                
  43. if This_Player.getV(78,1) < 0 then  This_Player.SetV(78,1,0); //初始化个人变量
  44. if This_Player.getV(78,2) < 0 then  This_Player.SetV(78,2,0); //初始化个人变量
  45. num :=  StrToIntDef(This_NPC.InputStr,-1);
  46. if getg(78,1) < 0 then  //初始化全局变量
  47.     SetG(78,1,0);
  48. if getg(78,2) < 0 then
  49.     SetG(78,2,0);
  50. if getg(78,3) < 0 then
  51.     SetG(78,3,0);
  52. if getg(78,4) < 0 then
  53.     SetG(78,4,0);
  54. if getg(78,5) < 0 then
  55.     SetG(78,5,0);

  56. s1 := getg(78,1);  //定义变量
  57. s2 := getg(78,2);
  58. s3 := getg(78,3);
  59. s4 := getg(78,4);
  60. s5 := getg(78,5);
  61. if This_Player.GetV(78,1) = s1 then
  62. begin
  63.   m2 := '第一名';
  64.   end
  65. else  
  66. if This_Player.GetV(78,1) = s2 then
  67.   begin
  68.   m2 := '第二名';
  69.   end
  70.   else   
  71.    if This_Player.GetV(78,1) = s3 then
  72.   begin
  73.   m2 := '第三名';
  74.   end
  75.   else   
  76.     if This_Player.GetV(78,1) = s4 then
  77.   begin
  78.   m2 := '第四名';
  79.   end
  80.   else   
  81.    if This_Player.GetV(78,1) = s5 then
  82.   begin
  83.   m2 := '第五名';
  84.   end
  85.   else   
  86.    if (This_Player.GetV(78,1) > 1) and (This_Player.GetV(78,1) < s5) then
  87.   begin
  88.   m2 := '第六名后';
  89.   end
  90.   else   m2 := '无';
  91. This_NPC.NpcDialog(This_Player,
  92.     '每日捐献的<总值>存入<沙奖池>中.<攻城后>领取\'
  93.    +'|今日总捐献:<'+inttostr(GetG(78,6))+'/c=103>       沙奖池累计:  <'+inttostr(GetG(78,7)/40)+'/c=243>|\'
  94.    +'|<第一名/c=103>:捐献元宝     <'+inttostr(getg(78,1))+'/c=254>        <'+n1+'/c=250>\'
  95.    +'|<第二名/c=103>:捐献元宝     <'+inttostr(getg(78,2))+'/c=254>        <'+n2+'/c=250> \'
  96.    +'|<第三名/c=103>:捐献元宝     <'+inttostr(getg(78,3))+'/c=254>        <'+n3+'/c=250> \'
  97.    +'|<第四名/c=103>:捐献元宝     <'+inttostr(getg(78,4))+'/c=254>        <'+n4+'/c=250>\'
  98.    +'|<第五名/c=103>:捐献元宝     <'+inttostr(getg(78,5))+'/c=254>        <'+n5+'/c=250> \'
  99.    +'|<第六名/c=103>:后不显示数据       <每日0点更新捐献/c=red>\'  
  100.    +'|您当前捐献元宝:<'+inttostr(This_Player.GetV(78,1))+'/c=254>        排名 [  <'+m2+'/c=250>  ]   \'

  101.    +'|{cmd}<我要捐献/@jxyb>  ^<查看属性/@shuxing>^<领取奖池/@linqujl>   ^<关闭/@Exit> '

  102.    );
  103. end;

  104. procedure _linqujl;
  105. begin
  106.   if ( This_Player.IsCastle ) and  ( This_Player.IsGuildLord ) then
  107.   begin
  108.      This_Npc.NpcDialog(This_Player,
  109.      '尊敬的<沙巴克城主>您好!|\ \' +
  110.      '当前<沙城池>捐献<元宝>数量为:   <'+inttostr(GetG(78,7))+'/c=243>  元宝|\ \' +
  111.      '您可以领取<城池元宝>数量为:   <'+inttostr(GetG(78,7)/40)+'/c=243>  元宝|\ \' +
  112.      '<是否领取>:|\ \' +                  
  113.      '|{cmd}<领取城池元宝/@lqsjc>  ^ <返回/@main>|\'
  114. );
  115.   end else
  116.   begin
  117.      This_Npc.NpcDialog(This_Player,
  118.      '只有沙巴克会长才能进行操作!'
  119.         +'|                                                           <返回/@main>') ;
  120.   end;
  121. end;

  122. procedure _lqsjc;
  123. begin
  124.   if ( This_Player.IsCastle ) and  ( This_Player.IsGuildLord ) then
  125.   begin
  126.   sccjl := GetG(78,7);
  127.    This_Player.ScriptRequestAddYBNum((GetG(78,7)/10));
  128.   ServerSay('沙巴克城主:[<' + This_Player.Name + '>]领取了沙城池奖励['+inttostr(GetG(78,7)/40)+']元宝!', 70);
  129.   SetG(78,7,0);
  130.        This_Npc.NpcDialog(This_Player,
  131.      '恭喜你领取了沙城池奖励!'
  132.         +'|                                                           <返回/@linqujl>') ;
  133.           end else
  134.   begin
  135.      This_Npc.NpcDialog(This_Player,
  136.      '只有沙巴克会长才能进行操作!'
  137.         +'|                                                           <返回/@main>') ;
  138.   end;
  139.   end;

  140. procedure _shuxing;
  141. begin         
  142. This_NPC.NpcDialog(This_Player,
  143.     '|您当前捐献元宝:<'+inttostr(This_Player.GetV(78,1))+'/c=254>        排名 [  <'+m2+'/c=250>  ]   \'
  144.    +'|<第一名/c=103>:   提升     <60%>   主属性\'
  145.    +'|<第二名/c=103>:   提升     <50%>   主属性\'
  146.    +'|<第三名/c=103>:   提升     <40%>   主属性\'
  147.    +'|<第四名/c=103>:   提升     <30%>   主属性\'
  148.    +'|<第五名/c=103>:   提升     <20%>    主属性\'
  149.    +'|<六名后/c=103>:   提升     <10%>    主属性\'
  150.    +'|{cmd}<领取属性/@lqsx11>     ^<返回/@main>');
  151. end;

  152. procedure _lqsx;
  153.         begin
  154.         This_Player.CallOut(This_NPC,1,'lqsx1');
  155.         end;


  156. procedure _lqsx11;
  157. begin        
  158.    if This_Player.GetV(78,1) > 0 then
  159.            begin
  160. if         (ybjx1 = 0) and (ybjx2 = 0) and (ybjx3 = 0) then
  161.         begin

  162.                               sxz1 := 0;
  163.                   sxz2 := 0;
  164.                                   sxz3 := 0;
  165.                                   sxz4 := 0;                  
  166.                   sxz5 := 0;               
  167.                   sxz8 := 0;                  
  168.                   sxz9 := 0;
  169.                   ybjx1 := 0;
  170.                   ybjx2 := 0;
  171.                                   ybjx3 := 0;
  172.                                   ybjx4 := 0;
  173.                                   ybjx5 := 0;
  174.                                   ybjx6 := 0;
  175.                                   ybjx7 := 0;
  176.         
  177.                                  
  178.             begin        

  179.                                                            
  180.                         if (This_Player.GetV(78,1) = GetG(78,1)) and (This_Player.GetV(78,1) > 0) then
  181.                 begin         
  182.                   ybjx1 := This_Player.MaxDC * 60 / 100
  183.                   ybjx2 := This_Player.MaxMC * 60 / 100
  184.                                   ybjx3 := This_Player.MaxSC * 60 / 100
  185.                         This_Player.PlayerNotice('沙城捐献:[第一名]属性已触发',2);        
  186.                             end;

  187.                         if (This_Player.GetV(78,1) = GetG(78,2)) and (This_Player.GetV(78,1) > 0) then
  188.                 begin         
  189.                   ybjx1 := This_Player.MaxDC * 50 / 100
  190.                   ybjx2 := This_Player.MaxMC * 50 / 100
  191.                                   ybjx3 := This_Player.MaxSC * 50 / 100
  192.                         This_Player.PlayerNotice('沙城捐献:[第二名]属性已触发',2);               
  193.                             end;

  194.                         if (This_Player.GetV(78,1) = GetG(78,3)) and (This_Player.GetV(78,1) > 0) then
  195.                 begin         
  196.                   ybjx1 := This_Player.MaxDC * 40 / 100
  197.                   ybjx2 := This_Player.MaxMC * 40 / 100
  198.                                   ybjx3 := This_Player.MaxSC * 40 / 100
  199.                         This_Player.PlayerNotice('沙城捐献:[第三名]属性已触发!',2);               
  200.                             end;

  201.                         if (This_Player.GetV(78,1) = GetG(78,4)) and (This_Player.GetV(78,1) > 0) then
  202.                 begin         
  203.                   ybjx1 := This_Player.MaxDC * 30 / 100
  204.                   ybjx2 := This_Player.MaxMC * 30 / 100
  205.                                   ybjx3 := This_Player.MaxSC * 30 / 100
  206.                         This_Player.PlayerNotice('沙城捐献:[第四名]属性已触发!',2);               
  207.                             end;

  208.                         if (This_Player.GetV(78,1) = GetG(78,5)) and (This_Player.GetV(78,1) > 0) then
  209.                 begin         
  210.                   ybjx1 := This_Player.MaxDC * 20 / 100
  211.                   ybjx2 := This_Player.MaxMC * 20 / 100
  212.                                   ybjx3 := This_Player.MaxSC * 20 / 100
  213.                         This_Player.PlayerNotice('沙城捐献:[第五名]属性已触发!',2);               
  214.                             end;

  215.                           if (This_Player.GetV(78,1) > 0) and (This_Player.GetV(78,1) < GetG(78,5)) then
  216.                 begin         
  217.                   ybjx1 := This_Player.MaxDC * 10 / 100
  218.                   ybjx2 := This_Player.MaxMC * 10 / 100
  219.                                   ybjx3 := This_Player.MaxSC * 10 / 100
  220.                         This_Player.PlayerNotice('沙城捐献:[没排上名次的]属性已触发!',2);               
  221.                             end;





  222.    if ((This_Player.GetV(78,1) = GetG(78,1)) and (This_Player.GetV(78,1) > 0))
  223.    or ((This_Player.GetV(78,1) = GetG(78,2)) and (This_Player.GetV(78,1) > 0))
  224.    or ((This_Player.GetV(78,1) = GetG(78,3)) and (This_Player.GetV(78,1) > 0))  
  225.    or ((This_Player.GetV(78,1) = GetG(78,4)) and (This_Player.GetV(78,1) > 0))
  226.    or ((This_Player.GetV(78,1) = GetG(78,5)) and (This_Player.GetV(78,1) > 0))
  227.    or ((This_Player.GetV(78,1) < GetG(78,5)) and (This_Player.GetV(78,1) > 0)) then
  228.                 begin
  229.                                   sxz1 := zswj1 + ybjx1;
  230.                   sxz2 := zswj2 + ybjx2;
  231.                                   sxz3 := zswj3 + ybjx3;
  232.                                   sxz4 := zswj4 + txdy4;
  233.                   sxz5 := zswj5 + txdy5;
  234.                                   sxz6 := zswj6 + ltsx6;
  235.                                   sxz7 := zswj7 + ltsx7;                  
  236.                  This_Player.AddPlayerAbil(0, sxz1, 3600);
  237.                              This_Player.AddPlayerAbil(1, sxz2, 3600);
  238.                              This_Player.AddPlayerAbil(2, sxz3, 3600);
  239.                              This_Player.AddPlayerAbil(4, sxz4, 3600);
  240.                              This_Player.AddPlayerAbil(5, sxz5, 3600);
  241.                              This_Player.AddPlayerAbil(8, sxz6, 3600);
  242.                              This_Player.AddPlayerAbil(9, sxz7, 3600);         
  243.                                  This_Player.CallOut(This_Npc, 60, 'xiaochu');
  244.        This_Player.PlayerNotice('属性增加:攻击 + '+inttostr(sxz1)+'点.魔法 + '+inttostr(sxz2)+'点.道术 .时限1小时',8);                                 
  245.       end;
  246.       end;
  247.   end else
  248.       begin
  249.               This_Player.PlayerNotice('你已经领取过了,稍后领取',2);  
  250.      end;   
  251.   end else
  252.       begin
  253.               This_Player.PlayerNotice('你还没有捐献记录,无法领取',2);  
  254.      end;  
  255. end;


  256. procedure xiaochu;
  257. begin
  258.                  ybjx1 := 0;
  259.                  ybjx2 := 0;        
  260.          ybjx3 := 0;
  261. end;

  262. procedure _jxyb;
  263. begin   
  264.         This_NPC.InputDialog(This_Player,'请输入捐献元宝数',0,111) ;
  265. end;

  266. procedure p111;
  267. begin
  268.    num :=  StrToIntDef(This_NPC.InputStr,-1);//输入非阿拉伯数字的字符都返回-1
  269.    if This_NPC.InputOK  then            
  270.     begin
  271.         if (num < 100) or  (num > 50000)  then
  272.        begin
  273.        This_NPC.NpcDialog(This_Player,'捐献一次至少<100>元宝.总额不能大于<50000>.只能使用阿拉伯<数字>!'
  274.            +'|                                                           <返回/@main>') ;
  275.        end
  276.         else if (num >= 100) and (num < 50000) then
  277.          begin
  278.            if  This_Player.YBNum >= num then
  279.            begin
  280.                   
  281.                    num3 := GetG(78,6);
  282.                    num3 := num3 + num;
  283.                    SetG(78,6,num3);
  284.            This_Player.PsYBConsum(This_NPC,'xin',801,num,1);
  285.            This_Player.CallOut(This_NPC,1,'jxyb');
  286.                    This_Player.ScriptRequestSubYBNum(num);
  287.                    ServerSay('玩家:['+This_Player.Name+']为沙城捐献了:'+ inttostr(num)+'  元宝!', 3);
  288.            This_NPC.NpcDialog(This_Player,'恭喜你成功捐献:'+ inttostr(num)+' 元宝!'
  289.             +'|                                                           <返回/@main>') ;
  290.            end else
  291.            This_NPC.NpcDialog(This_Player,'你没有足够的元宝捐献!'
  292.         +'|                                                           <返回/@main>') ;
  293.          end;
  294.     end;
  295. end;

  296. procedure jxyb;
  297. begin
  298. num :=  StrToIntDef(This_NPC.InputStr,-1);//现在捐献元宝数,输入非阿拉伯数字的字符都返回-1

  299. num1 := This_Player.getV(78,1);  //已捐献元宝数
  300. num2 :=num + num1;    //总捐献元宝
  301. s1 := getg(78,1); //全局第1
  302. s2 := getg(78,2); //全局第2     
  303. s3 := getg(78,3); //全局第3  
  304. s4 := getg(78,4); //全局第4
  305. s5 := getg(78,5); //全局第5
  306. if num2 > s1 then     //如果总捐献大于第一名

  307. begin
  308.     SetG(78,5,s4);
  309.     SetG(78,4,s3);
  310.     SetG(78,3,s2);
  311.     SetG(78,2,s1);

  312. SetG(78,1,num2);       //第一名 写入你的捐献元宝数  
  313. This_Player.SetV(78,1,num2);    //个人变量标记
  314. This_Player.SetV(78,2,1);    //个人变量标记
  315. n1 := This_Player.Name;           //第一名写入你的名字
  316. end
  317. else
  318. if (num2 > s2) and (num2 < s1) then
  319. begin

  320.     SetG(78,5,s4);
  321.     SetG(78,4,s3);
  322.     SetG(78,3,s2);
  323.     SetG(78,1,s1);

  324. SetG(78,2,num2);   
  325. This_Player.SetV(78,1,num2);
  326. This_Player.SetV(78,2,1);    //个人变量标记
  327. n2 := This_Player.Name;
  328. end
  329. else
  330. if (num2 > s3) and (num2 < s2) then
  331. begin

  332.     SetG(78,5,s4);
  333.     SetG(78,4,s3);
  334.     SetG(78,2,s2);
  335.     SetG(78,1,s1);

  336. SetG(78,3,num2);   
  337. This_Player.SetV(78,1,num2);
  338. This_Player.SetV(78,2,1);    //个人变量标记
  339. n3 := This_Player.Name;
  340. end
  341. else
  342. if (num2 > s4) and (num2 < s3) then
  343. begin

  344.     SetG(78,5,s4);
  345.     SetG(78,3,s3);
  346.     SetG(78,2,s2);
  347.     SetG(78,1,s1);

  348. SetG(78,4,num2);   
  349. This_Player.SetV(78,1,num2);
  350. This_Player.SetV(78,2,1);    //个人变量标记
  351. n4 := This_Player.Name;
  352. end
  353. else
  354. if (num2 > s5) and (num2 < s4) then
  355. begin

  356.     SetG(78,4,s4);
  357.     SetG(78,3,s3);
  358.     SetG(78,2,s2);
  359.     SetG(78,1,s1);

  360. SetG(78,5,num2);   
  361. This_Player.SetV(78,1,num2);
  362. This_Player.SetV(78,2,1);    //个人变量标记
  363. n5 := This_Player.Name;
  364. end
  365. else
  366. if num2 < s5 then  
  367. begin
  368. This_Player.SetV(78,1,num2);
  369. This_Player.SetV(78,2,1);    //个人变量标记
  370. end;
  371. end;

  372. function xin(price, num: Integer):boolean;
  373. begin
  374.    result := true;
  375. end;

  376. begin
  377. domain;
  378. end.
复制代码






上一篇:传奇战神引擎英雄玩家排行榜脚本代码
下一篇:传奇沙巴克城堡管理员NPC脚本代码
回复

使用道具 举报

1

主题

252

回帖

1070

积分

旋风流星刀

积分
1070
QQ
发表于 2023-12-26 13:52:41 | 显示全部楼层
积分任务
回复

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-4-28 14:12 , Processed in 0.335828 second(s), 58 queries .

Powered by Discuz! X3.5

Copyright © 2001-2024, Tencent Cloud.

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