1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Question Blackjacking help

Discussion in 'Developer Support' started by Scerchy, Apr 20, 2019.

  1. Scerchy

    Joined:
    Mar 17, 2019
    Messages:
    2
    Likes Received:
    0
    Hi

    I'm currently in the process of writing a black jack bot which is proving more difficult than I anticipated.
    While working on it, I have some questions I'd like to get cleared up.

    The first one is the misclicking and menu interaction being slow. I read up on previous posts and figured that it is Clouse doing all of that. By tweaking the mouse multiplier, the interaction is a lot smoother but it's too inhumane. Can you implement your own menu interaction to avoid missing key clicks? I'd like to have the pickpocket after a knock-out to be instant so that I can avoid going into combat.

    Second one is combat detection related. My current combat detection on blackjacking is: `
    lastTarget != null && lastTarget.getTarget() == player`
    . lastTarget is assigned when the knock-out is initiated against a valid target. player is assigned in the `onStart` as `Players.getLocal()`. I've noticed that this method isn't yielding the results that I want. When I log the name of the target, it'll say my player name but the comparison is false. What is the recommended approach here?

    Last one is about the Bot interfaces. What has should be done in a single `onLoop`? I currently have loop 0: prepare the knock out room (lure and close doors). Loop 1 -> inf: knockout, thieve and flee on failure. (I plan on adding a restocking option that will go before the room prep).
    I prefer working OO with single responsibility. I'm creating library classes that have a number of methods that can be used in scripts bots. Each method returns a boolean if any action was taken. I use this value to see if I can go to the next step. It's therefore important to know what can be done in a single loop (so my methods don't get too long or tedious).

    tldr
    - Can you implement your own menu interaction to avoid missing key clicks?
    - What's the best way to detect you are in combat with a Npc (target is known)
    - What has be in a single `onLoop`
     

Share This Page

Loading...