Jump to content

Transfer information between instances


Recommended Posts

Posted

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

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

 

Posted
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
Posted (edited)

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

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