Results 1 to 8 of 8

Thread: Flash Game Level Select script help

  1. #1
    Join Date
    Sep 2008
    Posts
    43
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Flash Game Level Select script help

    Ok I am currently making a flash game called the impoosible quiz level select script.

    Code:
    program ImpossibleQuizSolver;
    {this program was made by barbarianl3t using
    whocares357 tutorial on the scripting basics.
    
    http://www.addictinggames.com/theimpossiblequiz.html
    
    How to use level select part.
    Just put the green brackets around the levels that you don't want to skip.
    example
    
    level1
    level2
    {level3
    level4
    level5
    ...}
    //This will make you skip levels 1 and two and start on level 3. Have fun
    
    var
    x,y: integer;
    
    const
    br1=456;
    br2=365;
    bl1=180;
    bl2=329;
    tr1=463;
    tr2=252;
    tl1=188;
    tl2=210;
    
    procedure startgame;
    
    begin;
     FindColor(x,y,9828771,0,0,600,400);
     Wait(3000);
     MoveMouse(x,y);
     Wait(100);
     ClickMouse(x,y,true);
     Wait(5000);
     MoveMouse(172,355);
     Wait(100);
     ClickMouse(172,355,true);
    end;
    
    
    
    procedure level1;
     begin;
      Wait(200);
      MoveMouse(br1,br2);
      Wait(500);
      ClickMouse(br1,br2,true);
     end;
     
    procedure level2;
     begin;
      Wait(200);
      MoveMouse(bl1,bl2);
      Wait(500)
      ClickMouse(bl1,bl2,true);
      Wait(100);
     end;
     
    procedure level3;
     begin;
      wait(200);
      MoveMouse(tl1,tl2);
      Wait(500);
      ClickMouse(tl1,tl2,true);
      Wait(100);
     end;
     
    procedure level4;
     begin;
      Wait(200);
      MoveMouse(364,129);
      Wait(500);
      ClickMouse(364,129,true);
      Wait(100);
     end;
     
    procedure level5;
     begin;
      Wait(200);
      MoveMouse(637,339);
      Wait(200);
      ClickMouse(54,249,true);
     end;
     
    procedure level6;
     begin;
      Wait(200);
      MoveMouse(bl1,bl2);
      Wait(100);
      ClickMouse(bl1,bl2,true);
      Wait(200);
     end;
     
    procedure level7;
     begin;
      Wait(200);
      MoveMouse(br1,br2);
      Wait(100);
      ClickMouse(br1,br2,true);
      Wait(200);
     end;
    
    procedure level8;
     begin;
      Wait(200);
      MoveMouse(220,215)
      Wait(100);
      ClickMouse(220,215,true);
      Wait(200);
     end;
     
    procedure level9;
     begin;
      Wait(200);
      MoveMouse(tr1,tr2);
      Wait(100);
      ClickMouse(tr1,tr2,true);
      Wait(200);
     end;
     
    procedure level10;
     begin;
      Wait(200);
      MoveMouse(236,328)
      Wait(200);
      ClickMouse(236,328,true);
      Wait(3000);
     end;
     
    procedure level11;
     begin;
      Wait(200);
      MoveMouse(tr1,tr2);
      Wait(100);
      ClickMouse(tr1,tr2,true);
      Wait(200);
     end;
     
    procedure level12;
     begin;
      Wait(200);
      MoveMouse(273,57);
      Wait(100);
      ClickMouse(273,57,true);
     end;
     
    procedure level13;
     begin;
      Wait(200);
      MoveMouse(tr1,tr2);
      Wait(100);
      ClickMouse(tr1,tr2,true);
     end;
     
    procedure level14;
     begin;
      Wait(200);
      MoveMouse(tr1,tr2);
      Wait(100);
      ClickMouse(tr1,tr2,true);
      Wait(200);
     end;
    
     procedure level15;
      begin;
       Wait(200);
       ClickMouse(404,298,true);
       Wait(100);
       ClickMouse(502,212,true);
       Wait(100);
       ClickMouse(266,217,true);
       Wait(100);
       ClickMouse(191,317,true);
       Wait(100);
       ClickMouse(204,221,true);
       Wait(200);
      end;
      
     procedure level16;
      begin;
       Wait(200);
       MoveMouse(tr1,tr2);
       Wait(100);
       ClickMouse(tr1,tr2,true);
       Wait(200);
      end;
      
    procedure level17;
     begin;
      Wait(100);
      MoveMouse(73,59);
      Wait(200);
      ClickMouse(73,59,true);
     end;
     
    procedure level18;
     begin;
      Wait(100);
      MoveMouse(243,262);
      Wait(200);
      ClickMouse(243,262,true);
      Wait(200);
     end;
     
    procedure level19;
     begin;
      Wait(100);
      ClickMouse(323,332,true);
      Wait(50);
      ClickMouse(394,223,true);
      Wait(50);
      ClickMouse(545,221,true);
      Wait(50);
      ClickMouse(579,230,true);
      Wait(50);
      ClickMouse(481,230,true);
      ClickMouse(598,393,true);
      Wait(200);
     end;
     
    procedure level20;
     begin;
      Wait(50);
      MoveMouse(bl1,bl2);
      Wait(50);
      ClickMouse(bl1,bl2,true);
      Wait(100);
     end;
    
    procedure level21;
     begin;
      Wait(3000);
      MoveMouse(tl1,tl2);
      Wait(100);
      ClickMouse(tl1,tl2,true);
     end;
     
    procedure level22;
     begin;
      Wait(100);
      MoveMouse(br1,br2);
      Wait(100);
      ClickMouse(br1,br2,true);
      Wait(200);
     end;
     
    procedure level23;
     begin;
      Wait(100);
      MoveMouse(br1,br2);
      Wait(99);
      ClickMouse(br1,br2,true);
      Wait(200);
     end;
     
    procedure level24;
     begin;
      Wait(100);
      MoveMouse(83,452);
      Wait(100);
      ClickMouse(83,452,true);
     end;
     
    procedure level25;
     begin;
      Wait(100);
      MoveMouse(tl1,tl2);
      Wait(200);
      ClickMouse(tl1,tl2,true);
      Wait(200);
     end;
    
    procedure level26;
     begin;
      Wait(100);
      MoveMouse(326,232);
      Wait(100);
      ClickMouse(326,232,true);
      Wait(200);
     end;
    
    procedure level27;
     begin;
      Wait(100);
      MoveMouse(br1,br2);
      Wait(150);
      ClickMouse(br1,br2,true);
      Wait(100);
     end;
     
    procedure level28;
     begin;
      Wait(100);
      MoveMouse(164,280);
      Wait(100);
      ClickMouse(165,280,true);
      Wait(200);
     end;
     
    procedure level29;
     begin;
      Wait(100);
      MoveMouse(bl1,bl2);
      Wait(50);
      ClickMouse(bl1,bl2,true);
      Wait(100);
     end;
     
    procedure level30;
     begin;
      Wait(100);
      MoveMouse(89,335);
      Wait(100);
      ClickMouse(432,229,true);
      Wait(100);
     end;
    
    procedure level31;
     begin;
      Wait(100);
      MoveMouse(bl1,bl2);
      Wait(150);
      ClickMouse(bl1,bl2,true);
      Wait(10);
     end;
     
    procedure level32;
     begin;
      Wait(100);
      MoveMouse(tr1,tr2);
      Wait(50);
      ClickMouse(tr1,tr2,true);
      Wait(100);
     end;
     
    procedure level33;
     begin;
      Wait(100);
      MoveMouse(tl1,tl2);
      Wait(50);
      ClickMouse(tl1,tl2,true);
      Wait(100);
     end;
     
    procedure level34;
     begin;
      Wait(100);
      MoveMouse(-1,-1);
      Wait(7000);
     end;
     
    procedure level35;
     begin;
      Wait(5500);
      Clickmouse(326,227,true);
      Wait(100);
     end;
     
    procedure level36;
     begin;
      Wait(100);
      MoveMouse(tr1,tr2);
      Wait(100);
      ClickMouse(tr1,tr2,true);
      Wait(200);
     end;
     
    procedure level37;
     begin;
      Wait(100);
      MoveMouse(tr1,tr2);
      Wait(25);
      ClickMouse(tr1,tr2,true);
     end;
     
    procedure level38;
     begin;
      Wait(100);
      MoveMouse(tr1,tr2);
      Wait(25);
      ClickMouse(tr1,tr2,true);
      Wait(100);
     end;
     
    procedure level39;
     begin;
      Wait(100);
      MoveMouse(tl1,tl2);
      Wait(25);
      ClickMouse(tl1,tl2,true);
      Wait(100);
     end;
     
    procedure level40;
     begin;
      Wait(100);
      MoveMouse(194,242);
      Wait(100);
      ClickMouse(388,235,true);
      Wait(100);
     end;
     
     
     
     
     
     
    begin
     level1;
     level2;
     level3;
     level4;
     level5;
     level6;
     level7;
     level8;
     level9;
     level10;
     level11;
     level12;
     level13;
     level14;
     level15;
     level16;
     level17;
     level18;
     level19;
     level20;
     level21;
     level22;
     level23;
     level24;
     level25;
     level26;
     level27;
     level28;
     level29;
     level30;
     level31;
     level32;
     level33;
     level34;
     level35;
     level36;
     level37;
     level38;
     level39;
     level40;
    end.
    I was wondering if there was a way to change a constant or do something so you don't have to put brackets and still could choose what level to start on.

  2. #2
    Join Date
    Dec 2006
    Location
    Program TEXAS home of AUTOERS
    Posts
    7,934
    Mentioned
    26 Post(s)
    Quoted
    237 Post(s)

    Default

    like:
    SCAR Code:
    const

    level= '1'

    //MAIN LOOP

    case level of
          '1' : level1;
          '2' : level2;
    //SO ON...
    end;

    is that what you needed?
    btw sorry for that rough example, it should explain what i mean..

  3. #3
    Join Date
    Sep 2008
    Posts
    43
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I don't quite understand how that works but it looks like its what I wanted.

  4. #4
    Join Date
    Dec 2006
    Location
    Program TEXAS home of AUTOERS
    Posts
    7,934
    Mentioned
    26 Post(s)
    Quoted
    237 Post(s)

    Default

    well what dont you not understand?

    the const is where you put the constant and "level" is a string.

    so be like

    SCAR Code:
    const

    level='1'; // put the level you want to play at.

    Procedure blah;//your script , THIS IS JUST A EXAMPLE...
    begin
    end;
    Procedure blah;
    Procedure blah;
    Procedure blah;
    Procedure blah;
    Procedure blah;
    Procedure blah;
    Procedure blah;

    //Main loop begins.
    begin
    setupsrl;
    case level of
          '1' : level1; //"level1" is the procedure name. and '1' is the number what the user chose..
          '2' : level2;
          '3' : level3;
    //so on..
    end;

    that?

  5. #5
    Join Date
    Sep 2008
    Posts
    43
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ok thanks so much I finally understand it.

  6. #6
    Join Date
    Dec 2006
    Location
    Program TEXAS home of AUTOERS
    Posts
    7,934
    Mentioned
    26 Post(s)
    Quoted
    237 Post(s)

    Default

    np, if any questions just post or pm.

  7. #7
    Join Date
    Sep 2008
    Location
    New Zealand
    Posts
    157
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

  8. #8
    Join Date
    Dec 2007
    Location
    Williston, ND
    Posts
    3,106
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    lol at the game, yeah...it kinda sucks, but it's addicting
    Proud owner of "Efferator" my totally boted main account!
    "You see, sometimes, science is not a guess" -Xiaobing Zhou (my past physics professor, with heavy Chinese accent)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Facebook Flash Game
    By fORCE_wORKS in forum First Scripts
    Replies: 0
    Last Post: 11-21-2007, 03:14 PM
  2. My game (Flash)
    By Fourscape in forum News and General
    Replies: 13
    Last Post: 05-16-2007, 11:31 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •