Skip to content
Daniel Tischner edited this page Jun 23, 2016 · 8 revisions

Getting started

  • Integrate the Sparkle API into your project.
  • Ensure the Selenium library is correctly loaded to the APIs build path.
  • Create an instance of the API by using new Sparkle();
  • Take a look into SparkleSample.java for more hints on how to use the API.

SparkleSample

API

The API is specified by IFreewarAPI and is capable of generating IFreewarInstances by using the login-method. An IFreewarInstance represents a logged in session from Freewar. It provides access to various sub-interfaces, like IPlayer, IMovement, IInventory, and so on. They are used to perform actions like walking through the world, attacking NPCs, using items or to access information like the current life points or if a NPC is present on the current location.

The interface structure should clarify possibilities (8.April 2016).

InterfaceStructure

Browser

The API provides support for several browsers. They are specified in EBrowser, among them are:

  • Firefox
  • Chrome
  • Safari
  • Internet Explorer

Additionally Sparkle can wrap a DelayedWebDriver over the browser, which it does by default. This driver automatically delays requests to the MMORPG Freewar to disguise the usage of a bot. The delays are randomly generated by a normal distribution function which maps to the click behavior of the average gamer kid.

Since the API is Selenium driven, it interacts with a browser installed by the user. Thus one can view the API opening windows and clicking links in it. This makes creating passive bots that only interact passively while the user plays the game actively very easy. An example for such would be a program that ensures life points stay over 50 all the time. Additionally Selenium has the possibility to be executed remotely, by that the API can easily be used on a remote machine.

Clone this wiki locally