Titan Rs Posted September 4, 2018 Posted September 4, 2018 Hi Guys, I'm writing a script and the last thing i've got to do is Muling. I've been trying to figure out how to send a request to the mule - mule logs in, and they both know they need to trade eachother. But i just cant figure it out. Does it require database support? Any snippets or just topics in java i should research, or just explaining how it works would really help? Thanks
Duhstin Posted September 4, 2018 Posted September 4, 2018 Personally, mine grabs a mule account name from database after X amount of resources, gold earned, etc. Then goes to location and trades the mule. All my accounts that are farming are within the database, so the mule doesn't accept any trades from any accounts that isn't in the database. 1
GPSwap Posted September 4, 2018 Posted September 4, 2018 Database is probably the best way to do it, but it can be done much simpler by simply using a .txt file, you can have slaves edit it and mules read it to pass information back and forth 1
Athylus Posted September 4, 2018 Posted September 4, 2018 (edited) 36 minutes ago, GPSwap said: Database is probably the best way to do it, but it can be done much simpler by simply using a .txt file, you can have slaves edit it and mules read it to pass information back and forth I thought using streams and accessing databases is blocked from within OSBot. Also you can simply have your accounts add your mule and then use your private status to trigger an event (trading in this case). Edited September 4, 2018 by Athylus 1
Titan Rs Posted September 4, 2018 Author Posted September 4, 2018 29 minutes ago, GPSwap said: Database is probably the best way to do it, but it can be done much simpler by simply using a .txt file, you can have slaves edit it and mules read it to pass information back and forth Thanks for the response, would this be like Slave5 needs to mule - script writes in txt file "Slave 5 name" needs to mule. The mule is constantly scanning the txt file. If it isnt empty it would log in and get the "Slave5 name from text" Once the muling is finished slave5 will clear "Slave 5 name" needs to mule from txt file. I probably need to do a bit more research into i can work with databases xd so this would be better 1
flakeybanana Posted September 4, 2018 Posted September 4, 2018 remember that you can only R/W in the data directory for osbot, anywhere else and you will get errors. 1
HeyImJamie Posted September 4, 2018 Posted September 4, 2018 2 hours ago, Luke Reading said: Thanks for the response, would this be like Slave5 needs to mule - script writes in txt file "Slave 5 name" needs to mule. The mule is constantly scanning the txt file. If it isnt empty it would log in and get the "Slave5 name from text" Once the muling is finished slave5 will clear "Slave 5 name" needs to mule from txt file. I probably need to do a bit more research into i can work with databases xd so this would be better I wouldn't do something like this via a text file. If you were going to use .txt, I'd probably just output the username and then have the mule script remain logged in and only accept trades from usernames found within the .txt file. If you wanted something like you've mentioned, Sockets are likely the best way. They're fairly simple to use, and you can send a request from your slave to your mule, i.e -> NAME/LOCATION. The mule will then receive the request and you can handle that accordingly, by either returning a confirmed message or doing nothing at all. Here's some information: https://www.tutorialspoint.com/java/java_networking.htm 1
Titan Rs Posted September 4, 2018 Author Posted September 4, 2018 2 hours ago, HeyImJamie said: I wouldn't do something like this via a text file. If you were going to use .txt, I'd probably just output the username and then have the mule script remain logged in and only accept trades from usernames found within the .txt file. If you wanted something like you've mentioned, Sockets are likely the best way. They're fairly simple to use, and you can send a request from your slave to your mule, i.e -> NAME/LOCATION. The mule will then receive the request and you can handle that accordingly, by either returning a confirmed message or doing nothing at all. Here's some information: https://www.tutorialspoint.com/java/java_networking.htm Thanks a lot for this, will look into it.