自己写的彩票压点数
2023-7-23


PROGRAM Mir2;
var 
i : Integer;
j : Integer;
xx,ll,jb,sji: Integer;

num1:integer;


Procedure _doexit;

begin
   This_Npc.CloseDialog(This_Player);
end;










procedure _AfterPlayDice();



 begin
	xx := This_Player.Getv(3, 10);
	ll:= This_Player.GetV(56, 11);
	jb:= This_Player.Getv(56,19);
	sji:= Random(100);
	
	if sji >= 60 then 
	begin
	if xx = ll then
	begin
		This_Player.Setv(3, 10,0);
      This_Npc.NpcDialog(This_Player,'你扔的骰子数是 ['+inttostr(xx)+ '] 点,恭喜你你买中了['+inttostr(ll)+ '],获得30倍赔率!'+'{cmd}<继续投注/@main>') ;
	   ServerSay('恭喜:'+This_Player.Name+'在100倍鸭店处赢得'+inttostr(jb *100)+'金币',7);
       This_Player.AddGold(jb *100);
	   This_Player.setV(56, 11,0);
	   This_Player.Setv(3, 18,0);
	   jb := 0;
	   end
	   else
	  
	   This_Player.Setv(3, 10,0);
	   This_Player.setv(56, 11,0);
	   This_Player.Setv(3, 18,0);
	   jb := 0;
	   This_NPC.NpcDialog(This_Player,' 你什么都没买中,在来一次?'+'{cmd}<继续?/@main>' +'{cmd}<返回/@main>') ;
	   
	   end else
	   	   This_Player.Setv(3, 10,0);
	   This_Player.setv(56, 11,0);
	   This_Player.Setv(3, 18,0);
	   jb := 0;
	   This_NPC.NpcDialog(This_Player,'你什么都没买中,在来一次?'+'{cmd}<继续?/@main>' +'{cmd}<返回/@main>') ;

end;




procedure DoPlayDice();


begin
	if This_Player.getv(56,11) > 0 then 
	begin
	This_Player.Setv(3, 10, (Random(12) + 1));
	xx := This_Player.Getv(3, 10);
	This_Player.Setv(3, 18,1);
	This_Npc.PlayDice (This_Player,2, '@AfterPlayDice');
	end else
    This_NPC.NpcDialog(This_Player,'请先押注'+'{cmd}<押注?/@main>' +'{cmd}<返回/@main>') ;
end;



procedure _DoPlayDice(); //扔骰子//注意这里需要下画线
begin
if This_Player.getv(3,18) = 1then
    begin
    This_Npc.NpcDialog(This_Player,'请不要重复投骰子!'
	) ;
    end else

	This_Player.CallOut(This_NPC, 1, 'DoPlayDice');//注意这里需要@
end;



procedure _mw12;

  begin
  if This_Player.GetV(56,11) > 0  then 
  begin   
	This_NPC.NpcDialog(This_Player,'你已经投过注了,只能买一种哦!'+'{cmd}<返回/@main>') ;

  end else 
	        This_NPC.InputDialog(This_Player,'请输入你要买的数额',0,22) ;
 end;

procedure p22;
begin 
    num1 :=  StrToIntDef(This_NPC.InputStr,-1);//输入非阿拉伯数字的字符都返回-1
   if This_NPC.InputOK  then  
        if  (num1 < 100) or  (num1 > 29999999) then 
       begin 
       This_NPC.NpcDialog(This_Player,'投注必须使用大于100小于29999999的阿拉伯数字!') ;
       end 
        else if (num1 >= 100) and (num1 < 30000000) then
         begin
           if  This_Player.GoldNum >= num1 then 
           begin
                This_Player.DecGold(num1);
                This_NPC.NpcDialog(This_Player,'你买了'+inttostr(num1)+'金币押注【12】!'+'|{cmd}<买定开奖/@DoPlayDice>'+'{cmd}<返回/@main>') ;
                This_Player.setv(56,19,num1);   //限定能投骰子的玩家,及只能在3个选项中同一时间选一个
                This_Player.setv(56,11,12); // 限定选择的下注的类型,改类型为选了豹子 
           end else
           This_NPC.NpcDialog(This_Player,'你没有足够的金币买'+inttostr(num1)+'点数!' +'{cmd}<返回/@main>') ;
         end;
    
end;




procedure _mw11;

 begin
  if This_Player.GetV(56,11) > 0  then 
  begin   
	This_NPC.NpcDialog(This_Player,'你已经投过注了,只能买一种哦!'+'{cmd}<返回/@main>') ;

  end else 
	        This_NPC.InputDialog(This_Player,'请输入你要买的数额',0,21) ;
 end;

procedure p21;
begin 
    num1 :=  StrToIntDef(This_NPC.InputStr,-1);//输入非阿拉伯数字的字符都返回-1
   if This_NPC.InputOK  then  
        if  (num1 < 100) or  (num1 > 29999999) then 
       begin 
       This_NPC.NpcDialog(This_Player,'投注必须使用大于100小于29999999的阿拉伯数字!') ;
       end 
        else if (num1 >= 100) and (num1 < 30000000) then
         begin
           if  This_Player.GoldNum >= num1 then 
           begin
                This_Player.DecGold(num1);
                This_NPC.NpcDialog(This_Player,'你买了'+inttostr(num1)+'金币押注【11】!'+'|{cmd}<买定开奖/@DoPlayDice>'+'{cmd}<返回/@main>') ;
                 This_Player.setv(56,19,num1);  //限定能投骰子的玩家,及只能在3个选项中同一时间选一个
                This_Player.setv(56,11,11); // 限定选择的下注的类型,改类型为选了豹子 
           end else
           This_NPC.NpcDialog(This_Player,'你没有足够的金币买'+inttostr(num1)+'点数!' +'{cmd}<返回/@main>') ;
         end;
    
end;


procedure _mw10;

 begin
  if This_Player.GetV(56,11) > 0  then 
  begin   
	This_NPC.NpcDialog(This_Player,'你已经投过注了,只能买一种哦!'+'{cmd}<返回/@main>') ;

  end else 
	        This_NPC.InputDialog(This_Player,'请输入你要买的数额',0,20) ;
 end;

procedure p20;
begin 
    num1 :=  StrToIntDef(This_NPC.InputStr,-1);//输入非阿拉伯数字的字符都返回-1
   if This_NPC.InputOK  then  
        if  (num1 < 100) or  (num1 > 29999999) then 
       begin 
       This_NPC.NpcDialog(This_Player,'投注必须使用大于100小于29999999的阿拉伯数字!') ;
       end 
        else if (num1 >= 100) and (num1 < 30000000) then
         begin
           if  This_Player.GoldNum >= num1 then 
           begin
                This_Player.DecGold(num1);
                This_NPC.NpcDialog(This_Player,'你买了'+inttostr(num1)+'金币押注【10】!'+'|{cmd}<买定开奖/@DoPlayDice>'+'{cmd}<返回/@main>') ;
                  This_Player.setv(56,19,num1); //限定能投骰子的玩家,及只能在3个选项中同一时间选一个
                This_Player.setv(56,11,10); // 限定选择的下注的类型,改类型为选了豹子 
           end else
           This_NPC.NpcDialog(This_Player,'你没有足够的金币买'+inttostr(num1)+'点数!' +'{cmd}<返回/@main>') ;
         end;
    
end;


procedure _mw9;

 begin
  if This_Player.GetV(56,11) > 0  then 
  begin   
	This_NPC.NpcDialog(This_Player,'你已经投过注了,只能买一种哦!'+'{cmd}<返回/@main>') ;

  end else 
	        This_NPC.InputDialog(This_Player,'请输入你要买的数额',0,19) ;
 end;

procedure p19;
begin 
    num1 :=  StrToIntDef(This_NPC.InputStr,-1);//输入非阿拉伯数字的字符都返回-1
   if This_NPC.InputOK  then  
        if  (num1 < 100) or  (num1 > 29999999) then 
       begin 
       This_NPC.NpcDialog(This_Player,'投注必须使用大于100小于29999999的阿拉伯数字!') ;
       end 
        else if (num1 >= 100) and (num1 < 30000000) then
         begin
           if  This_Player.GoldNum >= num1 then 
           begin
                This_Player.DecGold(num1);
                This_NPC.NpcDialog(This_Player,'你买了'+inttostr(num1)+'金币押注【9】!'+'|{cmd}<买定开奖/@DoPlayDice>'+'{cmd}<返回/@main>') ;
                  This_Player.setv(56,19,num1); //限定能投骰子的玩家,及只能在3个选项中同一时间选一个
                This_Player.setv(56,11,9); // 限定选择的下注的类型,改类型为选了豹子 
           end else
           This_NPC.NpcDialog(This_Player,'你没有足够的金币买'+inttostr(num1)+'点数!' +'{cmd}<返回/@main>') ;
         end;
    
end;




procedure _mw8;

 begin
  if This_Player.GetV(56,11) > 0  then 
  begin   
	This_NPC.NpcDialog(This_Player,'你已经投过注了,只能买一种哦!'+'{cmd}<返回/@main>') ;

  end else 
	        This_NPC.InputDialog(This_Player,'请输入你要买的数额',0,18) ;
 end;

procedure p18;
begin 
    num1 :=  StrToIntDef(This_NPC.InputStr,-1);//输入非阿拉伯数字的字符都返回-1
   if This_NPC.InputOK  then  
        if  (num1 < 100) or  (num1 > 29999999) then 
       begin 
       This_NPC.NpcDialog(This_Player,'投注必须使用大于100小于29999999的阿拉伯数字!') ;
       end 
        else if (num1 >= 100) and (num1 < 30000000) then
         begin
           if  This_Player.GoldNum >= num1 then 
           begin
                This_Player.DecGold(num1);
               This_NPC.NpcDialog(This_Player,'你买了'+inttostr(num1)+'金币押注【8】!'+'|{cmd}<买定开奖/@DoPlayDice>'+'{cmd}<返回/@main>') ;
                 This_Player.setv(56,19,num1);  //限定能投骰子的玩家,及只能在3个选项中同一时间选一个
                This_Player.setv(56,11,8); // 限定选择的下注的类型,改类型为选了豹子 
           end else
           This_NPC.NpcDialog(This_Player,'你没有足够的金币买'+inttostr(num1)+'点数!' +'{cmd}<返回/@main>') ;
         end;
    
end;





procedure _mw7;

 begin
  if This_Player.GetV(56,11) > 0 then 
  begin   
	This_NPC.NpcDialog(This_Player,'你已经投过注了,只能买一种哦!'+'{cmd}<返回/@main>') ;

  end else 
	        This_NPC.InputDialog(This_Player,'请输入你要买的数额',0,17) ;
 end;

procedure p17;
begin 
    num1 :=  StrToIntDef(This_NPC.InputStr,-1);//输入非阿拉伯数字的字符都返回-1
   if This_NPC.InputOK  then  
        if  (num1 < 100) or  (num1 > 29999999) then 
       begin 
       This_NPC.NpcDialog(This_Player,'投注必须使用大于100小于29999999的阿拉伯数字!') ;
       end 
        else if (num1 >= 100) and (num1 < 30000000) then
         begin
           if  This_Player.GoldNum >= num1 then 
           begin
                This_Player.DecGold(num1);
                This_NPC.NpcDialog(This_Player,'你买了'+inttostr(num1)+'金币押注【7】!'+'|{cmd}<买定开奖/@DoPlayDice>'+'{cmd}<返回/@main>') ;
                This_Player.setv(56,19,num1);   //限定能投骰子的玩家,及只能在3个选项中同一时间选一个
                This_Player.setv(56,11,7); // 限定选择的下注的类型,改类型为选了豹子 
           end else
           This_NPC.NpcDialog(This_Player,'你没有足够的金币买'+inttostr(num1)+'点数!' +'{cmd}<返回/@main>') ;
         end;
    
end;



procedure _mw6;

 begin
  if This_Player.GetV(56,11) > 0 then 
  begin   
	This_NPC.NpcDialog(This_Player,'你已经投过注了,只能买一种哦!'+'{cmd}<返回/@main>') ;

  end else 
	        This_NPC.InputDialog(This_Player,'请输入你要买的数额',0,16) ;
 end;

procedure p16;
begin 
    num1 :=  StrToIntDef(This_NPC.InputStr,-1);//输入非阿拉伯数字的字符都返回-1
   if This_NPC.InputOK  then  
        if  (num1 < 100) or  (num1 > 29999999) then 
       begin 
       This_NPC.NpcDialog(This_Player,'投注必须使用大于100小于29999999的阿拉伯数字!') ;
       end 
        else if (num1 >= 100) and (num1 < 30000000) then
         begin
           if  This_Player.GoldNum >= num1 then 
           begin
                This_Player.DecGold(num1);
                This_NPC.NpcDialog(This_Player,'你买了'+inttostr(num1)+'金币押注【6】!'+'|{cmd}<买定开奖/@DoPlayDice>'+'{cmd}<返回/@main>') ;
                 This_Player.setv(56,19,num1);  //限定能投骰子的玩家,及只能在3个选项中同一时间选一个
                This_Player.setv(56,11,6); // 限定选择的下注的类型,改类型为选了豹子 
           end else
           This_NPC.NpcDialog(This_Player,'你没有足够的金币买'+inttostr(num1)+'点数!' +'{cmd}<返回/@main>') ;
         end;
    
end;


procedure _mw5;

 begin
  if This_Player.GetV(56,11) > 0  then 
  begin   
	This_NPC.NpcDialog(This_Player,'你已经投过注了,只能买一种哦!'+'{cmd}<返回/@main>') ;

  end else 
	        This_NPC.InputDialog(This_Player,'请输入你要买的数额',0,15) ;
 end;

procedure p15;
begin 
    num1 :=  StrToIntDef(This_NPC.InputStr,-1);//输入非阿拉伯数字的字符都返回-1
   if This_NPC.InputOK  then  
        if  (num1 < 100) or  (num1 > 29999999) then 
       begin 
       This_NPC.NpcDialog(This_Player,'投注必须使用大于100小于29999999的阿拉伯数字!') ;
       end 
        else if (num1 >= 100) and (num1 < 30000000) then
         begin
           if  This_Player.GoldNum >= num1 then 
           begin
                This_Player.DecGold(num1);
                This_NPC.NpcDialog(This_Player,'你买了'+inttostr(num1)+'金币押注【5】!'+'|{cmd}<买定开奖/@DoPlayDice>'+'{cmd}<返回/@main>') ;
                This_Player.setv(56,19,num1);   //限定能投骰子的玩家,及只能在3个选项中同一时间选一个
                This_Player.setv(56,11,5); // 限定选择的下注的类型,改类型为选了豹子 
           end else
           This_NPC.NpcDialog(This_Player,'你没有足够的金币买'+inttostr(num1)+'点数!' +'{cmd}<返回/@main>') ;
         end;
    
end;




procedure _mw4;

 begin
  if This_Player.GetV(56,11) > 0  then 
  begin   
	This_NPC.NpcDialog(This_Player,'你已经投过注了,只能买一种哦!'+'{cmd}<返回/@main>') ;

  end else 
	        This_NPC.InputDialog(This_Player,'请输入你要买的数额',0,14) ;
 end;

procedure p14;
begin 
    num1 :=  StrToIntDef(This_NPC.InputStr,-1);//输入非阿拉伯数字的字符都返回-1
   if This_NPC.InputOK  then  
        if  (num1 < 100) or  (num1 > 29999999) then 
       begin 
       This_NPC.NpcDialog(This_Player,'投注必须使用大于100小于29999999的阿拉伯数字!') ;
       end 
        else if (num1 >= 100) and (num1 < 30000000) then
         begin
           if  This_Player.GoldNum >= num1 then 
           begin
                This_Player.DecGold(num1);
                  This_NPC.NpcDialog(This_Player,'你买了'+inttostr(num1)+'金币押注【4】!'+'|{cmd}<买定开奖/@DoPlayDice>'+'{cmd}<返回/@main>') ;
                  This_Player.setv(56,19,num1); //限定能投骰子的玩家,及只能在3个选项中同一时间选一个
                This_Player.setv(56,11,4); // 限定选择的下注的类型,改类型为选了豹子 
           end else
           This_NPC.NpcDialog(This_Player,'你没有足够的金币买'+inttostr(num1)+'点数!' +'{cmd}<返回/@main>') ;
         end;
    
end;



procedure _mw3;

 begin
  if This_Player.GetV(56,11) > 0  then 
  begin   
	This_NPC.NpcDialog(This_Player,'你已经投过注了,只能买一种哦!'+'{cmd}<返回/@main>') ;

  end else 
	        This_NPC.InputDialog(This_Player,'请输入你要买的数额',0,13) ;
 end;

procedure p13;
begin 
    num1 :=  StrToIntDef(This_NPC.InputStr,-1);//输入非阿拉伯数字的字符都返回-1
   if This_NPC.InputOK  then  
        if  (num1 < 100) or  (num1 > 29999999) then 
       begin 
       This_NPC.NpcDialog(This_Player,'投注必须使用大于100小于29999999的阿拉伯数字!') ;
       end 
        else if (num1 >= 100) and (num1 < 30000000) then
         begin
           if  This_Player.GoldNum >= num1 then 
           begin
                This_Player.DecGold(num1);
                 This_NPC.NpcDialog(This_Player,'你买了'+inttostr(num1)+'金币押注【3】!'+'|{cmd}<买定开奖/@DoPlayDice>'+'{cmd}<返回/@main>') ;
                  This_Player.setv(56,19,num1); //限定能投骰子的玩家,及只能在3个选项中同一时间选一个
                This_Player.setv(56,11,3); // 限定选择的下注的类型,改类型为选了豹子 
           end else
           This_NPC.NpcDialog(This_Player,'你没有足够的金币买'+inttostr(num1)+'点数!' +'{cmd}<返回/@main>') ;
         end;
    
end;


procedure _mw2;

 begin
  if This_Player.GetV(56,11) > 0 then 
  begin   
	This_NPC.NpcDialog(This_Player,'你已经投过注了,只能买一种哦!'+'{cmd}<返回/@main>') ;

  end else 
	        This_NPC.InputDialog(This_Player,'请输入你要买的数额',0,12) ;
 end;

procedure p12;
begin 
    num1 :=  StrToIntDef(This_NPC.InputStr,-1);//输入非阿拉伯数字的字符都返回-1
   if This_NPC.InputOK  then  
        if  (num1 < 100) or  (num1 > 29999999) then 
       begin 
       This_NPC.NpcDialog(This_Player,'投注必须使用大于100小于29999999的阿拉伯数字!') ;
       end 
        else if (num1 >= 100) and (num1 < 30000000) then
         begin
           if  This_Player.GoldNum >= num1 then 
           begin
                This_Player.DecGold(num1);
                This_NPC.NpcDialog(This_Player,'你买了'+inttostr(num1)+'金币押注【2】!'+'|{cmd}<买定开奖/@DoPlayDice>'+'{cmd}<返回/@main>') ;                   //限定能投骰子的玩家,及只能在3个选项中同一时间选一个
                This_Player.setv(56,11,2); // 限定选择的下注的类型,改类型为选了豹子 
				This_Player.setv(56,19,num1);
           end else
           This_NPC.NpcDialog(This_Player,'你没有足够的金币买'+inttostr(num1)+'点数!' +'{cmd}<返回/@main>') ;
         end;
    
end;






procedure _mw1;

 begin
  if This_Player.GetV(56,11) > 0  then 
  begin   
	This_NPC.NpcDialog(This_Player,'你已经投过注了,只能买一种哦!'+'{cmd}<返回/@main>') ;

  end else 
	        This_NPC.InputDialog(This_Player,'请输入你要买的数额',0,11) ;
 end;

procedure p11;
begin 
    num1 :=  StrToIntDef(This_NPC.InputStr,-1);//输入非阿拉伯数字的字符都返回-1
   if This_NPC.InputOK  then  
        if  (num1 < 100) or  (num1 > 29999999) then 
       begin 
       This_NPC.NpcDialog(This_Player,'投注必须使用大于100小于29999999的阿拉伯数字!') ;
       end 
        else if (num1 >= 100) and (num1 < 30000000) then
         begin
           if  This_Player.GoldNum >= num1 then 
           begin
                This_Player.DecGold(num1);
                This_NPC.NpcDialog(This_Player,'你买了'+inttostr(num1)+'金币押注【1】!'+'|{cmd}<买定开奖/@DoPlayDice>'+'{cmd}<返回/@main>') ;
                   //限定能投骰子的玩家,及只能在3个选项中同一时间选一个
                This_Player.setv(56,11,1); // 限定选择的下注的类型,改类型为选了豹子 
				This_Player.setv(56,19,num1);
				
           end else
           This_NPC.NpcDialog(This_Player,'你没有足够的金币买'+inttostr(num1)+'点数!' +'{cmd}<返回/@main>') ;
         end;
    
end;



procedure _444;

begin
This_Player.Setv(3, 18,0);
end;

	


procedure _333;

begin
This_Player.setv(56,11,0);
end;

procedure domain;

begin

	i := This_Player.Getv(3, 10);
	j := This_Player.Getv(3, 11);
	xx := i + j;
    This_NPC.NpcDialog(This_Player,
     +'|当前为100倍长,压中点数返还100倍奖励\' 
     +'|{cmd}<买一/@mw1><买二/@mw2><买三/@mw3>\'
	 +'|{cmd}<买四/@mw4><买五/@mw5><买六/@mw6>\'
	 +'|{cmd}<买七/@mw7><买八/@mw8><买九/@mw9>\'
	 +'|{cmd}<买十/@mw10><买十一/@mw11><买十二/@mw12>\'
	 +'|{cmd}<清除下注/@333>^<买定开奖/@DoPlayDice>^<不能摇点一下/@444>\'
      );
	
end;




Begin

  domain;
end.
最新回复 (0)
返回