Results 1 to 6 of 6

Thread: Opening doors if they're open.

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

    Default Opening doors if they're open.

    Simba Code:
    begin
      If FindObj(x,y,'Open',5393484,5) then
      Begin
        Writeln('Door is closed.');
        ClickMouse2(True);
        Writeln('Door is now open.')
      end else if FindObj(x,y,'Close',8221554,5) then  
        Writeln('Door is already opened.');
        Exit;
      end;

    now this is all fine and dandy when the door is closed, it opens it right up, but when it is already opened, it goes crazy looking at all of the other objects that are similar colors. i know that it can work because it goes to the door first every time, but it skips over it and goes through its routine until it goes back to the door a second time, then it realizes that it is opened and stops the script.

    is there a better way to get it on the first time it hovers?

  2. #2
    Join Date
    Dec 2011
    Location
    Toronto, Ontario
    Posts
    6,424
    Mentioned
    84 Post(s)
    Quoted
    863 Post(s)

    Default

    Simba Code:
    IF findobj(sdunasid,'Door') then
    begin
    if IsUptext('Open') then
      Mouse;
    if isUptext('Close') then
      exit;

    end;

  3. #3
    Join Date
    Nov 2011
    Posts
    34
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Sin View Post
    Simba Code:
    IF findobj(sdunasid,'Door') then
    begin
    if IsUptext('Open') then
      Mouse;
    if isUptext('Close') then
      exit;

    end;
    lol knew that

    thanks. ill fix it once im back from classes. should work now though, almost done

  4. #4
    Join Date
    Dec 2006
    Location
    Sweden
    Posts
    10,812
    Mentioned
    3 Post(s)
    Quoted
    16 Post(s)

    Default

    Protip: don't rely on uptext for doors. It's very botlike and slow. Use the info you can LONG before you even consider moving the mouse.


    Send SMS messages using Simba
    Please do not send me a PM asking for help; I will not be able to help you! Post in a relevant thread or make your own! And always remember to search first!

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

    Default

    Quote Originally Posted by Harry View Post
    Protip: don't rely on uptext for doors. It's very botlike and slow. Use the info you can LONG before you even consider moving the mouse.
    explain

  6. #6
    Join Date
    Jun 2008
    Location
    United States
    Posts
    818
    Mentioned
    60 Post(s)
    Quoted
    90 Post(s)

    Default

    Quote Originally Posted by bam92992 View Post
    explain
    It seems pretty straightforward to me. Analyze all available information before you revert to mousing over the door to read the uptext. Maybe a simple color count of the door color can tell you if it is open or closed. You could check to see if your dot is on one side or the other of the red line on the minimap. Create a DTM of the center of the building the door leads to- check your distance from it. Do everything you can to only have to mouse once. Moving the mouse an unnecessary amount is just lazy coding.
    [10/14/13:19:03] <BenLand100> this is special relatively, just cleverly disguised with yachts

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
  •