Results 1 to 5 of 5

Thread: hmm...help?

  1. #1
    Join Date
    Sep 2007
    Posts
    415
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default hmm...help?

    okay so, i'm trying to make this autobuyer for chaos, and i'm getting there, but i'm having serious trouble, i'm doing the function "runeamount" that returns how many runes the person has offered, but i dunno how to take that amount and use it in anything, here's the script so far

    SCAR Code:
    program New;
    {.include srl/srl.scar}
    {.include srl/srl/skill/buysell.scar}
    {.include srl/srl/misc/trade.scar}

    var
    x,y,z,a,AmountToGive,NumOfChaos,Chaos: integer;

    const
      Message = ('buying chaos 110 ea and deaths 270 ea - drizzt');


    begin
      setupsrl;
      activateclient;
      LoadRune('chaos');
      FreeBitmap(chaos);
      repeat;
        Typesend(message);
        if (someonetrades = true) then
        begin
          accepttrade;
          wait(500);
          if (tradescreen) then
          begin
            wait(3000);
            begin
              Runeamount('tradescreen','Chaos');   //this is where my current problem is
              AmountToGive := (NumOfChaos * 110);
            end
            findobj(z,a,'oins',1680070,549,205,736,460);
            mouse(z,a,2,2,false);
            choosoption('er-X');
            typesend(inttostr(AmountToGive));
          end
          if PlayerAccepted = true then
          Accept;
          CheckItem(true,'Chaos Rune x ' + inttostr(numofchaos););
        end
      until not(loggedin);
    end.


    k i figured out a way to do it, is this the proper way?

    SCAR Code:
    program New;
    {.include srl/srl.scar}
    {.include srl/srl/skill/buysell.scar}
    {.include srl/srl/misc/trade.scar}

    var
    x,y,z,a,AmountToGive,NumOfChaos,Chaos: integer;

    const
      Message = ('buying chaos 110 ea and deaths 270 ea - drizzt');
      ItemToBuy = ('aos');
      PricePerItem = (110);
     
    function FindIt: boolean;
      begin
        if Findcolor(x,y,1680070,549,205,736,460) then
        begin
          MMouse(z,a,0,0)
          Wait(50+Random(50));
          if (IsUpText(ItemToBuy)) then
          begin
            Result := True;
          end
        end
      end;

    begin
      setupsrl;
      activateclient;
      LoadRune('chaos');
      repeat;
        Typesend(message);
        if (someonetrades = true) then
        begin
          accepttrade;
          wait(500);
          if (tradescreen) then
          begin
            wait(3000);
            if FindIt = true then
            begin
              NumOfChaos := Runeamount('tradescreen','Chaos');
              AmountToGive := (NumOfChaos * PricePerItem);
            end
            mouse(z,a,2,2,false);
            chooseoption('er-X');
            typesend(inttostr(AmountToGive));
          end
          if PlayerAccepted = true then
          Accept;
          CheckItem(true,'Chaos Rune x ' + inttostr(numofchaos));
        end
      until (isfunctionkeydown(1) = true);
      FreeBitmap(chaos);
    end.
    Quote Originally Posted by That guy that wrote forefeathers
    <munklez>haha im too lazy, girls annoy me
    <munklez> they always wanna like, do stuff
    <munklez> and i just wanna program
    <munklez> and they always take all my money

  2. #2
    Join Date
    Oct 2006
    Posts
    412
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    its cause after you load the chaos, you free it right after, so there is actually no 'chaos' to find

    LoadRune('chaos');
    FreeBitmap(chaos);

    place the free bitmap at the end of the script.

  3. #3
    Join Date
    May 2007
    Location
    Netherlands, Amersfoort
    Posts
    2,701
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Line 31: [Error] (15766:44): Invalid number of parameters in script

    you didn't fill in the procedure correct. look in the includes to find out how you need to fill it in

  4. #4
    Join Date
    Sep 2007
    Posts
    415
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    i understand that master, and ty Teapot, i'll need that later, but my problem was that i don't know how to get the result of "Runeamount" to "numofchaos" or, how to use "Runeamount" in any way
    Quote Originally Posted by That guy that wrote forefeathers
    <munklez>haha im too lazy, girls annoy me
    <munklez> they always wanna like, do stuff
    <munklez> and i just wanna program
    <munklez> and they always take all my money

  5. #5
    Join Date
    Mar 2007
    Posts
    15
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    from a shop or other persons couse other persons would be very had to make

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
  •