Jump to content

Trade Handler


BravoTaco

Recommended Posts

  On 11/10/2019 at 6:19 AM, BravoTaco said:

Hopefully this works, haven't tested. Let me know if it doesn't

  Reveal hidden contents

 

Expand  

Could you please show an example on how to use this?

Link to comment
Share on other sites

  On 11/10/2019 at 1:28 PM, danielmedvec said:

Could you please show an example on how to use this?

Expand  

Sure can 🙂 

Trading Items:

  Reveal hidden contents

Receiving Items:

  Reveal hidden contents

 

Edited by BravoTaco
  • Heart 1
Link to comment
Share on other sites

  On 11/10/2019 at 11:49 PM, BravoTaco said:

Sure can 🙂 

Trading Items:

  Reveal hidden contents

Receiving Items:

  Reveal hidden contents

 

Expand  

Thank you so much, i appreciate it! :)

Link to comment
Share on other sites

  On 11/11/2019 at 12:53 AM, danielmedvec said:

How do you completely decline the trade?

Say in case there was someone who have declined like 3 times, and i just want to cancel this trade.
How do i make the process stop? Because i tried decline trade, but it still kept trading.

Best regards :)

Expand  

Do you mean like not trade that person again? If so this will have to be done in your own script logic.

An example would be to add that player to a blacklist after he has declined the trade or keep track of how many times that player has declined the trade and if it exceeds a certain threshold add them to the blacklist to not be traded again.

Example Code Without Threshold (Untested):

  Reveal hidden contents

Example Code With Threshold (Untested):

  Reveal hidden contents

 

Link to comment
Share on other sites

  • 2 years later...
  • 1 year later...

Can confirm it works, only if on the second trading screen, the player who gets offered the trade accepts before the bot/script running player presses accept, it will fail and indeed give a NPE. 
 

this is because it detects the text on top, when the normal player accepts, the bot gets to see “other player has accepted” and tries to click that instead of the accept trade button. 
 

lovely snippet thanks.

Link to comment
Share on other sites

  • 1 year later...

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...