working on freesky online bot

06/30/2009 13:41 wildspirit#1
freesky online is a browser based game similar to travian except it has better graphics and its full flash...

anyway, the game is pretty simple, so all the bot requires is to move to X,Y coordinates and click it, its a point and click game so making a bot is fairly easy...

i already made an auto-scout bot but i havent released it yet since its still missing a very important part (and im still trying to enjoy it since no one has made any bot for this yet, afaik), i cant seem to find the right address of "weariness" and "morale", tried searching for it using CE but still no success...

i looked at the memory and i saw an XML taken from this URL ([Only registered and activated users can see links. Click Here To Register...]), there is a node there for army (see attributes below) but it doesnt have what i need

# id
# name
# userId
# userName
# userColor
# isNpc
# x
# y
# status
# order
# fightPower
# amount
# allianceName
# allianceLogoURL
# wonderId
# cityId
# totalEnergyConsumption
# itemAddOnAttack
# itemAddOnDefense
# speed
# scoutScope

so what am i missing? its the address where i can look at weariness if i select the fleet, why do i need that? my auto-scout bot does it continuously with no weariness check, if you have about 45 weariness your fleets will be destroyed easily (tried it for 6 hours and i lost 93 BS)...

im not quite sure what im doing wrong but i cant seem to retrieve the address, and if anyone can at least point where should i be looking it will be a great addition for the bot before i release it...

ok, heres what i have so far
  1. user defined target town (small town)
  2. coordinates to select scout (computed based on small town)
  3. coordinates to select fleet (computed based on small town)
  4. coordinates for fleet selection if its more than 3 fleets (computed based on small town and icon radius)
  5. coordinates of possible dialog boxes when scouting (top most of the screen is user defined since it will vary depending on browsers)
  6. auto-click using WIN API

what im missing
  1. base address (maybe for offset)
  2. memory addresses of weariness/morale (so i can call on ReadProcessMemory)
  3. fleet selection ignoring weary fleets (will depend on fleets weariness thats why i need the address)

tried searching for weariness value * 8 but none of those results are correct...

appreciate any help...
06/30/2009 14:47 Atheuz#2
I don't really understand why you are using a memory poking tool for this, all you need is to set the correct cookie and read the xml with serializer or whatever you prefer. You rather fiddle with httpliveheaders, tamper data, fiddler 2 etc.

If you want to find the weariness you should download httpliveheaders and activate it before looking at the fleet info, you should then get another xml that is being loaded into the flash application that should direct you to it. I would direct you to it, but I don't have a fleet in free sky online.

Actually, I'm a bit worried why you are overcomplicating this by trying to use memory adresses and mouse clicks instead of very simple GET/POST requests that would run in the backround with low cpu usage.
06/30/2009 18:10 wildspirit#3
thank you Atheuz, i appreciate the help.

this is the first time i tried making something for a web based one, most of the time i use win api to do the task for me since that is what i usually do at work...

thanks again!
06/30/2009 21:12 Atheuz#4
Quote:
Originally Posted by wildspirit View Post
thank you Atheuz, i appreciate the help.

this is the first time i tried making something for a web based one, most of the time i use win api to do the task for me since that is what i usually do at work...

thanks again!
If you can give me an account that has a current fleet, send me a pm if you can't figure it out and i'll show it you. I can also help you by explaining you what GET/POST requests are and how to embed them into visual basic for communication between the server.
07/01/2009 15:22 wildspirit#5
i have an existing code which i used for gaiaonline, i think i will be able to make one, but it'll be great if you could help, ill make some fleets on my test account just in case i needed help, right now it only has recons...

this is what i have at work, no cookies tho, i'll take a look at what i did with gaiaonline...

Code:
    Public Function HTTPPostRequest(ByVal url As String, _
        ByVal param_names As String, _
        ByVal param_values As String, _
        Optional ByVal authentication As String = "") As ResultInfo

        Dim result As New ResultInfo

        ' build parameters
        Dim params As String
        Dim param_name() As String = param_names.Split(",")
        Dim param_value() As String = param_values.Split(",")

        If param_name.Length <> param_value.Length Then
            result.Result = Nothing
            result.ErrorFound = True
            result.Details = "HTTPGet Parameter name and value count doesn't match"
            result.OnRequest = True

            Return result
        ElseIf param_names.Trim <> String.Empty Then
            For cnt As Int16 = 0 To param_name.Length - 1
                params += param_name(cnt) & "=" & param_value(cnt) & "&"
            Next

            ' remove last ampersand
            params = params.Substring(0, params.Length - 1)
        Else
            ' no parameter given
            params = String.Empty
        End If

        ' for logs / xmldebug
        result.Request = params

        Try
            Dim request As HttpWebRequest

            Try
                ' convert parameters to byte array
                Dim buffer() As Byte
                buffer = Encoding.ASCII.GetBytes(params)

                ' connect to url
                request = WebRequest.Create(url)
                With request
                    .KeepAlive = False              ' fix for timeout
                    .Method = "POST"
                    .ContentType = "application/x-www-form-urlencoded"
                    .ContentLength = buffer.Length
                    .AllowAutoRedirect = False      ' fix for redirected result page
                End With

                ' network authentication
                If authentication <> String.Empty Then
                    request.Headers.Add("Authorization", authentication)
                End If

                ' send data
                Dim requestStream As Stream
                requestStream = request.GetRequestStream()
                With requestStream
                    .Write(buffer, 0, buffer.Length)
                    .Close()
                End With

            Catch ex As Exception
                result.OnRequest = True
                Throw ex
            End Try

            ' obtain response
            Dim response As HttpWebResponse
            response = request.GetResponse()

            ' parse result
            Dim reader As New StreamReader(response.GetResponseStream, Encoding.ASCII)
            Dim xml As String = reader.ReadToEnd
            result.Result = ParseResult(xml, "Result")
            result.Details = xml
            result.ErrorFound = False

        Catch ex As Exception
            result.Result = Nothing
            result.ErrorFound = True
            result.Details = "HTTP Post: " & ex.Message
        End Try

        Return result
    End Function
07/13/2009 18:32 Weisong#6
can teach me how to even get the address and bypass to edit the memories? >.> i'm kind of noob in these stuffs
07/25/2009 11:36 vhinze03#7
i can't understand what to do...

can you tell the instructions?
07/25/2009 13:46 Atheuz#8
Quote:
Originally Posted by vhinze03 View Post
i can't understand what to do...

can you tell the instructions?
He's not offering a bot, he just asked for help. This topic is already resolved btw.