Jump to content

Transfer information between instances


Heiz

Recommended Posts

Is there any way to transfer information between instances of scripts running by OsBot? I know it's a strange question, but the reason is this: I developed a script, for personal use, where my objective is to earn as many points as possible in a minigame. To do this, I would need to obtain information from the players who were on each team, in order to make calculations that would allow me to draw up routes to maximize the points on each account.

Thanks

Link to comment
Share on other sites

3 hours ago, Heiz said:

Is there any way to transfer information between instances of scripts running by OsBot? I know it's a strange question, but the reason is this: I developed a script, for personal use, where my objective is to earn as many points as possible in a minigame. To do this, I would need to obtain information from the players who were on each team, in order to make calculations that would allow me to draw up routes to maximize the points on each account.

Thanks

I was trying to do something kind of like that a while back and I got some advice that was a bit over my head. Might help you out if you know more about this sort of thing though.
 

 

Link to comment
Share on other sites

21 minutes ago, Alakazizam said:

I was trying to do something kind of like that a while back and I got some advice that was a bit over my head. Might help you out if you know more about this sort of thing though.
 

 

I was thinking about sockets but I chose to ask if there was any solution for this within the osbot API itself. Apparently there isn't, so I'll implement a socket anyway, thanks!

  • Like 1
Link to comment
Share on other sites

Use Kafka? Probably too overkill + Extra dependency. 

I would write a separate Rest API that all your scripts can call to disseminate information to every other registerd script. Idea is very similar to how a listener works between classes. Don't forget authentication if this is not local. 

Your script would also need to expose an endpoint that this REST API would use. 

- POST: Register script instance

  • Pass in your script instance's endpoint

- POST: Broadcast message

  • Broadcast whatever it is to all your script instances.  Call the script's endpoint that was register before. 

- POST: Close server

  • Tell all your scripts to shut up. 

 

Pretty much a chatroom. 

 



 

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

14 hours ago, Heiz said:

Is there any way to transfer information between instances of scripts running by OsBot? I know it's a strange question, but the reason is this: I developed a script, for personal use, where my objective is to earn as many points as possible in a minigame. To do this, I would need to obtain information from the players who were on each team, in order to make calculations that would allow me to draw up routes to maximize the points on each account.

Thanks

1. Use a file to write data in and read in other instances (Same machine)
2. Use Sockets
3. Create a Rest application

Some will be harder than others ^^

  • Heart 1
Link to comment
Share on other sites

7 hours ago, PayPalMeRSGP said:

This is LMS isn't it. Since you want one bot instance to run to another and then kill each other to guarantee points. 

Nah, it's much simpler than that!

I would just like to get information on how many players there are on each Castle Wars team, because the team with the most players, I will win the game, to maximize the amount of tickets obtained

6 minutes ago, Khaleesi said:

1. Use a file to write data in and read in other instances (Same machine)
2. Use Sockets
3. Create a Rest application

Some will be harder than others ^^

Omg, this file idea is extremely simple and can be very effective! I hadn't thought about that, thank you so much

  • Heart 1
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...