Ezud.com - Trolling Assistance Forum

Ezud.com - Trolling Assistance Forum (http://ezud.com/forum/index.php)
-   Runescape Botting (http://ezud.com/forum/forumdisplay.php?f=194)
-   -   [function] Check for gas (http://ezud.com/forum/showthread.php?t=4522)

Nunk 02-03-2009 01:43 AM

[function] Check for gas
 
This code i used at my ProMiners and it works very well. It check for gas under mouse. Btw... Those random updates.. did they remove gas?? If they did this is pretty useles..

simple example of use
Code:

Sub MyMiningThing()
Do Until Stop=True
MoveToRock
If Not GasFound Then LeftClick
Wait 2000,4000
Loop
End Sub

The function (you have to get all other things you need by yourself :))
Code:

Private Function GasFound(Percents As Integer)
Dim PixelChange As Integer, Xnow As Integer, Ynow As Integer, startX As Integer, startY As Integer
Dim RShdc As Long, x As Long, y As Long, Pixs(0 To 24, 0 To 25) As String
Dim PaintDebug As Integer, PixCount As Integer

PaintDebug = 1
RShdc = GetDC(selWnd)

startX = getx - 12
startY = GetY - 25

Xnow = 0
For x = startX To startX + 24
    Ynow = 0
        For y = startY To startY + 25
            Pixs(Xnow, Ynow) = GetPixel(RShdc, x, y)
            'If PaintDebug Then
            '  If Xnow = 0 Then SetPixel RShdc, x - 1, y, 9090
              '  If Ynow = 0 Then SetPixel RShdc, x, y - 1, 9090
              ' If x = startX + 18 Then SetPixel RShdc, x + 1, y, 9090
                'If y = startY + 18 Then SetPixel RShdc, x, y + 1, 9090
            'End If
            PixCount = PixCount + 1
            Ynow = Ynow + 1
        Next y
    Xnow = Xnow + 1
Next x
'Text1.Text = "PixCount " & PixCount & vbCrLf & Text1.Text

WaitMS Rand(30, 100)

Xnow = 0
Ynow = 0

For x = startX To startX + 24
    Ynow = 0
        For y = startY To startY + 25
            If Not GetPixel(RShdc, x, y) = Pixs(Xnow, Ynow) Then PixelChange = PixelChange + 1
            Ynow = Ynow + 1
        Next y
    Xnow = Xnow + 1
Next x
'Text1.Text = "PixelChange " & PixelChange & vbCrLf & Text1.Text

If Not PixelChange = 0 Then
AddToLog "PixelChange: " & Round(((PixelChange / PixCount)) * 100, 1) & "%"
'Text1.Text = "PixelChange " & (Int((PixelChange / PixCount) * 100)) & "%" & vbCrLf & Text1.Text
If Round(((PixelChange / PixCount) * 100), 0) >= Percents Then
GasFound = True
AddToLog "Possible Gas!"
mmouse2 627, 85
If Rand(1, 2) = 1 Then mmouse2 627, 85
WaitMS Rand(20, 150)
LClick
End If
End If
ReleaseDC selWnd, RShdc
End Function

Code:

Public Function GetY()
Dim wndRect As RECT
Dim mousexy As POINTAPI
GetWindowRect selWnd, wndRect
GetCursorPos mousexy
GetY = (mousexy.y - wndRect.Top)
End Function

Public Function GetX()
Dim wndRect As RECT
Dim mousexy As POINTAPI
GetWindowRect selWnd, wndRect
GetCursorPos mousexy
GetX = (mousexy.x - wndRect.Top)
End Function


frostedblood 02-05-2009 03:32 PM

what was the gas thing? if its what im thinking of is it the thing where stuff comes out of the rock? or is that called something else?

Lust 02-05-2009 03:34 PM

A.) In English, it is "smoke", "smoking rocks".
B.) When the random update happens, this will be useless.

TheGopher 02-05-2009 06:10 PM

What language would this be?

Lust 02-06-2009 01:58 AM

Quote:

Originally Posted by TheGopher (Post 44923)
What language would this be?

Nunk is Dutch(I think)

If you mean the code, that looks like VB.

Nunk 02-06-2009 06:41 AM

Its VB6 code and im from Finland. :D

FBI 02-06-2009 07:26 PM

saatana vittu perkele

Csg999 02-06-2009 11:17 PM

Yes useless after update sorry :(

Nunk 02-07-2009 01:27 AM

Quote:

Originally Posted by csg999 (Post 45017)
Yes useless after update sorry :(

Lol not its not. Its good for learning purposes (if it isnt badly done).

Csg999 02-07-2009 01:41 AM

Quote:

Originally Posted by Nunk (Post 45029)
Lol not its not. Its good for learning purposes (if it isnt badly done).

'useless' meaning it wont help in rs


All times are GMT -8. The time now is 03:02 PM.

Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.