Jump to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

drawing entity model?

Featured Replies

How could I draw the model? I can get some of the points but there's also this weird line that appears...

 

71c29b3feb90a4319fd946f131f60c2c.png

Edited by Swizzbeat

  • Author

What was it?

graphics.fill(GraphicUtilities.getModelArea(bot, entity.getGridX(), entity.getGridY(), entity.getZ(), entity.getModel()));
graphics.fill(GraphicUtilities.getModelArea(bot, entity.getGridX(), entity.getGridY(), entity.getZ(), entity.getModel()));

 

Ah ok, I saw this which is what I was using. I guess both ways work :P

 

GraphicUtilities.drawModel(this.bot, g, npc.getGridX(), npc.getGridY(), npc.getZ(), npc.getModel());

2d668ca7db41b3d9696988b7d07ec2bd.png

 

this draws the actual model, you can draw the outline of the entity as well:

2e351c3fbbea6963e099a128658df1b1.png

 

and using your way will result in the entire area being filled. The main difference is drawModel will draw the in game model, where your way will fill in the entire area occupied by the entity.

  • Author

Ah ok, I saw this which is what I was using. I guess both ways work tongue.png

 

GraphicUtilities.drawModel(this.bot, g, npc.getGridX(), npc.getGridY(), npc.getZ(), npc.getModel());

2d668ca7db41b3d9696988b7d07ec2bd.png

 

this draws the actual model, you can draw the outline of the entity as well:

2e351c3fbbea6963e099a128658df1b1.png

 

and using your way will result in the entire area being filled. The main difference is drawModel will draw the in game model, where your way will fill in the entire area occupied by the entity.

Yeah I've already done all this messing around with the different graphics methods :p

Yeah I've already done all this messing around with the different graphics methods tongue.png

 

Why do you want to draw the models though? Its a waste of cpu if you ask me. :P

  • Author

How did u draw the outline? tongue.png looks nice

I got the area using the GraphicsUtilities class and then did graphics.draw(area).

How did u draw the outline? tongue.png looks nice

 
In your onPaint method just add this in. You can change the color to whatever you like, and instead of player you can use any entity. :P   
 
    @Override
    public void onPaint(Graphics2D g){
        player = myPlayer();
        g.setColor(Color.CYAN);
        if(player != null){
            g.draw(GraphicUtilities.getModelArea(this.bot, player.getGridX(), player.getGridY(), player.getZ(), player.getModel()));
        }
    }
 

 

Will produce this: 

c2f0bdaf5b90cec1e1a737147f3ff199.png

Guest
This topic is now closed to further replies.

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.