Jump to content

help with chat message /widgets? Looki


TheGreatests

Recommended Posts

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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;
        }
    }
	

 

whats ur skype Whipz?

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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;        }    }
	

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

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