BrandonWill / GrepolisBot

24 stars 12 forks source link

Top actie dit #1

Closed Frank18000 closed 8 years ago

Frank18000 commented 8 years ago

Hoi ben blij dat jullie hier mee bezig zijn ik heb geen verstand van programmeren maar wil graag testen voor jullie. Ik kan in loggen maar dan bevriest de bot en doet ie niks meer.

22:56:52 Selecting world 22:57:00 Bot enabled 22:57:00 csrftoken: e3cb66694a3 22:57:00 Default town: xxxxx 22:57:00 Towns found: 4 Exception in thread "Thread-130" java.lang.NullPointerException at Grepolis.GrepolisBot$BuildTheBuildings.run(GrepolisBot.java:501) at java.lang.Thread.run(Unknown Source)

Frank18000 commented 8 years ago

Wat aanvullende info

Exception in thread "Thread-130" java.lang.NullPointerException at Grepolis.GrepolisBot$BuildTheBuildings.run(GrepolisBot.java:501) at java.lang.Thread.run(Unknown Source) Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at Grepolis.IO.Saver.saveBuildings(Saver.java:78) at Grepolis.IO.Saver.save(Saver.java:22) at Grepolis.GrepolisBot$2.windowClosing(GrepolisBot.java:101) at java.awt.Window.processWindowEvent(Unknown Source) at javax.swing.JFrame.processWindowEvent(Unknown Source) at java.awt.Window.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Window.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.awt.EventQueue.access$500(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at Grepolis.IO.Saver.saveBuildings(Saver.java:78) at Grepolis.IO.Saver.save(Saver.java:22) at Grepolis.GrepolisBot$2.windowClosing(GrepolisBot.java:101) at java.awt.Window.processWindowEvent(Unknown Source) at javax.swing.JFrame.processWindowEvent(Unknown Source) at java.awt.Window.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Window.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.awt.EventQueue.access$500(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source)

BrandonWill commented 8 years ago

You closed the issue, did it fix itself?

The line that it's indicating you may be using an older version of the bot. Are you using 0.14?

Frank18000 commented 8 years ago

I had locked the issue accidentally . The bot I downloaded yesterday via the zip so assume that it is the latest

BrandonWill commented 8 years ago

Hmm, found the issue. It wasn't able to find the senate and several other buildings. Working on an update now

BrandonWill commented 8 years ago

Issue should be fixed!

Frank18000 commented 8 years ago

great i go test it

BrandonWill commented 8 years ago

Reopening issue...

This fix solves the issue for the US server; however, the en server uses the other wording for descriptions. So the buildings now won't load for them.

What server are you playing on?

Frank18000 commented 8 years ago

i play on the dutch servers.

I ran the bot from the new zip file and it freezes

jar GrepolisBot_0.15.jar java.io.FileNotFoundException: C:\Users\xxxxxxx\Desktop\GrepolisBot-master\Saves\AccountSave.txt (Het systeem kan het opgegeven pad niet vinden) at java.io.FileInputStream.open0(Native Method) at java.io.FileInputStream.open(Unknown Source) at java.io.FileInputStream.(Unknown Source) at java.io.FileInputStream.(Unknown Source) at java.io.FileReader.(Unknown Source) at Grepolis.IO.Loader.loadAccount(Loader.java:44) at Grepolis.IO.Loader.load(Loader.java:22) at Grepolis.GrepolisBot.initComponents(GrepolisBot.java:96) at Grepolis.GrepolisBot.(GrepolisBot.java:75) at Grepolis.GrepolisBot$1.run(GrepolisBot.java:86) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.awt.EventQueue.access$500(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) initializing variables Account save file not found! 11:14:24 Browser agent changed to latest chrome version. It's now: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.80 Safari/537.36 11:15:18 Selecting world 11:15:36 Bot enabled 11:15:36 csrftoken: 11:15:36 Default town: xxxxx 11:15:37 Towns found: 115 11:15:40 Not all buildings found. Please create an issue on Github! Pausing... 11:15:40 64 A6 Vision Nothing to build or building queue is full!

BrandonWill commented 8 years ago

Pushed another update. It should work for you now. It works on both us and en servers for me and no longer uses the description to find buildings.

BrandonWill commented 8 years ago

Tested on dutch server. Closing issue

Frank18000 commented 8 years ago

It is reading the cities now great

is the bot looking to the city names or the bb code?

BrandonWill commented 8 years ago

It reads the city names from the captain. Is it not reading them correctly? It mainly works off of finding their city ID, which is their bb code now that I think about it.

Frank18000 commented 8 years ago

perfect but when you change a name does the bot understand this and uses te building que?

BrandonWill commented 8 years ago

Yeah it does!

If you rename it, the next time you reload the bot, the bot will recognize it and keep your queue

Frank18000 commented 8 years ago

it doesn't build troops the nummers i put in the que are not saved when i push the save button

BrandonWill commented 8 years ago

Has the bot read the city yet? It also won't save the numbers if the city doesn't have a barracks/docks.

The first time it runs through your cities is mainly to gather information

Frank18000 commented 8 years ago

yes it did read the city i wil try farming next

Frank18000 commented 8 years ago

farming works

BrandonWill commented 8 years ago

Alright.

I got my stuff to save for me on the de server. However, troop counts aren't being loaded. Going to see if there's anything I can do to fix that

Frank18000 commented 8 years ago

ok when farming is ready i close the bot en restart it and look at the troop counts

Frank18000 commented 8 years ago

the bot doesn't make a save file

is that the problem?

BrandonWill commented 8 years ago

It should be creating one. It has to be closed from the jar file though and not where it's being logged

Frank18000 commented 8 years ago

know it does it reads troeps every other city

BrandonWill commented 8 years ago

Should be fixed in the most recent version

Frank18000 commented 8 years ago

okay i wil get the new version

Frank18000 commented 8 years ago

the new version freezes

jar GrepolisBot_0.15.jar 12:59:14 Browser agent changed to latest chrome version. It's now: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.80 Safari/537.36 12:59:33 Selecting world 12:59:45 Bot enabled 12:59:45 csrftoken: 387fc79ae63 12:59:45 Default town: xxxx 12:59:46 Towns found: 115 Exception in thread "Thread-142" java.lang.NullPointerException at Grepolis.GrepolisBot$BuildTheBuildings.run(GrepolisBot.java:512) at java.lang.Thread.run(Unknown Source)

Frank18000 commented 8 years ago

17:30:30 Towns found: 115 Exception in thread "Thread-151" java.lang.NullPointerException at Grepolis.GrepolisBot$BuildTheBuildings.run(GrepolisBot.java:512) at java.lang.Thread.run(Unknown Source)

BrandonWill commented 8 years ago

Sorry, I went to sleep.

Fixed it

Frank18000 commented 8 years ago

great i wil download and test it

Frank18000 commented 8 years ago

it runs first load 116 cities

Frank18000 commented 8 years ago

it's working great!!

BrandonWill commented 8 years ago

Good to hear!

Frank18000 commented 8 years ago

2 things it doesn't read all the cities and i can not save tir in the que

Frank18000 commented 8 years ago

this is how the dock save line looks. Tirime is writen wrong is that the problem? townID:xxxxxxx,big_transporter:0,bireme:0,attack_ship:0,demolition_ship:0,small_transporter:0,trireme:0,colonize_ship:0,sea_monster:0,

BrandonWill commented 8 years ago

I took the spelling from the wiki: https://wiki.en.grepolis.com/wiki/Trireme

I'm able to save it on my account on en (started the bot from scratch). Is it loading your ships from the towns?

Frank18000 commented 8 years ago

okay than is that not the problem i loaded the last update en starteded the bot from scratch

BrandonWill commented 8 years ago

The most recent version will tell you if the docks/barracks aren't loaded when you attempt to save

Frank18000 commented 8 years ago

okay great i will download it

Frank18000 commented 8 years ago

hoi villages on an isle without farms arn't read in the bot

BrandonWill commented 8 years ago

Created a new issue for that. The towns are currently found by having villages