[SCAR]How to use SCAR

Discussion in 'Computers and Technology' started by tharoux, Dec 14, 2008.

  1. tharoux

    tharoux Level IV

    Joined:
    Dec 30, 2006
    Messages:
    2,733
    Likes Received:
    126
    Location:
    In front of my PC, Montreal
    So, after many, many, many, many, did I say many request:
    here's the how-to video that will save my brain from melting everytime someone search the crosshair :lol:

    Yeah, you heard it right:
    How to use scar to play a game for you !
    Here's the video. Click on "watch in high quality" below the video to be able to read the text there.

    http://www.youtube.com/watch?v=1_vQUrbgFU0

    Enjoy !
     
    candcain and Cacklenub like this.
  2. CoS

    CoS Level IV

    Joined:
    Jun 16, 2008
    Messages:
    1,090
    Likes Received:
    35
    Re: [SCAR]How to user SCAR

    sounds like somebody has finally done the right thing :)
    will watch l8r :)
     
  3. Dusk412

    Dusk412 Level I

    Joined:
    Aug 2, 2008
    Messages:
    88
    Likes Received:
    9
    Re: [SCAR]How to user SCAR

    Tharoux one of my good friends on SRL Forums developed a game using SCAR. If you want I can dig it up and put it on here. Do you want me to go ask him first though, I am not sure if he is still active and he freely released it on the Forums. Not sure, anyways its really fun, pretty basic, and yeah so let me know :p.

    PS. I helped make it yayyyy!

    EDIT: Wait is this topic (I haven't watched the vid) for playing a game solely on SCAR or using SCAR to automate a game lol...
     
  4. tharoux

    tharoux Level IV

    Joined:
    Dec 30, 2006
    Messages:
    2,733
    Likes Received:
    126
    Location:
    In front of my PC, Montreal
    Re: [SCAR]How to user SCAR

    This guide was for using SCAR to play flash game, but feel free to post the game...
    I like seeing nice coding ;)
     
  5. Dusk412

    Dusk412 Level I

    Joined:
    Aug 2, 2008
    Messages:
    88
    Likes Received:
    9
    Re: [SCAR]How to user SCAR

    *** All credit goes to munk from SRL Forums :).

    I watched this game develop from pretty much start to finish and it is pretty interesting and a good example of how to make a game and canvases and such. Enjoy!

    This is the old one but it is bug free pretty much.

    Code (Text):
    1. {
    2.  8b    d8 88   88 88""Yb 8888b.  888888 88""Yb  dP"Yb  88   88 .dP"Y8
    3.  88b  d88 88   88 88__dP  8I  Yb 88__   88__dP dP   Yb 88   88 `Ybo."
    4.  88YbdP88 Y8   8P 88"Yb   8I  dY 88""   88"Yb  Yb   dP Y8   8P o.`Y8b
    5.  88 YY 88 `YbodP' 88  Yb 8888Y"  888888 88  Yb  YbodP  `YbodP' 8bodP'
    6.  
    7.             88""Yb    db    88""Yb 88 88b 88  dP""b8
    8.             88__dP   dPYb   88__dP 88 88Yb88 dP   `"
    9.             88"Yb   dP__Yb  88"""  88 88 Y88 Yb  "88
    10.             88  Yb dP""""Yb 88     88 88  Y8  YboodP
    11.  
    12.         8888P  dP"Yb  8b    d8 88""Yb 88 888888 .dP"Y8 d8b
    13.           dP  dP   Yb 88b  d88 88__dP 88 88__   `Ybo." Y8P
    14.          dP   Yb   dP 88YbdP88 88""Yb 88 88""   o.`Y8b `"'
    15.         d8888  YbodP  88 YY 88 88oodP 88 888888 8bodP' (8)
    16.        
    17.               these ain't no ordinary zombies...
    18.  
    19.  
    20.  
    21.  
    22.  - Arrow Keys to Move
    23.  - Space Bar to Shoot
    24.                                                 ...good luck
    25. }
    26. program game;
    27. var
    28.   f,shootTime,rise,run,rr,
    29.   hp,score,speed,amount:integer;
    30.   p,lp:Tpoint;
    31.   shoot:boolean;
    32.  
    33. type npcInfo = record
    34.   bmps: array of integer;
    35.   area: Tbox;
    36.   text: string;
    37.   attack: boolean;
    38.   deadTime: integer;
    39.   hits: integer;
    40.   x: integer;
    41.   y: integer;
    42. end;
    43.  
    44. var
    45.   npc:Array of npcInfo;
    46.  
    47. procedure setupNPC(which,nText:string;nArea:Tbox;nAttack:boolean);
    48. var
    49.   i,ii:integer;
    50.   good:boolean;
    51. begin
    52.   setArrayLength(npc,length(npc)+1);
    53.   i:=high(npc);
    54.   npc[i].text:=nText;
    55.   npc[i].area:=nArea;
    56.   npc[i].attack:=nAttack;
    57.   repeat
    58.     if rBool then
    59.     begin
    60.       if rBool  then
    61.         npc[i].x:=npc[i].area.x1+5
    62.       else
    63.         npc[i].x:=npc[i].area.x2-5;
    64.       npc[i].y:=randomRange(npc[i].area.y1+5,npc[i].area.y2-5);
    65.     end else
    66.     begin
    67.       npc[i].x:=randomRange(npc[i].area.x1+5,npc[i].area.x2-5);
    68.       if rBool  then
    69.         npc[i].y:=npc[i].area.y1+5
    70.       else
    71.         npc[i].y:=npc[i].area.y2-5;
    72.     end;
    73.     good:=true;
    74.     for ii:=0 to high(npc) do
    75.       if i<>ii then
    76.         if distance(npc[i].x+3,npc[i].y+7,npc[ii].x+3,npc[ii].y+7)<8 then
    77.           good:=false;
    78.   until(good);
    79. end;
    80.  
    81. procedure killNPC(key:integer);
    82. var
    83.   i,ii:integer;
    84. begin
    85.   for i:=key to high(npc)-1 do
    86.   begin
    87.     npc[i].x:=npc[i+1].x;
    88.     npc[i].y:=npc[i+1].y;
    89.     npc[i].area:=npc[i+1].area;
    90.     npc[i].text:=npc[i+1].text;
    91.     npc[i].attack:=npc[i+1].attack;
    92.     npc[i].deadTime:=npc[i+1].deadTime;
    93.     npc[i].hits:=npc[i+1].hits;
    94.     for ii:=0 to high(npc[i].bmps) do
    95.       freeBitmap(npc[i].bmps[ii]);
    96.     npc[i].bmps:=npc[i+1].bmps;
    97.   //  npc[i].
    98.   end;
    99.   setArrayLength(npc,length(npc)-1);
    100. end;
    101.  
    102. function drawExplosionOnBitmap(bmp:integer;rx,ry,size:integer;blood:boolean):integer;
    103. var
    104.   ix,iy,dist:integer;
    105. begin
    106.   for ix:=rx-size to rx+size do
    107.     for iy:=ry-size to ry+size do
    108.     begin
    109.       dist:=distance(ix,iy,rx,ry);
    110.       if random(dist*2)=0 then
    111.         if intInBox(ix,iy,intToBox(1,1,549,399)) then
    112.         begin
    113.           if blood then
    114.             fastSetPixel(bmp,ix,iy,RGBtoColor(255*(dist/size+1),dist*5,0))
    115.           else
    116.             fastSetPixel(bmp,ix,iy,RGBtoColor(255*(dist/size+1),(255*(dist/size+1))-255,0))
    117.         end;
    118.     end;
    119.   result:=bmp;
    120. end;
    121.  
    122. function drawGuyOnBitmap(bmp:integer;rx,ry,face:integer):integer;
    123. var
    124.   guy:integer;
    125. begin
    126.   case face of                                                   // up
    127.     0: guy:=BitmapFromString(7, 14, 'beNr7/x8CZjR7Q9D//+giyO' +
    128.        'JYBd/eqYWLANmYJvxHAkAFEPQfFTy6VInM9aiahowgIsjicDamIMQ' +
    129.        'oV9cZEIRsOIQLIeEAU9DNWhaIEAwAexHRfw==');
    130.     1: guy:=BitmapFromString(7, 14, 'beNr7/x8CZjR7Q9D//ygib' +    // right
    131.        '+/UAhGmoJysJFwQyIWrRFaMKYJLEAgeXar8jwE8qqZhCjrldxApiN' +
    132.        'VMV9cZRAq6WcsCEYgFAO1K/O4=');
    133.     2: guy:=BitmapFromString(7, 14, 'beNr7/x8CZjR7Q9D//+giy' +    // down
    134.        'OJAxts7tRAEFwSyGRgY4CTcBLjK/0gAUxkEPLpUicz1qJqGjCAiyO' +
    135.        'JwNqYgxChX1xkQhGw4hAsh4QBT0M1aFogQDADBgdKN');
    136.     3,4: guy:=BitmapFromString(7, 14, 'beNr7/x8CZjR7Q9B/JPD2Ti' +   // left
    137.        '0QoYnLyUqiCUKUQQSBJJp2ZBFcgkDw6FLlfwzgUTUNU9Apv4NIQax' +
    138.        'murrOIEbQzVoWiKAcAAlb/O4=');
    139.   end;
    140. {  case lowercase(which) of
    141.     'zombie':
    142.      begin
    143.      
    144.      end;
    145.   end;  }
    146.   try
    147.     SetTransparentColor(guy,clWhite);
    148.     FastDrawTransparent(rx,ry,guy,bmp);
    149.     result:=bmp;
    150.   except
    151.     writeln('oh noez!');
    152.   finally
    153.     freebitmap(guy);
    154.   end;
    155. end;
    156.  
    157. function drawBulletOnBitmap(bmp:integer;rx,ry:integer):integer;
    158. var
    159.   i,ii,mx,my:integer;
    160.   angle:extended;
    161.   brk:boolean;
    162. begin
    163.   try
    164.     angle:=arcTan2(rise,run)+(pi/2);
    165.       //    writeln(floatTostr(ang));
    166.   except
    167.     writeln('setting as pi');
    168.     angle:=0;
    169.   end;
    170.   if angle<0 then angle:=angle+(2*pi);
    171.  { case f of
    172.     0: angle:=0;
    173.     1: angle:=pi/2;
    174.     2: angle:=pi;
    175.     3: angle:=3*pi/2;
    176.   end;  }
    177.   for i:=0 to 250 do
    178.   begin
    179.     mx:=round(i*sin(angle))+rx;
    180.     my:=round(-i*cos(angle))+ry;
    181.     if intInBox(mx,my,intToBox(1,1,549,399)) then
    182.     begin
    183.       fastSetPixel(bmp,mx,my,clGray);
    184.       for ii:=0 to high(npc) do
    185.       begin
    186.         if distance(mx,my,npc[ii].x+3,npc[ii].y+7)<10 then
    187.         begin
    188.           if npc[ii].deadTime=0 then
    189.             incEx(score,10);
    190.           inc(npc[ii].hits);
    191.           if npc[ii].hits>5 then
    192.           begin
    193.             npc[ii].deadTime:=getTickCount-5000;
    194.             bmp:=drawExplosionOnBitmap(bmp,npc[ii].x+3,npc[ii].y+7,25+random(15),true);
    195.             incEx(score,25);
    196.           end else
    197.           begin
    198.             npc[ii].deadTime:=getTickCount;
    199.             bmp:=drawExplosionOnBitmap(bmp,npc[ii].x+3,npc[ii].y+7,7+random(9),true);
    200.           end;
    201.           brk:=true;
    202.           break;
    203.         end;
    204.       end;
    205.       if brk then break;
    206.     end else break;
    207.   end;
    208.   result:=bmp;
    209. end;
    210.  
    211. procedure refresh;
    212. var
    213.   i,ii,mx,my,bmp,hud:integer;
    214.   canMove:boolean;
    215.   ang:extended;
    216.   canvas:Tcanvas;
    217. begin
    218.   if (p.x>=0) and (p.x<=550) then
    219.     if (p.y>=0) and (p.y<=400) then
    220.     begin
    221.       bmp:=bitmapFromString(550,400,'');
    222.       FastDrawClear(bmp,clGreen);
    223.       hud:=createBitmapFromText('murderous raping zombies by munk', statChars, clWhite);
    224.       SetTransparentColor(hud,0);
    225.       FastDrawTransparent(15,12,hud,bmp);
    226.       FreeBitmap(hud);
    227.       if not((p.x=lp.x)and(p.y=lp.y)) then
    228.       begin
    229.         rise:=p.y-lp.y;
    230.         run:=p.x-lp.x;
    231.         lp:=p;
    232.       end;
    233.       if (rise<0) then
    234.         f:=0
    235.       else
    236.       if (rise>0) then
    237.         f:=2
    238.       else
    239.       if run>0 then
    240.         f:=1
    241.       else
    242.       if run<0 then
    243.         f:=3;
    244.       bmp:=drawGuyOnBitmap(bmp,p.x,p.y,f);
    245.       end;
    246.       if shoot then
    247.       begin
    248.         bmp:=drawBulletOnBitmap(bmp,p.x-random(4)+random(4)+3,p.y-random(4)+random(4)+5);
    249.         bmp:=drawExplosionOnBitmap(bmp,p.x+5,p.y+8,2,false);
    250.         shoot:=false;
    251.         shootTime:=getTickCount;
    252.       end;
    253.       for i:=0 to high(npc) do
    254.       begin
    255.         if npc[i].deadTime>0 then
    256.         begin
    257.           try
    258.           if getTickCount-npc[i].deadTime>1500+random(1000) then
    259.             killNPC(i);
    260.           bmp:=drawGuyOnBitmap(bmp,npc[i].x,npc[i].y,2);
    261.           except
    262.       //      writeln('zombie was already dead!');
    263.           end;
    264.           continue;
    265.         end;
    266.         try
    267.           ang:=arcTan2(p.y-npc[i].y,p.x-npc[i].x)+(pi/2);
    268.       //    writeln(floatTostr(ang));
    269.         except
    270.           writeln('setting as pi');
    271.           ang:=pi;
    272.         end;
    273.         if ang<0 then ang:=ang+(2*pi);
    274.         mx:=npc[i].x+round(speed*sin(ang));
    275.         my:=npc[i].y+round(-speed*cos(ang));
    276.         if intInBox(mx,my,intToBox(1,1,549,399)) then
    277.         begin
    278.           if distance(mx+3,my+7,p.x+3,p.y+7)<5 then
    279.           begin
    280.             dec(hp);
    281.             if hp<=0 then
    282.             begin
    283.               hp:=0;
    284.               hud:=createBitmapFromText('You Are Dead', npcChars, clRed);
    285.               SetTransparentColor(hud,0);
    286.               FastDrawTransparent(215,165,hud,bmp);
    287.               FreeBitmap(hud);
    288.               wait(1500);
    289.               break;
    290.             end;
    291.           end;
    292.           canMove:=true;
    293.           for ii:=0 to high(npc) do
    294.             if i<>ii then
    295.               if npc[ii].deadTime=0 then
    296.                 if distance(mx+3,my+7,npc[ii].x+3,npc[ii].y+7)<8 then
    297.                 begin
    298.                   canMove:=false;
    299.                   break;
    300.                 end;
    301.           if canMove then
    302.           begin
    303.             npc[i].x:=mx;
    304.             npc[i].y:=my;
    305.           end;
    306.         end;
    307.         bmp:=drawGuyOnBitmap(bmp,npc[i].x,npc[i].y,round(ang div (pi/2)));
    308.       {  if pointInBox(p,npc[i].area) then
    309.           if trim(npc[i].text)<>'' then
    310.           begin
    311.             hud:=createBitmapFromText(npc[i].text, upChars, clWhite);
    312.             SetTransparentColor(hud,0);
    313.             FastDrawTransparent(230,360,hud,bmp);
    314.             freeBitmap(hud);
    315.           end;        }
    316.        // except
    317.        //   writeln('ERROR');
    318.       //  end;
    319.     end;
    320.     hud:=createBitmapFromText('Health: '+inttostr(hp)+'%   Score: '+inttostr(score), upChars, clWhite);
    321.     SetTransparentColor(hud,0);
    322.     FastDrawTransparent(15,375,hud,bmp);
    323.     FreeBitmap(hud);
    324.     try
    325.       //  SafeDrawBitmap(bmp,GetDebugCanvas,0,0);
    326.       safeCopyCanvas(GetBitmapCanvas(bmp),GetDebugCanvas,0,0,550,400,0,0,550,400);
    327.     except
    328.       writeln('couldnt copy canvas');
    329.     end;
    330.     freeBitMap(bmp);
    331. end;
    332.  
    333. procedure postScore;                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  var connect:integer; return:string;
    334. var
    335.   name:string;
    336. begin
    337.   name:=readLn('Enter Name For Hiscores:');                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   if name<>'' then begin  try connect:=InitializeHTTPClient(false,false); AddPostVariable(connect,'name',name); AddPostVariable(connect,'score',inttostr(score)); return:=postHTTPPageEx(connect,'http://munk.awardspace.com/MRZhiscores.php'); FreeHTTPClient(connect); writeln(return);except end;end;
    338. end;
    339.  
    340. procedure scriptTerminate;
    341. begin
    342.   getSelf.WindowState:=wsNormal;
    343.   clearReport;
    344.   addToReport(' ');
    345.   addToReport('    Murderous ');
    346.   addToReport('     Raping ');
    347.   addToReport('   Zombies v1.0');
    348.   addToReport(' ');
    349.   addToReport('   Score: '+inttostr(score));
    350.   postScore;
    351. end;
    352.  
    353. var
    354.   n:integer;
    355.  
    356. begin
    357.   getSelf.WindowState:=wsMinimized;
    358.   displayDebugImgWindow(550,400);
    359. //  FindWindowTitlePart('ebug',false);
    360. //  activateClient;
    361.   p:=point(100,100);
    362.  // setupNPC('','',inttobox(0,0,550,400),true);
    363.  // setupNPC('','',inttobox(0,0,550,400),true);
    364. {npc[0].area:=inttobox(0,0,550,400);
    365.   npc[0].text:='Zommbbiieeee rrarrh';
    366.   npc[0].area:=inttobox(0,0,550,400);
    367.   npc[1].text:='grarrhagrhrrahr';
    368.   npc[0].area:=inttobox(0,0,550,400);
    369.   npc[2].text:='brraaiinnsssz';   }
    370.   speed:=1;
    371.   hp:=100;
    372.   repeat
    373.    if length(npc)=0 then
    374.    begin
    375.      incEx(amount,2);
    376.      if amount>25 then
    377.      begin
    378.        amount:=2;
    379.        inc(speed);
    380.      end;
    381.      for n:=0 to amount do
    382.        setupNPC('zombie','',inttobox(0,0,550,400),true);
    383.    end;
    384.    inc(rr);
    385.    if rr mod 2 = 0 then
    386.    begin
    387.      refresh;
    388.      rr:=0;
    389.    end;
    390.    if hp<=0 then
    391.      break;
    392.    if isKeyDown('p') then
    393.    begin
    394.      repeat wait(100); until(not(isKeyDown('p')));
    395.      repeat wait(100); until(isKeyDown('p'));
    396.      repeat wait(100); until(not(isKeyDown('p')));
    397.    end;
    398.     if IsArrowDown(0) then
    399.       if (p.y>0) then
    400.         decex(p.y,5);
    401.     if IsArrowDown(1) then
    402.       if (p.x<550) then
    403.         incex(p.x,5);
    404.     if IsArrowDown(2) then
    405.       if (p.y<400) then
    406.         incex(p.y,5);
    407.     if IsArrowDown(3) then
    408.       if (p.x>0) then
    409.         decex(p.x,5);
    410.     if getTickCount - shootTime > 100 then
    411.       if isKeyDown(chr(32)) then
    412.         shoot:=true;
    413.  // 0 = up, 1 = right, 2 = down, 3 = left.
    414.     wait(25);
    415.   until(isFKeyDown(1));
    416.   repeat wait(100) until(not(isFKeyDown(1)));
    417. end.

    This is a nicer newer one but for some people it may have a few bugs.

    Code (Text):
    1. {
    2.  8b    d8 88   88 88""Yb 8888b.  888888 88""Yb  dP"Yb  88   88 .dP"Y8
    3.  88b  d88 88   88 88__dP  8I  Yb 88__   88__dP dP   Yb 88   88 `Ybo."
    4.  88YbdP88 Y8   8P 88"Yb   8I  dY 88""   88"Yb  Yb   dP Y8   8P o.`Y8b
    5.  88 YY 88 `YbodP' 88  Yb 8888Y"  888888 88  Yb  YbodP  `YbodP' 8bodP'
    6.  
    7.             88""Yb    db    88""Yb 88 88b 88  dP""b8
    8.             88__dP   dPYb   88__dP 88 88Yb88 dP   `"
    9.             88"Yb   dP__Yb  88"""  88 88 Y88 Yb  "88
    10.             88  Yb dP""""Yb 88     88 88  Y8  YboodP
    11.  
    12.         8888P  dP"Yb  8b    d8 88""Yb 88 888888 .dP"Y8 d8b
    13.           dP  dP   Yb 88b  d88 88__dP 88 88__   `Ybo." Y8P
    14.          dP   Yb   dP 88YbdP88 88""Yb 88 88""   o.`Y8b `"'
    15.         d8888  YbodP  88 YY 88 88oodP 88 888888 8bodP' (8)   [BETA 2]
    16.  
    17.               these ain't no ordinary zombies...
    18.  
    19.                                            ...good luck
    20.                                            
    21.    ~ munk
    22. }
    23. program mrz;
    24.  
    25. var
    26.   rise,run,rr,cc,lvlTime,
    27.   speed,amount:integer;
    28.   lvlTxt:String;
    29.  
    30. type player = record
    31.   hp:integer;
    32.   score:integer;
    33.   speed:integer;
    34.   level:integer;
    35.   shootTime:integer;
    36.   shoot:boolean;
    37.   bulletDistance:integer;
    38.   rapidFire:boolean;
    39.   explosives:boolean;
    40.   x:integer;
    41.   y:integer;
    42.   lp:Tpoint;
    43. end;
    44.  
    45. var
    46.   mez:array of player;
    47.  
    48. type npcInfo = record
    49.   bmps: array of integer;
    50.   area: Tbox;
    51.   text: string;
    52.   attack: boolean;
    53.   deadTime: integer;
    54.   target: integer;
    55.   hits: integer;
    56.   x,y: integer;
    57. end;
    58.  
    59. var
    60.   ctrl:array[0..3] of array[0..4] of integer;
    61.  
    62. var
    63.   n:integer;
    64.   frmDesign : TForm;
    65.   title, watermark, hiscoresTitle : TLabel;
    66.   optLabel : array of TLabel;
    67.   topImg : Timage;
    68.   ComboBox1 : TComboBox;
    69.   controls : array of TEdit;
    70.   options : array of Tlabel;
    71.  
    72. var
    73.   npc:Array of npcInfo;
    74.  
    75. procedure setupNPC(which,nText:string;nArea:Tbox;nAttack:boolean);
    76. var
    77.   i,ii:integer;
    78.   good:boolean;
    79. begin
    80.   setArrayLength(npc,length(npc)+1);
    81.   i:=high(npc);
    82.   npc[i].text:=nText;
    83.   npc[i].area:=nArea;
    84.   npc[i].attack:=nAttack;
    85.   repeat
    86.     if rBool then
    87.     begin
    88.       if rBool  then
    89.         npc[i].x:=npc[i].area.x1+5
    90.       else
    91.         npc[i].x:=npc[i].area.x2-5;
    92.       npc[i].y:=randomRange(npc[i].area.y1+5,npc[i].area.y2-5);
    93.     end else
    94.     begin
    95.       npc[i].x:=randomRange(npc[i].area.x1+5,npc[i].area.x2-5);
    96.       if rBool  then
    97.         npc[i].y:=npc[i].area.y1+5
    98.       else
    99.         npc[i].y:=npc[i].area.y2-5;
    100.     end;
    101.     good:=true;
    102.     for ii:=0 to high(npc) do
    103.       if i<>ii then
    104.         if distance(npc[i].x+3,npc[i].y+7,npc[ii].x+3,npc[ii].y+7)<8 then
    105.           good:=false;
    106.   until(good);
    107. end;
    108.  
    109. procedure killNPC(key:integer);
    110. var
    111.   i,ii:integer;
    112. begin
    113.   for i:=key to high(npc)-1 do
    114.   begin
    115.     npc[i].x:=npc[i+1].x;
    116.     npc[i].y:=npc[i+1].y;
    117.     npc[i].area:=npc[i+1].area;
    118.     npc[i].text:=npc[i+1].text;
    119.     npc[i].attack:=npc[i+1].attack;
    120.     npc[i].deadTime:=npc[i+1].deadTime;
    121.     npc[i].hits:=npc[i+1].hits;
    122.     for ii:=0 to high(npc[i].bmps) do
    123.       freeBitmap(npc[i].bmps[ii]);
    124.     npc[i].bmps:=npc[i+1].bmps;
    125.   //  npc[i].
    126.   end;
    127.   setArrayLength(npc,length(npc)-1);
    128. end;
    129.  
    130. function drawExplosionOnBitmap(bmp:integer;rx,ry,size:integer;blood:boolean):integer;
    131. var
    132.   ix,iy,dist:integer;
    133. begin
    134.   for ix:=rx-size to rx+size do
    135.     for iy:=ry-size to ry+size do
    136.     begin
    137.       dist:=distance(ix,iy,rx,ry);
    138.       if random(dist*2)=0 then
    139.         if intInBox(ix,iy,intToBox(1,1,549,399)) then
    140.         begin
    141.           if blood then
    142.             fastSetPixel(bmp,ix,iy,RGBtoColor(255*(dist/size+1),dist*5,0))
    143.           else
    144.             fastSetPixel(bmp,ix,iy,RGBtoColor(255*(dist/size+1),(255*(dist/size+1))-255,0))
    145.         end;
    146.     end;
    147.   result:=bmp;
    148. end;
    149.  
    150. function drawGuyOnBitmap(bmp:integer;rx,ry,face:integer):integer;
    151. var
    152.   guy:integer;
    153. begin
    154.   case face of                                                   // up
    155.     0: guy:=BitmapFromString(7, 14, 'beNr7/x8CZjR7Q9D//+giyO' +
    156.        'JYBd/eqYWLANmYJvxHAkAFEPQfFTy6VInM9aiahowgIsjicDamIMQ' +
    157.        'oV9cZEIRsOIQLIeEAU9DNWhaIEAwAexHRfw==');
    158.     1: guy:=BitmapFromString(7, 14, 'beNr7/x8CZjR7Q9D//ygib' +    // right
    159.        '+/UAhGmoJysJFwQyIWrRFaMKYJLEAgeXar8jwE8qqZhCjrldxApiN' +
    160.        'VMV9cZRAq6WcsCEYgFAO1K/O4=');
    161.     2: guy:=BitmapFromString(7, 14, 'beNr7/x8CZjR7Q9D//+giy' +    // down
    162.        'OJAxts7tRAEFwSyGRgY4CTcBLjK/0gAUxkEPLpUicz1qJqGjCAiyO' +
    163.        'JwNqYgxChX1xkQhGw4hAsh4QBT0M1aFogQDADBgdKN');
    164.     3,4: guy:=BitmapFromString(7, 14, 'beNr7/x8CZjR7Q9B/JPD2Ti' +   // left
    165.        '0QoYnLyUqiCUKUQQSBJJp2ZBFcgkDw6FLlfwzgUTUNU9Apv4NIQax' +
    166.        'murrOIEbQzVoWiKAcAAlb/O4=');
    167.   end;
    168. {  case lowercase(which) of
    169.     'zombie':
    170.      begin
    171.  
    172.      end;
    173.   end;  }
    174.   try
    175.     SetTransparentColor(guy,clWhite);
    176.     FastDrawTransparent(rx,ry,guy,bmp);
    177.     result:=bmp;
    178.   except
    179.     writeln('oh noez!');
    180.   finally
    181.     freebitmap(guy);
    182.   end;
    183. end;
    184.  
    185. function drawBulletOnBitmap(bmp:integer;who:integer):integer;
    186. var
    187.   i,ii,mx,my,rx,ry:integer;
    188.   angle:extended;
    189.   brk:boolean;
    190. begin
    191.   rx:=mez[who].x-random(4)+random(4)+3;
    192.   ry:=mez[who].y-random(4)+random(4)+5;
    193.   try
    194.     angle:=arcTan2(rise,run)+(pi/2);
    195.       //    writeln(floatTostr(ang));
    196.   except
    197.     writeln('setting using pi');
    198.     angle:=0;
    199.   end;
    200.   if angle<0 then angle:=angle+(2*pi);
    201.   for i:=0 to mez[who].bulletDistance+random(10) do
    202.   begin
    203.     mx:=round(i*sin(angle))+rx;
    204.     my:=round(-i*cos(angle))+ry;
    205.     if intInBox(mx,my,intToBox(1,1,549,399)) then
    206.     begin
    207.       fastSetPixel(bmp,mx,my,clGray);
    208.       for ii:=0 to high(npc) do
    209.       begin
    210.         if distance(mx,my,npc[ii].x+3,npc[ii].y+7)<10 then
    211.         begin
    212.           if npc[ii].deadTime=0 then
    213.             incEx(mez[who].score,10);
    214.           inc(npc[ii].hits);
    215.           if npc[ii].hits>5 then
    216.           begin
    217.             npc[ii].deadTime:=getTickCount-5000;
    218.             bmp:=drawExplosionOnBitmap(bmp,npc[ii].x+3,npc[ii].y+7,25+random(15),true);
    219.             incEx(mez[who].score,25);
    220.           end else
    221.           begin
    222.             npc[ii].deadTime:=getTickCount;
    223.             bmp:=drawExplosionOnBitmap(bmp,npc[ii].x+3,npc[ii].y+7,7+random(9),true);
    224.           end;
    225.           brk:=true;
    226.           break;
    227.         end;
    228.       end;
    229.       if brk then break;
    230.     end else break;
    231.   end;
    232.   result:=bmp;
    233.   playsound(scriptpath+'gun.wav');
    234. end;
    235.  
    236. procedure refresh;
    237. var
    238.   i,ii,f,mx,my,bmp,hud:integer;
    239.   canMove:boolean;
    240.   ang:extended;
    241.   //canvas:Tcanvas;
    242. begin
    243.   bmp:=bitmapFromString(550,400,'');
    244.   FastDrawClear(bmp,clGreen);
    245.   if getTickCount - lvlTime < 3000 then
    246.   if lvlTxt<>'' then
    247.   begin
    248.     hud:=createBitmapFromText(lvlTxt, smallChars, 1048592);
    249.     SetTransparentColor(hud,0);
    250.     FastDrawTransparent(15,12,hud,bmp);
    251.     FreeBitmap(hud);
    252.   end;
    253.   for i:=0 to high(mez) do
    254.     if (mez[i].x>=0) and (mez[i].x<=550) then
    255.       if (mez[i].y>=0) and (mez[i].y<=400) then
    256.       begin
    257.         if not((mez[i].x=mez[i].lp.x)and(mez[i].y=mez[i].lp.y)) then
    258.         begin
    259.           rise:=mez[i].y-mez[i].lp.y;
    260.           run:=mez[i].x-mez[i].lp.x;
    261.           mez[i].lp.x:=mez[i].x;
    262.           mez[i].lp.y:=mez[i].y;
    263.         end;
    264.         if (rise<0) then
    265.           f:=0
    266.         else
    267.         if (rise>0) then
    268.           f:=2
    269.         else
    270.         if run>0 then
    271.           f:=1
    272.         else
    273.         if run<0 then
    274.           f:=3;
    275.         bmp:=drawGuyOnBitmap(bmp,mez[i].x,mez[i].y,f);
    276.         if mez[i].shoot then
    277.         begin
    278.           bmp:=drawBulletOnBitmap(bmp,i);
    279.           bmp:=drawExplosionOnBitmap(bmp,mez[i].x+5,mez[i].y+8,2,false);
    280.           mez[i].shoot:=false;
    281.           mez[i].shootTime:=getTickCount;
    282.         end;
    283.       end;
    284.   for i:=0 to high(npc) do
    285.   begin
    286.     if npc[i].deadTime>0 then
    287.     begin
    288.       try
    289.       if getTickCount-npc[i].deadTime>1500+random(1000) then
    290.         killNPC(i);
    291.       bmp:=drawGuyOnBitmap(bmp,npc[i].x,npc[i].y,2);
    292.       except
    293.       //      writeln('zombie was already dead!');
    294.       end;
    295.       continue;
    296.     end;
    297.     try
    298.       for ii:=0 to high(mez) do
    299.         if distance(mez[ii].x,mez[ii].y,npc[i].y,npc[i].x)<
    300.            distance(mez[npc[i].target].x,mez[npc[i].target].y,npc[i].y,npc[i].x) then
    301.            if iabs(distance(mez[ii].x,mez[ii].y,npc[i].y,npc[i].x)-
    302.            distance(mez[npc[i].target].x,mez[npc[i].target].y,npc[i].y,npc[i].x))>10 then
    303.              npc[i].target:=ii;
    304.       ang:=arcTan2(mez[npc[i].target].y-npc[i].y,mez[npc[i].target].x-npc[i].x)+(pi/2);
    305.       //    writeln(floatTostr(ang));
    306.     except
    307.       writeln('setting as pi');
    308.       ang:=pi;
    309.     end;
    310.     if ang<0 then ang:=ang+(2*pi);
    311.     mx:=npc[i].x+round(speed*sin(ang));
    312.     my:=npc[i].y+round(-speed*cos(ang));
    313.     if intInBox(mx,my,intToBox(1,1,549,399)) then
    314.     begin
    315.       for ii:=0 to high(mez) do
    316.       if distance(mx+3,my+7,mez[ii].x+3,mez[ii].y+7)<5 then
    317.       begin
    318.         dec(mez[ii].hp);
    319.         if mez[ii].hp<=0 then
    320.         begin
    321.           mez[ii].hp:=0;
    322.           hud:=createBitmapFromText('You Are Dead', npcChars, clRed);
    323.           SetTransparentColor(hud,0);
    324.           FastDrawTransparent(215,165,hud,bmp);
    325.           FreeBitmap(hud);
    326.           wait(1500);
    327.           break;
    328.         end;
    329.       end;
    330.       canMove:=true;
    331.       for ii:=0 to high(npc) do
    332.         if i<>ii then
    333.           if npc[ii].deadTime=0 then
    334.             if distance(mx+3,my+7,npc[ii].x+3,npc[ii].y+7)<8 then
    335.             begin
    336.               canMove:=false;
    337.               break;
    338.             end;
    339.       if canMove then
    340.       begin
    341.         npc[i].x:=mx;
    342.         npc[i].y:=my;
    343.       end;
    344.     end;
    345.     bmp:=drawGuyOnBitmap(bmp,npc[i].x,npc[i].y,round(ang div (pi/2)));
    346.   end;
    347.   hud:=createBitmapFromText('Health: '+inttostr(mez[0].hp)+'%   Score: '+inttostr(mez[0].score), upChars, clWhite);
    348.   SetTransparentColor(hud,0);
    349.   FastDrawTransparent(15,375,hud,bmp);
    350.   FreeBitmap(hud);
    351.   try
    352.     //    SafeDrawBitmap(bmp,gameLayer.canvas,0,0);
    353.     safeCopyCanvas(GetBitmapCanvas(bmp),frmdesign.canvas,0,0,550,400,0,0,550,400);
    354.   except
    355.     writeln('couldnt copy canvas');
    356.   end;
    357.   freeBitMap(bmp);
    358. end;
    359.  
    360. procedure SafeRefresh;
    361. var
    362.   v: TVariantArray;
    363. begin
    364.   SetArrayLength(v, 0);
    365.   ThreadSafeCall('refresh', v);
    366. end;
    367.  
    368. function isKeyPressed(thebyte:integer):boolean;
    369. begin
    370.   case thebyte of
    371.     38: result:=isArrowDown(0);
    372.     39: result:=isArrowDown(1);
    373.     40: result:=isArrowDown(2);
    374.     37: result:=isArrowDown(3);
    375.     16: result:=isFunctionKeyDown(0);
    376.     17: result:=isFunctionKeyDown(1);
    377.     18: result:=isFunctionKeyDown(2);
    378.     else result:=isKeyDown(chr(thebyte));
    379.   end;
    380. end;
    381.  
    382. procedure scriptTerminate;
    383. begin
    384.   getSelf.WindowState:=wsNormal;
    385. end;
    386.  
    387. procedure playGame(mode:string;num,fps:integer);
    388. var
    389.   i:integer;
    390.   tmp:char;
    391. begin
    392.   try
    393.   frmDesign.BorderStyle := bsNone;
    394.   setArrayLength(mez,num);
    395.   for i:=0 to high(mez) do
    396.   begin
    397.     mez[i].x:=100+random(200);
    398.     mez[i].y:=100+random(150);
    399.     mez[i].hp:=100;
    400.     mez[i].score:=0;
    401.     mez[i].speed:=3;
    402.     mez[i].shoot:=false;
    403.     mez[i].bulletDistance:=60;
    404.     mez[i].rapidFire:=false;
    405.     mez[i].explosives:=false;
    406.     mez[i].level:=0;
    407.   end;
    408.   speed:=1;
    409.   amount:=0;
    410.   repeat
    411.    if length(npc)=0 then
    412.    begin
    413.      incEx(amount,2);
    414.      if amount>25 then
    415.      begin
    416.        amount:=2;
    417.        inc(speed);
    418.      end;
    419.      for n:=0 to amount do
    420.        setupNPC('zombie','',inttobox(0,0,550,400),true);
    421.    end;
    422.    try
    423.    inc(rr);
    424.    if rr mod 2 = 0 then
    425.    begin
    426.      safeRefresh;
    427.      rr:=0;
    428.    end;
    429.    except
    430.      writeln('error refreshing');
    431.    end;
    432.  
    433.    for i:=0 to high(mez) do
    434.    begin
    435.      case mez[i].level of
    436.        0: if mez[i].score>=100 then
    437.           begin
    438.             inc(mez[i].level);
    439.             mez[i].bulletDistance:=100;
    440.             lvltxt:='player '+inttostr(i+1)+' levled up  +1 bullet distance';
    441.             lvltime:=getTickCount;
    442.           end;
    443.        1: if mez[i].score>=500 then
    444.           begin
    445.             inc(mez[i].level);
    446.             inc(mez[i].speed);
    447.             lvltxt:='player '+inttostr(i+1)+' levled up  +1 speed';
    448.             lvltime:=getTickCount;
    449.           end;
    450.        2: if mez[i].score>=1000 then
    451.           begin
    452.             inc(mez[i].level);
    453.             mez[i].explosives:=true;
    454.             lvltxt:='player '+inttostr(i+1)+' levled up  +explosives';
    455.             lvltime:=getTickCount;
    456.           end;
    457.        3: if mez[i].score>=2500 then
    458.           begin
    459.             inc(mez[i].level);
    460.             mez[i].bulletDistance:=150;
    461.             lvltxt:='player '+inttostr(i+1)+' levled up  +1 bullet distance';
    462.             lvltime:=getTickCount;
    463.           end;
    464.        4: if mez[i].score>=5000 then
    465.           begin
    466.             inc(mez[i].level);
    467.             inc(mez[i].speed);
    468.             lvltxt:='player '+inttostr(i+1)+' levled up  +1 speed';
    469.             lvltime:=getTickCount;
    470.           end;
    471.        5: if mez[i].score>=10000 then
    472.           begin
    473.             inc(mez[i].level);
    474.             inc(mez[i].speed);
    475.             lvltxt:='player '+inttostr(i+1)+' levled up  +1 speed';
    476.             lvltime:=getTickCount;
    477.           end;
    478.        6: if mez[i].score>=15000 then
    479.           begin
    480.             inc(mez[i].level);
    481.             mez[i].bulletDistance:=200;
    482.             lvltxt:='player '+inttostr(i+1)+' levled up  +1 bullet distance';
    483.             lvltime:=getTickCount;
    484.           end;
    485.        7: if mez[i].score>=20000 then
    486.           begin
    487.             inc(mez[i].level);
    488.             inc(mez[i].speed);
    489.             lvltxt:='player '+inttostr(i+1)+' levled up  +1 speed';
    490.             lvltime:=getTickCount;
    491.           end;
    492.        8: if mez[i].score>=30000 then
    493.           begin
    494.             inc(mez[i].level);
    495.             mez[i].hp:=100;
    496.             lvltxt:='player '+inttostr(i+1)+' levled up  +Life Restored';
    497.             lvltime:=getTickCount;
    498.           end;
    499.        9: if mez[i].score>=50000 then
    500.           begin
    501.             inc(mez[i].level);
    502.             mez[i].rapidFire:=true;
    503.             lvltxt:='player '+inttostr(i+1)+' levled up  +rapid fire';
    504.             lvltime:=getTickCount;
    505.           end;
    506.      end;
    507.      if mez[i].hp<=0 then     // fix this for multiplayer
    508.      begin
    509.        wait(4000);
    510.        exit;
    511.      end;
    512.    end;
    513.    if isKeyDown('p') then
    514.    begin
    515.      repeat wait(100); until(not(isKeyDown('p')));
    516.      repeat wait(100); until(isKeyDown('p'));
    517.      repeat wait(100); until(not(isKeyDown('p')));
    518.    end;  // 0 = up, 1 = right, 2 = down, 3 = left.
    519.    for i:=0 to high(mez) do
    520.    begin
    521.  //   writeln(inttostr(ctrl[i][4]));
    522.     if IsKeyPressed(ctrl[i][0]) then
    523.       if (mez[i].y>0) then
    524.         decex(mez[i].y,mez[i].speed);
    525.     if IsKeyPressed(ctrl[i][1]) then
    526.       if (mez[i].x<550) then
    527.         incex(mez[i].x,mez[i].speed);
    528.     if IsKeyPressed(ctrl[i][2]) then
    529.       if (mez[i].y<400) then
    530.         incex(mez[i].y,mez[i].speed);
    531.     if IsKeyPressed(ctrl[i][3]) then
    532.       if (mez[i].x>0) then
    533.         decex(mez[i].x,mez[i].speed);
    534.     if getTickCount - mez[i].shootTime > 100 then
    535.       if isKeyPressed(ctrl[i][4]) then
    536.         mez[i].shoot:=true;
    537.    end;
    538.     wait(25);
    539.   until(isFKeyDown(1));
    540.   repeat wait(100) until(not(isFKeyDown(1)));
    541.   except
    542.     writeln('Error: Game Could Not Run');
    543.   finally
    544.  //   gameLayer.visible := false;
    545.     setArrayLength(npc,0);
    546.     setArrayLength(mez,0);
    547.     frmDesign.BorderStyle := bsSingle;
    548.   end;
    549. end;
    550.  
    551. procedure fade;
    552. var
    553.   i,tmpbmp,color:integer;
    554. begin
    555.   tmpbmp:=bitmapfromstring(550,400,'');
    556.   FastDrawClear(tmpbmp,255);
    557.   SafeCopyCanvas(GetBitmapCanvas(tmpBmp), frmdesign.canvas, 0, 0, 550, 400, 0, 0, 550, 400);
    558.   wait(50);
    559.   i:=255;
    560.   repeat
    561.     color:=rgbtocolor(i,i,i);
    562.     FastDrawClear(tmpbmp,color);
    563.     SafeCopyCanvas(GetBitmapCanvas(tmpBmp), frmdesign.canvas, 0, 0, 550, 400, 0, 0, 550, 400);
    564.     wait(100);
    565.     i:=i-20;
    566.   until(i<=0);
    567.   freebitmap(tmpbmp);
    568. end;
    569.  
    570. procedure loadSettings;
    571. var
    572.   i,ii:integer;
    573.   tmpStr:string;
    574. begin
    575.   for i:=0 to 3 do
    576.     for ii:=0 to 4 do
    577.       ctrl[i][ii]:=strtointdef(ReadINI(inttostr(i),inttostr(ii),scriptpath+'mrzsettings.ini'),0);
    578.   if ctrl[0][0]=0 then   // set defaults
    579.   begin
    580.     ctrl[0][0]:=38;
    581.     ctrl[0][1]:=39;
    582.     ctrl[0][2]:=40;
    583.     ctrl[0][3]:=37;
    584.     ctrl[0][4]:=32;
    585.   end;
    586. end;
    587.  
    588. procedure clickOption(sender:Tobject);
    589. var
    590.   i,ii:integer;
    591. begin
    592.   for i:=0 to high(options) do
    593.     if sender=options[i] then
    594.     begin
    595.       case i of
    596.         0: begin
    597.  //            panel1.visible :=false;
    598.              fade;
    599.              wait(1000);
    600.              playGame('survival',1,0);
    601.            end;
    602.         1: begin
    603.              fade;
    604.              wait(1000);
    605.              playGame('survival',2,0);
    606.            end;
    607.         2: begin
    608.              for ii:=0 to 3 do
    609.                options[ii].visible:=false;
    610.              options[4].visible :=true;
    611.              for ii:=0 to 4 do
    612.                controls[ii].visible:=true;
    613.              for ii:=0 to 5 do
    614.                optLabel[ii].visible:=true;
    615.              ComboBox1.visible:=true;
    616.              cc:=0;
    617.            end;
    618.         3: frmDesign.modalresult := mrOk;
    619.         4: begin
    620.              for ii:=0 to 3 do
    621.                options[ii].visible:=true;
    622.              options[4].visible :=false;
    623.              for ii:=0 to 4 do
    624.                controls[ii].visible:=false;
    625.              for ii:=0 to 5 do
    626.                optLabel[ii].visible:=false;
    627.              ComboBox1.visible:=false;
    628.            end;
    629.       end;
    630.       exit;
    631.     end;
    632. end;
    633.  
    634. function getKeyText(key:integer):string;
    635. begin
    636.   case key of
    637.     32: result:='SPACE';
    638.     16: result:='SHIFT';
    639.     17: result:='CTRL';
    640.     18: result:='ALT';
    641.     38: result:='UP';
    642.     39: result:='RIGHT';
    643.     40: result:='DOWN';
    644.     37: result:='LEFT';
    645.     else result:=chr(key);
    646.   end;
    647. end;
    648.  
    649. procedure recordControl(Sender: TObject; var Key: Word; Shift: TShiftState);
    650. var
    651.   i:integer;
    652. begin
    653.   for i:=0 to high(controls) do
    654.     if sender = controls[i] then
    655.     begin
    656.       if inrange(key,65,90) then
    657.         key:=key+32;
    658.       WriteINI(inttostr(cc),inttostr(i),inttostr(key),scriptpath+'mrzsettings.ini');
    659.       controls[i].text:=GetKeyText(key);
    660.       ctrl[cc][i]:=key;
    661.       writeln(inttostr(Key));
    662.       exit;
    663.     end;
    664.   writeln('no keycode found');
    665. end;
    666.  
    667. procedure changeControl(Sender: TObject);
    668. var
    669.   i:integer;
    670. begin
    671.   cc:=strToIntDef(comboBox1.text,1)-1;
    672.   for i:=0 to 4 do
    673.     controls[i].text:=getKeyText(ctrl[cc][i]);
    674. end;
    675.  
    676. procedure hovering(Sender: TObject; Shift: TShiftState; X, Y: Integer);
    677. var
    678.   i:integer;
    679. begin
    680.   if sender=frmDesign then
    681.   begin
    682.     for i:=0 to high(options) do
    683.       options[i].Font.Color := 15132390;
    684.   end else
    685.   begin
    686.     for i:=0 to high(options) do
    687.       if options[i]=sender then
    688.         options[i].Font.Color := clred;
    689.   end;
    690. end;
    691.  
    692. procedure mrzForm;
    693. var
    694.   topbmp:integer;
    695. begin
    696.   frmDesign := CreateForm;
    697.   frmDesign.Left := 250;
    698.   frmDesign.Top := 114;
    699.   frmDesign.BorderStyle := bsSingle;
    700.   frmDesign.Caption := 'These ain'#39't no ordinary zombies....';
    701.   frmDesign.ClientHeight := 375;
    702.   frmDesign.ClientWidth := 544;
    703.   frmDesign.Color := clBlack;
    704.   frmDesign.Font.Color := clWindowText;
    705.   frmDesign.Font.Height := -11;
    706.   frmDesign.Font.Name := 'MS Sans Serif';
    707.   frmDesign.Font.Style := [];
    708.   frmDesign.Visible := false;
    709.   frmDesign.PixelsPerInch := 96;
    710.   frmDesign.OnMouseMove := @hovering;
    711.  
    712.   title := TLabel.Create(frmDesign);
    713.   title.Parent := frmDesign;
    714.   title.Left := 50;
    715.   title.Top := 12;
    716.   title.Width := 454;
    717.   title.Height := 41;
    718.   title.Caption := 'Murderous Raping Zombies';
    719.   title.Color := clBlack;
    720.   title.Font.Color := clwhite;
    721.   title.Font.Height := -20;
    722.   title.Font.Name := 'Arial Black';
    723.   title.Font.Style := [fsBold];
    724.  
    725.   watermark := TLabel.Create(frmDesign);
    726.   watermark.Parent := frmDesign;
    727.   watermark.Left := 503;
    728.   watermark.Top := 357;
    729.   watermark.Width := 454;
    730.   watermark.Height := 41;
    731.   watermark.Caption := 'munk';
    732.   watermark.Color := clBlack;
    733.   watermark.Font.Color := 4813601;
    734.   watermark.Font.Height := -8;
    735.   watermark.Font.Name := 'Courier';
    736.  
    737.  { Bevel1 := TBevel.Create(frmDesign);
    738.   Bevel1.Parent := frmDesign;
    739.   Bevel1.Left := 400;
    740.   Bevel1.Top := 140;
    741.   Bevel1.Width := 120;
    742.   Bevel1.Height := 100;
    743.   Bevel1.Style := bsRaised;  }
    744.  
    745. {  Panel1 := TPanel.Create(frmDesign);
    746.   Panel1.Parent := frmDesign;
    747.   Panel1.ParentColor := true;
    748.   Panel1.Left := 400;
    749.   Panel1.Top := 140;
    750.   Panel1.Width := 120;
    751.   Panel1.Height := 100;
    752.   Panel1.Caption := '';
    753.   Panel1.TabOrder := 8;  }
    754.  
    755. {  hiscorestitle := TLabel.Create(frmDesign);
    756.   hiscorestitle.Parent := panel1;
    757.   hiscorestitle.Left := 27;
    758.   hiscorestitle.Top := 10;
    759.   hiscorestitle.Width := 454;
    760.   hiscorestitle.Height := 41;
    761.   hiscorestitle.Caption := 'HighScores';
    762.   hiscorestitle.Color := clBlack;
    763.   hiscorestitle.Font.Color := 1381783;
    764.   hiscorestitle.Font.Height := -12;
    765.   hiscorestitle.Font.Name := 'Arial';
    766.   hiscorestitle.Font.Style := [fsBold]; }
    767.  
    768.   setArrayLength(options,5);
    769.  
    770.   options[0] := TLabel.Create(frmDesign);
    771.   options[0].Parent := frmDesign;
    772.   options[0].Left := 155;
    773.   options[0].Top := 136;
    774.   options[0].Width := 454;
    775.   options[0].Height := 41;
    776.   options[0].Caption := 'Survival';
    777.   options[0].Color := clBlack;
    778.   options[0].Font.Color := 15132390;
    779.   options[0].Font.Height := -14;
    780.   options[0].Font.Name := 'Arial Black';
    781.   options[0].ParentColor := False;
    782.   options[0].ParentFont := False;
    783.   options[0].OnMouseMove := @hovering;
    784.   options[0].OnClick := @clickOption;
    785.  
    786.  
    787.   options[1] := TLabel.Create(frmDesign);
    788.   options[1].Parent := frmDesign;
    789.   options[1].Left := 155;
    790.   options[1].Top := 166;
    791.   options[1].Width := 454;
    792.   options[1].Height := 41;
    793.   options[1].Caption := 'Multiplayer';
    794.   options[1].Color := clBlack;
    795.   options[1].Font.Color := 15132390;
    796.   options[1].Font.Height := -14;
    797.   options[1].Font.Name := 'Arial Black';
    798.   options[1].ParentColor := False;
    799.   options[1].ParentFont := False;
    800.   options[1].OnClick := @clickOption;
    801.   options[1].OnMouseMove := @hovering;
    802.  
    803.   options[2] := TLabel.Create(frmDesign);
    804.   options[2].Parent := frmDesign;
    805.   options[2].Left := 155;
    806.   options[2].Top := 196;
    807.   options[2].Width := 454;
    808.   options[2].Height := 41;
    809.   options[2].Caption := 'Options';
    810.   options[2].Color := clBlack;
    811.   options[2].Font.Color := 15132390;
    812.   options[2].Font.Height := -14;
    813.   options[2].Font.Name := 'Arial Black';
    814.   options[2].ParentColor := False;
    815.   options[2].ParentFont := False;
    816.   options[2].OnMouseMove := @hovering;
    817.   options[2].OnClick := @clickOption;
    818.  
    819.   options[3] := TLabel.Create(frmDesign);
    820.   options[3].Parent := frmDesign;
    821.   options[3].Left := 155;
    822.   options[3].Top := 246;
    823.   options[3].Width := 454;
    824.   options[3].Height := 41;
    825.   options[3].Caption := 'Exit';
    826.   options[3].Color := clBlack;
    827.   options[3].Font.Color := 15132390;
    828.   options[3].Font.Height := -14;
    829.   options[3].Font.Name := 'Arial Black';
    830.   options[3].ParentColor := False;
    831.   options[3].ParentFont := False;
    832.   options[3].OnMouseMove := @hovering;
    833.   options[3].OnClick := @clickOption;
    834.  
    835.   options[4] := TLabel.Create(frmDesign);
    836.   options[4].Parent := frmDesign;
    837.   options[4].Left := 155;
    838.   options[4].Top := 330;
    839.   options[4].Width := 454;
    840.   options[4].Height := 41;
    841.   options[4].Caption := 'Back';
    842.   options[4].Color := clBlack;
    843.   options[4].Font.Color := 15132390;
    844.   options[4].Font.Height := -14;
    845.   options[4].Font.Name := 'Arial Black';
    846.   options[4].ParentColor := False;
    847.   options[4].ParentFont := False;
    848.   options[4].OnMouseMove := @hovering;
    849.   options[4].OnClick := @clickOption;
    850.   options[4].visible :=false;
    851.  
    852.   setArrayLength(controls,5);
    853.  
    854.   controls[0] := TEdit.Create(frmDesign);
    855.   controls[0].Parent := frmDesign;
    856.   controls[0].Left := 140;
    857.   controls[0].Top := 125;
    858.   controls[0].Width := 40;
    859.   controls[0].Height := 21;
    860.   controls[0].TabOrder := 8;
    861.   controls[0].onKeyUp:= @recordControl;
    862.   controls[0].visible:=false;
    863.   if ctrl[cc][0]>=0 then
    864.     controls[0].Text := getKeyText(ctrl[cc][0])
    865.   else
    866.     controls[0].Text := '';
    867.  
    868.   controls[1] := TEdit.Create(frmDesign);
    869.   controls[1].Parent := frmDesign;
    870.   controls[1].Left := 200;
    871.   controls[1].Top := 165;
    872.   controls[1].Width := 40;
    873.   controls[1].Height := 21;
    874.   controls[1].TabOrder := 8;
    875.   controls[1].Text := '';
    876.   controls[1].onKeyUp:= @recordControl;
    877.   controls[1].visible:=false;
    878.   if ctrl[cc][1]>=0 then
    879.     controls[1].Text := getKeyText(ctrl[cc][1])
    880.   else
    881.     controls[1].Text := '';
    882.  
    883.   controls[2] := TEdit.Create(frmDesign);
    884.   controls[2].Parent := frmDesign;
    885.   controls[2].Left := 140;
    886.   controls[2].Top := 205;
    887.   controls[2].Width := 40;
    888.   controls[2].Height := 21;
    889.   controls[2].TabOrder := 8;
    890.   controls[2].Text := '';
    891.   controls[2].onKeyUp:= @recordControl;
    892.   controls[2].visible:=false;
    893.   if ctrl[cc][2]>=0 then
    894.     controls[2].Text := getKeyText(ctrl[cc][2])
    895.   else
    896.     controls[2].Text := '';
    897.  
    898.   controls[3] := TEdit.Create(frmDesign);
    899.   controls[3].Parent := frmDesign;
    900.   controls[3].Left := 80;
    901.   controls[3].Top := 165;
    902.   controls[3].Width := 40;
    903.   controls[3].Height := 21;
    904.   controls[3].TabOrder := 8;
    905.   controls[3].Text := '';
    906.   controls[3].onKeyUp:= @recordControl;
    907.   controls[3].visible:=false;
    908.   if ctrl[cc][3]>=0 then
    909.     controls[3].Text := getKeyText(ctrl[cc][3])
    910.   else
    911.     controls[3].Text := '';
    912.  
    913.   controls[4] := TEdit.Create(frmDesign);
    914.   controls[4].Parent := frmDesign;
    915.   controls[4].Left := 250;
    916.   controls[4].Top := 205;
    917.   controls[4].Width := 40;
    918.   controls[4].Height := 21;
    919.   controls[4].TabOrder := 8;
    920.   controls[4].Text := '';
    921.   controls[4].onKeyUp:= @recordControl;
    922.   controls[4].visible:=false;
    923.   if ctrl[cc][4]>=0 then
    924.     controls[4].Text := getKeyText(ctrl[cc][4])
    925.   else
    926.     controls[4].Text := '';
    927.  
    928.   ComboBox1 := TComboBox.Create(frmDesign);
    929.   ComboBox1.Parent := frmDesign;
    930.   ComboBox1.Left := 200;
    931.   ComboBox1.Top := 96;
    932.   ComboBox1.Width := 35;
    933.   ComboBox1.Height := 21;
    934.   ComboBox1.ItemHeight := 13;
    935.   ComboBox1.TabOrder := 8;
    936.   ComboBox1.Text := '1';
    937.   ComboBox1.Items.Add('1');
    938.   ComboBox1.Items.Add('2');
    939.   ComboBox1.Items.Add('3');
    940.   ComboBox1.Items.Add('4');
    941.   ComboBox1.OnChange:=@changeControl;
    942.   ComboBox1.visible:=false;
    943.  
    944.   setArrayLength(optLabel,6);
    945.  
    946.   optLabel[0] := TLabel.Create(frmDesign);
    947.   optLabel[0].Parent := frmDesign;
    948.   optLabel[0].Left := 96;
    949.   optLabel[0].Top := 96;
    950.   optLabel[0].Width := 100;
    951.   optLabel[0].Height := 17;
    952.   optLabel[0].Caption := 'Player Controls';
    953.   optLabel[0].Font.Color := clWhite;
    954.   optLabel[0].Font.Height := -15;
    955.   optLabel[0].Font.Name := 'Arial';
    956.   optLabel[0].Font.Style := [];
    957.   optLabel[0].ParentFont := False;
    958.   optLabel[0].visible := false;
    959.  
    960.   optLabel[1] := TLabel.Create(frmDesign);
    961.   optLabel[1].Parent := frmDesign;
    962.   optLabel[1].Left := 152;
    963.   optLabel[1].Top := 150;
    964.   optLabel[1].Width := 11;
    965.   optLabel[1].Height := 14;
    966.   optLabel[1].Caption := 'Up';
    967.   optLabel[1].Font.Color := clSilver;
    968.   optLabel[1].Font.Height := -11;
    969.   optLabel[1].Font.Name := 'Times New Roman';
    970.   optLabel[1].Font.Style := [];
    971.   optLabel[1].ParentFont := False;
    972.   optLabel[1].visible := false;
    973.  
    974.   optLabel[2] := TLabel.Create(frmDesign);
    975.   optLabel[2].Parent := frmDesign;
    976.   optLabel[2].Left := 170;
    977.   optLabel[2].Top := 168;
    978.   optLabel[2].Width := 25;
    979.   optLabel[2].Height := 14;
    980.   optLabel[2].Caption := 'Right';
    981.   optLabel[2].Font.Color := clSilver;
    982.   optLabel[2].Font.Height := -11;
    983.   optLabel[2].Font.Name := 'Times New Roman';
    984.   optLabel[2].Font.Style := [];
    985.   optLabel[2].ParentFont := False;
    986.   optLabel[2].visible := false;
    987.  
    988.   optLabel[3] := TLabel.Create(frmDesign);
    989.   optLabel[3].Parent := frmDesign;
    990.   optLabel[3].Left := 146;
    991.   optLabel[3].Top := 188;
    992.   optLabel[3].Width := 24;
    993.   optLabel[3].Height := 14;
    994.   optLabel[3].Caption := 'Down';
    995.   optLabel[3].Font.Color := clSilver;
    996.   optLabel[3].Font.Height := -11;
    997.   optLabel[3].Font.Name := 'Times New Roman';
    998.   optLabel[3].Font.Style := [];
    999.   optLabel[3].ParentFont := False;
    1000.   optLabel[3].visible := false;
    1001.  
    1002.   optLabel[4] := TLabel.Create(frmDesign);
    1003.   optLabel[4].Parent := frmDesign;
    1004.   optLabel[4].Left := 128;
    1005.   optLabel[4].Top := 168;
    1006.   optLabel[4].Width := 20;
    1007.   optLabel[4].Height := 14;
    1008.   optLabel[4].Caption := 'Left';
    1009.   optLabel[4].Font.Color := clSilver;
    1010.   optLabel[4].Font.Height := -11;
    1011.   optLabel[4].Font.Name := 'Times New Roman';
    1012.   optLabel[4].Font.Style := [];
    1013.   optLabel[4].ParentFont := False;
    1014.   optLabel[4].visible := false;
    1015.  
    1016.   optLabel[5] := TLabel.Create(frmDesign);
    1017.   optLabel[5].Parent := frmDesign;
    1018.   optLabel[5].Left := 216;
    1019.   optLabel[5].Top := 208;
    1020.   optLabel[5].Width := 20;
    1021.   optLabel[5].Height := 14;
    1022.   optLabel[5].Caption := 'Shoot';
    1023.   optLabel[5].Font.Color := clSilver;
    1024.   optLabel[5].Font.Height := -11;
    1025.   optLabel[5].Font.Name := 'Times New Roman';
    1026.   optLabel[5].Font.Style := [];
    1027.   optLabel[5].ParentFont := False;
    1028.   optLabel[5].visible := false;
    1029.    
    1030.  { Button1 := TButton.Create(frmDesign);
    1031.   Button1.Parent := frmDesign;
    1032.   Button1.Left := 0;
    1033.   Button1.Top := 0;
    1034.   Button1.Width := 1;
    1035.   Button1.Height := 1;
    1036.   Button1.Caption := '';
    1037.   Button1.TabOrder := 8;
    1038.   button1.OnEnter:=@intro;  }
    1039.   topbmp := BitmapFromString(28, 44, 'beNrFl1uoVVUUhr9xtqZGIqXHS' +
    1040.        'Cj0wcoCI0uixG6UBZkl0d0iyygrIoIiw8ySzF4krJAwu5BJJN3LUr' +
    1041.        'I008xrmlYqKQrd7PpQ0IWysb7dlAM7Pfuhcxx8D+vMPee/1pzzH2P' +
    1042.        'OA+3GETCozZ8hfaBL+0PpBidCd+kKrRH19gmwFPpKxgmyE87eT5oD' +
    1043.        'YBsMk1tgOxxfqyUTI3bDtZJxq2TLeU1oHgW/wExZ46ipcqfP90rGm' +
    1044.        '7LbV+8Xzd6wA9bLakfNk4k+PyA1+Eyy5RSaikXwlSxy1GZ5xOfJ0g' +
    1045.        'o/Srac3JzmbPhDXnXUT/Kiz/dIf/hd/tQk9eirXTtTc4bDk9fhh6K' +
    1046.        '/oM3ch5YOv8HgMmoWvANHS2M8VIakybfC3/J2Gw9cWDp8D0eWUW/4' +
    1047.        'AXXfdi+ZsifuLkM+gQ3wlzytx6bI5fCrzDPdDpFlLtHj0topmjcQ9' +
    1048.        'flu0fY/y2Qd9YLk7NbKBPtfI1/D52UTezRoXkbsgl1qfmj6b7Pn2m' +
    1049.        'L1J2GJjIZeMF++gxVwgTRGR2ieSdRz51N4V9nkMTV3SDYulxEwpjS' +
    1050.        'uc1mGSmOcTtS/JxfzFZ25QM+vLzm73J+Si+Auq+hOvZRlsIc0xghi' +
    1051.        'S5n4XFgo7+mBb2V1KTJZYG8sz9nzDGiRztEcSWw1gz6AObBYVrq8e' +
    1052.        'zTXyTS4BJ6Vh9vkaWNcXL4zc/MpYpl+3uSu1f2QK/mRpAFGwXVyPR' +
    1053.        'zWYMuO08zWS4mNsFHNZ4hVsMpX5Ny/kTX+tNTcHF38M8Q8/c9oqTx' +
    1054.        'frd5KXT2H2ODufKGlv5Rcz7fkJbjCo3aA5t/bzGu+ur7XS6rd/Ner' +
    1055.        'm92v7bKm+v6KGdaTQ6Vl7xvUEZp59zgHnpPFVbrFJllPTCrp87Fqy' +
    1056.        'ZVwlkdt730ecF08CqfLQjU3yPvE2CoBI0nZB+VY7wM9JTpd82hvHc' +
    1057.        'lrlVtihbxMnAtPSBaoSZIH5cFe27q1p9m/lO7clOeJ+TI7YnhV7SN' +
    1058.        'Jm90uB9q/JvvW7FOlfMVMPT/X+jAt4rgqWSLJ+nmTHKBau9ERmjUz' +
    1059.        'YrhMrQ7BeBSSOyIGWbJGurbjYJya0ZxmT6vWYGv4dOJ+SMZGrnOcJ' +
    1060.        'LM8MsZo5mY0W9zEgTIe7oPb5PyIfuXqMoUYZUXqsl81c5X6ydWVS+' +
    1061.        'MqSE6LyAQ8XG4uF/5a05pdvbW2etcaXzwwJOKgktpZZI6RaO5C20G' +
    1062.        'adTv18n+fnPWpMjCqMl5vH1YWoUnN/y3+AXUDnhg=');
    1063.   topImg := TImage.Create(frmDesign);
    1064.   topImg.Parent := frmDesign;
    1065.   topImg.SetBounds(0, 0, 28, 44);
    1066.   SafeCopyCanvas(GetBitmapCanvas(topBmp), topImg.Canvas, 0, 0, 28, 44, 0, 0, 28, 44);
    1067.   topImg.Left := 15;
    1068.   topImg.Top := 15;
    1069.   topImg.Width := 28;
    1070.   topImg.Height := 44;
    1071.   freebitmap(topbmp);
    1072.  
    1073. end;
    1074.  
    1075. procedure SafeInitForm;
    1076. var
    1077.   v: TVariantArray;
    1078. begin
    1079.   SetArrayLength(v, 0);
    1080.   ThreadSafeCall('mrzForm', v);
    1081. end;
    1082.  
    1083. procedure ShowFormModal;
    1084. begin
    1085.   frmDesign.ShowModal;
    1086. end;
    1087.  
    1088. procedure SafeShowFormModal;
    1089. var
    1090.   v: TVariantArray;
    1091. begin
    1092.   SetArrayLength(V, 0);
    1093.   ThreadSafeCall('ShowFormModal', v);
    1094. end;
    1095.  
    1096. begin
    1097. //  getSelf.WindowState:=wsMinimized;
    1098.   loadSettings;
    1099.   safeInitForm;
    1100.   SafeShowFormModal;
    1101.   FreeForm(frmDesign);
    1102. end.
    1103.  
    1104. {
    1105.  
    1106.  
    1107. }
     
  6. tharoux

    tharoux Level IV

    Joined:
    Dec 30, 2006
    Messages:
    2,733
    Likes Received:
    126
    Location:
    In front of my PC, Montreal
    Re: [SCAR]How to user SCAR

    I'll take a look at this !
    Thanks ! :D
     
  7. Dusk412

    Dusk412 Level I

    Joined:
    Aug 2, 2008
    Messages:
    88
    Likes Received:
    9
    Re: [SCAR]How to user SCAR

    Your welcome. Enjoy!
     
  8. ry_thebasketballguy

    Joined:
    May 14, 2009
    Messages:
    59
    Likes Received:
    0
    thanks soo much
    i thought i just wasted like 15 points
    but i didnt
    thanks!!