OGame Automizer Development Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Welcome on the OGame Automizer Development/Support Forum

If this is your first visit, be sure to check out the
http://ogameautomizer.com/doc/manual.html : A guide written by OA users with consultation of OA author (En)

http://ogameautomizer.com/doc/manual_de.html : A guide written by OA users with consultation of OA author (Benutzerschnittstellenhandbuch) (GE)

http://ogameautomizer.com/doc/scripting_manual.html : OA Scripting Manual (En)

Pages: 1 [2] 3 4

Author Topic: ExpoScript: Expedition *Update 02.04*  (Read 25225 times)

0 Members and 1 Guest are viewing this topic.

anonymous19

  • Newbie
  • *
  • Offline Offline
  • Posts: 24
    • View Profile
Re: ExpoScript: Expedition
« Reply #15 on: April 02, 2012, 01:29:47 AM »

Update: ExpoScript v.1.3
* ExpoCounter added! After each fleet sending you will see how many expos the script has done
* Randomizing: You can turn on random flights (solar-system based) sothat you wont fly the same spot too often
* Done some small modification of the code


Code: [Select]
//Config

def logFile = "expolog.txt" //logfile path+name
def sleepTime=2000 //in seconds * 1000 (1000 <=> 1 second)


def randomSpot=true //(true or false) | if activated, exposystem will be randomly (randomMax) changed
def randomMax=10 //amount of added value for solar system, not needed when randomSpot=false


def expofleet = //your expo fleet
[
  SMALLCARGO : 0,
  LARGECARGO : 200,
  HEAVYFIGHTER : 0,
  DESTROYER : 0,
  ESPIONAGEPROBE : 0,


  LIGHTFIGHTER : 0,
  BOMBER : 0,


  CRUISER : 0,
  BATTLECRUISER : 0,
  BATTLESHIP : 0,


  COLONYSHIP : 0,
  RECYCLER : 0,
  DEATHSTAR : 0
]
def savefleet = //your fleet which have to be left on planet for saving reasons
[
  SMALLCARGO : 0,
  LARGECARGO : 100,
  HEAVYFIGHTER : 0,
  DESTROYER : 0,
  ESPIONAGEPROBE : 0,


  LIGHTFIGHTER : 0,
  BOMBER : 0,


  CRUISER : 0,
  BATTLECRUISER : 0,
  BATTLESHIP : 0,


  COLONYSHIP : 0,
  RECYCLER : 0,
  DEATHSTAR : 0
]


//CODE *do not enter this zone :P*
def expocounter=0


printOut "ExpoScript v1.3 started"
appendToFile logFile, Time.getTime()+" | "+"ExpoScript v1.3 | started"+" \r\n"


while(true)
{
if(hasAvailableFleetSlot() && hasAvailableExpeditionFleetSlot())
{
  Iterator<Planet> iter = getPlanets().iterator()
  while(iter.hasNext())
  {
    Planet p = iter.next();


    def iter_f = expofleet.keySet().iterator()
    def okay=true
    while(iter_f.hasNext())
    {
      String key = iter_f.next()
      if(getNumberOf(key, p.coordinates) < (expofleet.get(key)+savefleet.get(key)))
      {
        okay=false
        break
      }
     }
   
    if(okay)
    {
     printOut "trying to send from "+p.name
     appendToFile logFile, Time.getTime()+" | "+"trying to send from "+p.name+" \r\n"
     
     def exposys=p.coordinates.system
     
if(randomSpot)
{
Random rand = new Random()
int changer = rand.nextInt(randomMax)

if (rand.nextInt(10)%2 == 0 && (exposys-changer)>=1 )
{
exposys=exposys-changer
}
else
{
  exposys=exposys+changer
}
}
 
     def sent = sendFleet(
          p.name,
          p.coordinates.galaxy+":"+exposys+":16",
          FleetMission.EXPEDITION_MISSION,
          100,
          expofleet
      );
     
    if(sent)
    {
      expocounter=expocounter+1
      printOut "Fleet sent !"
      appendToFile logFile, Time.getTime()+" | "+"Fleet sent !"+" \r\n"
      printOut "ExpoSpot: "+p.coordinates.galaxy+":"+exposys+":16"
      appendToFile logFile, Time.getTime()+" | "+"ExpoSpot: "+p.coordinates.galaxy+":"+exposys+":16"+" \r\n"
      printOut "ExpoCounter: "+expocounter
      appendToFile logFile, Time.getTime()+" | "+"ExpoCounter: "+expocounter+" \r\n"
      break
    }
     else
    {
      printOut "Fleet sending failed !"
      appendToFile logFile, Time.getTime()+" | "+"Fleet sending failed !"+" \r\n"
    }
   }
  }
}
sleep sleepTime
}



is there a possibility that i can run this script in and infinite loop and start expos as soon as they return?


This is exactly what the script is doing ATM xD

wulf3010

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 447
    • View Profile
Re: ExpoScript: Expedition *Update 02.04*
« Reply #16 on: June 10, 2012, 02:15:42 PM »

can you add a time loop or an option to stop he script between a certain time. Its not good to have it on 24/7.
Logged

inferno

  • Newbie
  • *
  • Offline Offline
  • Posts: 1
    • View Profile
Re: ExpoScript: Expedition *Update 02.04*
« Reply #17 on: July 22, 2012, 12:57:36 PM »

Good Script. I found one little bug :)

If all planets have the same name, the script will not send the Fleet from the right planet. Change

Code: [Select]
def sent = sendFleet(
          p.name,
          p.coordinates.galaxy+":"+exposys+":16",
          FleetMission.EXPEDITION_MISSION,
          100,
          expofleet
      );

in

Code: [Select]
def sent = sendFleet(
          p.coordinates,
          p.coordinates.galaxy+":"+exposys+":16",
          FleetMission.EXPEDITION_MISSION,
          100,
          expofleet
      );

Greetz  8)
« Last Edit: July 22, 2012, 01:00:00 PM by inferno »
Logged

frankdilak

  • Guest
Re: ExpoScript: Expedition *Update 02.04*
« Reply #18 on: November 15, 2012, 07:00:37 PM »

is there a way to set this scrip to sen expes from only one planet,
i mean that all expes starts only from 8-125-7
sorry for my english
spanish:
hay alguna forma de que las expediciones sean enviadas desde un solo planeta que nosotros eligamos?
por ejemplo enviar todas las expediciones desde 8-125-7
Logged

wulf3010

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 447
    • View Profile
Re: ExpoScript: Expedition *Update 02.04*
« Reply #19 on: November 16, 2012, 05:05:05 PM »

this is in OA already included, why you need a script for this behavior?
Logged

frankdilak

  • Guest
Re: ExpoScript: Expedition *Update 02.04*
« Reply #20 on: November 17, 2012, 12:07:36 PM »

because i have one planet in a far far away galaxi and it isnt that saturated like the fist ones (1-xxx-xx,2-xxx-xx)
and i think there is mor chance that i can get something intersting, or am i wrong?
haw can i set to send all expes from 8-xxx-xx


por que tengo un planeta muy lejano y ahi no esta tan saturado como las primeras galaxias(1-xxx-xx,2-xxx-xx)
y creo que asi hay mas oportunidad de obtener algo mas rentable
como puedo configurar para enviar todas mis expes desde 8-xxx-12?
Logged

wulf3010

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 447
    • View Profile
Re: ExpoScript: Expedition *Update 02.04*
« Reply #21 on: November 17, 2012, 06:40:04 PM »

Read this: http://docs.google.com/View?id=dfq87kpr_4dtkq8ddw

and you find your explanation of it how to set up the expedition you want.
Logged

icegolem

  • Newbie
  • *
  • Offline Offline
  • Posts: 13
    • View Profile
Re: ExpoScript: Expedition *Update 02.04*
« Reply #22 on: October 09, 2013, 10:03:22 PM »

is it possible that the script use Player reserved Fleetslots?

20 slots  17 for raid/hunter 3 player slots to use by expo?
Logged

JotZet

  • Newbie
  • *
  • Offline Offline
  • Posts: 10
    • View Profile
Re: ExpoScript: Expedition *Update 02.04*
« Reply #23 on: April 13, 2015, 06:37:54 PM »

Is this script still save to use? Or will i get a ban or something?

I´m just asking because it´s an older script and here is no activity anymore :)
Logged

anonymous19

  • Newbie
  • *
  • Offline Offline
  • Posts: 24
    • View Profile
Re: ExpoScript: Expedition *Update 02.04*
« Reply #24 on: May 23, 2015, 12:13:06 AM »

Is this script still save to use? Or will i get a ban or something?

I´m just asking because it´s an older script and here is no activity anymore :)

I use this script since 2 years (around 10 hours a day) and still got no ban mate.

avenger clown

  • Newbie
  • *
  • Offline Offline
  • Posts: 9
    • View Profile
Re: ExpoScript: Expedition *Update 02.04*
« Reply #25 on: August 31, 2015, 08:19:23 PM »

hey dude, the first is congrats for this script, realy nice

i have a "bug", the script just try to send expeditions on just one planet, and i want to know if its posible to make it automatically on diferent planets/moons

for example, if i have 10 planets, (1.100; 1.300; 2.100; ....) he just send expeditions on 1.100
Logged

underground

  • Newbie
  • *
  • Offline Offline
  • Posts: 15
    • View Profile
Re: ExpoScript: Expedition *Update 02.04*
« Reply #26 on: September 20, 2015, 09:30:20 PM »

How can I send the expeditions from Moon ??

I tried to left the ships needed only in the moon and it didn't send anything. So Maybe I need to set up something that I don't know.

Thank you in advance.
Logged

bohne

  • Newbie
  • *
  • Offline Offline
  • Posts: 44
    • View Profile
Re: ExpoScript: Expedition *Update 02.04*
« Reply #27 on: October 10, 2015, 05:12:56 PM »

Doesnt work for me with the newest version
Logged

AnonymousUser

  • Newbie
  • *
  • Offline Offline
  • Posts: 11
    • View Profile
Re: ExpoScript: Expedition *Update 02.04*
« Reply #28 on: October 27, 2015, 01:22:53 AM »

In witch variable can i define how long the expo must go? It only goes with one hour duration on my script, i gotta change for 8 hours...

How can i procede?
Logged

anonymous19

  • Newbie
  • *
  • Offline Offline
  • Posts: 24
    • View Profile
Re: ExpoScript: Expedition *Update 02.04*
« Reply #29 on: October 27, 2015, 10:31:14 AM »

How can I send the expeditions from Moon ??

I tried to left the ships needed only in the moon and it didn't send anything. So Maybe I need to set up something that I don't know.

Thank you in advance.

put in config:
Code: [Select]
def avoidMoons=false
def onlyMoons=true

Doesnt work for me with the newest version

Try: http://ogameautomizer.com/BetaVersion/OGameAutomizer.jar

Works for me.

In witch variable can i define how long the expo must go? It only goes with one hour duration on my script, i gotta change for 8 hours...

How can i procede?

Basically, add ".setExpeditionTime( 8 ) " in fleetbuilder.


Code: [Select]
  def fleetbuilder = getBuilderFactory().newFleet()
    .setFrom(p.coordinates)
.setTarget(p.coordinates.galaxy+":"+exposys+":16")
.setMission(EXPEDITION_MISSION)
        .setExpeditionTime(8) 
.addShips(expofleet)
    def sent = fleetbuilder.sendNow()
Pages: 1 [2] 3 4
 

Page created in 0.059 seconds with 20 queries.