Delphi & Pascal (česká wiki)
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;