Git Product home page Git Product logo

b4d's Introduction

b4d's People

Contributors

dependabot[bot] avatar flalal avatar lucberge avatar mrdomoo avatar

Stargazers

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

Watchers

 avatar  avatar

b4d's Issues

[Gui] Program selection using a tableView

Is your feature request related to a problem? Please describe.
The current program selection uses dropdown lists, pograms are referenced by Place, Category, Subcategory and Titles. In this way, we cannot get a clear overview of all the programs making the program selection complicated.

Describe the solution you'd like
The idea would be to have a tableView with all the programs in it just like in the "Person" panel. The table has 4 rows : Category, Subcategory, Location and a title with possibility to add filter for each column to make a program searchable. Each program also have a short description which is displayed next to the table when seleted.

[Core] Do not use %pos% to get the current position of the player

Is your feature request related to a problem? Please describe.
When a program begins, the player position need to be retrieved for transportation API (to know where to go). It is currently done by doing %pos% in the chat. When the general channel is not displayed, it's impossible to get the position back. Because of this, every program has to have the Channel.GENERAL set in the builder. Moreover, frequently running %pos% is a vulnerability for bot detection.

Describe the solution you'd like
The idea is simply to not use %pos% to get the current position of the player.

Describe alternatives you've considered

  • Using OCR to get the position on the top-left hand corner : not always visible and not always readable, rejected.
  • Find how other bots do it (Flatybot...etc).

[Core] Define socket ids from a database

Is your feature request related to a problem? Please describe.
At each update, the socket ids change. We need a way to update the socket ids on the bot side as well.

Describe the solution you'd like
The bot need a json database matching the sockets ids with the event name.

Describe alternatives you've considered
When openning the bot, the database is updated based on the Datafus repo.

Error at launch

Hello,
I have an Exception when i try to start the application:

java -jar B4D-2019.11.09.jar

=>

Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\Users\myuser\AppData\Local\Temp\jna-2095686\jna10876926830729102268.dll: Can't find dependent libraries
at java.base/java.lang.ClassLoader$NativeLibrary.load0(Native Method)
at java.base/java.lang.ClassLoader$NativeLibrary.load(ClassLoader.java:2430)
at java.base/java.lang.ClassLoader$NativeLibrary.loadLibrary(ClassLoader.java:2487)
at java.base/java.lang.ClassLoader.loadLibrary0(ClassLoader.java:2684)
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2617)
at java.base/java.lang.Runtime.load0(Runtime.java:765)
at java.base/java.lang.System.load(System.java:1835)
at com.sun.jna.Native.loadNativeDispatchLibraryFromClasspath(Native.java:851)
at com.sun.jna.Native.loadNativeDispatchLibrary(Native.java:826)
at com.sun.jna.Native.(Native.java:140)
at com.sun.jna.Pointer.(Pointer.java:41)
at com.sun.jna.ptr.PointerByReference.(PointerByReference.java:28)
at com.sun.jna.ptr.PointerByReference.(PointerByReference.java:24)
at org.pcap4j.core.Pcaps.findAllDevs(Pcaps.java:51)
at org.pcap4j.core.Pcaps.getDevByAddress(Pcaps.java:99)
at fr.B4D.socket.PcapsFinder.findActiveDevice(PcapsFinder.java:45)
at fr.B4D.socket.SocketListener.(SocketListener.java:56)
at fr.B4D.bot.B4D.(B4D.java:67)
at fr.B4D.gui.JFrame_B4D.(JFrame_B4D.java:62)
at fr.B4D.gui.JFrame_B4D.main(JFrame_B4D.java:53)

fr.B4D.bot.B4DException: Couldn't find any packet on any device. Please try again.

This issue occurs when NetworkFinder.find() don't find any active device. Normaly, PacketCapture.findDevice() (from jpcap) should return the active device. But after few tests, this function only return the first device in the PacketCapture.lookupDevices() list. To find the active one, B4D listen on every devices in this list. When a packet is detected, the device name is returned.

Please keep trying and make sure you have an internet connection

Error

java.lang.NullPointerException
at sun.awt.SunToolkit.getImageFromHash(SunToolkit.java:728)
at sun.awt.SunToolkit.getImage(SunToolkit.java:762)
at fr.B4D.gui.JFrame_B4D.initialize(JFrame_B4D.java:78)
at fr.B4D.gui.JFrame_B4D.(JFrame_B4D.java:67)
at fr.B4D.gui.JFrame_B4D.main(JFrame_B4D.java:53)

Process finished with exit code 0

Add "Java doc" pipeline [C]

Is your feature request related to a problem? Please describe.
The java doc is manualy created with the maven command javadoc:javadoc.

Describe the solution you'd like
Setup a Javadoc pipeline that works in two steps :

  • Build the javadoc with maven
  • Publish the javadoc on GitHub pages

Additional context
This ticket is the pipeline C on the picture

Add "Code analysis" pipeline [E]

Is your feature request related to a problem? Please describe.
To make sure good practices are used while coding, a static code analysis tool can like (SonarQube) can do the job to highlight vulnerabilities and errors.

Describe the solution you'd like
List and compare all the code analysis tools for github and pick one.
Add code analysis to the CI.

Additional context
This ticket is the pipeline E on the picture

Almanax not working

Describe the bug

fr.B4D.bot.B4DException: org.jsoup.HttpStatusException: HTTP error fetching URL. Status=403, URL=https://account.ankama.com/sso?from=http%3A%2F%2Fwww.krosmoz.com%2Ffr%2Falmanax%2F2021-04-01%3Fgame%3Ddofus

when trying to get today's almanax

To Reproduce
Try to get today's almanax

Expected behavior
Returns a list of items to get

Add "Package" pipeline [B]

Is your feature request related to a problem? Please describe.
The packaging part is manualy done. It is a waste of time.

Describe the solution you'd like
Setup a package pipeline that works in two steps :

  • Package the jar with maven
  • Publish the jar on GitHub release

Additional context
This ticket is the pipeline B on the picture

[Program] Runes buy/sell program

Describe the new program
The idea is to make a program that makes money based on runes. It compare the runes prices, buy runes, merge them and sell it.

Original message received by email:

 Ouvre l'HDV Runes Ă  Brak ou bonta.
Clic sur "Achat"
Coche la case "Runes de forgemagie si elle n'est pas déjà cochée

Clic sur le premier item de la liste pour lire et enregistrer le prix de l'ensemble des items listés

Pour chacunes de recettes connus, si le [prix de vente] x 0.98 - [prix d'achat] > [prix d'achat] x 0.2 alors il achete de quoi faire la recette. (En gros si il peut faire 20% de bénef en soustrayant la taxe de 2%.)
Le bot fait ainsi une liste de recette rentable à hauteur de 20% de bénef.
(Dans l'idĂ©al, se chiffre peut ĂȘtre modifiĂ© en dĂ©but de programme.)

Ferme l'hdv
Entre dans l'atelier de forgemages
Monte Ă  l'Ă©tage en clicant sur l'escalier (il y a moins de monde en haut)
Clic sur le concasseur puis sur fusionner des ressources

Tant qu'il y a une recette Ă  fabriquer

	Tape dans la barre de recherche le nom de l'items qu'il doit créer
	Double clic dessus
	Clic sur le "1" pour entrer la quantité d'items à crafter (multiple de 100)

Ferme la fenĂštre
Descend au RDC
Sort du batiment
Clic sur l'HDV
Clic sur Vente

Tant u'il y a des runes Ă  vendre dans son inventaire

	Recherhce dans son inventaire le nom exacte des runes Ă  vendre
	Clic desus
	Quantité : 100
	Prix du lot = n-1 kamas
	Entrer
	
Ferme hdv Runes

--------------------
 Liste des recettes
--------------------

1) Runes primaires

	300 Runes Fo     --> 100 Runes Pa Fo
	300 Runes Pa Fo  --> 100 Runes Ra Fo
<=> 900 Runes Fo     --> 300 Runes Pa Fo  --> 100 Runes Ra Fo


	300 Runes Age    --> 100 Runes Pa Age
	300 Runes Pa Age --> 100 Runes Ra Age
<=> 900 Runes Age    --> 300 Runes Pa Age --> 100 Runes Ra Age

	300 Runes Ine    --> 100 Runes Pa Ine
	300 Runes Pa Ine --> 100 Runes Ra Ine
<=> 900 Runes Ine    --> 300 Runes Pa Ine --> 100 Runes Ra Ine

	300 Runes Cha    --> 100 Runes Pa Cha
	300 Runes Pa Cha --> 100 Runes Ra Cha
<=> 900 Runes Cha    --> 300 Runes Pa Cha --> 100 Runes Ra Cha

	300 Runes Sa    --> 100 Runes Pa Sa
	300 Runes Pa Sa --> 100 Runes Ra Sa
<=> 900 Runes Sa    --> 300 Runes Pa Sa --> 100 Runes Ra Sa

	300 Runes Vi    --> 100 Runes Pa Vi
	300 Runes Pa Vi --> 100 Runes Ra Vi
<=> 900 Runes Vi    --> 300 Runes Pa Vi --> 100 Runes Ra Vi

2) Runes secondaires

	300 Runes Ini    --> 100 Runes Pa Ini
	300 Runes Pa Ini --> 100 Runes Ra Ini
<=> 900 Runes Ini    --> 300 Runes Pa Ini --> 100 Runes Ra Ini

	300 Runes Pod    --> 100 Runes Pa Pod
	300 Runes Pa Pod --> 100 Runes Ra Pod
<=> 900 Runes Pod    --> 300 Runes Pa Pod --> 100 Runes Ra Pod

3) Runes dommage

300 Runes Do Feu --> 100 Runes Pa Do Feu
300 Runes Do Neutre --> 100 Runes Pa Do Neutre
300 Runes Do Eau --> 100 Runes Pa Do Eau
300 Runes Do Air --> 100 Runes Pa Do Air
300 Runes Do Terre --> 100 Runes Pa Do Terre

300 Runes Do Pou --> 100 Runes Pa Do Pou
300 Runes Do Cri --> 100 Runes Pa Do Cri

	300 Runes Pui    --> 100 Runes Pa Pui
	300 Runes Pa Pui --> 100 Runes Ra Pui
<=> 900 Runes Pui    --> 300 Runes Pa Pui --> 100 Runes Ra Pui

4) Runes RĂ©sistance

300 Runes RĂ© Feu --> 100 Runes Pa RĂ© Feu
300 Runes RĂ© Neutre --> 100 Runes Pa RĂ© Neutre
300 Runes RĂ© Eau --> 100 Runes Pa RĂ© Eau
300 Runes RĂ© Air --> 100 Runes Pa RĂ© Air
300 Runes RĂ© Terre --> 100 Runes Pa RĂ© Terre

300 Runes RĂ© Pou --> 100 Runes Pa RĂ© Pou
300 Runes RĂ© Pa --> 100 Runes Pa RĂ© Pa
300 Runes RĂ© Pme --> 100 Runes Pa RĂ© Pme

300 Runes RĂ© Pme --> 100 Runes Pa RĂ© Pme

5) Autres runes

	300 Runes Pi Per    --> 100 Runes Pa Pi Per
	300 Runes Pa Pi Per --> 100 Runes Ra Pi Per
<=> 900 Runes Pi Per    --> 300 Runes Pa Pi Per --> 100 Runes Ra Pi Per

300 Runes Pi --> 100 Runes Pa Pi
300 Runes Prospe --> 100 Runes Pa Prospe
300 Runes So --> 100 Runes Pa So
300 Runes Fui --> 100 Runes Pa Fui
300 Runes RĂ© Cri --> 100 Runes Pa RĂ© Cri
300 Runes Ret Pa --> 100 Runes Pa Ret Pa
300 Runes Ret Pme --> 100 Runes Pa Ret Pme
300 Runes Tac --> 100 Runes Pa Tac

Add "Test" pipeline [A]

Is your feature request related to a problem? Please describe.
Building and testing the code is manualy done. It is long and repetitive.

Describe the solution you'd like
Setup a "Test" pipeline that works in three steps :

  • Build with maven
  • Test with maven and jacoco
  • Publish the results on codecov

Additional context
This ticket is the pipeline A on the picture

Spam bot

Someone asked me for a flood program that sends a private message for each person entering/leaving the map. The parameters would be the following:

  • Customize the message
  • Define the time between each message
  • Choose between entering/leaving the map
  • Define proxy server parameters (optional)

Original message by email:

[...] Ce que je veux prĂ©cisĂ©ment c'est un spam bot (un bot flood) pour partager mon discord etc.. sur le jeu. un bot qui permet d'envoyer un message privĂ© aux joueurs qui passent par la map. Je suis prĂȘt Ă  payer pour cela si la fonctionnalitĂ© n'existe pas. [...]
surtout pour la publicité et pour monter mon discord mais certainement pas pour de l'arnaque. Je ne cherche pas à monter non plus un bot comme snowbot ou autre pour le commercialiser, ma demande se limite uniquement au flood dans le canal privé.

  • pouvoir personnaliser le message
  • personnaliser un dĂ©lai entre les messages
  • des champs pour le proxy
  • pouvoir choisir entre personnages entrant / sortants.

Erorr

PacketCapture: loading native library jpcap.. ok
fr.B4D.bot.B4DException: Merci de vĐčrifier votre connection internet.
at fr.B4D.socket.os.Windows.findActiveDevice(Windows.java:47)
at fr.B4D.socket.SocketListener.(SocketListener.java:61)
at fr.B4D.bot.B4D.(B4D.java:74)
at fr.B4D.gui.JFrame_B4D.(JFrame_B4D.java:64)
at fr.B4D.gui.JFrame_B4D.main(JFrame_B4D.java:55)

[Core] Improve error logs

Is your feature request related to a problem? Please describe.
It is hard to debug an error if the user cannot acces the full logs.

Describe the solution you'd like
When an exception occurs, create a log file in logs/yyyy-MM-dd HH:mm:ss.log

Compilation error on CI workflow

Describe the bug
When pushing on github, the CI workflow triggers to compile and test the program. But the compilation fails because of an unknown symbol. It might be encoding related or platform dependant.

To Reproduce
I'm not able to reproduce the bug on windows on compilation. Someone on linux must try it.

Expected behavior
Compilation pass.

Error

 Error:  COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
Error:  /home/runner/work/B4D/B4D/src/main/java/fr/B4D/program/Program.java:[27,32] error: cannot find symbol
Error:   package fr.B4D.programs.tutorials
/home/runner/work/B4D/B4D/src/main/java/fr/B4D/program/Program.java:[28,32] error: cannot find symbol
Error:   package fr.B4D.programs.tutorials
/home/runner/work/B4D/B4D/src/main/java/fr/B4D/program/Program.java:[29,32] error: cannot find symbol
Error:   package fr.B4D.programs.tutorials
/home/runner/work/B4D/B4D/src/main/java/fr/B4D/program/Program.java:[30,32] error: cannot find symbol
Error:   package fr.B4D.programs.tutorials
/home/runner/work/B4D/B4D/src/main/java/fr/B4D/program/Program.java:[31,32] error: cannot find symbol
Error:   package fr.B4D.programs.tutorials
/home/runner/work/B4D/B4D/src/main/java/fr/B4D/program/Program.java:[35,32] error: cannot find symbol
Error:   package fr.B4D.programs.tutorials
/home/runner/work/B4D/B4D/src/main/java/fr/B4D/program/Program.java:[101,21] error: cannot find symbol
Error:   class Program
/home/runner/work/B4D/B4D/src/main/java/fr/B4D/program/Program.java:[105,21] error: cannot find symbol
Error:   class Program
/home/runner/work/B4D/B4D/src/main/java/fr/B4D/program/Program.java:[107,21] error: cannot find symbol
Error:   class Program
/home/runner/work/B4D/B4D/src/main/java/fr/B4D/program/Program.java:[109,21] error: cannot find symbol
Error:   class Program
/home/runner/work/B4D/B4D/src/main/java/fr/B4D/program/Program.java:[111,21] error: cannot find symbol
Error:   class Program
/home/runner/work/B4D/B4D/src/main/java/fr/B4D/program/Program.java:[119,21] error: cannot find symbol

English Docs

Please, if you can describe everything in English it will be nice (I'm Brazilian) and may I help you to get this project further..

I know there's a translator haha :)

Add "License scan" pipeline [D]

Is your feature request related to a problem? Please describe.
The program licensing is only set in the LICENSE file, but it has no legal value if the files does not have license intro in it.

Describe the solution you'd like
List and compare all the License scan tools for github and pick one.
Add license scanning to the CI.

Additional context
This ticket is the pipeline D on the picture

Switch all the java doc to English

Is your feature request related to a problem? Please describe.
The javadoc has been firstly done in French but internationnal users want to contribute to the bot.

Describe the solution you'd like
Replace the French javadoc by English javadoc.

Additional context
All the classes that have been created before 2020 are in French (eg).
All classes modified after 2020 are in English (eg).

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.