Results 1 to 19 of 19

Thread: Im in a conundrum ;s

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

    Default Im in a conundrum ;s

    I have no clue if that's how you spell it but
    Anyways, i'm making a Safe Cracker script.
    I've gotten finding the safe down (via DTM's), now I only need to find out how to break the script from it's sleep once the safe has been cracked.
    Any ideas?
    I was thinking waiting for an xp rise but I have no clue how to do that... :ss

  2. #2
    Join Date
    Nov 2011
    Posts
    92
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Could you have it open the xp bar and have it check to see if the number at the top has changed? Like have it find the starting number Ex)+32 and when it changes then the script starts working on a safe again?

  3. #3
    Join Date
    Dec 2011
    Location
    New York, USA
    Posts
    1,242
    Mentioned
    12 Post(s)
    Quoted
    193 Post(s)

    Default

    You could probably use WaitInvCount,

  4. #4
    Join Date
    Oct 2011
    Location
    UK
    Posts
    1,322
    Mentioned
    2 Post(s)
    Quoted
    1 Post(s)

    Default

    I have no idea about safe cracking but if @Nebula's post is right then something like
    Simba Code:
    Procedure WaitUntilDone;
    Var
      OldCount : Integer;
      begin
        OldCount := InvCount;
        While(OldCount = InvCount) do
          begin
            Wait(200+Random(200));
            AntiBan;
          end;
        Inc(SafesCracked);
      end;

  5. #5
    Join Date
    Dec 2011
    Location
    New York, USA
    Posts
    1,242
    Mentioned
    12 Post(s)
    Quoted
    193 Post(s)

    Default

    Sorry, that actually wouldn't work since safecracking also gives coins (stackables). So your best bet would be to learn how to incorporate the xp counter in your script.

  6. #6
    Join Date
    Jan 2008
    Location
    C:\
    Posts
    1,483
    Mentioned
    2 Post(s)
    Quoted
    2 Post(s)

    Default

    Quote Originally Posted by Nebula View Post
    Sorry, that actually wouldn't work since safecracking also gives coins (stackables). So your best bet would be to learn how to incorporate the xp counter in your script.
    You could wait for a change in coin amount OR a change in inv count. Should solve the problem.

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

    Default

    Sometimes NO coins are added :s
    Otherwise i'd just add a FindBlackChatmessage :L

  8. #8
    Join Date
    Feb 2011
    Location
    The Future.
    Posts
    5,600
    Mentioned
    396 Post(s)
    Quoted
    1598 Post(s)

    Default

    Do not use the XP counter alone.. some users will have "Lots!" in their XP bar and that will get you stuck in another conundrum or whatever you wanna call it.. Use that in combination with other things..

    To Count stacked items for anyone who was wondering..
    Simba Code:
    DTM := DTMFromString('mQwAAAHicY2ZgYMhlYmCoAuICIH4C5D8A4k9A3DJjJpBkgmIEYETCQAAAEhAF0w==');  //Just a random dtm..
      writeln(ItemAmount('inv', 'dtm', DTM, []));   //Counts stacked Items.. Does not have to be a dtm..
      FreeDTM(DTM);

    CoinAmount('inv');  //<--- Returns the number of coins in the invent.
    //Check out the Amount.Simba include.
    So with that said.. just get a count of every item in the invent whether stacked or not.. it'll let your know successes vs fails.
    I am Ggzz..
    Hackintosher

  9. #9
    Join Date
    Jan 2008
    Location
    C:\
    Posts
    1,483
    Mentioned
    2 Post(s)
    Quoted
    2 Post(s)

    Default

    Quote Originally Posted by S1N View Post
    Sometimes NO coins are added :s
    Otherwise i'd just add a FindBlackChatmessage :L
    Do you get an item and/or coins every time you crack the safe? Or can you crack it and have a chance of not getting anything?

  10. #10
    Join Date
    Sep 2007
    Location
    Michigan
    Posts
    3,862
    Mentioned
    2 Post(s)
    Quoted
    1 Post(s)

    Default

    Monitor the chat and use timers to break out if it takes to long.

    E:
    It tells you if you've failed and if successful plus what you got.
    (Scripts outdated until I update for new SRL changes)
    AK Smelter & Crafter [SRL-Stats] - Fast Fighter [TUT] [SRL-Stats]
    If you PM me with a stupid question or one listed in FAQ I will NOT respond. -Narcle
    Summer = me busy, won't be around much.

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

    Default

    Quote Originally Posted by Narcle View Post
    Monitor the chat and use timers to break out if it takes to long.

    E:
    It tells you if you've failed and if successful plus what you got.
    It doesn't give an item always, + i'll have food in there

    Quote Originally Posted by Runaway View Post
    Do you get an item and/or coins every time you crack the safe? Or can you crack it and have a chance of not getting anything?
    Nope, you have a chance of not getting anything

    Quote Originally Posted by ggzz View Post
    Do not use the XP counter alone.. some users will have "Lots!" in their XP bar and that will get you stuck in another conundrum or whatever you wanna call it.. Use that in combination with other things..

    To Count stacked items for anyone who was wondering..
    Simba Code:
    DTM := DTMFromString('mQwAAAHicY2ZgYMhlYmCoAuICIH4C5D8A4k9A3DJjJpBkgmIEYETCQAAAEhAF0w==');  //Just a random dtm..
      writeln(ItemAmount('inv', 'dtm', DTM, []));   //Counts stacked Items.. Does not have to be a dtm..
      FreeDTM(DTM);

    CoinAmount('inv');  //<--- Returns the number of coins in the invent.
    //Check out the Amount.Simba include.
    So with that said.. just get a count of every item in the invent whether stacked or not.. it'll let your know successes vs fails.
    No clue what to do o.O

  12. #12
    Join Date
    Dec 2007
    Location
    192.168.1.73
    Posts
    2,439
    Mentioned
    6 Post(s)
    Quoted
    119 Post(s)

    Default

    Am I right in saying that a recent update now causes a number which refers to your xp to appear above your character? You could do a colour check in the area around your character, count that the number of colours exceeds 10 or something, then exit the loop, and you've been successful.

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

    Default

    Hmm that should work, what method would I use? FindColor in a TBox?

  14. #14
    Join Date
    Dec 2007
    Location
    192.168.1.73
    Posts
    2,439
    Mentioned
    6 Post(s)
    Quoted
    119 Post(s)

    Default

    I'd recommend using a TPA method, do a FindColorsTolerance, then find the length of this TPA, ensure it is above a certain number. The problem with this is that you'd be essentially performing the same check over and over until it appeared.

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

    Default

    I found a different way.
    I'm checking for the thieving Bitmap that occurs above the screen.
    Should be easy that way, any way to get the coordinates on a smart window?

  16. #16
    Join Date
    Dec 2011
    Location
    New York, USA
    Posts
    1,242
    Mentioned
    12 Post(s)
    Quoted
    193 Post(s)

    Default

    Drag the crosshairs

  17. #17
    Join Date
    Dec 2011
    Posts
    98
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Probably a silly suggestion as i cant really script but there would be no way that it could detect the safe door when its cracked it stays open for 2 or 3 seconds if i recall?

  18. #18
    Join Date
    Sep 2007
    Location
    Michigan
    Posts
    3,862
    Mentioned
    2 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by Slone View Post
    Probably a silly suggestion as i cant really script but there would be no way that it could detect the safe door when its cracked it stays open for 2 or 3 seconds if i recall?
    This ^, I know it can be done. *cough*
    (Scripts outdated until I update for new SRL changes)
    AK Smelter & Crafter [SRL-Stats] - Fast Fighter [TUT] [SRL-Stats]
    If you PM me with a stupid question or one listed in FAQ I will NOT respond. -Narcle
    Summer = me busy, won't be around much.

  19. #19
    Join Date
    Feb 2011
    Location
    Earth
    Posts
    1,784
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Narcle View Post
    This ^, I know it can be done. *cough*
    Hehe, that's a very good idea, look into that.

    Currently: Working on Defending&Attacking in my Castle-Wars Script
    Project Rebuild: 90M/170M

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
  •