Results 1 to 5 of 5

Thread: Why wont my script drop the logs??

  1. #1
    Join Date
    Dec 2008
    Posts
    160
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Question Why wont my script drop the logs??

    Ok so this is my VERY first script and uhh it wont seem to drop the logs.....it works but wont drop them)=
    My Soul Wars Scipt Proggress:[100%....]
    Probably won't release though I like it for myself

  2. #2
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    Quote Originally Posted by poopy2177 View Post
    Ok so this is my VERY first script and uhh it wont seem to drop the logs.....it works but wont drop them)=
    Do you mean it right clicks on the logs, but doesn't choose the drop option?

    This is the procedure I used:

    SCAR Code:
    procedure Cut_DropLogs;
    var a : Integer;
    begin
      if(InvFull)then
      begin
        Wait(80 + Random(100));
        for a := 2 to 28 do
          DropItem(a);
        NumOfLogs := NumOfLogs + 27;
        if(NumOfLogs >= Players[CurrentPlayer].Integers[0])then
        begin
          Writeln('Cut desired number of logs, logging out.');
          Wait(80 + Random(100));
          Logout;
          Players[CurrentPlayer].Active := False;
          Exit;
        end;
      end;
      S_FindRandoms;
    end;

    This is simpler, and get's the job done. I can't see what's wrong with yours, try putting in Writeln's and you can see where the error is. That's a useful technique Nava2 told me when I first started scripting.
    Last edited by Coh3n; 06-19-2009 at 08:07 AM.

  3. #3
    Join Date
    Jan 2007
    Location
    Nomming bits in your RAM
    Posts
    385
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by poopy2177 View Post
    Ok so this is my VERY first script and uhh it wont seem to drop the logs.....it works but wont drop them)=
    Try something to the effect of this:
    SCAR Code:
    procedure DropLogs;
    var
      i: Integer;
    begin
      if(not(LoggedIn))then Exit;
      for i:=1 to 28 do //Loop.
      begin
        MMouseItem(i); //Mouseover the item.
        if(IsUpTextMultiCustom(['Logs', 'ogs', 'Log'])then //if there are logs in that slot
          DropItem(i);
        wait(500+random(500));
      end;
    end;
    Scans through your inventory one by one, if the uptext has 'Logs', 'ogs', or 'Log' in it, it drops that item.

    Simple, fast, and easy.

    If you want to use the procedure you're using, though, then I don't really see much of a problem with it. You may want to use 'Drop' as opposed to 'rop' in ChooseOption, though.
    Last edited by Macro_FTW; 06-19-2009 at 08:03 AM.
    Current Project: Catching up. XD. Potentially back for the summer, depending on how things go.

  4. #4
    Join Date
    Dec 2008
    Posts
    160
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    hey thanks guys for fixing this also ty for writeln method to see where error is ty!
    My Soul Wars Scipt Proggress:[100%....]
    Probably won't release though I like it for myself

  5. #5
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    Quote Originally Posted by poopy2177 View Post
    hey thanks guys for fixing this also ty for writeln method to see where error is ty!
    No problem. I find myself using it all the time, it's a very useful technique.

    EDIT: If you still want to use your procedure, update to Revision 34. I just read there was a bug in the ChooseOption function, so that may have been your problem.
    Last edited by Coh3n; 06-19-2009 at 10:34 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
  •