Results 1 to 6 of 6

Thread: Need help again lol

  1. #1
    Join Date
    May 2006
    Location
    Qld, Australia
    Posts
    223
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Need help again lol

    ok, I made a script for a game, its not for runescape and I dont want to say te game to encourage ppl to macro on it, im not really even gonna use this script but finishing it will help me with making other scripts, It doesnt work so i need some1 to help me fix it.
    any help would be greatly appreciated.

    PHP Code:
    program MinerSmelterAndSmither;
    var
    skillinteger;
    procedure SetUpVar;
    begin
    skill
    := 3//1 is for mining, 2 for smelting & 3 for smithing
    end;
    procedure Mine;
    begin
    if(skill<2then
    movemousesmooth
    (335,240);
    clickmouse(335,240,false);
    wait(100);
    movemousesmooth(420,325);
    clickmouse(420,325,true);
    wait(100);
    end;
    procedure RepeatDaMine;
    begin
    if(skill<2then
    repeat
    Mine
    until
    (false);
    end;
    procedure Smelt;
    begin
    if(skill>1then
    movemousesmooth
    (335,150);
    clickmouse(335,150,false);
    wait(100);
    movemousesmooth(425,225);
    clickmouse(425,225,true);
    wait(100);
    end;
    procedure RepeatDaSmelt;
    begin
    if(skill>1then
    repeat
    Smelt
    until
    (false);
    end;
    procedure Smith;
    begin
    if(skill>2then
    movemousesmooth
    (335,210);
    clickmouse(335,210,false);
    wait(100);
    movemousesmooth(425,300);
    clickmouse(425,300,true);
    wait(100);
    movemousesmooth(425,313);
    clickmouse(425,313,true);
    wait(100);
    end;
    procedure RepeatDaSmith;
    begin
    if(skill>2then
    repeat
    Smith
    until
    (false);
    end;
    begin
    writeln
    ('yay im finished');
    end

  2. #2
    Join Date
    Feb 2006
    Location
    Aussie
    Posts
    937
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ok, so,it will only write yay im finished because you have not called any of the procedures. where you have writeln, you need to have smith etc etc, tell me if i wasn't clear enough

  3. #3
    Join Date
    Apr 2006
    Posts
    168
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    To start off with, please space out your Script so we can actually see what you have created..
    AKA Standards.
    Oldgen.

  4. #4
    Join Date
    Feb 2006
    Location
    Aussie
    Posts
    937
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    oh yer lol, i forgot i spaced it out myself when i was looking at it.

  5. #5
    Join Date
    Feb 2006
    Posts
    1,022
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Code:
    program MinerSmelterAndSmither;
    var  // here just have const skill = 3; insted of all the var stuff
      skill: integer;
    
    procedure SetUpVar;
    begin
      skill := 3; //1 is for mining, 2 for smelting & 3 for smithing
    end;
    
    procedure Mine;
    begin
      if (skill = 1) then
        movemousesmooth(335, 240);
      clickmouse(335, 240, false);
      wait(100);
      movemousesmooth(420, 325);
      clickmouse(420, 325, true);
      wait(100);
    end;
    
    procedure RepeatDaMine;
    begin
      if (skill = 1) then
        repeat
          Mine
        until (false);
    end;
    
    procedure Smelt;
    begin
      if (skill = 2) then
        movemousesmooth(335, 150);
      clickmouse(335, 150, false);
      wait(100);
      movemousesmooth(425, 225);
      clickmouse(425, 225, true);
      wait(100);
    end;
    
    procedure RepeatDaSmelt;
    begin
      if (skill = 2) then
        repeat
          Smelt
        until (false);
    end;
    
    procedure Smith;
    begin
      if (skill = 3) then
        movemousesmooth(335, 210);
      clickmouse(335, 210, false);
      wait(100);
      movemousesmooth(425, 300);
      clickmouse(425, 300, true);
      wait(100);
      movemousesmooth(425, 313);
      clickmouse(425, 313, true);
      wait(100);
    end;
    
    procedure RepeatDaSmith;
    begin
      if (skill = 3) then
        repeat
          Smith
        until (false);
    end;
    
    begin
      RepeatDaMine;
      RepeatDaSmelt;
      RepeatDaSmith;
      writeln('yay im finished');
    end.
    I've changed some stuff, like "if (skill > 1) then" because that means if skill is 2 or 3 then it will do somthing that could be wrong, so we want it "if (skill = 2 (you can have 2 or 3)) then".

    For
    Code:
    var  // here just have const skill = 3; insted of all the var stuff
      skill: integer;
    
    procedure SetUpVar;
    begin
      skill := 3; //1 is for mining, 2 for smelting & 3 for smithing
    end;
    all you need is "const skill = 1; //1 is for mining, 2 for smelting & 3 for smithing".

    Also, by chance is it for Atitd?

  6. #6
    Join Date
    May 2006
    Location
    Qld, Australia
    Posts
    223
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ummm i have no idea what atitd is but thx for ur help.
    umm im not sure where to put that const stuff

Thread Information

Users Browsing this Thread

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

Posting Permissions

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