Výherní automat DAYTONA GAMBLER pro dosbox který stáhnete z domovské stránky dosboxu

Delphi & Pascal (česká wiki)
Přejít na: navigace, hledání
Kategória: KMP (Klub mladých programátorov)
gambler.jpgAutor: Martin Koleček
Program: Daytona.pasDefault.pasHisther.pasJackpot.pasLoading.pasMain.pasMaingame.pasMisc.pasMys.pasOvladani.pas
Súbor exe: Gambler.zip
Potrebné: Plus1000.pasPlus500.pasProdat.pasRiskscr.pasRoll.pasRollpre.pasRollproc.pasRolsetup.pasRskdolni.pasRskhorni.pas
Príklady: Saveload.pasScore.pasScreen.pasServis.pasSetbet.pasTestwin.pasUpdate5.pasWaitbtn.pasWinblink.pasWrivalce.pasZisky.pas

Výherní automat podle skutečného stroje Daytona 750. Podporuje Sound Blaster.
Rychlost hry je konfigurovatelná. Experimentálně podporuje ovládání dotykovým displayem pro Androidy.

POZOR:
  • než se objeví hra tak se to načítá poměrně velmi velmi dlouho takže buďte trpěliví
  • pokud nevíte co přesně děláte tak servisní nastavení raději nechte bez povšimnutí
  • reset v servisním nastavení resetuje pouze počítadlo výher a vkladů, ne nastavení hry
  • pokud už jste stačili popřehazovat servisní nastavení a hra je špatně hratelná, tak vymažte soubor GAMBLER.DAT, hra se uvede do "továrního nastavení"

O dosboxu:
  • pokud nevíte a neumíte tak se zeptejte někoho kdo ví a umí nebo si najděte informace o dosboxu na internetu
  • hodnota cycles pro GAMBLERA na PC je tak 10000 až 20000
  • hodnota cycles na mobilních zařízeních (tam používejte legální dosbox turbo) je tak 7000
  • nedávejte cycles max nebo cycles auto, párkrát to zkuste a najděte si správnou přesnou hodnotu
  • hra by neměla kazit zvuk nebo cukat obraz, pokud je cycles nastaveno optimálně v‘e jede hladce
  • DAYTONA GAMBLER je podomácku vyrobený freeware takže ho bezestrachu ‘iřte a ukazujte druhým jak se to hraje
  • totéž dosbox pro PC je freeware, dosbox turbo je komerční ale stojí jen 60 korun tak nebuďte piráti


Nastavení výhernosti:
V servisní obrazovce klávesou TAB měníte switch a nahoru dolů manipupuje s výherností rozsahy jsou 0 až 65000 v‘echny switche a číslo na něm vyrábí poměr mezi dvěma stavy, obvykle to bývá jestli je výhra nebo není výhra a číslo teda dělí na poměr mezi těmito stavy, vždy "0 až číslo" je jedna část, třeba jestli se riskovani povede nebo nepovede a "číslo až 65000" je druhá část možného výsledku. Nakonec rozhodne náhodné číslo z rozsahu "0 až 65535" , ale záleží na poměru na switchi co je pravděpodobněj‘í interval.


SWITCHE:
  • 2kč výhry = šance na výhru ve dvoukorunové hře {RollSetup bet 2, čím menší tím míň výher}
  • 4kč výhry = šance na výhru ve čtyřkorunové hře {RollSetup bet 4, čím menší tím míň výher}
  • 5kč výhry = šance na výhru v pětikorunové hře {RollSetup bet 5, čím menší tím míň výher}
  • 2kč Joker A = pravděpodobnost výsměchu Jokera na dvoukorunové hře {TestWin bet 2J, čím menší tím víc výher}
  • 2kč Joker B = pravděpodobnost zdvojnásobení Jokerem na dvoukorunové hře {TestWin bet 2J, čím menší tím míň výher}
  • 4kč Joker A = pravděpodobnost výsměchu Jokera na čtyřkorunové hře {TestWin bet 4J, čím menší tím víc výher}
  • 4kč Joker B = pravděpodobnost zdvojnásobení Jokerem na čtyřkorunové hře {TestWin bet 4J, čím menší tím míň výher}
  • 5kč Joker = pravděpodobnost zdvojnásobení Jokerem na pětikorunové hře {TestWin bet 5J, čím menší tím míň výher} (na 5kč hře se joker neposmívá)
  • riskovani = šance na zdvojnásobení riskem strany mince při náhodném risku {Risking vyhernost čím menší tím míň výher} (neplatí při risku postřehem; nebo při risku autostartem tam je poměr 1:1)
Procedure MakeRiskScreen;
Begin
  {HLAVA OREL}
  Begin
    WriteSprite(252,82,100,116,131,131,Buffer[1],Buffer[4]); {RISK}
    If Hlava.Enable=True then WriteSprite(220,104,0,140,47,179,Buffer[1],Buffer[4])
                         else WriteSprite(220,104,0,100,47,139,Buffer[1],Buffer[4]);
    If Orel.Enable=True then WriteSprite(268,104,48,140,95,179,Buffer[1],Buffer[4])
                        else WriteSprite(268,104,48,100,95,139,Buffer[1],Buffer[4]);
  End;
 
  {Button HLAVA}
  If Btn[4].Phase=0 then Blok(239,185,278,199,ColorRedDark,Buffer[4])
                    else Blok(239,185,278,199,ColorYellow,Buffer[4]);
  Ramecek(239,185,278,199,ColorGreenDark,Buffer[4]);
  WriteText(Buffer[1],160,20,5,5,1,272,187,'h',Buffer[4]);
  WriteText(Buffer[1],160,20,5,5,1,241,193,'hlava',Buffer[4]);
 
  {Button OREL}
  If Btn[5].Phase=0 then Blok(280,185,319,199,ColorRedDark,Buffer[4])
                    else Blok(280,185,319,199,ColorYellow,Buffer[4]);
  Ramecek(280,185,319,199,ColorGreenDark,Buffer[4]);
  WriteText(Buffer[1],160,20,5,5,1,313,187,'o',Buffer[4]);
  WriteText(Buffer[1],160,20,5,5,1,282,193,'orel',Buffer[4]);
End;
 
 
Procedure RiskHorni;
Begin
    Key[35]:=False;  {HLAVA}
    Key[24]:=False;  {OREL}
    Repeat
       RiskScreen;
       If AutoStart=True then
       Begin
         Dec(RiskRandom2);
         If RiskRandom2=0 then
         Begin
           RiskAuto:=False;
           If RiskRandom1=0 then Begin {RiskRandom1=1}
                                   If RiskRandom4<6 then {1/2 chance}
                                   Begin {WIN}
                                     If Hlava.Enable=True then
                                     Begin
                                       Key[35]:=True;   {HLAVA AUTO TRUE}
                                       Key[24]:=False;  {OREL AUTO FALSE}
                                     End;
                                     If Orel.Enable=True then
                                     Begin
                                       Key[35]:=False;  {HLAVA AUTO FALSE}
                                       Key[24]:=True;   {OREL AUTO TRUE}
                                     End;
                                   End else
                                   Begin {LOSE}
                                     If Hlava.Enable=True then
                                     Begin
                                       Key[35]:=False;  {HLAVA AUTO FALSE}
                                       Key[24]:=True;   {OREL AUTO TRUE}
                                     End;
                                     If Orel.Enable=True then
                                     Begin
                                       Key[35]:=True;   {HLAVA AUTO TRUE}
                                       Key[24]:=False;  {OREL AUTO FALSE}
                                     End;
                                   End;
                                 End
                            else Begin {RiskRandom1=1}
                                   If RiskRandom4>=6 then {1/2 chance}
                                   Begin {WIN}
                                     If Hlava.Enable=True then
                                     Begin
                                       Key[35]:=True;   {HLAVA AUTO TRUE}
                                       Key[24]:=False;  {OREL AUTO FALSE}
                                     End;
                                     If Orel.Enable=True then
                                     Begin
                                       Key[35]:=False;  {HLAVA AUTO FALSE}
                                       Key[24]:=True;   {OREL AUTO TRUE}
                                     End;
                                   End else
                                   Begin {LOSE}
                                     If Hlava.Enable=True then
                                     Begin
                                       Key[35]:=False;  {HLAVA AUTO FALSE}
                                       Key[24]:=True;   {OREL AUTO TRUE}
                                     End;
                                     If Orel.Enable=True then
                                     Begin
                                       Key[35]:=True;   {HLAVA AUTO TRUE}
                                       Key[24]:=False;  {OREL AUTO FALSE}
                                     End;
                                   End;
                                 End;
         End;
       End;
       For N:=0 to DatRec.fpsProdleva+1 do
       Begin
{HLAVA}  If ((Key[35]=True) or (HlavaStiskly1=1)) then
         Begin
           If AutoStart=False then While Key[35]=True do Begin End;
           If AutoStart=False then While HlavaStiskly1=1 do Begin End;
           If Key[35]=True then Key[35]:=False;
           NextVyhra:=Vyhra.Castka*2;
           If NextVyhra<7777 then
           Begin
             If Hlava.Enable=True then Begin
                                         Vyhra.Castka:=Vyhra.Castka*2;
                                         If AutoStart=True then
                                         Begin
                                           Inc(RiskCounter);
                                         End;
                                         If DatRec.SBEnable=True
                                         then Begin
                                                If DatRec.RawEnable=True then SBPlayRaw(1)
                                                                         else SBPlayRaw(26);
                                              End
                                         else Begin
                                                If DatRec.RawEnable=True then PlayRaw(1)
                                                                         else PlaySound(16);
                                              End;
                                         For I:=0 to 49 do Wait(DatRec.fpsProdleva);
                                       End
                                  else Begin
                                         Vyhra.Castka:=0;
                                         If AutoStart=True then
                                         Begin
                                           RiskCounter:=2;
                                         End;
                                         If DatRec.SBEnable=True
                                         then Begin
                                                If DatRec.RawEnable=True then SBPlayRaw(9)
                                                                         else SBPlayRaw(31);
                                              End
                                         else Begin
                                                If DatRec.RawEnable=True then PlayRaw(9)
                                                                         else PlaySound(21);
                                              End;
                                         For I:=0 to 49 do Wait(DatRec.fpsProdleva);
                                       End;
             Randomize;
             RiskRandom3:=Random(2);
             If RiskRandom3=0 then Risk.Phase:=0
                              else Risk.Phase:=1;
           End else
           Begin
             If Hlava.Enable=True then Begin
                                         If AutoStart=True then
                                         Begin
                                           NextVyhra:=7777;
                                           Vyhra.Castka:=7777;
                                           RiskCounter:=2;
                                         End else
                                         Begin
                                           NextVyhra:=7777;
                                           Vyhra.Castka:=7777;
                                         End;
                                         If DatRec.SBEnable=True
                                         then Begin
                                                If DatRec.RawEnable=True then SBPlayRaw(1)
                                                                         else SBPlayRaw(26);
                                              End
                                         else Begin
                                                If DatRec.RawEnable=True then PlayRaw(1)
                                                                         else PlaySound(16);
                                              End;
                                         For I:=0 to 49 do Wait(DatRec.fpsProdleva);
                                       End
                                  else Begin
                                         Vyhra.Castka:=0;
                                         If AutoStart=True then
                                         Begin
                                           RiskCounter:=2;
                                         End;
                                         If DatRec.SBEnable=True
                                         then Begin
                                                If DatRec.RawEnable=True then SBPlayRaw(9)
                                                                         else SBPlayRaw(31);
                                              End
                                         else Begin
                                                If DatRec.RawEnable=True then PlayRaw(9)
                                                                         else PlaySound(21);
                                              End;
                                         For I:=0 to 49 do Wait(DatRec.fpsProdleva);
                                       End;
           End;
         End;
 
{OREL}   If ((Key[24]=True) or (OrelStiskly1=1)) then
         Begin
           If AutoStart=False then While Key[24]=True do Begin End;
           If AutoStart=False then While OrelStiskly1=1 do Begin End;
           If Key[24]=True then Key[24]:=False;
           NextVyhra:=Vyhra.Castka*2;
           If NextVyhra<7777 then
           Begin
             If Orel.Enable=True then Begin
                                        Vyhra.Castka:=Vyhra.Castka*2;
                                        If AutoStart=True then
                                        Begin
                                          Inc(RiskCounter);
                                        End;
                                        If DatRec.SBEnable=True
                                        then Begin
                                               If DatRec.RawEnable=True then SBPlayRaw(1)
                                                                        else SBPlayRaw(26);
                                             End
                                        else Begin
                                               If DatRec.RawEnable=True then PlayRaw(1)
                                                                        else PlaySound(16);
                                             End;
                                        For I:=0 to 49 do Wait(DatRec.fpsProdleva);
                                      End
                                 else Begin
                                        Vyhra.Castka:=0;
                                        If AutoStart=True then
                                        Begin
                                          RiskCounter:=2;
                                        End;
                                        If DatRec.SBEnable=True
                                        then Begin
                                               If DatRec.RawEnable=True then SBPlayRaw(9)
                                                                        else SBPlayRaw(31);
                                             End
                                        else Begin
                                               If DatRec.RawEnable=True then PlayRaw(9)
                                                                        else PlaySound(21);
                                             End;
                                        For I:=0 to 49 do Wait(DatRec.fpsProdleva);
                                      End;
             Randomize;
             RiskRandom3:=Random(2);
             If RiskRandom3=0 then Risk.Phase:=0
                              else Risk.Phase:=1;
           End else
           Begin
             If Orel.Enable=True then Begin
                                        NextVyhra:=7777;
                                        Vyhra.Castka:=7777;
                                        If AutoStart=True then
                                        Begin
                                          NextVyhra:=7777;
                                          Vyhra.Castka:=7777;
                                          RiskCounter:=2;
                                        End else
                                        Begin
                                          NextVyhra:=7777;
                                          Vyhra.Castka:=7777;
                                        End;
                                        If DatRec.SBEnable=True
                                        then Begin
                                               If DatRec.RawEnable=True then SBPlayRaw(1)
                                                                        else SBPlayRaw(26);
                                             End
                                        else Begin
                                               If DatRec.RawEnable=True then PlayRaw(1)
                                                                        else PlaySound(16);
                                             End;
                                        For I:=0 to 49 do Wait(DatRec.fpsProdleva);
                                      End
                                 else Begin
                                        Vyhra.Castka:=0;
                                        If AutoStart=True then
                                        Begin
                                          RiskCounter:=2;
                                        End;
                                        If DatRec.SBEnable=True
                                        then Begin
                                               If DatRec.RawEnable=True then SBPlayRaw(9)
                                                                        else SBPlayRaw(31);
                                             End
                                        else Begin
                                               If DatRec.RawEnable=True then PlayRaw(9)
                                                                        else PlaySound(21);
                                             End;
                                        For I:=0 to 49 do Wait(DatRec.fpsProdleva);
                                      End;
           End;
         End;
 
{MULTI}  If (((Key[50]=True) or (Key[57]=True) or (DoMultiwinuStiskly1=1)) and (AutoStart=False)) then
         Begin
           While Key[50]=True do Begin End;
           While Key[57]=True do Begin End;
           While DoMultiwinuStiskly1=1 do Begin End;
           Risk.Enable:=False;
           Risk.Blinking:=False;
           For I:=0 to 8 do Btn[I].Blinking:=False;
           For I:=0 to 8 do Btn[I].Phase:=0;
           RiskAuto:=False;
         End;
 
{AUTO}   If ((RiskRandom2=0) and (RiskAuto=False) and (AutoStart=True)) then
         Begin
           Risk.Enable:=False;
           Risk.Blinking:=False;
           For I:=0 to 8 do Btn[I].Blinking:=False;
           For I:=0 to 8 do Btn[I].Phase:=0;
           RiskScreen;
         End;
         TestStopAutoStart;
         Wait(1);
       End;
    Until ((Vyhra.Castka=0) or (NextVyhra=7777) or (RiskAuto=False));
    Key[35]:=False;  {HLAVA}
    Key[24]:=False;  {OREL}
End;
 
 
Procedure RiskHorniNahodny;
Var losovani: Word;
Begin
  Repeat
     RiskScreen;
     For N:=0 to DatRec.fpsProdleva+1 do
     Begin
       If ((Key[35]=True) or (HlavaStiskly1=1) or
           (Key[24]=True) or (OrelStiskly1=1)) then
       Begin
         losovani:=Random(66);
         losovani:=losovani*1000;
         If losovani<DatRec.Nahoda[8] then {chance na vyhru 32000}
         Begin {pokazde vyhra}
           If ((Key[35]=True) or (HlavaStiskly1=1)) then
           Begin
             While Key[35]=True do Begin End;
             While HlavaStiskly1=1 do Begin End;
             Hlava.Enable:=True;
             Orel.Enable:=False;
             Btn[4].Phase:=1;
             Btn[5].Phase:=0;
             MakeRiskScreen;
           End;
           If ((Key[24]=True) or (OrelStiskly1=1)) then
           Begin
             While Key[24]=True do Begin End;
             While HlavaStiskly1=1 do Begin End;
             Hlava.Enable:=False;
             Orel.Enable:=True;
             Btn[4].Phase:=0;
             Btn[5].Phase:=1;
             MakeRiskScreen;
           End;
           NextVyhra:=Vyhra.Castka*2;
           If NextVyhra<7777 then
           Begin
             Vyhra.Castka:=Vyhra.Castka*2;
             If DatRec.SBEnable=True
             then Begin
                    If DatRec.RawEnable=True then SBPlayRaw(1)
                                             else SBPlayRaw(26);
                  End
             else Begin
                    If DatRec.RawEnable=True then PlayRaw(1)
                                             else PlaySound(16);
                  End;
             For I:=0 to 49 do Wait(DatRec.fpsProdleva);
           End else
           Begin
             NextVyhra:=7777;
             Vyhra.Castka:=7777;
             If DatRec.SBEnable=True
             then Begin
                    If DatRec.RawEnable=True then SBPlayRaw(1)
                                             else SBPlayRaw(26);
                  End
             else Begin
                    If DatRec.RawEnable=True then PlayRaw(1)
                                             else PlaySound(16);
                  End;
             For I:=0 to 49 do Wait(DatRec.fpsProdleva);
           End;
         End else
         Begin {pokazde prohra}
           If ((Key[35]=True) or (HlavaStiskly1=1)) then
           Begin
             While Key[35]=True do Begin End;
             While HlavaStiskly1=1 do Begin End;
             Hlava.Enable:=False;
             Orel.Enable:=True;
             Btn[4].Phase:=0;
             Btn[5].Phase:=1;
             MakeRiskScreen;
           End;
           If ((Key[24]=True) or (OrelStiskly1=1)) then
           Begin
             While Key[24]=True do Begin End;
             While HlavaStiskly1=1 do Begin End;
             Hlava.Enable:=True;
             Orel.Enable:=False;
             Btn[4].Phase:=1;
             Btn[5].Phase:=0;
             MakeRiskScreen;
           End;
           Vyhra.Castka:=0;
           If DatRec.SBEnable=True
           then Begin
                  If DatRec.RawEnable=True then SBPlayRaw(9)
                                           else SBPlayRaw(31);
                End
           else Begin
                  If DatRec.RawEnable=True then PlayRaw(9)
                                           else PlaySound(21);
                End;
           For I:=0 to 49 do Wait(DatRec.fpsProdleva);
         End;
       End;
{MULTI}  If (((Key[50]=True) or (Key[57]=True) or (DoMultiwinuStiskly1=1)) and (AutoStart=False)) then
         Begin
           While Key[50]=True do Begin End;
           While Key[57]=True do Begin End;
           While DoMultiwinuStiskly1=1 do Begin End;
           Risk.Enable:=False;
           Risk.Blinking:=False;
           For I:=0 to 8 do Btn[I].Blinking:=False;
           For I:=0 to 8 do Btn[I].Phase:=0;
           AddScore(Vyhra.Castka);
         End;
     End;
  Until ((Vyhra.Castka=0) or (NextVyhra=7777));
End;