unknowncheats uc-forum.com ucdownloads ucdownloads.com

Go Back   UC-Tutorials - Multiplayer Game Hacking and Cheat Tutorials > Programming > Visual Basic

- Sponsored Advertisement -
http://www.myfpscheats.com/


Reply
 
Thread Tools Display Modes
  #1  
Old 11-05-2009, 01:51 AM
Dave Dave is offline
Junior Member
 
Join Date: Oct 2009
Posts: 11
Default [Source] Mafia Wars Fight Bot

This is a little bot a made for mafia wars on myspace.. Havent tried it on facebook but it might work.

I leave it running all day and night, so you might want to change some settings to fit your needs.

Ill be updating this as i work on the program but this will get you started. Can you believe people actually pay for programs like this?

Anyway, you'll need a http packet sniffer for your urls right now.. Ill be coding a function later for it but you'll have to do it manually right now.

I use effetech http packet sniffer. Just open mafia wars, goto fight tab, start packet sniffer and click fight on someone. Copy the url that starts with:
http://mwms.zynga.com/mwms/remote/html_server.php?"

Then your good to go.. Program will save settings and u can set ur timer and you'll have no more wasted stamina.

Mafia wars does not have to be open.

Enjoy!

ps. If anyone wants the entire project ill upload that aswell.




PHP Code:
Public Class Form1

    Dim Wins 
As Integer 0
    Dim Losses 
As Integer 0

    Dim MainURL 
As String "http://mwms.zynga.com/mwms/remote/html_server.php?"
    
Dim exp_sig As String My.Settings.exp_sig
    Dim time 
As String My.Settings.time
    Dim action 
As String My.Settings.action
    Dim city 
As String My.Settings.city
    Dim opponent 
As String My.Settings.opponent
    Dim hd 
As String My.Settings.hd
    Dim wh 
As String My.Settings.wh
    Dim viewer 
As String My.Settings.viewer
    Dim zy_sig 
As String My.Settings.zy_sig
    Dim ajax 
As String My.Settings.ajax
    Dim client 
As String My.Settings.client
    Dim xw_sig 
As String My.Settings.xw_sig
    Dim xw_user 
As String My.Settings.xw_user
    Dim random 
As String My.Settings.random
    Dim tmp 
As String My.Settings.tmp

    Dim MyDebug 
As Boolean False
    Dim AllIsWell 
As Boolean True

    Dim Fight 
As String MainURL "xw_controller=fight" "&" exp_sig "&" time "&" action "&" city "&" tmp "&" opponent "&" hd "&" wh "&" viewer "&" ajax "&" client "&" xw_sig "&" xw_user "&" random
    Dim heal 
As String MainURL "xw_controller=hospital" "&" exp_sig "&" time "&" action "&" city "&" hd "&" wh "&" "zy_viewer_id=102351781" "&" ajax "&" client "&" xw_sig "&" xw_user "&" random
    
Private Sub Form1_Load(ByVal sender As System.ObjectByVal e As System.EventArgsHandles MyBase.Load
        UpdateURL
()
    
End Sub
    
Public Sub UpdateURL()
        If 
AllIsWell Then
        End 
If
        
TextBox2.Text My.Settings.exp_sig
        TextBox3
.Text My.Settings.time
        TextBox4
.Text My.Settings.action
        TextBox5
.Text My.Settings.city
        TextBox6
.Text My.Settings.tmp
        TextBox7
.Text My.Settings.opponent
        TextBox8
.Text My.Settings.hd
        TextBox9
.Text My.Settings.wh
        TextBox10
.Text My.Settings.viewer
        TextBox11
.Text My.Settings.ajax
        TextBox12
.Text My.Settings.client
        TextBox13
.Text My.Settings.xw_sig
        TextBox14
.Text My.Settings.xw_user
        TextBox15
.Text My.Settings.random
    End Sub
    
Public Function readCommand(ByVal str As StringByVal position As Integer) As String
        Dim Tempstr
() As String
        
If position >= 1 Then
            Tempstr 
Split(str"&")
            
readCommand Tempstr(position 1)
        
End If
    
End Function

    Private 
Sub Button1_Click(ByVal sender As System.ObjectByVal e As System.EventArgsHandles Button1.Click
        TextBox2
.Text readCommand(TextBox1.Text2)
        
TextBox3.Text readCommand(TextBox1.Text3'
        TextBox4.Text = readCommand(TextBox1.Text, 4) '
        
TextBox5.Text readCommand(TextBox1.Text5'
        TextBox6.Text = readCommand(TextBox1.Text, 6) '
        
TextBox7.Text readCommand(TextBox1.Text7'
        TextBox8.Text = readCommand(TextBox1.Text, 8) '
        
TextBox9.Text readCommand(TextBox1.Text9'
        TextBox10.Text = readCommand(TextBox1.Text, 10) '
        
TextBox11.Text readCommand(TextBox1.Text11'
        TextBox12.Text = readCommand(TextBox1.Text, 12) '
        
TextBox13.Text readCommand(TextBox1.Text13'
        TextBox14.Text = readCommand(TextBox1.Text, 14) '
        
TextBox15.Text readCommand(TextBox1.Text15'
        My.Settings.exp_sig = TextBox2.Text
        My.Settings.time = TextBox3.Text
        My.Settings.action = TextBox4.Text
        My.Settings.city = TextBox5.Text
        My.Settings.tmp = TextBox6.Text
        My.Settings.opponent = TextBox7.Text
        My.Settings.hd = TextBox8.Text
        My.Settings.wh = TextBox9.Text
        My.Settings.viewer = TextBox10.Text
        My.Settings.ajax = TextBox11.Text
        My.Settings.client = TextBox12.Text
        My.Settings.xw_sig = TextBox13.Text
        My.Settings.xw_user = TextBox14.Text
        My.Settings.random = TextBox15.Text
        UpdateURL()
    End Sub
    Private Sub CheckFight()
        Dim Page2String As String = WebBrowser1.DocumentText
        If MyDebug Then
            MsgBox(Page2String)
        End If
        If Page2String.Contains("You win!") Then
            Wins = Wins + 1
            Label3.Text = Wins
            AllIsWell = True
        ElseIf Page2String.Contains("You lose!") Then
            Losses = Losses + 1
            Label4.Text = Losses
            AllIsWell = True
        End If
        If Page2String.Contains("You will be able to fight again") Then
            DoHeal()
            AllIsWell = False
            If MyDebug Then
                MsgBox("Doing heal")
            End If
        End If
        If Page2String.Contains("You need more stamina to fight") Then
            MsgBox("Out of stanima")
            AllIsWell = False
            Timer2.Enabled = False
        End If
    End Sub
    Private Sub DoHeal()
        WebBrowser1.Navigate(heal)
        If MyDebug Then
            MsgBox("heal done")
        End If
    End Sub
    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        If AllIsWell Then
            DoFight()
        End If
    End Sub
    Public Sub DoFight()
        If AllIsWell Then
            If MyDebug = True Then
                MsgBox(Fight)
            End If
            WebBrowser1.ScriptErrorsSuppressed = True
            WebBrowser1.Navigate(Fight)
            If Not WebBrowser1.IsBusy Then
                CheckFight()
            End If
        End If
    End Sub
    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        Label5.Text = "Status: " + WebBrowser1.StatusText
        If Not AllIsWell Then
            Label5.Text = "Status: Health or Stamina is low"
        End If
    End Sub
    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
        WebBrowser1.Navigate(heal)
    End Sub
    Private Sub Button3_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        If Button3.Text = "Hide" Then
            Me.Width = 669
            Me.Height = 437
            Button3.Text = "Show"
        Else
            Me.Width = 669
            Me.Height = 837
            Button3.Text = "Hide"
        End If
    End Sub
    Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
        DoHeal()
    End Sub
    Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
        DoFight()
    End Sub
    Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
        Timer2.Start()
        Label21.Text = "Running"
    End Sub
    Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click
        Timer2.Stop()
        Label21.Text = "Stopped"
    End Sub
    Private Sub Timer3_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer3.Tick
        If Not AllIsWell And Timer2.Enabled = False Then
            DoFight()
        End If
    End Sub
End Class 
Reply With Quote
Reply

  • Submit Thread to Digg
  • Submit Thread to del.icio.us
  • Submit Thread to StumbleUpon
  • Submit Thread to Google
  • Submit Thread to Facebook
  • Submit Thread to My Yahoo!
  • Submit Thread to MySpace
  • Submit Thread to Twitter
  • Submit Thread to Reddit

Tags
bot, fight, mafia, source, wars

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 03:07 AM.