Results 1 to 14 of 14

Thread: Looking to optimize your script(s)? Look no further!

  1. #1
    Join Date
    May 2007
    Posts
    5
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Looking to optimize your script(s)? Look no further!

    So yeah, post bits of code, procedures, functions and such and I will gladly optimize them along with giving you detailed explanations of what I have changed/improved. If you'd like, we can use PMs as the media. I review pay scripts in exchange for granted usage of the script itself. I don't do anything that involves logging onto RS or creating Forms. My credentials you ask for? I have none. Hopefully that will change as time progresses.

    Alright, let's see how this works out.

  2. #2
    Join Date
    Apr 2007
    Posts
    3,152
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    lol...do u know nething about scripting?jw cuz u only have 2 posts
    SCAR Tutorials: The Form Tutorial | Types, Arrays, and Classes
    Programming Projects: NotePad | Tetris | Chess


  3. #3
    Join Date
    May 2007
    Posts
    5
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    lol

  4. #4
    Join Date
    Apr 2007
    Posts
    57
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default climb down

    I want to go down a ladder, it works but sometimes someone gets in the way and then there is no option "climb" and then my script goes on . How can I make my script so it keeps trying until it goes down?

    My ladder godown procedure

    If (FindObjMultiText(TX, TY, 'La', 'dd', 'er', 2708852, 4)) then
    Begin
    Mouse(TX, TY, 3, 3, False)
    Wait(200+random(50))
    ChooseOption(x,y,'Climb')
    Flag;
    Wait(800+random(50))

  5. #5
    Join Date
    Mar 2007
    Posts
    3,681
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by marre View Post
    I want to go down a ladder, it works but sometimes someone gets in the way and then there is no option "climb" and then my script goes on . How can I make my script so it keeps trying until it goes down?

    My ladder godown procedure

    If (FindObjMultiText(TX, TY, 'La', 'dd', 'er', 2708852, 4)) then
    Begin
    Mouse(TX, TY, 3, 3, False)
    Wait(200+random(50))
    ChooseOption(x,y,'Climb')
    Flag;
    Wait(800+random(50))






    repeat
    If (FindObjMultiText(TX, TY, 'La', 'dd', 'er', 2708852, 4)) then
    Begin
    Mouse(TX, TY, 3, 3, False)
    Wait(200+random(50))
    ChooseOption(x,y,'Climb')
    Flag;
    Wait(800+random(50))
    until (FindObjMultiText(TX, TY, 'La', 'dd', 'er', 2708852, 4)


    not sure tho

  6. #6
    Join Date
    Apr 2007
    Posts
    3,152
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    sry hugolord...i think its

    SCAR Code:
    repeat
    If (FindObjMultiText(TX, TY, 'La', 'dd', 'er', 2708852, 4)) then
    Begin
    Mouse(TX, TY, 3, 3, False)
    Wait(200+random(50))
    ChooseOption(x,y,'Climb')
    Flag;
    Wait(800+random(50))
    until IsLoading;
    If(IsLoading)then
    Wait(3000+random(1000));
    If (FindObjMultiText(TX, TY, 'La', 'dd', 'er', 2708852, 4)) then
    begin
    Mouse(x,y,2,2,true);
    if not (Popup('climb down the stairs')) and (PopUp('Climb up the stairs')then
    repeat
    ThisProcedure;
    until Popup('climb down the stairs') and (PopUp('Climb up the stairs')

    but this only works as long as it has more than 2 stairs...if not then put the ending part with popup as whatever the opposite of what u wanted on the way was
    SCAR Tutorials: The Form Tutorial | Types, Arrays, and Classes
    Programming Projects: NotePad | Tetris | Chess


  7. #7
    Join Date
    Mar 2007
    Posts
    3,681
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    oh yer thats much better :P

  8. #8
    Join Date
    Apr 2007
    Posts
    57
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Unknown identifier 'IsLoading' in script C:\Documents and Settings\ :s

  9. #9
    Join Date
    Apr 2007
    Posts
    3,152
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    add the include for loading
    SCAR Tutorials: The Form Tutorial | Types, Arrays, and Classes
    Programming Projects: NotePad | Tetris | Chess


  10. #10
    Join Date
    May 2007
    Posts
    5
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    That's not related to optimization.

  11. #11
    Join Date
    Apr 2007
    Posts
    3,152
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    u never answered my question..."lol...do u know nething about scripting?jw cuz u only have 2 posts"
    SCAR Tutorials: The Form Tutorial | Types, Arrays, and Classes
    Programming Projects: NotePad | Tetris | Chess


  12. #12
    Join Date
    Mar 2007
    Posts
    3,681
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    [QUOTE=orlandu633;121659]That's not related to optimization.[/QUOTE]



    How is it not 'optimization' ?? i don't get it...

    here let me tel you what the word means :



    [op-tuh-muh-zey-shuhn]


    1. the fact of optimizing; making the best of anything.
    2. the condition of being optimized.
    3. Mathematics. a mathematical technique for finding a maximum or minimum value of a function of several variables subject to a set of constraints, as linear programming or systems analysis.
    The procedure or procedures used to make a system or design as effective or functional as possible, especially the mathematical techniques involved.

    the act of rendering optimal; "the simultaneous optimization of growth and profitability"; "in an optimization problem we seek values of the variables that lead to an optimal value of the function that is to be optimized"; "to promote the optimization and diversification of agricultural products"

    n the context of technical analysis, it is the process of adjusting one's trading system in an attempt to make it more effective. These adjustments include changing the number of periods used in moving averages, changing the number of indicators used, or simply taking away what doesn't work.


    dan cardin and i were making the procedure/code better (optmized) so can it NOT be optimization

  13. #13
    Join Date
    Feb 2007
    Location
    Australia
    Posts
    358
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Yup, making things better.
    What they are talking about is optimization in my eyes.

  14. #14
    Join Date
    May 2007
    Location
    Canada
    Posts
    261
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by marre View Post
    I want to go down a ladder, it works but sometimes someone gets in the way and then there is no option "climb" and then my script goes on . How can I make my script so it keeps trying until it goes down?

    My ladder godown procedure

    If (FindObjMultiText(TX, TY, 'La', 'dd', 'er', 2708852, 4)) then
    Begin
    Mouse(TX, TY, 3, 3, False)
    Wait(200+random(50))
    ChooseOption(x,y,'Climb')
    Flag;
    Wait(800+random(50))
    Try
    SCAR Code:
    procedure ClimbLadder;
    var laddertime : integer;
    begin
    MarkTime(laddertime);
    repeat
     FindObjMultiText(TX, TY, 'La', 'dd', 'er', 2708852, 4);
     Mouse(TX, TY, 3, 3, False);
     Wait(200+random(50));
     ChooseOption(x,y,'limb');
     Flag;
     Wait(800+random(50));
    until (FindObjMultiText(TX, TY, 'La', 'dd', 'er', 2708852, 4)) or (TimeFromMark(laddertime) > 120000);
    end;

    That should work...

    The MarkTime is just so that that procedure isn't a endless loop if it never finds the ladder/stairs.

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
  •