Delphi & Pascal (česká wiki)
Přejít na: navigace, hledání
Procedure TestStopAutoStart;
Var I: Byte;
    textmsg: string;
Begin
  If ((AutoStart=True) and ((AutostartStiskly1=1) or (Key[30]=True))) then
  Begin
    While Key[30]=True do Begin End;
    If AutoStartTyp<3 then Inc(AutoStartTyp)
                      else AutoStartTyp:=1;
    If WinGamble.Enable=True then
    Begin
      textmsg:='autostart off';
      AutoStart:=False;
      AutoStartTyp:=3;
    End else
    Case AutoStartTyp of
     1: textmsg:='autostart b';
     2: textmsg:='autostart c';
     3: Begin textmsg:='autostart off'; AutoStart:=False; End;
    End; {Case End}
    KresliValce;
    Blok(109,141,210,149,ColorBlack,Buffer[3]);
    WriteText(Buffer[1],160,140,5,7,1,120,142,textmsg,Buffer[3]);
    WaitRetrace;
    FlipPage(Buffer[3],Buffer[4]);
    For I:=0 to 24 do Wait(DatRec.fpsProdleva);
  End;
End;
 
 
Procedure TestBetDown;
 
  Procedure DecSound;
  Var I: Byte;
  Begin
    For I:=0 to 9 do Wait(DatRec.fpsProdleva);
    MainGameScreen;
    If DatRec.SBEnable=True
    then Begin
           If DatRec.RawEnable=True then SBPlayRaw(7)
                                    else SBPlayRaw(30);
         End
    else Begin
          If DatRec.RawEnable=True then PlayRaw(7)
                                   else PlaySound(20);
         End;
    For I:=0 to 49 do Wait(DatRec.fpsProdleva);
  End;
 
Begin
  If Credit<Bet then
  Begin
    Bet:=2;
    BetMulti:=0;
    BetCounter:=0;
    Nasobic:=0;
    Lista[1].Enable:=False;
    Lista[0].Enable:=True;
    Lista[0].Sazka[0]:=True;
    Lista[0].Sazka[1]:=False;
    DecSound;
  End;
 
  If MultiWin<BetMulti then
  Begin
    If MultiWin>=95 then BetMulti:=95;
    If ((MultiWin>=85) and (MultiWin<95)) then Begin
                                                 BetMulti:=85;
                                                 Nasobic:=9;
                                                 BetCounter:=10;
                                                 DecSound;
                                               End;
    If ((MultiWin>=75) and (MultiWin<85)) then Begin
                                                 BetMulti:=75;
                                                 Nasobic:=8;
                                                 BetCounter:=9;
                                                 DecSound;
                                               End;
    If ((MultiWin>=65) and (MultiWin<75)) then Begin
                                                 BetMulti:=65;
                                                 Nasobic:=7;
                                                 BetCounter:=8;
                                                 DecSound;
                                               End;
    If ((MultiWin>=55) and (MultiWin<65)) then Begin
                                                 BetMulti:=55;
                                                 Nasobic:=6;
                                                 BetCounter:=7;
                                                 DecSound;
                                               End;
    If ((MultiWin>=45) and (MultiWin<55)) then Begin
                                                 BetMulti:=45;
                                                 Nasobic:=5;
                                                 BetCounter:=6;
                                                 DecSound;
                                               End;
    If ((MultiWin>=35) and (MultiWin<45)) then Begin
                                                 BetMulti:=35;
                                                 Nasobic:=4;
                                                 BetCounter:=5;
                                                 DecSound;
                                               End;
    If ((MultiWin>=25) and (MultiWin<35)) then Begin
                                                 BetMulti:=25;
                                                 Nasobic:=3;
                                                 BetCounter:=4;
                                                 DecSound;
                                               End;
    If ((MultiWin>=15) and (MultiWin<25)) then Begin
                                                 BetMulti:=15;
                                                 Nasobic:=2;
                                                 BetCounter:=3;
                                                 DecSound;
                                               End;
 
    If ((MultiWin>=5) and (MultiWin<15)) then  Begin
                                                 BetMulti:=5;
                                                 Nasobic:=1;
                                                 BetCounter:=2;
                                                 DecSound;
                                               End;
    If MultiWin<5 then Begin
                         BetMulti:=0;
                         Bet:=2;
                         Nasobic:=0;
                         BetCounter:=0;
                         Lista[1].Enable:=False;
                         Lista[0].Enable:=True;
                         Lista[0].Sazka[0]:=True;
                         Lista[0].Sazka[1]:=False;
                         DecSound;
                        End;
  End;
End;
 
 
Function TestRollEnable: Boolean;
Begin
  If ((Credit>=Bet) and (MultiWin>=BetMulti)) then TestRollEnable:=True
                                              else TestRollEnable:=False;
End;