Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how install BOTS?¿ #229

Open
Blacky696 opened this issue Jan 19, 2021 · 7 comments
Open

how install BOTS?¿ #229

Blacky696 opened this issue Jan 19, 2021 · 7 comments

Comments

@Blacky696
Copy link

sorry for my bad english, but i need littel tutorial for install bots...can you help mee?

@IntinteDAO
Copy link
Contributor

Hello. In short in config.txt file you write info about your Database configuration

Copy this file to functions and create_bots.

If your server is new, execute file new_server.php, the bots will be "clean accounts". If your server works, then run exists_server.php. It create a bot account that have some building (based on your players position).

If you run multiple times, you create multiple bot accounts

Then execute all files from functions for every X time (cron?). Then the bots will uses functions (colonization, attack idlers etc).

@AppDec
Copy link

AppDec commented Apr 25, 2022

Hello IntinteDAO,

can you explain a b it more in details how to setup bots in steemnova please?

Thanks in advance
Regards

@IntinteDAO
Copy link
Contributor

@AppDec

In external you have two directories

  • create_bots
  • functions

Create bots add bot user. In config.txt set your MySQL database parameters and use one of these scripts (new_server.php add empty account, exists_server.php add bot with average buildings on planet)

copy this config.txt to functions. This is functions that bot can do.
Attack idlers - attack players that don't play
Attack Players - attack random player
Autobuilder, build something if possible
Autorefresher is needed every time you build something
Build ships - Build a ship if possible
Buy officer - Buy a officer by DM if possible
Colonize Planet - Colonize a planet if possible
Remove Messages - remove messages to bots, to save space in Database
Send Expedition - send expedition to get DM
Send Recyclers - send recycler to get some resources

You can use PHP to execute that - I recommend CLI and Cron

@AppDec
Copy link

AppDec commented Apr 27, 2022

@IntinteDAO

Thanks for your answer.
I already checked out how the bot work. But every time i try to let things work there is an error in line 4 in exists_server.php. Seems like the given database parameters like localhost, user, pw and db_name doesnt work.
I have to search for a solution, maybe i am just to stupid to use php, idk.

Maybe my php Version i not that comtabile with the code...here my server information. Maybe you have a quick solution or a headword for me to safe some time.

Server Infos: Apache/2.4.29 (Ubuntu)
PHP-Version: 7.0.33-57+ubuntu18.04.1+deb.sury.org+1 (apache2handler)
JSON Verfügbar: Ja
BCMath Verfügbar: Nein
cURL Verfügbar: Ja
SafeMode: Nein
MemoryLimit: 128M
MySQL-Client-Version: mysqlnd 5.0.12-dev - 20150407 - $Id: b5c5906d452ec590732a93b051f3827e02749b83 $
MySQL-Server-Version: 5.7.37-0ubuntu0.18.04.1
ErrorLog: includes/error.log (84, Aktiv)
Timezone(PHP/CONF/USER): 2 / 2 / -7
Suhosin: Nein
DB Version: 7

-- Game --
Game Version: 2Moons 1.8.git
Game Addresse: http://127.0.0.1/
Game Pfad: http://127.0.0.1/steemnova/index.php

Browser: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:99.0) Gecko/20100101 Firefox/99.0

@AppDec
Copy link

AppDec commented Apr 27, 2022

UPDATE:

I installed php8.1-mysqli. So the exists_server.php is thrown now a error at line 25

Expression #1 of ORDER BY clause is not in SELECT list, references column 'DB.uni1_statpoints.total_points' which is not in SELECT list; this is incompatible with DISTINCT in /var/www/html/steemnova/external/autobot/create_bots/exists_server.php:25

@IntinteDAO
Copy link
Contributor

@AppDec Hmm, but does "new_server.php" works?

@AppDec
Copy link

AppDec commented Apr 27, 2022

@IntinteDAO
New_servers.php works, yes. Also the execute for the functions scripts works like a charm so thats not the problem.
If i can help you in any way just let me know. I will still test it and give feedback in this post.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants