Skip to content

Commit

Permalink
Merge pull request #112 from alaingilbert/develop
Browse files Browse the repository at this point in the history
🆕 v21 ogame 8
  • Loading branch information
PiecePaperCode authored Jul 15, 2021
2 parents f464bcb + 2885caa commit 7a08410
Show file tree
Hide file tree
Showing 5 changed files with 194 additions and 68 deletions.
46 changes: 37 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ OGame is a browser-based, money-management and space-war themed massively multip
two million accounts.

This lib is supposed to help write scripts and bots for your needs.
it supports ogame_version: `7.6.6`
version `20`
it supports ogame_version: `8.1.0`
version `21`

## install
<pre>
pip install ogame
</pre>
update
<pre>
pip install ogame==7.6.6.20
pip install ogame==8.1.0.21
</pre>
dont want to wait for new updates download direct from the develop branch
<pre>
Expand Down Expand Up @@ -102,6 +102,8 @@ empire.planet_ids() returns list

empire.id_by_planet_name('name') returns int

empire.name_by_planet_id(id) return string

empire.planet_names() returns list
</pre>

Expand All @@ -114,6 +116,21 @@ empire.moon_names() returns list
**keep in mind to prefer planets id's moon id dont works on every function**
</pre>

### abandon planet
<pre>
empire.abandon_planet(id) returns bool

** keep in mind that this is truly final, that no more fleets are needed at the
departure or destination of this planet and that there is no construction or research underway on it.
</pre>

### rename planet
<pre>
empire.rename_planet(id,'new_name') returns bool

** keep in mind that the name must contain at least two characters **
</pre>

### coordinates
<pre>
coordinates have the format [galaxy, system, position, destination]
Expand All @@ -139,8 +156,15 @@ coordinates(1, 2, 12, destination.moon)
coordinates(1, 2, 12, destination.debris)
coordinates(1, 2, 12, destination.planet) or coordinates(1, 2, 12)
```
### get slot celestials
returns how many planet slots are free to colonize
<pre>
slot = empire.slot_celestial() returns class
slot.free returns int
slot.total returns int
</pre>

### get celestial data
### get celestial
works with planet's and moon's
<pre>
celestial = empire.celestial(id) returns class
Expand Down Expand Up @@ -176,6 +200,7 @@ empire.resources(id) returns class(object)
res = empire.resources(id)
res.resources returns resources
res.day_production returns resources
res.storage returns resources
res.darkmatter returns int
res.energy returns int
res.metal returns int
Expand Down Expand Up @@ -258,9 +283,9 @@ empire.traider(id) returns Exception("function not implemented

### get research
<pre>
empire.research() returns class(object)
empire.research(id) returns class(object)

res = empire.research()
res = empire.research(id)

res.energy.level
res.energy.is_possible
Expand Down Expand Up @@ -367,8 +392,10 @@ Get the actual free and total Fleet slots you have available
</pre>
```python
slot = empire.slot_fleet()
slot.fleet.free returns int
slot.expedition.total
slot.fleet.total returns int
slot.fleet.free returns int
slot.expedition.total returns int
slot.expedition.free returns int
```

### get fleet
Expand Down Expand Up @@ -430,14 +457,15 @@ for fleet in empire.phalanx(moon_id, coordinates(2, 410, 7)):
### get spyreports
<pre>
empire.spyreports() returns list of class(object)
empire.spyreports(firstpage=1, lastpage=30)
</pre>

```python
for report in empire.spyreports():
print(report.fright)
```

### send fleet
### send fleet (for both version 7.6 and 8.0.0)
```python
from ogame.constants import coordinates, mission, speed, fleet
empire.send_fleet(mission=mission.expedition,
Expand Down
Binary file added dist/ogame-8.1.0.21.tar.gz
Binary file not shown.
Loading

0 comments on commit 7a08410

Please sign in to comment.