Results 1 to 6 of 6

Thread: Another method for "&&"?

  1. #1
    Join Date
    Nov 2011
    Posts
    4
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default Another method for "&&"?

    Is there another method for && through pascal? I'm pretty new at it, and can't figure it out! I've got this so far
    Code:
    if (IsInCombat = 0 && not P07InvFull) then
    How would I make the && into something pascal? I'm confuzzled

  2. #2
    Join Date
    Feb 2012
    Location
    Discord
    Posts
    3,114
    Mentioned
    37 Post(s)
    Quoted
    538 Post(s)

    Default

    Simba Code:
    and
    e.g.
    Simba Code:
    if (IsInCombat = 0 and not P07InvFull) then

  3. #3
    Join Date
    Mar 2006
    Location
    Belgium
    Posts
    3,564
    Mentioned
    111 Post(s)
    Quoted
    1475 Post(s)

    Default

    if (IsInCombat = 0 and not P07InvFull) then

    EDIT: Fu TK!

    Creds to DannyRS for this wonderful sig!

  4. #4
    Join Date
    Jun 2012
    Posts
    4,867
    Mentioned
    74 Post(s)
    Quoted
    1663 Post(s)

    Default

    Quote Originally Posted by lmfaoown View Post
    Is there another method for && through pascal? I'm pretty new at it, and can't figure it out! I've got this so far
    Code:
    if (IsInCombat = 0 && not P07InvFull) then
    How would I make the && into something pascal? I'm confuzzled
    You mean like

    Simba Code:
    if ((IsInCombat = 0) and (not P07InvFull_) then

  5. #5
    Join Date
    Nov 2011
    Posts
    4
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Perfection! Thank's a bunch. Now, instead of spamming threads, i'll post my other problem here... I want my script to bury every bone in its inventory, but it'll only bury 1 bone, then proceed to pickup another bone, then bury 1, repeat. How can I fix this? I know the "until not Bone:....." is completely incorrect, but that's to give you the idea of what I want to do. Is there a way, instead of doing the method 27 times?
    Code:
    Bone := DTMFromString('mggAAAHicY2NgYHBlYmCwAmInIPYAYl8o+yoQXwbic0B8AYivA/FtIG4oL2fISExk2L1hA8PSWTMZpnZ3MXi6uDDgAow4MAQAAO+jD7s=');
        if FindDTM(Bone, x, y, MIX1, MIY1, MIX2, MIY2) then
          begin
            writeLn('BuryingBone');
            Mouse(x, y, 1, 1, true);;
          end;
          until not(Bone := DTMFromString('mggAAAHicY2NgYHBlYmCwAmInIPYAYl8o+yoQXwbic0B8AYivA/FtIG4oL2fISExk2L1hA8PSWTMZpnZ3MXi6uDDgAow4MAQAAO+jD7s='));
      end;

  6. #6
    Join Date
    Mar 2006
    Location
    Belgium
    Posts
    3,564
    Mentioned
    111 Post(s)
    Quoted
    1475 Post(s)

    Default

    Simba Code:
    for i:= 1 to 28 do
    begin
     if P07_ExistsItemDTM(Bone, x, y) then
       begin
          writeLn('BuryingBone');
          Mouse(x, y, 1, 1, true);;
       end;
    end;

    use this
    Simba Code:
    function P07_ExistsItemDTM(dtm: Integer; var x, y: Integer): Boolean;
    begin
      P07_Gametab(tab_Inv);
      Wait(300 + Random(300));
      Result := FindDTM(dtm, x, y, P07_MIx1, P07_MIy1, P07_MIx2, P07_MIy2);
    end;

    Creds to DannyRS for this wonderful sig!

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
  •