PDA

View Full Version : [VB6] Neopets Carnival Autoplayer



Reemer
09-02-2012, 11:18 AM
This one was easy. Let this be a reminder that not everything is as difficult as it seems; the games might be in flash but you can make it easily in VB6. Same with the slots games.
I don't think it tells you if you win an item correctly however.

Private Sub cmdStart_Click()
Dim intrandom As String
Dim strPoints As String
Dim stritem As String
Dim Finished As Boolean
cmdStart.Enabled = False
cmdstop.Enabled = True
StopProgram = False
If chkbag.Value = 1 And StopProgram = False Then
lblstatus.Caption = "Playing Bagatelle."
Do Until StopProgram = True Or Finished = True
MSToWait (Rand(txtwait1.Text, txtwait2.Text))
intrandom = Rand(1000, 99999)
Call RipperWrapper.Request(strHTML, "GET", "[Only registered and activated users can see links]" & intrandom)
strPoints = GetStringBetween(strHTML, "points=", "&totalnp=")
If Val(strPoints) > 0 Then
lststatus.AddItem ("Won " & strPoints & " NP.")
End If
lblplayed.Caption = lblplayed.Caption + 1
If InStr(strHTML, "You+can%27t+afford+to+play%2C+what+a+pity") Then
lststatus.AddItem ("Not enough NP. Stopping.")
StopProgram = True
End If
If InStr(strHTML, "Hey%2C+kid") Then
Finished = True
lblplayed.Caption = lblplayed.Caption - 1
lststatus.AddItem ("Finished playing Bagatelle.")
End If

Loop
End If
Finished = False



If chkcoco.Value = 1 And StopProgram = False Then
lblstatus.Caption = "Playing Coconut Shy."
Do Until StopProgram = True Or Finished = True
MSToWait (Rand(txtwait1.Text, txtwait2.Text))
intrandom = Rand(1000, 99999)
Call RipperWrapper.Request(strHTML, "GET", "[Only registered and activated users can see links]" & intrandom)
strPoints = GetStringBetween(strHTML, "points=", "&totalnp=")
If Val(strPoints) > 0 Then
lststatus.AddItem ("Won " & strPoints & " NP.")
End If
stritem = GetStringBetween(strHTML, "&success=", "&error")
If Val(stritem) > 3 Then
lststatus.AddItem ("Won an item from Coconut Shy!")
End If
lblplayed.Caption = lblplayed.Caption + 1
If InStr(strHTML, "No+Neopoints+No+Throw") Then
StopProgram = True
lststatus.AddItem ("Not enough NP. Stopping.")
End If
If InStr(strHTML, "had+yer+lot") Then
Finished = True
lblplayed.Caption = lblplayed.Caption - 1
lststatus.AddItem ("Finished playing Coconut Shy.")

End If

Loop
End If
Finished = False


Dim intrandsuccess As Integer

If chkcork.Value = 1 And StopProgram = False Then
lblstatus.Caption = "Playing Cork Gun."
Do Until StopProgram = True Or Finished = True
MSToWait (Rand(txtwait1.Text, txtwait2.Text))
intrandom = Rand(1000, 99999)
intrandsuccess = Rand(9, 15)
Call RipperWrapper.Request(strHTML, "GET", "[Only registered and activated users can see links]" & intrandsuccess & "&r=" & intrandom)
stritem = GetStringBetween(strHTML, "&success=", "&error")
If Val(stritem) > 0 And Val(stritem) < 50 Then
lststatus.AddItem ("Won an item from Cork Gun Gallery!")
End If
lblplayed.Caption = lblplayed.Caption + 1
If InStr(strHTML, "No+Neopoints") Then
lststatus.AddItem ("Not enough NP. Stopping.")
StopProgram = True
End If
If InStr(strHTML, "No+more+shots+today") Then
Finished = True
lststatus.AddItem ("Finished playing Cork Gun Gallery.")
lblplayed.Caption = lblplayed.Caption - 1
End If

Loop
End If
Finished = False
lblstatus.Caption = "Finished."


End Sub