Results 1 to 15 of 15

Thread: MultiNet>Drop

  1. #1
    Join Date
    Feb 2007
    Location
    Access Violation at 0x00000000
    Posts
    2,865
    Mentioned
    3 Post(s)
    Quoted
    18 Post(s)

    Default MultiNet>Drop

    For example, i have this as DeclarePlayers:

    SCAR Code:
    Players[0].Name       := 'username'; //Username
    Players[0].Pass       := 'password'; //Password
    Players[0].Nick       := 'sern'; //3-4 letters of username. e.x sern
    Players[0].Active     :=  True;
    Players[0].Strings[1] := 'Net'; //Net, Bait, Cage, Harpoon.
    Players[0].Strings[2] := '2' //Amount of nets used

    How do i get the Multi net thing work with my own made dropping?:

    SCAR Code:
    procedure Drop;
    var I : Integer;
    begin
    for I := 2 to 28 do
     DropItem(i);

    //I cud keep writing for different amount of nets:
    if (Players[CurrentPlayer].Strings[2] := '2') then
    begin
    for I := 3 to 28 do
     DropItem(i);
    end;
    //And so on and on with '3' and '4', etc. But, is there a quicker way?
    end;
    Ce ne sont que des gueux


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

    Default

    SCAR Code:
    var
      j:integer;
    begin
      j := StrToInt(Players[CurrentPlayer].Strings[2]) + 1;
      DropTo(j, 28);
    end;

    DropTo(StartSpot, EndSpot:integer):boolean;

    edit:
    and why the hell would you have the amount of nets as a string?
    Players[0].Integers[0] = 2;
    would work as well and save you the StrToInt trouble.

    ~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 2007
    Location
    Access Violation at 0x00000000
    Posts
    2,865
    Mentioned
    3 Post(s)
    Quoted
    18 Post(s)

    Default

    Yeh, but i didnt use the string yet, just to test :P

    Is there a possibility for like, hwne i got 4 nets, it drags all those nets organised 1 spot to the left when 1 net is gone?
    Else it'd miss that empty spot (filled with a fish then) with dropping

    And, DropTo doesnt work (Unknown Identifier) had it b4 i believe
    SCAR Code:
    begin
      J := Players[CurrentPlayer].Integers[1] + 1;
    for I := J to 28 do
     DropItem(i);
    end;
    That'd work?
    Ce ne sont que des gueux


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

    Default

    ever heard of saying thank you?

    you could look for a fish dtm in the inv to drop or you could count the nets, and if there's one missing move the last one to the first inv spot. then

    SCAR Code:
    Players[CurrentPlayer].Strings[1] := IntToStr(StrToInt(Players[CurrentPlayer].Strings[1]) - 1)

    //
    var
      j:integer;
    begin
      j:= StrToInt(Players[CurrentPlayer].Strings[1]);
      Dec(j);
      Players[CurrentPlayer].Strings[1] := IntToStr(j);
    end;

    ~RM

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

  5. #5
    Join Date
    Feb 2007
    Location
    Access Violation at 0x00000000
    Posts
    2,865
    Mentioned
    3 Post(s)
    Quoted
    18 Post(s)

    Default

    Thank you

    What does 'Dec' do? - nvm scrolled thru SCAR manual

    Do shirmp and anchovie have same shape? (so dtms too?)
    Ce ne sont que des gueux


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

    Default

    Quote Originally Posted by floor66 View Post
    Thank you

    What does 'Dec' do? - nvm scrolled thru SCAR manual

    Do shirmp and anchovie have same shape? (so dtms too?)
    Dec will do the same thing as
    j := j-1;

    yes i think they do have the same shape, make sure you have 255 tolerance to find both tough.

    ~RM

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

  7. #7
    Join Date
    Feb 2007
    Location
    Access Violation at 0x00000000
    Posts
    2,865
    Mentioned
    3 Post(s)
    Quoted
    18 Post(s)

    Default

    This i have as final:

    SCAR Code:
    procedure Drop;
    var I, J : Integer;
    begin
    if (Players[CurrentPlayer].Booleans[2] = True) then //Booleans[2] is: 'Use multi equipment?'
    begin
      J := Players[CurrentPlayer].Integers[1] + 1;
    for I := J to 28 do
     DropItem(i);
    end else
    for I := 2 to 28 do
     DropItem(i);
    end;

    Btw, i think imma use ArrangeInv;
    Ce ne sont que des gueux


  8. #8
    Join Date
    Oct 2006
    Posts
    1,190
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    i thought ArrangeInv just moves items around your inventory, i dont see how that is useful when dropping



  9. #9
    Join Date
    Feb 2007
    Location
    Access Violation at 0x00000000
    Posts
    2,865
    Mentioned
    3 Post(s)
    Quoted
    18 Post(s)

    Default

    I thought it worked like:

    |Not Filled|Spot2|Spot3|Spot4|
    |Spot1|Spot2|Spot3|Spot4|
    |Spot1|Spot2|Spot3|Spot4|
    |Spot1|Spot2|Spot3|Spot4|
    |Spot1|Spot2|Spot3|Spot4|
    |Spot1|Spot2|Spot3|Spot4|
    |Spot1|Spot2|Spot3|Spot4|

    All spots are filled except the first one, and i though arrageInv wud make it this:

    |Spot1|Spot2|Spot3|Spot4|
    |Spot1|Spot2|Spot3|Spot4|
    |Spot1|Spot2|Spot3|Spot4|
    |Spot1|Spot2|Spot3|Spot4|
    |Spot1|Spot2|Spot3|Spot4|
    |Spot1|Spot2|Spot3|Spot4|
    |Spot1|Spot2|Spot3|Not Filled| //Now here its empty, so its organised better
    Ce ne sont que des gueux


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

    Default

    SCAR Code:
    procedure Drop;
      var I, J : Integer;
    begin
      if (Players[CurrentPlayer].Booleans[2] = True) then //Booleans[2] is: 'Use multi equipment?'
      begin
        J := Players[CurrentPlayer].Integers[1] + 1;
        for I := J to 28 do { DropTo(J, 28) looks much neater }
          DropItem(i);
      end else
        for I := 2 to 28 do //DropTo(2, 28)
          DropItem(i);
    end;

    //here's what i'd do:
    procedure Drop;
      var J: Integer;
    begin
      if (Players[CurrentPlayer].Booleans[2] = True) then //Booleans[2] is: 'Use multi equipment?'
        J := Players[CurrentPlayer].Integers[1] + 1;
      else
        J := 2;
      DropTo(J, 28);
    end;

    and yes arrange Inv only moves items around.

    ~RM

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

  11. #11
    Join Date
    Feb 2007
    Location
    Access Violation at 0x00000000
    Posts
    2,865
    Mentioned
    3 Post(s)
    Quoted
    18 Post(s)

    Default

    DropTo bugs w/ me... so then?

    :P
    Ce ne sont que des gueux


  12. #12
    Join Date
    Dec 2007
    Posts
    103
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    DropTo has been removed from SRL. Look at Changes in Inventory.scar in the SRL manual (or just try to use the function and see the errors flying).
    This sentence is false.

  13. #13
    Join Date
    Feb 2007
    Location
    Access Violation at 0x00000000
    Posts
    2,865
    Mentioned
    3 Post(s)
    Quoted
    18 Post(s)

    Default

    Nvm, i got it working now, on my own way

    SCAR Code:
    procedure Drop;
    var I, J : Integer;
    begin
    if (Players[CurrentPlayer].Booleans[2] = True) then
    begin
      J := Players[CurrentPlayer].Integers[1] + 1;
    for I := J to 28 do
     DropItem(i);
    end else
    for I := 2 to 28 do
     DropItem(i);
    if (Players[CurrentPlayer].Strings[1] = 'Bait') then
    begin
    for I := 3 to 28 do
     DropItem(i);
     end;
    end;

    This jsut works fine for me
    Ce ne sont que des gueux


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

    Default

    didn't notice drop to was removed sorry for that. and actually i was wrong about Arrange Inv,

    SCAR Code:
    procedure ArrangeInv;
    By: Cheesehunk
    Description: Arrange's inventory in an orderly fashion.

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

  15. #15
    Join Date
    Feb 2007
    Location
    Access Violation at 0x00000000
    Posts
    2,865
    Mentioned
    3 Post(s)
    Quoted
    18 Post(s)

    Default

    So.. arrangeinv does make it like i posted?
    This:
    SCAR Code:
    |Not Filled|Spot2|Spot3|Spot4|
    |Spot1|Spot2|Spot3|Spot4|
    |Spot1|Spot2|Spot3|Spot4|
    |Spot1|Spot2|Spot3|Spot4|
    |Spot1|Spot2|Spot3|Spot4|
    |Spot1|Spot2|Spot3|Spot4|
    |Spot1|Spot2|Spot3|Spot4|

    All spots are filled except the first one, and i though arrageInv wud make it this:

    |Spot1|Spot2|Spot3|Spot4|
    |Spot1|Spot2|Spot3|Spot4|
    |Spot1|Spot2|Spot3|Spot4|
    |Spot1|Spot2|Spot3|Spot4|
    |Spot1|Spot2|Spot3|Spot4|
    |Spot1|Spot2|Spot3|Spot4|
    |Spot1|Spot2|Spot3|Not Filled| //Now here its empty, so its organised better
    Ce ne sont que des gueux


Thread Information

Users Browsing this Thread

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

Similar Threads

  1. What Do I Use For DROP Now???!!!
    By Ilikepie1995 in forum OSR Help
    Replies: 4
    Last Post: 09-30-2007, 08:15 PM
  2. Drop ore only
    By rkroxpunk in forum OSR Help
    Replies: 7
    Last Post: 09-25-2007, 11:31 PM
  3. drop
    By marre in forum OSR Help
    Replies: 6
    Last Post: 09-15-2007, 05:40 PM
  4. drop drop drop????
    By havoc928 in forum OSR Help
    Replies: 4
    Last Post: 08-21-2007, 03:29 AM

Posting Permissions

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