sm

立即登录 | 账号注册

积分: 0 |用户组: 游客

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

[战神引擎] 战神引擎抽奖脚本

[复制链接]

826

主题

36

回帖

23万

积分

霸王教主

积分
236304
发表于 2023-7-5 00:10:51 | 显示全部楼层 |阅读模式
  1. program Mir2;
  2. var ShowStr:string;ShowNum:integer;
  3.     EquipType : array[1..8] of string;
  4.     Eqcolor: array[1..8] of integer;
  5.        
  6. //This_Player.GetS(88,15)  个人动态显示变量勿改
  7. //This_Player.GetS(85,37)  个人时间设定变量勿改
  8. //This_Player.GetS(85,38)  个人每天抽取上限变量
  9. //GetG(85,31)              货币类型,此参数0为元宝,1为灵符,2为金刚石,请根据自身情况修改
  10. //GetG(85,32)              抽奖所需货币数量
  11. //GetG(85,33)              大奖几率,此参数0为完全随机,1为提高大奖几率,2为避开大奖几率
  12. //GetG(85,34)              避开大奖变量勿改
  13. //GetG(85,35)              抽奖开关
  14. //GetG(85,36)              服务器每天最大可抽取次数
  15. //GetG(85,37)              时间设定勿改
  16. //GetG(85,38)              服务器每天剩余抽取次数
  17. //GetG(85,39)              个人每天抽取上限(修改后第二天生效)

  18. Const DrawRandx = 80;      //80%几率出每类奖励中的前3类

  19. Procedure _exit;
  20. begin
  21.    This_Npc.CloseDialog(This_Player);
  22. end;
  23. procedure P100;
  24. begin
  25. end;

  26. function GetItemsName(ItemType:integer;ItemID:integer):String;
  27. begin
  28.     case ItemType of         //以下奖励请自行按格式增加或修改,每类奖励4个小分类,DrawRandx为小分类前3类的出现几率
  29.     1 : begin       //武器类
  30.                  case ItemID of
  31.                  1 : result := '银蛇,魔杖,炼狱,井中月,无极棍';
  32.                  2 : result := '血饮,裁决之杖,骨玉权杖,龙纹剑';
  33.                  3 : result := '怒斩,龙牙,霸者之刃';
  34.                  4 : result := '屠龙,嗜魂法杖,逍遥扇';
  35.                  end;
  36.          end;
  37.                  
  38.         2 : begin       //衣服类
  39.                  case ItemID of
  40.                  1 : result := '天师长袍';
  41.                  2 : result := '霓裳羽衣';
  42.                  3 : result := '圣战宝甲';
  43.                  4 : result := '天魔神甲,法神披风,天尊道袍';
  44.                  end;
  45.          end;

  46.         3 : begin       //首饰类
  47.                  case ItemID of
  48.                          1 : result := '绿色项链,灵魂项链,恶魔铃铛,黑铁头盔,力量戒指';
  49.                  2 : result := '紫绸靴,青铜腰带';
  50.                  3 : result := '圣战头盔,圣战戒指,圣战手镯';
  51.                  4 : result := '钢铁腰带,避魂靴';
  52.                  end;
  53.          end;
  54.                  
  55.         4 : begin       //鼓励奖
  56.                  case ItemID of
  57.                  1 : result := '50000,100000';
  58.                  2 : result := '200000,300000';
  59.                  3 : result := '400000,500000';
  60.                  4 : result := '1000000';
  61.                  end;
  62.          end;
  63.                  
  64.         5 : begin       //元宝类(所有元宝请在数据库做好物品)
  65.                  case ItemID of
  66.                  1 : result := '50元宝';
  67.                  2 : result := '100元宝';
  68.                  3 : result := '500元宝';
  69.                  4 : result := '1000元宝';
  70.                  end;
  71.          end;
  72.                  
  73.         6 : begin       //灵符类(所有灵符请在数据库做好物品)
  74.                  case ItemID of
  75.                  1 : result := '1灵符礼包,10灵符礼包';
  76.                  2 : result := '20灵符礼包,50灵符礼包';
  77.                  3 : result := '100灵符礼包';
  78.                  4 : result := '幸运灵符礼包';
  79.                  end;
  80.          end;
  81.                  
  82.         7 : begin       //物品类(所有物品请在数据库做好物品)
  83.                  case ItemID of
  84.                  1 : result := '祝福油,金条';
  85.                  2 : result := '金刚石10个';
  86.                  3 : result := '金刚石50个';
  87.                  4 : result := '金刚石100个';
  88.                  end;
  89.          end;
  90.                
  91.         8 : begin       //大奖类
  92.                  case ItemID of
  93.                  1 : result := '魔龙玉佩';
  94.                  end;
  95.          end;
  96.          end;
  97. end;


  98. function printStr(Pstr:string;Pid:integer):string;
  99. var len,arrlen,index,temp_len,temp_index,i:integer;
  100. str,temp_str:string;
  101. strArr:array[1..100] of string;
  102. begin
  103.     str := Pstr;
  104.     len := length(str);
  105.     index:=1;
  106.      for i:=1 to 100 do
  107.          begin
  108.               temp_str:= copy(str,index,len);
  109.                   temp_len := length(temp_str);
  110.                   temp_index := pos(',',temp_str);               
  111.      if temp_index = 0 then
  112.      begin
  113.                   strArr[i] := copy(temp_str,0,temp_len);
  114.                   arrlen:=i; break;
  115.                   end else
  116.               strArr[i] := copy(temp_str,0,temp_index-1);
  117.           index := index + temp_index;
  118.      end
  119.    result:=strArr[Pid];
  120. end;

  121. function LastStrIdx(Lstr:string):integer;
  122. var temp_str:string;l,temp_index:integer;
  123. begin
  124.      temp_str:=Lstr;
  125.          for l:=1 to 100 do
  126.          begin
  127.               if printStr(Lstr,l) = '' then
  128.           break;
  129.           temp_index:=l-1;
  130.          end;
  131.         result:=temp_index;
  132. end;

  133. procedure OnInitialize;
  134. var il:integer;
  135. begin
  136.     if GetG(85,31) < 1 then SetG(85,31,0);
  137.         if GetG(85,32) < 1 then SetG(85,32,1);        //第一次打开默认货币数量为1个
  138.     if GetG(85,33) < 1 then SetG(85,33,0);
  139.         if GetG(85,36) < 1 then SetG(85,36,1000);
  140.         if GetG(85,39) < 1 then SetG(85,39,100);      //第一次打开默认个人上限为100

  141.     EquipType[1]:='武   器';
  142.         EquipType[2]:='衣   服';
  143.         EquipType[3]:='首   饰';
  144.         EquipType[4]:='鼓 励 奖';
  145.         EquipType[5]:='元   宝';
  146.         EquipType[6]:='灵   符';
  147.         EquipType[7]:='物   品';
  148.         EquipType[8]:='大   奖';
  149.        
  150.         case GetG(85,31) of
  151. 0 : begin
  152.           ShowStr:='元宝';
  153.                   ShowNum:=This_Player.YBNum;
  154.          end;
  155. 1 : begin
  156.           ShowStr:='灵符';
  157.                   ShowNum:=This_Player.MyLFnum;
  158.          end;
  159. 2 : begin
  160.           ShowStr:='金刚石';
  161.                   ShowNum:=This_Player.MyDiamondnum;
  162.          end;
  163.    end;
  164.        
  165.         for il:=1 to 8 do
  166.         begin
  167.         Eqcolor[il] := 250;
  168.         end;
  169. end;

  170. procedure _GmPage;
  171. var LiStr,BiStr,DiStr,GiStr:string;
  172. begin
  173.      if GetG(85,34) = 1 then
  174.          begin
  175.          LiStr:='<是/@SetDraw~34>';
  176.          end else
  177.          LiStr:='<否/@SetDraw~34>';
  178.          
  179.          if GetG(85,35) = 1 then
  180.          begin
  181.          BiStr:='<关闭中/@SetDraw~35>';
  182.          end else
  183.          BiStr:='<已开启/@SetDraw~35>';
  184.          
  185.          case GetG(85,31) of
  186. 0 : begin GiStr:='元宝'; end;
  187. 1 : begin GiStr:='灵符'; end;
  188. 2 : begin GiStr:='金刚石'; end;
  189.      end;
  190.          
  191.      case GetG(85,33) of
  192. 0 : begin DiStr:='完全随机'; end;
  193. 1 : begin DiStr:='提高大奖'; end;
  194. 2 : begin DiStr:='避开大奖'; end;
  195.      end;
  196.          
  197.      This_Npc.NpcDialog(This_Player,
  198.          '当前<抽奖功能/fcolor=254>状态(点击修改):['+BiStr+']|'+
  199.          '<━━━━━━━━━━━━━━━━━━━━━/fcolor=5>|'+
  200.          '大奖后<是否自动开启避开/fcolor=254>大奖:['+LiStr+']|'+
  201.          '<━━━━━━━━━━━━━━━━━━━━━/fcolor=5>|'+
  202.          '个人每天<抽取上限/fcolor=254>:[<'+inttostr(GetG(85,39))+'/@HumTopLim>]|'+
  203.          '全区次数(<剩余/fcolor=254>/<上限/fcolor=254>) <'+inttostr(GetG(85,38))+'> /<'+inttostr(GetG(85,36))+'/@DrawAll>^^^[<重置剩余/@ResetDraw>]|'+
  204.          '<━━━━━━━━━━━━━━━━━━━━━/fcolor=5>|'+
  205.          '当前<大奖几率/fcolor=254>为:[<'+DiStr+'/@Drawrand~33>]|'+
  206.          '参数:<完全随机/fcolor=22>、<提高大奖/fcolor=22>、<避开大奖/fcolor=22>|'+
  207.          '<━━━━━━━━━━━━━━━━━━━━━/fcolor=5>|'+
  208.          '当前<货币类型/fcolor=254>为:[<'+GiStr+'/@Drawrand~31>]|'+
  209.          '参数:<元宝/fcolor=22>、<灵符/fcolor=22>、<金刚石/fcolor=22>|'+
  210.          '当前抽奖所需<货币数量/fcolor=254>:[<'+inttostr(GetG(85,32))+'/@DrawNum>]|'+
  211.          '{cmd}<重置他人当日剩余/@ResetOther><返回主页/@main>');
  212. end;

  213. procedure ShowDialog;
  214. var GMShowStr:string;today:integer;
  215. begin
  216.      if GetG(85,35) = 1 then
  217.          begin
  218.          if This_Player.GMLevel > 0  then
  219.          begin
  220.          _GmPage;
  221.          end else
  222.          This_NPC.InputDialog(This_Player,'                                                       抽奖暂未开放!',1,100);exit;
  223.          end;

  224.      if This_Player.GMLevel > 0  then GMShowStr:='{cmd}<GM管理界面/@GmPage>';
  225.          
  226.      today:=GetDateNum(GetNow);
  227.      if This_Player.GetS(85,37) <> today then
  228.      begin
  229.      This_Player.SetS(85,37,today);
  230.          This_Player.SetS(85,38,GetG(85,39));
  231.          end;
  232.          
  233.          if GetG(85,37) <> today then
  234.          begin
  235.          SetG(85,37,today);
  236.          SetG(85,38,GetG(85,36));
  237.          end;
  238.        
  239.      OnInitialize;
  240.      This_Npc.NpcDialog(This_Player,
  241.          ' ┏━━━━┳━━━━┳━━━━┓|'+
  242.      ' ┃<'+EquipType[1]+'/fcolor='+inttostr(Eqcolor[1])+'>^   ┃<'+EquipType[2]+'/fcolor='+inttostr(Eqcolor[2])+'>^ ┃<'+EquipType[3]+'/fcolor='+inttostr(Eqcolor[3])+'>^┃|'+
  243.      ' ┣━━━━╋━━━━╋━━━━┫|'+
  244.      ' ┃<'+EquipType[8]+'/fcolor='+inttostr(Eqcolor[8])+'>^   ┃<[抽★奖]/@Drawluck>^ ┃<'+EquipType[4]+'/fcolor='+inttostr(Eqcolor[4])+'>^┃|'+
  245.      ' ┣━━━━╋━━━━╋━━━━┫|'+
  246.      ' ┃<'+EquipType[7]+'/fcolor='+inttostr(Eqcolor[7])+'>^   ┃<'+EquipType[6]+'/fcolor='+inttostr(Eqcolor[6])+'>^ ┃<'+EquipType[5]+'/fcolor='+inttostr(Eqcolor[5])+'>^┃|'+
  247.      ' ┗━━━━┻━━━━┻━━━━┛|'+
  248.          '全区每天最多可抽取 <'+inttostr(GetG(85,38))+'> /<'+inttostr(GetG(85,36))+'/fcolor=251> 次|'+
  249.          '每人每天只能抽取 <'+inttostr(GetG(85,39))+'/fcolor=254> 次,每次需 <'+inttostr(GetG(85,32))+'/fcolor=254> '+ShowStr+'|'+
  250.          '你当前剩余次数:<'+inttostr(This_Player.GetS(85,38))+'/fcolor=70>^'+ShowStr+'数量:<'+inttostr(ShowNum)+'/fcolor=70>|'+GMShowStr);
  251. end;

  252. procedure _SetDraw(GStr:string);
  253. begin
  254.      if GetG(85,StrToInt(GStr)) = 1 then
  255.          begin
  256.          SetG(85,StrToInt(GStr),0);
  257.          _GmPage;
  258.          end else
  259.          SetG(85,StrToInt(GStr),1);
  260.          _GmPage;
  261. end;

  262. procedure _ResetDraw;
  263. begin
  264.      SetG(85,38,GetG(85,36));
  265.          _GmPage;
  266.          This_NPC.InputDialog(This_Player,'                                                        修改成功!',1,100);
  267. end;

  268. procedure _HumTopLim;
  269. begin
  270.      This_NPC.InputDialog(This_Player,'请输入您要设置的个人上限数量',0,114);
  271. end;

  272. procedure P114;
  273. begin
  274.     SetG(85,39,StrToIntDef(This_NPC.InputStr,-1));
  275.         _GmPage;
  276.         This_NPC.InputDialog(This_Player,'                                                        修改成功!',1,100);
  277. end;

  278. procedure _ResetOther;
  279. begin
  280.      This_NPC.InputDialog(This_Player,'请输入您要重置的玩家名字                 可输入自己名字',0,113);
  281. end;

  282. procedure P113;
  283. var ClearName:string;
  284. begin
  285.      ClearName:=This_NPC.InputStr;
  286.      if This_Player.FindPlayer(ClearName) then
  287.          begin
  288.      This_Player.FindPlayerByName(ClearName).SetS(85,38,100);
  289.          This_NPC.InputDialog(This_Player,'您已成功重置了'+ClearName+'今日的抽奖次数!',1,100);
  290.          end else
  291.          This_NPC.InputDialog(This_Player,'重置失败!'+ClearName+'当前不在线!',1,100);
  292. end;

  293. procedure _DrawNum;
  294. begin
  295.      This_NPC.InputDialog(This_Player,'请输入您要设置的全区上限数量',0,112);
  296. end;

  297. procedure P112;
  298. begin
  299.     SetG(85,32,StrToIntDef(This_NPC.InputStr,-1));
  300.         _GmPage;
  301.         This_NPC.InputDialog(This_Player,'                                                        修改成功!',1,100);
  302. end;

  303. procedure _DrawAll;
  304. begin
  305.      This_NPC.InputDialog(This_Player,'请输入您要设置的全区上限数量',0,111);
  306. end;

  307. procedure P111;
  308. begin
  309.     SetG(85,36,StrToIntDef(This_NPC.InputStr,-1));
  310.         _GmPage;
  311.         This_NPC.InputDialog(This_Player,'                                                        修改成功!',1,100);
  312. end;

  313. procedure _Drawrand(GStr:string);
  314. begin
  315.     if GetG(85,StrToInt(GStr)) = 0 then
  316.         begin
  317.     SetG(85,StrToInt(GStr),1);
  318.         _GmPage;exit;
  319.         end;
  320.        
  321.         if GetG(85,StrToInt(GStr)) = 1 then
  322.         begin
  323.     SetG(85,StrToInt(GStr),2);
  324.         _GmPage;exit;
  325.         end;
  326.        
  327.         if GetG(85,StrToInt(GStr)) = 2 then
  328.         begin
  329.     SetG(85,StrToInt(GStr),0);
  330.         _GmPage;exit;
  331.         end;
  332. end;

  333. procedure GiveExpPrize(Pstr:string);
  334. var ExpNum:integer;
  335. begin
  336.      ExpNum:=StrToIntDef(Pstr,0);
  337.      This_Player.Give('经验',ExpNum);
  338.          ServerSay('恭喜玩家【'+This_Player.Name+'】抽奖获得了'+inttostr(ExpNum)+'经验!',3);
  339.          This_NPC.InputDialog(This_Player,'                                               恭喜你获得了'+inttostr(ExpNum)+'经验!',1,100);exit;
  340. end;

  341. procedure _Drawluck;
  342. var i,c,ia,DrawRandNum:integer;
  343. begin
  344.      This_Player.SetS(88,15,0);
  345.      if GetG(85,35) = 1 then
  346.          begin
  347.          This_NPC.InputDialog(This_Player,'                                                   抽奖功能已被关闭!',1,100);exit;
  348.          end;

  349.      case GetG(85,31) of
  350. 0 : begin
  351.           if This_Player.YBNum < GetG(85,32) then
  352.                   begin
  353.               This_NPC.InputDialog(This_Player,'                                        你的元宝不足无法抽取!',1,100);exit;
  354.               end;
  355.          end;
  356. 1 : begin
  357.           if This_Player.MyLFnum < GetG(85,32) then
  358.               begin
  359.               This_NPC.InputDialog(This_Player,'                                        你的灵符不足无法抽取!',1,100);exit;
  360.               end;
  361.          end;
  362. 2 : begin
  363.           if This_Player.MyDiamondnum < GetG(85,32) then
  364.                   begin
  365.               This_NPC.InputDialog(This_Player,'                                        你的金刚石不足无法抽取!',1,100);exit;
  366.               end;
  367.             end;
  368.      end;
  369.      
  370.          if GetG(85,36) < 1 then
  371.          begin
  372.          This_NPC.InputDialog(This_Player,'                                      服务器当前抽奖次数已到达限制!',1,100);exit;
  373.          end;
  374.          
  375.          if This_Player.GetS(85,38) < 1 then
  376.          begin
  377.          This_NPC.InputDialog(This_Player,'                                        你今天已无法再抽取!',1,100);exit;
  378.          end;
  379.          
  380.          case GetG(85,33) of
  381. 0 : begin DrawRandNum:=random(10)+10; end;
  382. 1 : begin DrawRandNum:=random(4)+8; end;
  383. 2 : begin DrawRandNum:=random(8)+9; end;
  384.          end;
  385.          for i := 1 to DrawRandNum do
  386.               begin
  387.                   for ia:=1 to 8 do
  388.                   begin
  389.                   Eqcolor[ia] := 250;
  390.                   end;
  391.                       c:=random(15)+241;
  392.                       if This_Player.GetS(88,15) = 8 then
  393.                       begin
  394.                   This_Player.SetS(88,15,1);
  395.                   Eqcolor[This_Player.GetS(88,15)]:=249;
  396.          This_Npc.NpcDialog(This_Player,
  397.      ' <┏━━━━┳━━━━┳━━━━┓/fcolor='+inttostr(c)+'>|'+
  398.      ' <┃/fcolor='+inttostr(c)+'><'+EquipType[1]+'/fcolor='+inttostr(Eqcolor[1])+'>^<   ┃/fcolor='+inttostr(c)+'><'+EquipType[2]+'/fcolor='+inttostr(Eqcolor[2])+'>^< ┃/fcolor='+inttostr(c)+'><'+EquipType[3]+'/fcolor='+inttostr(Eqcolor[3])+'>^<┃/fcolor='+inttostr(c)+'>|'+
  399.      ' <┣━━━━╋━━━━╋━━━━┫/fcolor='+inttostr(c)+'>|'+
  400.      ' <┃/fcolor='+inttostr(c)+'><'+EquipType[8]+'/fcolor='+inttostr(Eqcolor[8])+'>^<   ┃/fcolor='+inttostr(c)+'>^< ┃/fcolor='+inttostr(c)+'><'+EquipType[4]+'/fcolor='+inttostr(Eqcolor[4])+'>^< ┃/fcolor='+inttostr(c)+'>|'+
  401.      ' <┣━━━━╋━━━━╋━━━━┫/fcolor='+inttostr(c)+'>|'+
  402.      ' <┃/fcolor='+inttostr(c)+'><'+EquipType[7]+'/fcolor='+inttostr(Eqcolor[7])+'>^<   ┃/fcolor='+inttostr(c)+'><'+EquipType[6]+'/fcolor='+inttostr(Eqcolor[6])+'>^< ┃/fcolor='+inttostr(c)+'><'+EquipType[5]+'/fcolor='+inttostr(Eqcolor[5])+'>^<┃/fcolor='+inttostr(c)+'>|'+
  403.      ' <┗━━━━┻━━━━┻━━━━┛/fcolor='+inttostr(c)+'>|');
  404.          end
  405.              else
  406.                   begin
  407.                   This_Player.SetS(88,15,This_Player.GetS(88,15)+1);
  408.                   Eqcolor[This_Player.GetS(88,15)]:=249;
  409.          This_Npc.NpcDialog(This_Player,
  410.      ' <┏━━━━┳━━━━┳━━━━┓/fcolor='+inttostr(c)+'>|'+
  411.      ' <┃/fcolor='+inttostr(c)+'><'+EquipType[1]+'/fcolor='+inttostr(Eqcolor[1])+'>^<   ┃/fcolor='+inttostr(c)+'><'+EquipType[2]+'/fcolor='+inttostr(Eqcolor[2])+'>^< ┃/fcolor='+inttostr(c)+'><'+EquipType[3]+'/fcolor='+inttostr(Eqcolor[3])+'>^<┃/fcolor='+inttostr(c)+'>|'+
  412.      ' <┣━━━━╋━━━━╋━━━━┫/fcolor='+inttostr(c)+'>|'+
  413.      ' <┃/fcolor='+inttostr(c)+'><'+EquipType[8]+'/fcolor='+inttostr(Eqcolor[8])+'>^<   ┃/fcolor='+inttostr(c)+'>^< ┃/fcolor='+inttostr(c)+'><'+EquipType[4]+'/fcolor='+inttostr(Eqcolor[4])+'>^< ┃/fcolor='+inttostr(c)+'>|'+
  414.      ' <┣━━━━╋━━━━╋━━━━┫/fcolor='+inttostr(c)+'>|'+
  415.      ' <┃/fcolor='+inttostr(c)+'><'+EquipType[7]+'/fcolor='+inttostr(Eqcolor[7])+'>^<   ┃/fcolor='+inttostr(c)+'><'+EquipType[6]+'/fcolor='+inttostr(Eqcolor[6])+'>^< ┃/fcolor='+inttostr(c)+'><'+EquipType[5]+'/fcolor='+inttostr(Eqcolor[5])+'>^<┃/fcolor='+inttostr(c)+'>|'+
  416.      ' <┗━━━━┻━━━━┻━━━━┛/fcolor='+inttostr(c)+'>|');
  417.              end;
  418.      end;
  419.          
  420.          case GetG(85,31) of
  421. 0 : begin This_Player.PsYBConsum(This_NPC,'DeBugYB',20051,GetG(85,32),1); end;
  422. 1 : begin This_Player.DecLF(0,GetG(85,32),false); end;
  423. 2 : begin This_Player.TakeDiamond(GetG(85,32),this_npc); end;
  424.      end;
  425.    
  426.          SetG(85,38,GetG(85,38)-1);
  427.          This_Player.SetS(85,38,This_Player.GetS(85,38)-1);
  428.      This_Npc.NpcDialog(This_Player,
  429.      ' ┏━━━━┳━━━━┳━━━━┓|'+
  430.      ' ┃<'+EquipType[1]+'/fcolor='+inttostr(Eqcolor[1])+'>^   ┃<'+EquipType[2]+'/fcolor='+inttostr(Eqcolor[2])+'>^ ┃<'+EquipType[3]+'/fcolor='+inttostr(Eqcolor[3])+'>^┃|'+
  431.      ' ┣━━━━╋━━━━╋━━━━┫|'+
  432.      ' ┃<'+EquipType[8]+'/fcolor='+inttostr(Eqcolor[8])+'>^   ┃<[抽★奖]/@Drawluck>^ ┃<'+EquipType[4]+'/fcolor='+inttostr(Eqcolor[4])+'>^┃|'+
  433.      ' ┣━━━━╋━━━━╋━━━━┫|'+
  434.      ' ┃<'+EquipType[7]+'/fcolor='+inttostr(Eqcolor[7])+'>^   ┃<'+EquipType[6]+'/fcolor='+inttostr(Eqcolor[6])+'>^ ┃<'+EquipType[5]+'/fcolor='+inttostr(Eqcolor[5])+'>^┃|'+
  435.      ' ┗━━━━┻━━━━┻━━━━┛|'+
  436.          '全区每天最多可抽取 <'+inttostr(GetG(85,38))+'> /<'+inttostr(GetG(85,36))+'/fcolor=251> 次|'+
  437.          '每人每天只能抽取 <'+inttostr(GetG(85,39))+'/fcolor=254> 次,每次需 <'+inttostr(GetG(85,32))+'/fcolor=254> '+ShowStr+'|'+
  438.          '你当前剩余次数:<'+inttostr(This_Player.GetS(85,38))+'/fcolor=70>^'+ShowStr+'数量:<'+inttostr(ShowNum)+'/fcolor=70>|');
  439.          This_Player.CallOut(This_Npc, 1, 'TrueGiveReward');
  440. end;

  441. procedure TrueGiveReward;
  442. var i,r,inum:integer;
  443. PrizeName:string;
  444. begin
  445.      i:=This_Player.GetS(88,15);
  446.          if DrawRandx >= random(100) then
  447.          begin
  448.                   r:=random(3)+1;
  449.               end else
  450.          begin
  451.               r:=4;
  452.          end;
  453.          
  454.          if i = 8 then
  455.          begin
  456.               r:=1;
  457.          if GetG(85,34) = 1 then SetG(85,33,2);
  458.          end;

  459.          inum:=LastStrIdx(GetItemsName(i,r));
  460.          inum:=random(inum)+1;
  461.          PrizeName:=printStr(GetItemsName(i,r),inum);
  462.          
  463.          if i = 4 then
  464.          begin
  465.          GiveExpPrize(PrizeName); exit;
  466.          end;
  467.          
  468.          This_Player.Give(PrizeName,1);
  469.          ServerSay('恭喜玩家【'+This_Player.Name+'】抽奖获得了'+PrizeName+'1个!',3);
  470.          This_NPC.InputDialog(This_Player,'                                               恭喜你获得了'+PrizeName+'1个!',1,100);exit;
  471. end;

  472. Begin
  473. ShowDialog;
  474. end.
复制代码







上一篇:传奇改变天气脚本完整版
下一篇:Call原始回收系统,循环回收脚本
回复

使用道具 举报

1

主题

252

回帖

1070

积分

旋风流星刀

积分
1070
QQ
发表于 2023-12-23 15:58:09 | 显示全部楼层
积分任务
回复

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-5-10 09:37 , Processed in 0.277711 second(s), 53 queries .

Powered by Discuz! X3.5

Copyright © 2001-2024, Tencent Cloud.

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