GithubHelp home page GithubHelp logo

codesidian / python-missionchiefbot Goto Github PK

View Code? Open in Web Editor NEW
13.0 13.0 14.0 19.85 MB

A Python bot for the online game MissionChief

License: Other

Python 99.91% Batchfile 0.07% Shell 0.02%
bot botting missionchief

python-missionchiefbot's Introduction

Hi there 👋

I'm codesidian (Josh), a software developer from the UK. I try to keep most of my open source code here. Everything is free use unless otherwise stated. Feel free to reach out to me if you want to colab.

🔭 I’m currently working on ...

React, FastAPI, AWS, Microservices.

🌱 I’m currently learning ...

As above, focusing on learning React and microservice architecture.

📫 How to reach me: ...

[email protected]

https://www.linkedin.com/in/joshua-latham/

python-missionchiefbot's People

Contributors

bublov avatar codesidian avatar duchian avatar ferdzi39 avatar jackbayliss avatar rewindtm avatar valdemarcrafter avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

python-missionchiefbot's Issues

Large vehicle lists not rendering in time.

When a user has a large number of vehicles, the page doesn't render it time for out browser script to execute which throws a ElementClickInterceptedException since the checkbox isn't in view (I assume).

This is the last thing we need to fix before we can merge into master from the selenium-port branch.

'WebDriver' object has no attribute 'find_element_by_id'

Describe the bug
an error pops up when i start the bot

Upload your debug.log file
the debug is empty, i've attached a file that shows the problem
text.txt

To Reproduce
Steps to reproduce the behavior:

  1. open the cmd file
  2. see the error

Expected behavior
i expected to open it and see it work correctly

Screenshots
problem shown in text file

Desktop (please complete the following information):

  • OS: [e.g. iOS] windows
  • Browser [e.g. chrome, safari] chrome
  • Version [e.g. 22] 104.0.5112.79, i assume ur asking for the chrome version

Additional context
n/a

Not sure on this one Occured after buying 60 ambo stations

Oh no, an error occurred.
Message: no such element: Unable to locate element: {"method":"xpath","selector":"//a[contains(@href, "einsaetze")]"}
(Session info: chrome=80.0.3987.163)

Please create an issue on github or post in our discord
Include your output and the debug.log file so we can debug it! :)
Restarting bot....
Removing Completed
Building New Missions
33 mission/s found
Getting requirements
Oh no, an error occurred.
Message: no such element: Unable to locate element: {"method":"xpath","selector":"//a[contains(@href, "einsaetze")]"}
(Session info: chrome=80.0.3987.163)

Please create an issue on github or post in our discord
Include your output and the debug.log file so we can debug it! :)
Restarting bot....

Russian Support (www.dispetcher112.ru)

Full log:
Logging in
Logged in
Building Vehicles
2 vehicles/s found
1/2 vehicles checked!
2/2 vehicles checked!
Removing Completed
Building New Missions
2 mission/s found
https://www.dispetcher112.ru/missions/1491461
Getting requirements

Requirement found :   650 x кредиты (ср.)
Requirement found :   Требуемые пожарные станции x 650
Requirement found :   1 x пожарные станции
Requirement found :   Generated by x 1
Requirement found :   Пожарная станция x generated by
Requirement found :   Generated by x пожарная станция
Requirement found :   ПСЧ-Центр x generated by
Requirement found :   Требуемые пожарные машины x псч-центр
Requirement found :   1 x пожарные машины
Oh no, an error occurred!
no elements could be found with tag_name "td"
PLEASE CREATE AN ISSUE CONTAINING THIS OUTPUT ON GITHUB SO WE CAN DEBUG IT! :)

Process finished with exit code 0

How to use

I have windows 10 and always when I start the run.bat file, it automaticaly close. I did everything written in README.md file. I have python 3.8.1, did I need chrome driver and selenium and where can I download them. Please help me.

DE-Version

on the german Version it is always missing the NEF on ambulance. Aswell the LNA for bier missions.

Mission Batching

Since missions can time out, our current implementation of loading missions can fail if the user's mission amount is too big. We have a list of some timed out missions which cannot be dispatched.

A solution to the problem would be to change the logic to do missions in batches of 10 or any arbitrary number, rather than all at once. Load batch, dispatch batch and repeat.

Same issue in different servers

I try it in centos6 and centos7, with python, python2, python34 and python37....
Same error all times:

Traceback (most recent call last):
File "missionchief_bot.py", line 60, in
browser = Browser('chrome', **executable_path)
File "/usr/local/lib/python3.7/site-packages/splinter/browser.py", line 64, in Browser
return driver(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/splinter/driver/webdriver/chrome.py", line 43, in init
self.driver = Chrome(options=options, **kwargs)
File "/usr/local/lib/python3.7/site-packages/selenium/webdriver/chrome/webdriver.py", line 73, in init
self.service.start()
File "/usr/local/lib/python3.7/site-packages/selenium/webdriver/common/service.py", line 76, in start
stdin=PIPE)
File "/usr/local/lib/python3.7/subprocess.py", line 775, in init
restore_signals, start_new_session)
File "/usr/local/lib/python3.7/subprocess.py", line 1522, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
OSError: [Errno 8] Exec format error: './chromedriver.exe'

Any help will be useful, thank you!

Doesn't work

I tried it many times. How do you insert your account details into the txt file properly.

element click intercepted

Oh no, an error occurred! Message: element click intercepted: Element <input type="checkbox" value="143231" class="vehicle_checkbox" id="vehicle_checkbox_143231" name="vehicle_ids[]" fms="2" building_id="75483_68573" custom_="1" tractive_random="0" ignore_aao="0" vehicle_type_ignore_default_aao="0" tractive_vehicle_id="0" tractive_building_random="0" trailer_vehicle_id="0" fire="1" rw="1" ab_ruest_rw="1" vehicle_type_id="16" lf_only="1" possible_tractive="[]" hlf_only="1"> is not clickable at point (635, 881). Other element would receive the click: <div class="container-fluid">...</div> (Session info: chrome=79.0.3945.130)

The above occurs if an account has a huge amount of vehicles, because the checkbox isn't within the view it will fail checking it, even if existing.

To fix: Make the bot scroll to the checkbox.

May have to switch splinter to selenium as don't think splinter offers scrolling to element.

Requirement Logic

Somehow the bot thinks some vehicles can be dispatched to missions when they can't due to the mission requirements. Although somewhat functional right now, this needs ironing out.

Crashing on "Medium Earthquake" Mission

Describe the bug
A clear and concise description of what the bug is.
It seems the mission "Medium Earthquake" does not dispatch and crashes my client frequently

Upload your debug.log file
INFO: 06/24/2020 07:35:51 Attempting login
INFO: 06/24/2020 07:35:55 Checking for transport
INFO: 06/24/2020 07:35:56 Checking for ambulance transport
INFO: 06/24/2020 07:35:56 Checking for prisoners
INFO: 06/24/2020 07:35:56 6 missions found
INFO: 06/24/2020 07:35:56 Beginning despatch
INFO: 06/24/2020 07:35:56 16 mission
INFO: 06/24/2020 07:35:56 sending mission for despatch 73175262
INFO: 06/24/2020 07:35:56 Checking despatch for mission 73175262
INFO: 06/24/2020 07:35:59 Mission 73175262 meets the requirements- attempting to send.
INFO: 06/24/2020 07:35:59 Attempting to despatch 73175262
INFO: 06/24/2020 07:36:00 73175262 despatched
INFO: 06/24/2020 07:36:04 22 mission
INFO: 06/24/2020 07:36:04 sending mission for despatch 73175443
INFO: 06/24/2020 07:36:04 Checking despatch for mission 73175443
INFO: 06/24/2020 07:36:12 Mission 73175443 meets the requirements- attempting to send.
INFO: 06/24/2020 07:36:12 Attempting to despatch 73175443
INFO: 06/24/2020 07:36:12 73175443 despatched
INFO: 06/24/2020 07:36:20 35 mission
INFO: 06/24/2020 07:36:20 sending mission for despatch 73175574
INFO: 06/24/2020 07:36:20 Checking despatch for mission 73175574
INFO: 06/24/2020 07:36:24 Mission 73175574 meets the requirements- attempting to send.
INFO: 06/24/2020 07:36:24 Attempting to despatch 73175574
INFO: 06/24/2020 07:36:24 73175574 despatched
INFO: 06/24/2020 07:36:39 341 mission
INFO: 06/24/2020 07:36:39 sending mission for despatch 73175800
INFO: 06/24/2020 07:36:39 Checking despatch for mission 73175800
INFO: 06/24/2020 07:36:42 Mission 73175800 meets the requirements- attempting to send.
INFO: 06/24/2020 07:36:42 Attempting to despatch 73175800
INFO: 06/24/2020 07:36:42 73175800 despatched
INFO: 06/24/2020 07:36:49 133 mission
INFO: 06/24/2020 07:36:49 sending mission for despatch 73176989
INFO: 06/24/2020 07:36:49 Checking despatch for mission 73176989
INFO: 06/24/2020 07:36:52 Mission 73176989 meets the requirements- attempting to send.
INFO: 06/24/2020 07:36:52 Attempting to despatch 73176989
INFO: 06/24/2020 07:36:52 73176989 despatched
INFO: 06/24/2020 07:37:08 340 mission
INFO: 06/24/2020 07:37:08 sending mission for despatch 73178700
INFO: 06/24/2020 07:37:08 Checking despatch for mission 73178700
INFO: 06/24/2020 07:37:10 Mission 73178700 meets the requirements- attempting to send.
INFO: 06/24/2020 07:37:10 Attempting to despatch 73178700
INFO: 06/24/2020 07:37:10 73178700 despatched
INFO: 06/24/2020 07:37:17 Despatching failed missions
INFO: 06/24/2020 07:37:17 Beginning despatch
INFO: 06/24/2020 07:37:17 Checking for ambulance transport
INFO: 06/24/2020 07:37:17 Checking for prisoners
INFO: 06/24/2020 07:37:55 Checking for transport
INFO: 06/24/2020 07:37:56 Checking for ambulance transport
INFO: 06/24/2020 07:37:58 Checking for prisoners
INFO: 06/24/2020 07:37:58 0missions found
INFO: 06/24/2020 07:37:58 Beginning despatch
INFO: 06/24/2020 07:37:58 Despatching failed missions
INFO: 06/24/2020 07:37:58 Beginning despatch
INFO: 06/24/2020 07:37:58 Checking for ambulance transport
INFO: 06/24/2020 07:38:02 Checking for prisoners
INFO: 06/24/2020 07:39:33 Checking for transport
INFO: 06/24/2020 07:39:34 Checking for ambulance transport
INFO: 06/24/2020 07:39:34 Checking for prisoners
INFO: 06/24/2020 07:39:34 0missions found
INFO: 06/24/2020 07:39:34 Beginning despatch
INFO: 06/24/2020 07:39:34 Despatching failed missions
INFO: 06/24/2020 07:39:34 Beginning despatch
INFO: 06/24/2020 07:39:34 Checking for ambulance transport
INFO: 06/24/2020 07:39:34 Checking for prisoners
INFO: 06/24/2020 07:39:53 Checking for transport
INFO: 06/24/2020 07:39:54 Checking for ambulance transport
INFO: 06/24/2020 07:39:54 Checking for prisoners
INFO: 06/24/2020 07:39:54 0missions found
INFO: 06/24/2020 07:39:54 Beginning despatch
INFO: 06/24/2020 07:39:54 Despatching failed missions
INFO: 06/24/2020 07:39:54 Beginning despatch
INFO: 06/24/2020 07:39:54 Checking for ambulance transport
INFO: 06/24/2020 07:39:54 Checking for prisoners
INFO: 06/24/2020 07:40:50 Checking for transport
INFO: 06/24/2020 07:40:51 Checking for ambulance transport
INFO: 06/24/2020 07:40:54 Checking for prisoners
INFO: 06/24/2020 07:40:54 4missions found
INFO: 06/24/2020 07:40:54 Beginning despatch
INFO: 06/24/2020 07:40:54 383 mission
INFO: 06/24/2020 07:40:54 sending mission for despatch 73169719
INFO: 06/24/2020 07:40:54 Checking despatch for mission 73169719
INFO: 06/24/2020 07:41:13 Mission73169719 does not meet the requirements.
INFO: 06/24/2020 07:41:16 87 mission
INFO: 06/24/2020 07:41:16 sending mission for despatch 73175443
INFO: 06/24/2020 07:41:16 Checking despatch for mission 73175443
INFO: 06/24/2020 07:41:18 Checking for transport
INFO: 06/24/2020 07:41:19 Checking for ambulance transport
INFO: 06/24/2020 07:41:19 Checking for prisoners
INFO: 06/24/2020 07:41:19 4missions found
INFO: 06/24/2020 07:41:19 Beginning despatch
INFO: 06/24/2020 07:41:19 87 mission
INFO: 06/24/2020 07:41:19 sending mission for despatch 73175443
INFO: 06/24/2020 07:41:19 Checking despatch for mission 73175443
INFO: 06/24/2020 07:41:20 Exception list index out of range
INFO: 06/24/2020 07:41:20 Traceback (most recent call last):
File "MissionChiefBot.py", line 64, in getbase
File "MissionChiefBot.py", line 79, in doActions
File "MissionChiefBot.py", line 119, in buildMissions
File "MissionChiefBot.py", line 143, in despatchMissions
File "MissionChiefBot.py", line 161, in despatchMission
IndexError: list index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "MissionChiefBot.py", line 334, in
File "MissionChiefBot.py", line 33, in init
File "MissionChiefBot.py", line 66, in getbase
File "MissionChiefBot.py", line 79, in doActions
File "MissionChiefBot.py", line 119, in buildMissions
File "MissionChiefBot.py", line 143, in despatchMissions
File "MissionChiefBot.py", line 161, in despatchMission
IndexError: list index out of range

INFO: 06/24/2020 07:41:20 Attempting login
INFO: 06/24/2020 07:41:25 Checking for transport
INFO: 06/24/2020 07:41:25 Checking for ambulance transport
INFO: 06/24/2020 07:41:25 Checking for prisoners
INFO: 06/24/2020 07:41:25 4missions found
INFO: 06/24/2020 07:41:25 Beginning despatch
INFO: 06/24/2020 07:41:25 87 mission
INFO: 06/24/2020 07:41:25 sending mission for despatch 73175443
INFO: 06/24/2020 07:41:25 Checking despatch for mission 73175443
INFO: 06/24/2020 07:41:26 Checking for transport
INFO: 06/24/2020 07:41:27 Checking for ambulance transport
INFO: 06/24/2020 07:41:27 Checking for prisoners
INFO: 06/24/2020 07:41:27 4missions found
INFO: 06/24/2020 07:41:27 Beginning despatch
INFO: 06/24/2020 07:41:27 87 mission
INFO: 06/24/2020 07:41:27 sending mission for despatch 73175443
INFO: 06/24/2020 07:41:27 Checking despatch for mission 73175443

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: Chrome
  • Version: Most Recent

Crash

Crashed on me don't know why or when just had it running but it definitely didn't restart itself properly.

Console Output:
Please create an issue on github or post in our discord
Include your output and the debug.log file so we can debug it! :)
Restarting bot....
Removing Completed
Oh no, an error occurred.
Message: timeout: Timed out receiving message from renderer: -0.001
(Session info: headless chrome=80.0.3987.163)

Please create an issue on github or post in our discord
Include your output and the debug.log file so we can debug it! :)
Restarting bot....
Removing Completed
Oh no, an error occurred.
Message: timeout: Timed out receiving message from renderer: -0.000
(Session info: headless chrome=80.0.3987.163)

Upload your debug.log file
Upload or add the ouput of the debug.log if short enough otherwise upload and include the link with your report.

debug.log

New Features

Could you get it so it dispatches the correct units to a call and proceed to the next mission?

Issue

The DK Version is not working

Pip Missing

Describe the bug
'Pip' missing.

To Reproduce
Steps to reproduce the behavior:

  1. Open the bat file
  2. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
http://prntscr.com/101vr6a

Desktop (please complete the following information):
Chrome
V 1.1

Filter to ignore certain missons

A fliter to ignore certain missions like planned missions they just take way to long lock vehicles for the hole time.
I would find it helpful if i could just paste the mission names into a file which the bot then simply ignores i think that would be the easiest solution.

Problems running the bot

I'm new on Python. I did the setup process and finished it but when I try to run the command 'run missionchief_bot.py' it says Invalid Syntax. Can you help me?
python

32Bit

Is it a 32 Bit of this please

Missions that dont have patients in requirements dont dispatch ambos despite needing them

Describe the bug
A clear and concise description of what the bug is.

Upload your debug.log file
Upload or add the ouput of the debug.log if short enough otherwise upload and include the link with your report.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Prisoner Transport

Since some scenes can have prisoners that need transporting, we need to check to see if one of these occur. Theoretically, not checking could cause the bot to grind to a halt after a very long time running through missions.

Console Spam in headless mode

[0414/173250.560:INFO:CONSOLE(0)] "A cookie associated with a cross-site resource at http://www.facebook.com/ was set without the SameSite attribute. A future release of Chrome will only deliver cookies with cross-site requests if they are set with SameSite=None and Secure. You can review cookies in developer tools under Application>Storage>Cookies and see more details at https://www.chromestatus.com/feature/5088147346030592 and https://www.chromestatus.com/feature/5633521622188032.", source: https://www.leitstellenspiel.de/missions/1369060733 (0)
[0414/173251.496:INFO:CONSOLE(0)] "A cookie associated with a cross-site resource at http://www.facebook.com/ was set without the SameSite attribute. A future release of Chrome will only deliver cookies with cross-site requests if they are set with SameSite=None and Secure. You can review cookies in developer tools under Application>Storage>Cookies and see more details at https://www.chromestatus.com/feature/5088147346030592 and https://www.chromestatus.com/feature/5633521622188032.", source: https://www.leitstellenspiel.de/missions/1369084983 (0)
[0414/173251.750:INFO:CONSOLE(0)] "A cookie associated with a cross-site resource at http://www.facebook.com/ was set without the SameSite attribute. A future release of Chrome will only deliver cookies with cross-site requests if they are set with SameSite=None and Secure. You can review cookies in developer tools under Application>Storage>Cookies and see more details at https://www.chromestatus.com/feature/5088147346030592 and https://www.chromestatus.com/feature/5633521622188032.", source: https://www.leitstellenspiel.de/missions/1369111569 (0)

I get this spammed in the console if i run the bot in headless mode its a bit annoying not to be able to se what else is happening

No such element: mission_panel_201442593

Message: no such element: Unable to locate element: {"method":"xpath","selector":"//div[contains(@id, "mission_panel_201442593")]"}
(Session info: chrome=102.0.5005.115)
Stacktrace:
Backtrace:
Ordinal0 [0x01022733+2434867]
Ordinal0 [0x00FB07A1+1968033]
Ordinal0 [0x00E9C678+837240]
Ordinal0 [0x00EC94E0+1021152]
Ordinal0 [0x00EC977B+1021819]
Ordinal0 [0x00EF6592+1205650]
Ordinal0 [0x00EE4484+1131652]
Ordinal0 [0x00EF4892+1198226]
Ordinal0 [0x00EE4256+1131094]
Ordinal0 [0x00EBE840+976960]
Ordinal0 [0x00EBF736+980790]
GetHandleVerifier [0x01293C72+2515426]
GetHandleVerifier [0x0128702F+2463135]
GetHandleVerifier [0x010C522A+620442]
GetHandleVerifier [0x010C4016+615814]
Ordinal0 [0x00FB707B+1994875]
Ordinal0 [0x00FBB938+2013496]
Ordinal0 [0x00FBBA25+2013733]
Ordinal0 [0x00FC4DE1+2051553]
BaseThreadInitThunk [0x77566739+25]
RtlGetFullPathName_UEx [0x77898FEF+1215]
RtlGetFullPathName_UEx [0x77898FBD+1165]

ARV's

We need some ideas on how to solve the personel issue we are having with the ARV/Swat SUV staffing.

.com Support

Oh no, an error occurred!
no elements could be found with id "missionH1"
PLEASE CREATE AN ISSUE CONTAINING THIS OUTPUT ON GITHUB SO WE CAN DEBUG IT! :)

Microsoft Windows [Version 10.0.18362.592]
(c) 2019 Microsoft Corporation. All rights reserved.

[32168:8188:0207/123527.755:ERROR:configuration_policy_handler_list.cc(90)] Unknown policy: PasswordManagerAllowShowPasswords
[32168:8188:0207/123527.828:ERROR:configuration_policy_handler_list.cc(90)] Unknown policy: PasswordManagerAllowShowPasswords

DevTools listening on ws://127.0.0.1:58043/devtools/browser/cc670e67-74a5-4eff-85ab-ddc4369dd5e0
Logging in
Logged in
Building Vehicles
4 vehicles/s found
Removing Completed
Building New Missions
59 mission/s found
https://www.missionchief.com/missions/57068675
Getting requirements

Requirement found :   5 x firetrucks
Requirement found :   1 x battalion chief vehicles
Requirement found :   1 x platform trucks
Requirement found :   1 x mobile air vehicles

https://www.missionchief.com/missions/57069999
Getting requirements

Requirement found :   5 x firetrucks
Requirement found :   1 x battalion chief vehicles
Requirement found :   1 x water tankers

https://www.missionchief.com/missions/57070138
Getting requirements

Requirement found :   2 x firetrucks
Requirement found :   2 x heavy rescue vehicles

https://www.missionchief.com/missions/57071148
Getting requirements

Requirement found :   3 x firetrucks
Requirement found :   1 x heavy rescue vehicles

https://www.missionchief.com/missions/57072625
Getting requirements

Requirement found :   1 x firetrucks
Requirement found :   1 x platform trucks

https://www.missionchief.com/missions/57072793
Getting requirements

https://www.missionchief.com/missions/57075866
Getting requirements

https://www.missionchief.com/missions/57076247
Getting requirements

Requirement found :   1 x firetrucks
Requirement found :   1 x heavy rescue vehicles

https://www.missionchief.com/missions/57077407
Getting requirements

Requirement found :   1 x firetrucks
Requirement found :   1 x platform trucks

https://www.missionchief.com/missions/57081947
Getting requirements

Requirement found :   2 x firetrucks

https://www.missionchief.com/missions/57082520
Getting requirements

Requirement found :   1 x firetrucks
Requirement found :   1 x heavy rescue vehicles

https://www.missionchief.com/missions/57071898
Getting requirements

https://www.missionchief.com/missions/57064916
Getting requirements

Requirement found :   6 x police cars

https://www.missionchief.com/missions/57064653
Getting requirements

Requirement found :   1 x firetrucks
Requirement found :   2 x ambulances
Requirement found :   2 x police cars

https://www.missionchief.com/missions/57067275
Getting requirements

Requirement found :   1 x firetrucks
Requirement found :   2 x ambulances
Requirement found :   3 x police cars

https://www.missionchief.com/missions/57068216
Getting requirements

Requirement found :   4 x police cars

https://www.missionchief.com/missions/57077155
Getting requirements

Requirement found :   1 x firetrucks
Requirement found :   2 x ambulances
Requirement found :   2 x police cars

https://www.missionchief.com/missions/57086202
Getting requirements

Requirement found :   2 x firetrucks
Requirement found :   1 x ambulances
Requirement found :   7 x police cars

https://www.missionchief.com/missions/57034841
Getting requirements

Requirement found :   1 x firetrucks

https://www.missionchief.com/missions/57007686
Getting requirements

Requirement found :   4 x firetrucks
Requirement found :   2 x platform trucks
Requirement found :   2 x battalion chief vehicles
Requirement found :   2 x hazmat vehicles
Requirement found :   4 x police cars

https://www.missionchief.com/missions/57051083
Getting requirements

https://www.missionchief.com/missions/57027748
Getting requirements

https://www.missionchief.com/missions/56947674
Getting requirements

Requirement found :   1 x k-9 units
Requirement found :   10 x police cars
Requirement found :   1 x police helicopters

https://www.missionchief.com/missions/56954843
Getting requirements

Requirement found :   4 x police cars
Requirement found :   1 x k-9 units
Requirement found :   1 x police helicopters

https://www.missionchief.com/missions/57053080
Getting requirements

Requirement found :   8 x firetrucks
Requirement found :   4 x battalion chief vehicles
Requirement found :   2 x platform trucks
Requirement found :   2 x heavy rescue vehicles
Requirement found :   1 x water tankers
Requirement found :   1 x mobile air vehicles
Requirement found :   1 x mobile command vehicles
Requirement found :   2 x police cars

https://www.missionchief.com/missions/57074413
Getting requirements

Requirement found :   1 x police cars

https://www.missionchief.com/missions/57072838
Getting requirements

Requirement found :   4 x firetrucks
Requirement found :   1 x battalion chief vehicles
Requirement found :   1 x heavy rescue vehicles
Requirement found :   1 x water tankers
Requirement found :   1 x hazmat vehicles

https://www.missionchief.com/missions/57074129
Getting requirements

Requirement found :   4 x firetrucks
Requirement found :   1 x battalion chief vehicles
Requirement found :   1 x heavy rescue vehicles
Requirement found :   1 x water tankers
Requirement found :   1 x hazmat vehicles

https://www.missionchief.com/missions/57074541
Getting requirements

Requirement found :   5 x firetrucks
Requirement found :   2 x platform trucks
Requirement found :   2 x battalion chief vehicles
Requirement found :   1 x mobile command vehicles
Requirement found :   1 x hazmat vehicles

https://www.missionchief.com/missions/57074628
Getting requirements

Requirement found :   4 x firetrucks
Requirement found :   2 x heavy rescue vehicles
Requirement found :   2 x battalion chief vehicles
Requirement found :   1 x mobile command vehicles
Requirement found :   3 x police cars
Requirement found :   2 x hazmat vehicles

https://www.missionchief.com/missions/57074954
Getting requirements

Requirement found :   10 x firetrucks
Requirement found :   4 x platform trucks
Requirement found :   2 x battalion chief vehicles
Requirement found :   4 x heavy rescue vehicles
Requirement found :   2 x mobile air vehicles
Requirement found :   2 x hazmat vehicles
Requirement found :   1 x mobile command vehicles
Requirement found :   2 x police cars

https://www.missionchief.com/missions/57072285
Getting requirements

Requirement found :   4 x firetrucks
Requirement found :   2 x heavy rescue vehicles
Requirement found :   2 x battalion chief vehicles
Requirement found :   1 x mobile command vehicles
Requirement found :   3 x police cars
Requirement found :   2 x hazmat vehicles

https://www.missionchief.com/missions/57072525
Getting requirements

Requirement found :   6 x firetrucks
Requirement found :   2 x platform trucks
Requirement found :   2 x heavy rescue vehicles
Requirement found :   2 x battalion chief vehicles
Requirement found :   1 x mobile command vehicles
Requirement found :   2 x police cars

https://www.missionchief.com/missions/57079991
Getting requirements

Requirement found :   2 x firetrucks

https://www.missionchief.com/missions/57068127
Getting requirements

Requirement found :   2 x firetrucks

https://www.missionchief.com/missions/57082919
Getting requirements

Requirement found :   2 x firetrucks
Requirement found :   2 x platform trucks
Requirement found :   2 x battalion chief vehicles
Requirement found :   2 x heavy rescue vehicles

https://www.missionchief.com/missions/57061359
Getting requirements

Requirement found :   1 x police cars
Requirement found :   1 x firetrucks

https://www.missionchief.com/missions/57084388
Getting requirements

https://www.missionchief.com/missions/57084470
Getting requirements

Requirement found :   1 x police cars

https://www.missionchief.com/missions/57084097
Getting requirements

Requirement found :   6 x police cars

https://www.missionchief.com/missions/57079636
Getting requirements

Requirement found :   5 x firetrucks
Requirement found :   1 x battalion chief vehicles
Requirement found :   1 x water tankers

https://www.missionchief.com/missions/57085675
Getting requirements

Requirement found :   4 x firetrucks
Requirement found :   1 x battalion chief vehicles
Requirement found :   1 x heavy rescue vehicles
Requirement found :   1 x water tankers
Requirement found :   1 x hazmat vehicles

https://www.missionchief.com/missions/57074315
Getting requirements

Requirement found :   4 x firetrucks
Requirement found :   2 x battalion chief vehicles
Requirement found :   1 x heavy rescue vehicles
Requirement found :   2 x police cars

https://www.missionchief.com/missions/57070037
Getting requirements

Requirement found :   5 x firetrucks
Requirement found :   1 x battalion chief vehicles
Requirement found :   1 x heavy rescue vehicles
Requirement found :   1 x water tankers
Requirement found :   1 x hazmat vehicles
Requirement found :   2 x police cars

https://www.missionchief.com/missions/57086344
Getting requirements

Requirement found :   5 x firetrucks
Requirement found :   2 x platform trucks
Requirement found :   1 x heavy rescue vehicles
Requirement found :   2 x battalion chief vehicles
Requirement found :   2 x mobile air vehicles
Requirement found :   1 x water tankers
Requirement found :   1 x mobile command vehicles

https://www.missionchief.com/missions/57087110
Getting requirements

Requirement found :   5 x firetrucks
Requirement found :   2 x platform trucks
Requirement found :   2 x battalion chief vehicles
Requirement found :   1 x mobile command vehicles
Requirement found :   1 x hazmat vehicles

https://www.missionchief.com/missions/57047910
Getting requirements

Requirement found :   1 x firetrucks
Requirement found :   1 x battalion chief vehicles
Requirement found :   2 x heavy rescue vehicles

https://www.missionchief.com/missions/57086613
Getting requirements

Requirement found :   1 x firetrucks
Requirement found :   1 x platform trucks
Requirement found :   1 x battalion chief vehicles

https://www.missionchief.com/missions/57086644
Getting requirements

Requirement found :   2 x firetrucks
Requirement found :   1 x platform trucks

https://www.missionchief.com/missions/57086702
Getting requirements

https://www.missionchief.com/missions/57086784
Getting requirements

Requirement found :   2 x firetrucks
Requirement found :   1 x battalion chief vehicles

https://www.missionchief.com/missions/57087916
Getting requirements

Requirement found :   1 x police cars

https://www.missionchief.com/missions/57086859
Getting requirements

Requirement found :   2 x firetrucks

https://www.missionchief.com/missions/57086901
Getting requirements

Requirement found :   1 x firetrucks
Requirement found :   1 x platform trucks

https://www.missionchief.com/missions/57087038
Oh no, an error occurred!
no elements could be found with id "missionH1"
PLEASE CREATE AN ISSUE CONTAINING THIS OUTPUT ON GITHUB SO WE CAN DEBUG IT! :)

Error

Describe the bug
Error

To Reproduce
Steps to reproduce the behavior:

  1. Opened the bat file
  2. Did 1 or 2 missions wit the bot
  3. Error

Expected behavior
No error

Screenshots
http://prntscr.com/1035glf

Desktop (please complete the following information):
WINDOWS
Chrome

Bot won't dispatch

Describe the bug
Bot won't dispatch units.

To Reproduce
Steps to reproduce the behavior:

  1. Click and open 'run'
  2. See error

Expected behavior
Dispatch units.

when is the bot going to be fixed

all i get is cant find exact keyword,

fire engines is not on the .co.uk version just water ladder.

ive tried changing names in helpers file, I have tried editing the bot file, no hope

i have tried locating required list and vehicles.text to fix this myself but cannot find in any files,

if you dont have time to fix yourself can you please at least tell me hoe to edit requirements and keywords

Fail to log in


name: Torilius
about: fails to login user with correct details from config.ini
title: 'Fails to log in'
labels: issue
assignees: codesidian, jackbayliss


Describe the bug
Fails to log in after opening the missionchief.com/signin page.

Upload your debug.log file
Nothng in debug.log

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Python-MissionChiefBot-master'
  2. Open 'run.bat'

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots

Connecting to the region: United States

logging in
Traceback (most recent call last):
File "C:\Users\MYNAME\Desktop\Freebot\Python-MissionChiefBot-master\botfiles\missionchief_bot.py", line 505, in
begin()
File "C:\Users\MYNAME\Desktop\Freebot\Python-MissionChiefBot-master\botfiles\missionchief_bot.py", line 501, in begin
MissonChiefBot()
File "C:\Users\MYNAME\Desktop\Freebot\Python-MissionChiefBot-master\botfiles\missionchief_bot.py", line 49, in init
logged_in = login(username,password,browser)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\MYNAME\Desktop\Freebot\Python-MissionChiefBot-master\botfiles\missionchief_bot.py", line 397, in login
user = browser.find_element_by_id('user_email')
^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'WebDriver' object has no attribute 'find_element_by_id'

Desktop (please complete the following information):

  • OS: Win10
  • Browser [Chrome]
  • Version [Google Chrome - Version 109.0.5414.75 (Official Build) (64-bit)]

Additional context
Add any other context about the problem here.

Really just want to be able to clear the transports. as well as complete the tiny calls. Speed is not an issue.

ModuleNotFoundError: No module named 'selenium'

So i've followed the instructions and I get ModuleNotFoundError: No module named 'selenium' if I run generatemissions.bat then it does the same thing just changing selenium to chromedriver auto installer. I am on windows and have already installed all the requirements.

Program fails to launch

Good Day,

I really hope you can help me with this. I am a bit new to this so keep that in mind. I have copy and pasted the text I get when double clicking on the run file. I have installed Python, which should be apparent as this message comes from that program. The issue appears to be with something called selenium? Your help is greatly appreciated!!

Mon 04/19/2021

  • MISSION CHIEF BOT 16/02/2020-
  • Creative Commons Attribution-NonCommercial 4.0 International License -
  • Copyright 2020 Jack Bayliss / Joshua Latham license available - https://github.com/codesidian/Python-MissionChiefBot/blob/master/LICENSE.md -
    checking for new requirements
    Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.
    'pip' is not recognized as an internal or external command,
    operable program or batch file.
    Traceback (most recent call last):
    File "C:\Users\mccad\Desktop\MissionChief\botfiles\missionchief_bot.py", line 1, in
    from selenium import webdriver
    ModuleNotFoundError: No module named 'selenium'
    Press any key to continue . . .

tried everything

This is what I get when I attempt to run it

Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/selenium/webdriver/common/service.py", line 76, in start
stdin=PIPE)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 775, in init
restore_signals, start_new_session)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 1522, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: './chromedriver.exe': './chromedriver.exe'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Users/dustinyoung/Desktop/Python-MissionChiefBot-master-1/missionchief_bot.py", line 60, in
browser = Browser('chrome', **executable_path)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/splinter/browser.py", line 64, in Browser
return driver(*args, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/splinter/driver/webdriver/chrome.py", line 43, in init
self.driver = Chrome(options=options, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/selenium/webdriver/chrome/webdriver.py", line 73, in init
self.service.start()
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/selenium/webdriver/common/service.py", line 83, in start
os.path.basename(self.path), self.start_error_message)
selenium.common.exceptions.WebDriverException: Message: 'chromedriver.exe' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home

enhancement: Ability to despatch accordingly

So, I think it would be nice for the bot to understand how many despatchable vehicles are available.

So, for example if there's three and three missions, it'll assign one per mission. If there's three an one misson, it'll only assign one- etc.

At the moment it'll assign all vehicles available to a job which may not be a great idea.

not dispatching any units

Describe the bug
after leaving the cmd open for a while, it stops dispatching to calls, and just says "nothing to despatch".

"Going to mission ELEVATOR RESCUE
Checking requirements for ELEVATOR RESCUE
Mission needs 1 firetrucks
Nothing to despatch"

Upload your debug.log file
there isn't anything written in the debug

To Reproduce
Steps to reproduce the behavior:

  1. open the program
  2. leave it running by itself

Expected behavior
i expected it to dispatch the units.

Screenshots
image
image

Desktop (please complete the following information):

  • OS: [e.g. iOS] windows 10
  • Browser [e.g. chrome, safari] chrome
  • Version [e.g. 22] 2020/16/02 release, latest of the free version ig

Additional context
it just stops working, doesn't dispatch any units at all, even tho it still prints out what it was trying to do.

Dispatch/complete bugs

Oh no, an error occurred.
list.remove(x): x not in list
Please create an issue on github or post in our discord
Include your output and the debug.log file so we can debug it! :)

also vehicles are not being dispatched, not sure if i have my helper file is correct.

Python-MissionChiefBot-master.zip

New EMS Mission list / Update Suggestion

Is your feature request related to a problem? Please describe.
I'd like to see the mission list modified or separated to exclude Ambulance needs.

Describe the solution you'd like
I think that adding a separate list just for EMS needs would allow to bot to more smoothly dispatch Ambulances. Something along the lines of sending exact units for the correct number of patients.

"Checking EMS needs"

Then followed by

"1 out 1 patients found"
"ALS Unavailable"
"BLS Available, sending Dispatch!"

Could possibly add in IF ALS Ambulance not available check to see if BLS is and etc until it runs out of units it could possibly send to a specific call at a time. This would allow the bot to more smoothly handle Ambulance heavy missions.

I think it would work better if you made transport needs a separate line of thought for the Bot vs. all in one approach. This will help smooth the bot during the randomness of EMS needs.

Describe alternatives you've considered
I've also considered the possibility of having that code in each mission file but I feel this might cause a uptick in crashes.

Problem dispatching

It will only dispatch 1 vehicle to up to 2 calls. I have to manually assign additional vehicles

Make the bot more supportive for mac

I've been trying to install the bot on my mac computer and have had no luck. I would use python but don't have enough experience to do that. If it is available to run on python could someone show me and if not are there any other free ways of running it.

don't know how to get this working

I have python installed, I downloaded splinter and put chromedriver in the splinter folder, the splinter folder was automatically put into the documents folder (idk if it should be else where)
I also even tried putting chromedriver.exe with the missionchief_bot.py file
I put in the correct details in account file, when I open missionchief_bot.py it automatically closes, please help?

Noob issues

Hey there,

I am a noob in python and I am not sure what pip install splinter is.

I am also not sure in what format I should enter my account information.

Fix vehicle names for .com domain

Vehicle names are typed differently on the .com domain compared to the .co.uk. I've manually added what I can, however i will need to create a few different stations to get vehicle names and types.

Doesn't work.

Traceback (most recent call last):
File "C:\Users\aircr\Documents\MissionChief Tool\missionchief_bot.py", line 1, in
from splinter import Browser
File "C:\Users\aircr\AppData\Local\Programs\Python\Python37-32\lib\site-packages\splinter_init_.py", line 5, in
from splinter.browser import Browser # NOQA
File "C:\Users\aircr\AppData\Local\Programs\Python\Python37-32\lib\site-packages\splinter\browser.py", line 9, in
from splinter.driver.webdriver.firefox import WebDriver as FirefoxWebDriver
File "C:\Users\aircr\AppData\Local\Programs\Python\Python37-32\lib\site-packages\splinter\driver\webdriver_init_.py", line 16, in
from six import BytesIO
ModuleNotFoundError: No module named 'six'

Missing Vehicles

Hi,

On the German Server there are some missing Vehicles.:
THW:

GKW
LKW K9
Rettungsdienst:
NEF
Are not working:
KDOW LNA
KDOW Orgl

and in some Emergencys there is not enought Water to end.
I would love to see those Problems solved.

Have a good one…

P.s.: Thank's for the bot

Accident was not despatched

In some quest I saw that it can't read the quantity correctly.
As you can see in the following photo there is a need of

1st Accident [7 vehicles (which in mission requirements you will see that you need only 2 Fire engines, 1Fire Officers, 1 Rescue Support Vehicles, 2 Police Cars)]
2nd Accident [7 vehicles (the same accident as the above)]
3nd Accident [2 vehicles (which in mission requirements you will see that you need only 1 Fire Engine)]
4nd Accident [4 vehicles. (which in mission requirements you will see that you need only Fire engines 2)]

Currently I have more than 30 Fire Engines. 10 Officers and etc. witch they are plenty enough about the quests.
It seems to be a problem in these quests where you can see them in photo. I tried to find a solution but can’t find any.

123

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.