Jump to content

Valkyr

Members
  • Posts

    1433
  • Joined

  • Last visited

  • Days Won

    3
  • Feedback

    0%

Posts posted by Valkyr

  1. You need to encapsulate it within a JFrame.

    public class YourGui extends JFXPanel {
    
    ...
    
        public static JFrame create() {
            JFrame frame = new JFrame();
            YourGui gui = new YourGui ();
            Platform.runLater(() -> {
                gui.init();
                frame.setContentPane(gui);
            });
        }
    
        public void init() {
            final BorderPane container = new BorderPane();
            container.setTop(someComponent);
            container.setCenter(someOtherComponent);
            
            final Scene scene = new Scene(container);
            setScene(scene);
        }
    
    ...
    
    }
    
    

    Edit: You might only need to wrap the GuiClass.launch in a Platform.runLater

  2. You deleted the thread I posted using the template, but this one was approved. I hope that wasn't on purpose...

     

    13e3891dbce0861ff58b1d9c306cfc24.png

     

    This is the filter I'm using to search for entities:

    getContext().getWebWalker().interactWith(location,
                            "Attack", entity -> {
                                if (entity instanceof NPC) {
                                    NPC npc = (NPC) entity;
                                    if (!script.isAttackUnreachable() || getContext().getMap().canReach(npc))
                                        return npc.getHealth() > 0
                                                && npc.getLevel() < 1337
                                                && monsters.stream().anyMatch(s -> npc.getName().equalsIgnoreCase(s))
                                                && npc.getInteracting() == null;
                                }
                                return false;
                            });
    

    Relevant debug:

    [INFO][Bot #1][12/04 11:47:32 PM]: Executing node: FightMonster
    [INFO][Bot #1][12/04 11:47:32 PM]: Attacking unreachable monsters? false
    [INFO][Bot #1][12/04 11:47:32 PM]: Searching for entity at id=136 name=Chicken, x=3229y=3296, z=0
    [INFO][Bot #1][12/04 11:47:34 PM]: Successfully interacted with [Farmer]
    [INFO][Bot #1][12/04 11:47:34 PM]: Can reach? false

    Looking at this line in particular:

                                    if (!script.isAttackUnreachable() || getContext().getMap().canReach(npc))

    Looks like 

    !script.isAttackUnreachable()
    

    was the problem... Brb hanging myself.

     

    Sorry I wasted your time.

     

     

  3. nice! May I ask, where did you get the image resources from?

     

    Also, you should add a 'grab currently equipped' buttonez which will get the data from ur current player ingame. I'm sure you'll add that anyway tho

     

    Good luck! smile.png

    apa

    no i copyrighted that feature

    • Like 1
  4. Bank.open() uses the NPC as well as the booth. The scrip is probably clicking the NPC before the player is actually in the bank. It's because the NPC isn't reachable, but the bank (obviously) only opens when you're facing the booth..

  5. 
    

    In debug mode!

    Listening for transport dt_socket at address: 5005

    Stealth injection class-filter enabled!

    Loaded 32 local scripts and 5 SDN scripts.

    [DEBUG][11/09 11:47:56 PM]: OSBot is now ready!

    [INFO][11/09 11:47:57 PM]: Loaded 6 RS accounts!

    [INFO][11/09 11:47:58 PM]: Welcome to OSBot 2.4.2!

    [INFO][11/09 11:48:18 PM]: Updated injection hooks for client revision : 98!

    Created temp copy of nattach_64.dll as C:\Users\Aiden\AppData\Local\Temp\rrqw3680894836048588893.dll

    Created temp copy of stream_64.dll as C:\Users\Aiden\AppData\Local\Temp\wqw8526087086504495623.dll

    Bot exited with code : -1073741819

    Process finished with exit code -1073741819 (0xC0000005)

×
×
  • Create New...