Mass Attack planner

Discussion in 'Scripts & Independent Tools' started by Blo0DAngel, Apr 28, 2009.

Share This Page

  1. Blo0DAngel

    Blo0DAngel Still Going Strong

    Joined:
    Jan 1, 2009
    Messages:
    708
    Likes Received:
    1
    GEschlosen
     
    Last edited: May 6, 2010
  2. CSBoecker

    CSBoecker Non-stop Poster

    Joined:
    Oct 4, 2007
    Messages:
    453
    Likes Received:
    0
    What format do the input coordinates need to be?
     
  3. Blo0DAngel

    Blo0DAngel Still Going Strong

    Joined:
    Jan 1, 2009
    Messages:
    708
    Likes Received:
    1
    edit:

    now any format is supported
     
    Last edited: Mar 11, 2010
  4. Odoakar

    Odoakar Contributing Poster

    Joined:
    Mar 21, 2008
    Messages:
    1,073
    Likes Received:
    1
    I'll gie it a try:)
     
  5. Cyrano

    Cyrano Contributing Poster

    Joined:
    Jul 27, 2006
    Messages:
    1,135
    Likes Received:
    1
    Nice tool, looks like it may have some potential.

    However, when I enter in all the information and hit the 'plan attack' the results tell me to send attacks on the time i entered in to be my landing time, as seen below:

    [​IMG]
     
  6. Blo0DAngel

    Blo0DAngel Still Going Strong

    Joined:
    Jan 1, 2009
    Messages:
    708
    Likes Received:
    1
    Nice ;-) But to get different travel times you need field "Attack Unit (time to travel square):" > 0

    Feel free to post whole screenshot
     
    Last edited: Apr 28, 2009
  7. sacredfool

    sacredfool Part of the Furniture

    Joined:
    Jun 13, 2007
    Messages:
    5,402
    Likes Received:
    8
    Would it accept data in the same form as we input it into the fake script?

    We could use then the one for exporting coords from that thread :icon_surprised:
     
  8. Blo0DAngel

    Blo0DAngel Still Going Strong

    Joined:
    Jan 1, 2009
    Messages:
    708
    Likes Received:
    1
    It will soon, right now i parse only for

    xxx|yyy \n
    xxx|yyy \n


    regular expressions in C are not very suppoted :) so i will need to implement bit wiser and genraly apliable reading of coordinates.

    should be done in day or so...
     
  9. servy

    servy All Over the Board

    Joined:
    Mar 7, 2007
    Messages:
    12,944
    Likes Received:
    1
    If you're working in C just use string tokenizers. (That's C, not C++, yes?) Just break it up by whitespace, regardless of what that whitespace is.
     
  10. Blo0DAngel

    Blo0DAngel Still Going Strong

    Joined:
    Jan 1, 2009
    Messages:
    708
    Likes Received:
    1
    im using strtok already im strtoking for | and \n ... what looks as whitespace in twstats coord output is really a new line sign and in html \n means nothing ... so parsing for whitespace gets me nowhere ...

    after spliting on newline and | (pipe) i atoi and no problem... but i will need to write function to go through whole input and strcpy to new array only \d+|\d+
    now im looking to implement some regex extension library because covering all options with strtok is hell...
     
    Last edited: Apr 28, 2009
  11. servy

    servy All Over the Board

    Joined:
    Mar 7, 2007
    Messages:
    12,944
    Likes Received:
    1
    just set the deliminator to newline and space. It will split it when it comes across either.
     
  12. Blo0DAngel

    Blo0DAngel Still Going Strong

    Joined:
    Jan 1, 2009
    Messages:
    708
    Likes Received:
    1
    Very good! Fixed it ;-) must say didnt cross my mind strtok can accept multiple delimiters. :)

    now it supports input in

    (xxx|yyy) and xxx|yyy both all in same row or in multiple rows.

    Thanks
     
    Last edited: Apr 29, 2009
  13. servy

    servy All Over the Board

    Joined:
    Mar 7, 2007
    Messages:
    12,944
    Likes Received:
    1
    the default deliminator for most string tokenizers is space, newline, and tab...

    (It is in Java, I know that it is anyways, and the >> operator for iostreams in C++ which use tokenizers underneath.)
     
  14. Cyrano

    Cyrano Contributing Poster

    Joined:
    Jul 27, 2006
    Messages:
    1,135
    Likes Received:
    1
    It automatically defaults as 30 does it not?

    Anyways, i had already closed that page and didn't save the full screenshot.

    So, i repeated the process, without changing anything, and did infact get different results, however still incorrect.
    I've only censored the coordinates because I do plan on attacking these villages.

    Here is what I entered:

    [​IMG]

    here is result:

    [​IMG]

    Obviously I can't send an attack on the 15th.

    If I am doing something wrong please let me know. :)
     
  15. Blo0DAngel

    Blo0DAngel Still Going Strong

    Joined:
    Jan 1, 2009
    Messages:
    708
    Likes Received:
    1
    Yeah world time didnt support floating type :( my bad... so 0.75 was rounded on 0

    fixed it now, now it works right for speeds that have floating point.
     
  16. Odoakar

    Odoakar Contributing Poster

    Joined:
    Mar 21, 2008
    Messages:
    1,073
    Likes Received:
    1
    Doesn't work for me, just opens a blank page when I click on Plan Attacks.
     
  17. Blo0DAngel

    Blo0DAngel Still Going Strong

    Joined:
    Jan 1, 2009
    Messages:
    708
    Likes Received:
    1
    well you need to fill in something to get something out of it ;-)
     
  18. Gui - The Ghost

    Gui - The Ghost Still Going Strong

    Joined:
    Oct 10, 2008
    Messages:
    575
    Likes Received:
    0
    Same thing happ with me too. Im using FF and filled in all the details.
     
  19. Blo0DAngel

    Blo0DAngel Still Going Strong

    Joined:
    Jan 1, 2009
    Messages:
    708
    Likes Received:
    1
    Lol, dont know i used it a lot... if you could fill me in with data you put in boxes i might be able to track it.
    Also, there is private msg, so please send me private msg if you have problems rather than spamming thread about it.
     
    Last edited: Apr 29, 2009
  20. Odoakar

    Odoakar Contributing Poster

    Joined:
    Mar 21, 2008
    Messages:
    1,073
    Likes Received:
    1
    Tried it now with few towns only, works ok. Maybe I inputed too much villages in the boxes last time