Skip to content

undisputed-seraphim/KanColleAPI

Repository files navigation

Recent Updates

**I'm a little bored of Kancolle now but I will keep updating this bot for a bit. In the meantime, I'm looking for another bottable mobage.

Recent Updates @ 20 Jan '15:

Wow, I can't believe I took so long to crack the new security from the devs.

Anyway, I realize that I didn't include instructions on how to get the Port API part working. As you might have realized, it's the most integral part of KanColle automation because updating the Port is crucial in automatic expeditions.

You'll need 3 external files. Two of them are ActiveX interoperation wrappers, one is an swf file. (They are all included in the "packages" folder now)

That swf is crucial to the functionality of the expedition bot because it is what generates a special number that is sort of like a tiny checksum. This file was made by friendly folks at futaba. I have no idea how they made it, so don't ask me.

I have tried to decompile it, but the decompilation generates a bunch of strange actionscript code that doesn't make sense (e.g. functions that take more or less parameters than it's supposed to). So intead of wasting time figuring out what it means I've just decided to use their file aand wrap my C# code around it. They have conveniently put in a callback in the swf for that express purpose. Nonetheless, any Actionscript or Flash experts are welcome to help me decompile and interpret the swf file.

The ActiveX Interop wrappers (the two dll files in "packages") can be generated by yourself. (Or you can use mine, but hey. Open source n stuff)

  1. Search your Program Files directory for AxImp.exe (You probably need Visual Studio installed first, my environment is VS 2012) It should be somewhere in Program Files (x86)/Microsoft SDKs/Windows.

  2. Install Adobe Flash player for Internet Explorer.

  3. Look in C:\Windows\System32\Macromed\Flash for an OCX file. It should be named something like Flash64...ocx.

  4. Copy AxImp.exe and the OCX file to somewhere you have full permissions, like your Documents folder.

  5. Run the AxImp in command line with the filename of the OCX file as your sole argument.

  6. This will generate two DLL files which are the ActiveX Interop files.

**NOTE: RapidCraft might be removed because I'm a little too lazy to develop it.

Overview

This solution contains a few things:

KanColleAPI

A library written in C# that extracts and interprets JSON player information from the KanColle server.

This is mainly written as an exercise in C# for me. I take no responsibility if you use this library for any hanky-panky and get banned.

Always a work in progress.

Build this to get the DLL.

This library provides a KanColleProxy class that sends and receives a POST request. The current user-agent is Firefox.

The KanColleProxy class outputs a raw JSON string which you must then implement methods to deal with yourself. Personally I used JSON.NET to achieve this.

RunExp

Probably what you are here for.

This is a simple command line program that loops expedition commands.

Sparkler

Another simple cmd line program that sends a single ship out on 1-1 sparkle battles. You specify which fleet to send out and how many times to sparkle. This program will tell you the morale/condition of the ship every loop.

[UPDATE] Now this program will skip iterations if the morale is 81 or greater.

To-do

Add stuff that interprets battle data.

Add user agent extensions.

About

Kancolle API interpreting and constructing library written in C#.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages