Results 1 to 9 of 9

Thread: Grandexcahnge.scar

  1. #1
    Join Date
    Feb 2009
    Posts
    2,155
    Mentioned
    4 Post(s)
    Quoted
    42 Post(s)

    Default Grandexcahnge.scar

    i was getting errors using it so i jsut fixed it u dont have to use them but it does work


    Code:
    {*******************************************************************************
    Function GESetPrice(value: string): boolean;
    By: Rasta Magician
    Description: Sets the price of an item.
                 '0', 'min' - Minimum Value
                 '1', 'med' - Market Value
                 '2', 'max' - Max value
                      Other - Exact value
    *******************************************************************************}
    Function GESetPrice(Value: Variant): boolean;
    var
      price : integer;
    begin
    
      if not InGE then exit;
      if not GESellMenu then
        if not GEBuyMenu then
          exit;
    
      if value = 'min' then price := 0;
      if value = 'med' then price := 1;
      if value = 'max' then price := 2;
    
      wait(100+Random(50));
    
      case price of
        0: MouseBox(269, 208, 304, 232, 1);      // min price
        1: exit;                            // market price
        2: MouseBox(376, 210, 408, 233, 1);      // max price
        else begin
          MouseBox(429, 209, 462, 234, 1);
          wait(100+Random(100));
          TypeSend(IntToStr(value));
          wait(200+Random(100));
          if IsChatBoxTextAnyLine('price range', clblack) then
          begin
            writeln('wrong price! Out of Price Range!');
            GEMenuExit;
          end;
        end;
      end;
    
      Result := true;
    end;
    Code:
    {*******************************************************************************
    Function InGE: boolean;
    By: Rasta Magician
    Description: Checks if we are in GE
    *******************************************************************************}
    function Inge: Boolean;
    var
      gebmp, x, y : Integer;
    begin
        gebmp := BitmapFromString(107, 15, 'beNrNmFFOAzEMRDlT4beILwQ35' +
           'FAcipUsjUYztuss224jq8qmTmy/OG6218v3x9vX++v2uSTbFMjn9R' +
           'LCg3PZZ/QokfV3cED/9+cFMgwE6IYAY3H3n00vOdCsfODG9W5wCNG' +
           'aENLEm6cfrIj/bB1tiSGv/ACAsg77HwpVCBW9VYCybDU+j+IsgFvg' +
           'c/+b9DsFILtUAWycPCT9BKCXIK5L4m0IfJMilqLrAaamve/6sj5bF' +
           '8dSf6ReTcZ5dyQBgFEMReO9hqYAlBV4ys0MlNIh2OMrL5ismfrP3n' +
           'pcvlOVvoynAPlRJmKKbN/WMMgmKuBLR9jrc6pcWfdk671K+1IiOOo' +
           '5QKHXgJr0hwCbo10BrCxOQN0EKMcBANOCk9JmgNx/AMBhBk5g7gbI' +
           'DUCagpMCTI9wA606RBUobGVzNfXMrCCk1ht9d6aKwgHi+gd6IQI8R' +
           'C69rOl9PIp+ZRoVr7ma+pV7qDzXF4AetQOcXJhX7373fp+6n3j9T6' +
           'UB2NNzgPve958QmgDsIRxC75//nJzCqjJd/drm8gcF+e3g');
      Result := Findbitmap(gebmp, x, y);
      freebitmap(gebmp);
    end;

  2. #2
    Join Date
    Jul 2007
    Location
    Right now? Chair.
    Posts
    8,488
    Mentioned
    3 Post(s)
    Quoted
    12 Post(s)

    Default

    what errors?

    ~RM

    I & I know Zion. It is in the spirit, body and mind of every one of us
    RMouse(obj: TMSIObject): boolean;

  3. #3
    Join Date
    Feb 2009
    Posts
    2,155
    Mentioned
    4 Post(s)
    Quoted
    42 Post(s)

    Default

    i got couldn't convert the string double or somthing along those lines in the first one


    and the socond one i got a run time error

  4. #4
    Join Date
    Oct 2006
    Posts
    206
    Mentioned
    2 Post(s)
    Quoted
    45 Post(s)

    Default

    same problem, InGE is broken.

  5. #5
    Join Date
    Oct 2007
    Location
    #srl
    Posts
    6,102
    Mentioned
    39 Post(s)
    Quoted
    62 Post(s)

    Default

    Thats a pretty big .bmp for InGE. Also, .bmp's tend to become outdated quickly as colors change and what not. Why not count a color? or check for a color at a specific x, y?

  6. #6
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    InGE could be done with TPA's as well:

    SCAR Code:
    Function InGE : Boolean;
    Var TPA : TPointArray;
    Begin
      FindColorsTolerance(TPA, 7581167, MSX1, MSY1, MSX2, MSY2, 2);
      Result := (Length(TPA) > 2);
    End;

  7. #7
    Join Date
    Aug 2009
    Posts
    27
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    so i take it that this is a basic trade script? simple but effective?
    so which one would you recommend?

  8. #8
    Join Date
    Sep 2006
    Posts
    5,219
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    This is not a script. This is a thread about a function that is in an include that is used by scripts that trade at the GE. Scripts are here http://www.villavu.com/forum/forumdisplay.php?f=164

  9. #9
    Join Date
    Feb 2009
    Posts
    2,155
    Mentioned
    4 Post(s)
    Quoted
    42 Post(s)

    Default

    didnt work
    Last edited by JPHamlett; 08-17-2009 at 11:36 AM.

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
  •