Commit graph

38 commits

Author SHA1 Message Date
Daenges
b8f5909975 Allow newer SSL/TLS protocol versions
Fixes [this issue](https://github.com/MCCTeam/Minecraft-Console-Client/discussions/1885#discussioncomment-3434649).
2022-09-03 15:21:35 +02:00
Daenges
aa1f54d0d8
Rework of MineCube.cs and further improvements to CalculatePath() (#2014)
* Add function to determine if the client is executing a walking process
* Add comments
* Remove test bot entry
* Add funtion to approach a block as close as possible
* Add funtion to approach a block as close as possible
* Add funtion to approach a block as close as possible
* Add comment to function in McClient.cs
* Improve concurrency and reduce potential calculation power
* Apply code suggestions
* Apply code suggestions
* Improve CalculatePath() function to allow approaching
* Fix typo in MinecraftClient/ChatBot.cs
* Add comments to Chatbot fucntion
* Add break to for loop to exit quicker
* Allow to give a maxOffset to the goal
* Comment the sample bot again.
* Add parameter for calculation timeout
* Remove TestBot again
* Implement timeout in Chatbot class
* Remove test commands
* Update comment in Chatbot.cs
* Set timeout to default 5 sec
* Change order of parameters back
* Add suggested improvements
* Move task and fix missing methods in .NET 4.0
* Create switch for tool handling
* Remove unused function
* Improve movement
* Improve performance of CalculatePath()

 - Replace Hashset OpenSet with a Binary Heap
  - Temporary remove maxOffset / minOffset features
 - Round start location for easier calculation
 - Add 0.5 to each location in reconstruct path to avoid getting stuck
    on edges

* Add diagonal movement
* Remove direct block movement
- causes kick for invalid packet movement if moving on the block you are
  currently standing on

* Floor start in A* and improve diagonal walking check
* Add helperfunctions to McClient.cs
* Prevent client from falling into danger
* Add comment to function and remove dependencies
* Add comments
* Remove debug settings

Co-authored-by: ORelio <ORelio@users.noreply.github.com>
2022-08-15 18:26:40 +02:00
Daenges
95378dca8e
Automatic sugar cane farming (#1882)
* Automatic sugar cane farming

Inspired by #1871 I wrote a script to farm a field of sugar cane fully autonomous.

* Implement suggestions

* Remove unused comment

* Remove comment and improve return value
2022-01-04 22:34:09 +08:00
Daenges
b3b9a26288
Add script for excavating cubes (#1677)
* Add MineCube.cs

* Clear unused comments and using directives

* Move the command to a chatbot class

* Set a maximum sleep time for block mining

* Add tool selection function

* Improve the block - tool detection

* Improve naming and comments

* Add missing blocktypes

* Add block-tool assertion and tool switching in hotbar

* Remove unused using declaratives and improve coordinate handling

* Move Material2Tool in the Mapping folder

* Add function to let the bot mine up to 5 blocks above its head

* Remove obsolete function to detect breakability

* Implement mineup command
Users can dig out a 2 high square manually. The client will walk through it
mining everything that is reachable above, while avoiding falling blocks and liquids.

* Refactor big parts of the code
Move the function for obtaining cubes to a seperate file.
Sort Unbreakables alphabetically.
Change the distance to wait in the mine function back to 2.

* Fix suggestions from review
Change several parts of the code according to the review
Add credits

* Convert the bot into a script file and move it to config folder
Adjust the script to be loadable with /script
Remove unnecessary code
Add public modifier to material2tool

* Add checking for lava and water for normal mining

* Remove MineCube.cs from chatbots

* Code re-format

Rename variables
Fix indentation

Co-authored-by: ReinforceZwei <39955851+ReinforceZwei@users.noreply.github.com>
2021-08-03 13:25:43 +08:00
Daenges
83e61f04b7
Delete unnecessary Mail.cs (#1619)
This file was created for test reasons and never worked properly. With the implementation of the Mailer.cs chat bot this file became completely obsolete and is currently wasting unnecessary disk space.
2021-06-03 20:55:11 +08:00
Daenges
061b71befc Prevent errors from OnPlayerLeave() returning NULL
I suffered from some errors when I started the script. I soon found out, that the client detects some players leaving and I was wondering why, because there was not even a leaving message. I soon found out that the errors came from OnPlayerLeave() which returned a UUID but the name parameter was NULL. I don't know whether this is a bug in the client, but this should fix it for the script.
2021-06-02 23:11:36 +02:00
Daenges
5281bc140c
Fix pinging system in DiscordWebhook.cs (#1610)
* Check if ping already exists to avoid crashes.
* Remove bug where multiple words are not pinged
2021-05-31 18:54:04 +02:00
Daenges
b8ce4d16c4 Add more intuitive link for hardcoding 2021-05-08 11:48:15 +02:00
Daenges
2bf29c06a4
Implement hardcoding the WebhookURL (#1571)
* Implement hardcoding the WebhookURL

* Convert tabs to spaces

* Add comment
2021-05-06 19:53:20 +08:00
ReinforceZwei
7fd0f9157f
DiscordWebhook: Fix syntax error 2021-04-28 10:37:32 +08:00
Daenges
239900451d
Improvements for Discord Webhook (#1544)
* Improve caching and remove unused functions
* Save Player UUID before leaving
Save the UUID when they leave and save it until they join again.
* Clear the cache after disconnect
* Update MinecraftClient/config/ChatBots/DiscordWebhook.cs
2021-04-18 16:14:09 +02:00
Daenges
b3bae6c2f8
Add DiscordWebhook ChatBot (#1532)
* Send chatmessages to Discord via webhook.

With corresponding Minecraft skins as profilepicture.

* Support for pings at keywords and server messages.

* Cleanup, Settings Class and applied suggestions.

* Fix all function names

* Improve variable naming and UUID search

* Re-format some comment

* Rename file to DiscordWebhook.cs

* Add message caching and option for disabling UUID lookup

Add Message class
Add Cache class
Change internal Message delivery

* Add an ignore list

Improved help message
Add option to get all settings

* Add feature to deactivat CustomChatDetection

Comment some functions

* Option to unload the bot

Fix crash when not entering a valid ping syntax

Co-authored-by: ReinforceZwei <39955851+ReinforceZwei@users.noreply.github.com>
2021-04-14 10:21:18 +08:00
goldenlib
cca0f1f47c
TreeFarmer: Change sapling direction to up (#1537)
Invalid direction to place the sapling
2021-04-11 22:53:53 +08:00
ReinforceZwei
58feaaa39a
Fix TreeFarmer bot syntax error (#1535) 2021-04-11 21:47:48 +08:00
Рома Данилов
1c0826a045
Add QIWI OnDonation Optional ChatBot Script (#1360)
* Create QIWIDonation
* Rename QIWIDonation to QIWIDonation.cs
* Update QIWIDonation.cs
* Using double not float
* Add Check type
* Update QIWIDonation.cs
* Rename QIWIDonation.cs to QIWIAPI.cs
* Update QIWIAPI.cs
* Update QIWIAPI.cs
* Update QIWIAPI.cs
2020-12-06 13:07:32 +01:00
Рома Данилов
69c300cf5f
Update VkMessager add Example (#1354)
* Update VkMessager.cs
* Update VkMessager.cs
* Move summary above the ChatBot
* Add minimal working example
Co-authored-by: ORelio <ORelio@users.noreply.github.com>
2020-12-05 14:34:33 +01:00
ReinforceZwei
09800eab31 Add AutoTree ChatBot script
This script is made to work with Minecraft auto-tree machine.
2020-12-05 14:26:25 +01:00
Рома Данилов
2eba2149b7
VkMessagercs: New Methods and VK API version update (#1319)
* New Methods and VK API version update
* Update VkMessager.cs
* Update VkMessager.cs
* Fix code indenting
Co-authored-by: ORelio <ORelio@users.noreply.github.com>
2020-11-08 23:49:19 +01:00
ORelio
a38c9dd000
Add OreMiner.cs
Script by ReinforceZwei from #1254
2020-09-19 12:16:15 +02:00
Рома Данилов
4a3a23eb1d
Update VkMessager.cs (#1203)
* Update VkMessager.cs
* Fix
* Complite
* Update VkMessager.cs
2020-08-14 20:43:59 +02:00
Рома Данилов
3c30b34b91
Update VK API (#1201)
* Update VK API
* Fix copy paste
2020-08-13 10:30:35 +02:00
Рома Данилов
3f94814bda
VkMessager: New SendMessage RandomID core (#1198) 2020-08-12 21:47:20 +02:00
Рома Данилов
d33677a245 Update VK API Version 2020-08-10 20:13:20 +02:00
Рома Данилов
712875251e
Add UnLoadBot to ChatBot API (#1164)
Add UnloadBot
Add BotList
Update VkMessager
Remove debug info
2020-08-01 14:24:17 +02:00
Рома Данилов
55f8988bbc
Allow DLLs in scripts, Update VKAPI (#1158)
* Update VKAPI
* KeyBoard Update
* Add Custom Libs
* Change add method
2020-08-01 13:02:58 +02:00
Рома Данилов
432f55460d
Fix TreeFarmer (#1157) 2020-07-29 21:52:38 +02:00
Рома Данилов
b5c7dc4fc4
Update SugarCaneMiner.cs (#1156)
Fix
2020-07-29 21:52:15 +02:00
Рома Данилов
e91fefadb3 Fix CobbleMiner 2020-07-29 21:49:59 +02:00
Рома Данилов
f8111d6b3b Fix VKAPI 2020-07-18 15:12:01 +02:00
Рома Данилов
03388bf5a1
VkMessager bug fix (#1119)
* Update VkMessager.cs

VK API Auto Update Server Key

* Update VkMessager.cs

* Update VkMessager.cs

* Update VkMessager.cs

* Update VkMessager.cs

* Update VkMessager.cs

* Update VkMessager.cs
2020-07-08 21:30:08 +02:00
Рома Данилов
1088e6c4fd
PayKassa bot (#1114) 2020-07-07 19:29:57 +02:00
Рома Данилов
b7b242cff1 Create ClckRuAPI.cs 2020-07-07 19:28:28 +02:00
ORelio
e9f1a4477c Mail ChatBot to Mail script (#1102)
The script compiles but does not work yet due to serialization
2020-07-04 11:01:12 +02:00
ORelio
09bfe92071 Fix Miner/Farmer addon scripts (#1047) 2020-06-13 23:47:53 +02:00
ORelio
ee96788019 Add CobblestoneMiner and TreeFarmer by Nekiplay (#1047) 2020-06-12 00:12:36 +02:00
ORelio
fa0f91aad8 Sugar Cane Miner Improvements by NekiPlay (#1047) 2020-06-12 00:10:57 +02:00
ORelio
674bf4f635 Add SurgarCaneMiner by Nekiplay (#1047) 2020-06-07 23:37:17 +02:00
ORelio
9dae40153c Implement pull request #982
LookAtLocation and AutoLook
2020-05-01 14:02:23 +02:00