Jump to content

Czar

Discord Helper
  • Posts

    20647
  • Joined

  • Last visited

  • Days Won

    1790
  • Feedback

    100%

Posts posted by Czar

  1. If you are truly stuck, there's a trick to achieving strokes and shadows in paint without any fancy stuff by drawing the text with the stroke color, then drawing the text again with a different color on top of it.

     

    Usually, for shadows I just draw the text again with an offset of 1 pixel, so:

     

    String msg = "Hello";

    int x = 15, y = 15;

     

    g.setColor(Color.BLACK);

    drawString(msg, x + 1, y + 1);

    g.setColor(Color.RED);

    drawString(msg, x, y);

     

    Thats for a basic shadow, however if you want a full stroke (like you mentioned in your thread) you must make additions to the above code so that it draws in every direction, not just + 1, example

     

    drawString(msg, x + 1, y + 1);

    drawString(msg, x, y + 1);
    drawString(msg, x + 1, y);
     
    however, from the looks of it, its drawing too many strings! So only use this if you are hopeless, it's really not that bad but its better than nothing.
  2. DO NOT, i repeat DO NOT buy this script. the anti ban is extremely lousy, i got banned 2 times in a week botting like 4 hours every other day. i WOULD NOT recommend this script to anyone as you WILL get banned

     

    You have been unlucky, unfortunately. The anti-ban is not 'extremely lousy', it is, as I have explained, the best antiban for this type of script.

     

    EDIT: Thanks everybody else for the support :) I'm glad you enjoy the script.

  3. If you need any more help just pm

    @OP remove the client. So its just this.getInventory() because in osbot2 they changed it around. Client. Is just for old osbot.

  4. inventory.isFull() keeps running as an error for me.. sad.png

    Will run perfectly like this:

        private State getState() {
        	Entity tree = objects.closest("Tree");
        	if(!inventory.isEmpty())
        		return State.DROP;
        	if (tree != null)
        		return State.CUT;
        	return State.WAIT;
    

    but if i throw in the .isFull() the script won't run at all:

        private State getState() {
        	Entity tree = objects.closest("Tree");
        	if(!inventory.isFull())
        		return State.DROP;
        	if (tree != null)
        		return State.CUT;
        	return State.WAIT;
    

    pls halp (:

     

    If inventory isn't full, drop? Remember to remove the ! before the boolean (it was !isEmpty now !isFull) they are opposite so it should be if (getInventory().isFull())

     

    Or is the isFull causing an actual error? 

    • Like 1
  5. 1) Don't generate jar files while testing a script, you should do that in the end, otherwise you must restart etc. What I do, is just make your project folder on Users/OSBot, and change your output folder to OSBot/scripts, so all the .class goes there and you can just save script on your ide, and refresh scripts on OSBot and you don't have to restart client every time you make an update

     

    2) A trade request is a message, so you must add a messagelistener to your script by doing the following; put this in your onStart method: 

     
    getBot().addMessageListener(this);
    
     
    and then add the overriden method onMessage(Message m) the message will be 
     
    String msg = m.getMessage();
    
     
    and to check if its a trade, just do m.getMessageType(), which is an enum and contains RECEIVE_TRADE (in your case)
     
    As for the last question I've never handled trading in a script so I'm unable to assist you there, but there's an open source merching bot (which handles trades) in the snippet section iirc.
×
×
  • Create New...