the one for your brave level
another one for your combat level
a third one for an item ammout
can any one help me get these id's i have tried..
but no sucess
I don't see any of those IDs on the page... do I have to sign up? 0_o
Posts 1–14 of 14 · Page 1 of 1
Post a Reply
Tags for this Thread
None
yes, u have to be logged in
Do you also want to change them or only read 'em?
i want to read them and display in a label
No "Label" Exists, In this particular case you don't have such luck, the HTML is using table cells, Meaning you will have to parse the HTML and use RegEx to clean it up, or use Net.HttpWebResponse, Streamreader and again parse the information and remove the tags with text.replace.
thanks for the help nextgen mind showing me an example or snipit?
i kinda confused
I can't help you with the grabbing source code as I'm not experience with HttpRequests and logging in stuffs but I can help you with the regex pattern if you have the page source.
[php] Private Function getValue(ByVal pageSourceContents As String, ByVal stat As String)
Dim statRegex As New System.Text.RegularExpressions.Regex("<b>" & stat & ":</b> ")
Dim text As String = pageSourceContents
Dim stringConts() As String
Dim finalResult() As String
Try
stringConts = statRegex.Split(text)
finalResult = stringConts(1).Split("<")
Return finalResult(0)
Catch ex As Exception
Return Nothing
End Try
End Function
[/php]
pageSourceContents is the page source as a string and stat is the name of the stat such as Health, Level, Brave, EXP. It's the same as it appears on the page. It's case sensitive aswell btw. It returns the value of the stat such 100%, 5/5 etc. Not sure how to get item amount as I don't have any items..
Well I presume you're using a WebBrowser to get people to log in to caveages. After login is completed (WebBrowser.DocumentCompleted event) do something like this:
First, we need to import the RegEx namespace
[php]
Imports System.Text.RegularExpressions
[/php]
Next, declare at class level:
[php]
Private statDictionary As New Dictionary(Of String. String)
[/php]
[php]
Private Sub ParseStats(ByVal HTMLSauce As String)
For Each m As Match In Regex.Matches(HTMLSauce, "<b>.*?</b> .*?<br />")
Dim x As String = m.Value
If *****ntains("a href") Then x = Regex.Replace(x, "<a href.*?>", "").Replace("</a>", "")
Dim statName As String = Regex.Match(x, "(?<=<b>).*?(?=</b>)").Value
Dim statValue As String = Regex.Match(x, "(?<=</b>).*?(?=<br />)").Value
If Not StatDictionary.ContainsKey(statName) Then StatDictionary.Add(statName, statValue)
Next
End Sub
[/php]
Then to use the above method:
[php]
ParseStats(WebBrowser1.DocumentText)
[/php]
You now have a dictionary containing all the stats. You can use it however you like by iterating through the indexes like so:
[php]
For iterator as integer = 0 to statDictionary.Count - 1
Dim statName as String = statDictionary.Keys(i)
Dim statValue As String = statDictionary.Values(i)
'.... do something with the values
Next
[/php]
thank you for all your help and, jason will these stats change when i refresh the page?
becuase what the bot will do is....
Gets all the values
Shows the curent lvl
and then ask's you the level you want to train to...
then it will show you how many jack daniles you have
then it will do the crime steal the time portal until your brave is gone it will automaticly use jack daniles until your brave is full then do crimes again, and then when you get to level you wanted to it will stop.
Originally Posted by cosconub
thank you for all your help and, jason will these stats change when i refresh the page?
becuase what the bot will do is....
Gets all the values
Shows the curent lvl
and then ask's you the level you want to train to...
then it will show you how many jack daniles you have
then it will do the crime steal the time portal until your brave is gone it will automaticly use jack daniles until your brave is full then do crimes again, and then when you get to level you wanted to it will stop.
I don't know anything about the game, but add this line to "ParseStats" at the very top:
Code:
statDictionary.Clear
And it will basically refresh the stats every time "ParseStats" is called (it's up to you to make sure it's called whenever the page is refreshed.)
ok cool, thanks
Solved ?
I would say so.
Marked as such, PM me or lolland otherwise.