Results 1 to 10 of 10

Thread: Fire burning :(

  1. #1
    Join Date
    Feb 2012
    Posts
    119
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Fire burning :(

    Ok, this is bugging me really bad. Does anyone have any ideas/ working functions that i could use to check to see if there is a fire under my char? Any ideas/brain storming will be appreciated! I looked at the firemaking scripts and their no bueno.

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

    Default

    Simba Code:
    x := MSCX;
    y := MSCY;
    if FindColorSpiralTolerance(x,y,FireColor,Yayadadaa) then
    writeLn('Found fire');

  3. #3
    Join Date
    Feb 2012
    Posts
    119
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Yeah, Just thought of that, Do you reckon as box around the players feat would work better to see if he's standing on it?

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

    Default

    Yes, make a box around the player, name it tbox, and for the bounds put TBox.x1, TBox.y1, etc..

  5. #5
    Join Date
    Feb 2012
    Location
    SRL Jail
    Posts
    1,319
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Wouldn't color finding be a bit better that box? It works for me but if this method is better then I should change it?

  6. #6
    Join Date
    Feb 2012
    Location
    Somewhere, over the rainbow...
    Posts
    2,272
    Mentioned
    3 Post(s)
    Quoted
    45 Post(s)

    Default

    Quote Originally Posted by JOEbot View Post
    Wouldn't color finding be a bit better that box? It works for me but if this method is better then I should change it?
    It is color finding, but color finding within a box around the players feet - much more accurate

  7. #7
    Join Date
    Jul 2010
    Location
    Western US
    Posts
    387
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    Another method would to use the text seen in the chat box "you can't light a fire here" to determine that you have a fire under you. This also could be used as your failsafe in case your usual detection did not see it, or you burn yourself into a corner.

    Simba Code:
    if IsChatBoxTextBetween ('ere',clBlack,8,8) then
    Of all the things I have lost, I miss my mind the most.
    Current Projects:
    Addy bar miner and superheater

  8. #8
    Join Date
    Feb 2012
    Location
    Somewhere, over the rainbow...
    Posts
    2,272
    Mentioned
    3 Post(s)
    Quoted
    45 Post(s)

    Default

    ^^^^I tried using that function once (a similar one anyway) but it wouldn't work for me....


    EDIT: Something like FindChatBoxText

  9. #9
    Join Date
    Jul 2010
    Location
    Western US
    Posts
    387
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    Quote Originally Posted by abu_jwka View Post
    ^^^^I tried using that function once (a similar one anyway) but it wouldn't work for me....


    EDIT: Something like FindChatBoxText
    It can be a little tricky to remember which line it is looking on, and it can fail if there is a spam bot in the area. It works reasonably well in my firemaker, I just need to make sure I dont run onto another fire when it detects it cant light a fire.
    Of all the things I have lost, I miss my mind the most.
    Current Projects:
    Addy bar miner and superheater

  10. #10
    Join Date
    Dec 2011
    Location
    The Netherlands
    Posts
    1,631
    Mentioned
    47 Post(s)
    Quoted
    254 Post(s)

    Default

    This is a part of my failsafe

    Simba Code:
    { Failsafe when standing on a fire }
      ColorToleranceSpeed(2);
      SetColorSpeed2Modifiers(0.09, 0.62);
      if FindColorSpiralTolerance(X, Y, 536379, 244, 159, 276, 193, 3) then
        { Standing in a fire, moving }
        begin;
          MouseBox(211, 99, 318, 161, 1);
          Wait(1200 + Random(800));
        end;
      { Light a log }
      Logs := DTMFromString('mAAEAAHiclcvBCkBAFIXhY9aewjNIyUISK5Pm8SeUhbJB3oC/WFiaW9+pU+fGkmojVciRIX2V6OBg0aLBws+AEbOevuPEhhUTPA70RUJGv11Ba8kE7r93A1hgD7U=');
      if FindDTM(Logs, X, Y, MIX1, MIY1, MIX2, MIY2) then
        begin
          MMouse(X, Y, 2, 2);
          Mouse(X, Y, 0, 0, 0);
          WaitOptionMulti(['ight', 'Light'], 150);
          Wait(600 + Random(300));
          if not(FindDTM(Logs, X, Y, MIX1, MIY1, MIX2, MIY2)) then
            begin
              Inc(BurnedLogs);
            end else
            begin
              FindDTM(Logs, X, Y, MIX1, MIY1, MIX2, MIY2)
              MMouse(X, Y, 2, 2);
              Mouse(X, Y, 0, 0, 0);
              WaitOptionMulti(['ight', 'Light'], 150);
            end;
        end;
      FreeDTM(Logs);
      { Check for fire animation }
      PBox := IntToBox(282, 145, 320, 195);
      FindNormalRandoms;
      Marktime(q);
      repeat
        Wait(100 + Random(100));
        Antiban;
        Wait(100 + Random(100));
      until (Animating(PBox, 100, 200)) or (TimeFromMark(q)>10000);
      WriteLn('We have ignited a log')
      Wait(150 + Random(250));

    Script source code available here: Github

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
  •