Jump to content

help with chat message /widgets? Looki


Recommended Posts

Posted
58 minutes ago, whipz said:

 


public void onMessage(Message message) throws InterruptedException {
        if (message.getType() == Message.MessageType.GAME && message.getMessage().contains("form 4 cannonballs")) {
            itemsMade = itemsMade + 4;
        }
    }
	

 

In addition make sure you're calling the message listener event on start.

Posted
4 hours ago, Pseudo said:

In addition make sure you're calling the message listener event on start

5 hours ago, whipz said:

 



public void onMessage(Message message) throws InterruptedException {
        if (message.getType() == Message.MessageType.GAME && message.getMessage().contains("form 4 cannonballs")) {
            itemsMade = itemsMade + 4;
        }
    }
	

 

 

WHipz, what about resetting the inter value during on loop?

Posted
1 minute ago, Pseudo said:

onStart 

 


getBot().addMessageListener(this);

 

 

 

Ok, I called it. I am trying to implement this into a way that my muler will get a text from my miner, and hop to that world to trade with my miner.

Do you have some extra time?

My Skype is Elvis.basic3 if you wanna do a good deed :) just show me exactly how to implement it, in a good manner.

I'm also having issues resetting my clay counter variable!. Like I called onpaint, and then onstart and it'll count my clay up until I need to trade, however after that, I cant get it to reset. ive tried assigning that value down to 0 again but it still wont?

Posted

Well, I keep getting a syntax error for this method. I am not entirely sure why, I tried everything with it  -

 

 if(message.getType() == Message.MessageType.GAME
    && message.getMessage().contains("form 4 cannonballs"))) {
          }
      }

Still giving me syntax error.. somebody help if you got time! Also having a issue with resetting my clay count variable still. I've tried everything, from Claycount = 0; to other things with no results!

Posted
21 minutes ago, TheGreatests said:

Ok, I called it. I am trying to implement this into a way that my muler will get a text from my miner, and hop to that world to trade with my miner.

Do you have some extra time?

My Skype is Elvis.basic3 if you wanna do a good deed :) just show me exactly how to implement it, in a good manner.

I'm also having issues resetting my clay counter variable!. Like I called onpaint, and then onstart and it'll count my clay up until I need to trade, however after that, I cant get it to reset. ive tried assigning that value down to 0 again but it still wont?

I'll add you now but I'm heading away for ~20 minutes or so, will sort you out when I return.

Posted
40 minutes ago, Pseudo said:

onStart 

 


getBot().addMessageListener(this);

 

 

 

 

37 minutes ago, TheGreatests said:

Ok, I called it. I am trying to implement this into a way that my muler will get a text from my miner, and hop to that world to trade with my miner.

 

If you are overriding onMessage, you do not then need to call getBot().addMessageListener(this). You will just end up having two message listeners.

 

Quote

 

Do you have some extra time?

My Skype is Elvis.basic3 if you wanna do a good deed :) just show me exactly how to implement it, in a good manner.

I'm also having issues resetting my clay counter variable!. Like I called onpaint, and then onstart and it'll count my clay up until I need to trade, however after that, I cant get it to reset. ive tried assigning that value down to 0 again but it still wont?

 

 

Consider learning Java before trying to write scripts, simply asking other people to write things for you is not going to help you in the long run:

28 minutes ago, TheGreatests said:

Well, I keep getting a syntax error for this method. I am not entirely sure why, I tried everything with it  -

 

 if(message.getType() == Message.MessageType.GAME
    && message.getMessage().contains("form 4 cannonballs"))) {
          }
      }

Still giving me syntax error.. somebody help if you got time! Also having a issue with resetting my clay count variable still. I've tried everything, from Claycount = 0; to other things with no results!

You have an extra closing bracket..

  • Like 3
Posted
2 minutes ago, Explv said:

 

 

If you are overriding onMessage, you do not then need to call getBot().addMessageListener(this). You will just end up having two message listeners.

 

 

Consider learning Java before trying to write scripts, simply asking other people to write things for you is not going to help you in the long run:

You have an extra closing bracket..

:think: u right

Posted
3 hours ago, TheGreatests said:

WHipz, what about resetting the inter value during on loop?

thats simple after you have done your trade to mules do clay = 0; in that method 

 

 public void onMessage(Message message) throws InterruptedException {        if (message.getType() == Message.MessageType.GAME && message.getMessage().contains("form 4 cannonballs")) {            itemsMade = itemsMade + 4;        }    }
	

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...