Jump to content

computer differences?


Recommended Posts

Ok, well, i went and scripted a macro does all this stuff for me in a game. And well, it works perfectly fine on my computer, and my cousin and my friend wanted it too. So, i went into the file and changed all the variables so that they were read off of a .ini file. I then proceeded to send them my macro(it still works fine for me). So they received it, but nothing works for them, they filled in the .ini file correctly, and all, but nothing moves. Although other simple scripts like just basic mouse moving works for them. The only thing of my macro that works, is the winactivate command...

Here's the code:

HotKeySet("{F1}", "fchoose")
HotKeySet("{F2}", "lvl")
HotKeySet("{Esc}", "Stop")
HotkeySet("{F3}", "varcheck")
HotKeySet("{F4}", "pause")
$xehp = 0
$yehp = 0
$xehp2 = 0
$yehp2 = 0
$xhp = 0
$yhp = 0
$xhp2 = 0
$yhp2 = 0
$xrevive = 0
$yrevive = 0
$xrevive2 = 0
$yrevive2 = 0
$xsubmit = 0
$ysubmit = 0
$xlvl = 0
$ylvl = 0
$xlvl2 = 0
$ylvl2 = 0
$xfight = 0
$yfight = 0
$xfight2 = 0
$yfight2 = 0
call('cname')
Call('lvl')
Call('fchoose')
Call('ini')
While 1
ControlClick("Microsoft Internet Explorer", "", "Button1")
    If WinActive($charname & " - Microsoft Internet Explorer") Then
    Call('check')
    Call('submit')
    Call('fight')
    Call('check')
    Call('lvlchoose')
    call('revive')
Else
    WinActivate($charname & " - Microsoft Internet Explorer", "")
EndIf
WEnd




;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Func revive()
$youdie = PixelSearch( $xhp, $yhp, $xhp2, $yhp2, 0x058B04 )
If @error Then
    $alive = PixelSearch( $xehp, $yehp, $xehp2, $yehp2, 0x7A000F )
    If @error Then
    $youdie = PixelSearch( $xrevive, $yrevive, $xrevive2, $yrevive2, 0x555E67 )
        If not @error Then
                MouseClick("left", $youdie[0], $youdie[1], 1, 0)
        EndIf
EndIf
EndIf
EndFunc

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Func submit()
$alive = PixelSearch( $xehp, $yehp, $xehp2, $yehp2, 0x058B04 )
If @error Then
            MouseClick("left", $xsubmit, $ysubmit, 1, 0)
EndIf
EndFunc
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


Func lvlchoose()
$levelin = PixelSearch( $xlvl, $ylvl, $xlvl2, $ylvl2, 0xC3CAD0 )
If Not @error Then
    $lvl2 = PixelSearch( $xlvl, $ylvl, $xlvl2, $ylvl2, $lvlcolour )
    If Not @error Then
    Call('check')
    MouseClick("left", $lvl2[0], $lvl2[1], 1, 0)
    EndIf
EndIf
EndFunc

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Func fight()
$fight = PixelSearch( $xeHp, $yehp, $xehp2, $yehp2, 0x058B04 )
If Not @error Then
    $cfight = 1
    While $cfight = 1
    If Not WinActive($charname & " - Microsoft Internet Explorer") Then
    WinActivate($charname & " - Microsoft Internet Explorer", "")
    EndIf
ControlClick("Microsoft Internet Explorer", "", "Button1")
        Call('check') 
        If check() = 1 Then
        EndIf
    call('revive')
        call('lvlchoose')
        $fight = PixelSearch( $xeHp, $yehp, $xehp2, $yehp2, 0x058B04 )
        If @error Then
            $cfight = 0
        Else
            $fight = PixelSearch( $xfight, $yfight, $xfight2, $yfight2, $atk )
            If not @error Then
                MouseClick("left", $fight[0], $fight[1], 1, 0)
            EndIf
        EndIf
    WEnd
EndIf
EndFunc

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Func fchoose()
$atkchoice = InputBox("ATk Type", "1 - ATK                                                           2 - CST                                                             3 - HC1                                                             4 - HC2                                                             5 - DEF" , "", " M1")
Select
    Case $atkchoice = 1
    $atk = 0x0F2920
    Case $atkchoice = "2"
        $atk = 0xF0CE17
    Case $atkchoice = 3
        $atk = 0x2E0F0D
    Case $atkchoice = 4
        $atk = 0x403A3E
    Case $atkchoice = 5
        $atk = 0x69524A
EndSelect
EndFunc

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Func lvl()
$lvlup = InputBox("Stats", "1 - Str          2 - Dex                                        3 - Agi          4 - Dur                                        5 - Ntl          6 - Cnc                                       7 - Cnt          8 - All" , "", " M1")
Select
    Case $lvlup = 1
    $lvlcolour = 0xA0A8B3
    Case $lvlup = "2"
        $lvlcolour = 0xADB3C3
    Case $lvlup = 3
        $lvlcolour = 0xB7C1CB
    Case $lvlup = 4
        $lvlcolour = 0xB2BBCC
    Case $lvlup = 5
        $lvlcolour = 0x667384
    Case $lvlup = 6
        $lvlcolour = 0x636D79
    Case $lvlup = 7
        $lvlcolour = 0x223345
    Case $lvlup = 8
        $lvlcolour = 0xDBE3EE
EndSelect

EndFunc

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Func Stop()

Exit
EndFunc

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Func check()
$bar = 0
$sar = "0A1214"
$bar = PixelGetColor( 33 , 385 )
    While Hex($bar, 6) <> $sar
ControlClick("Microsoft Internet Explorer", "", "Button1")
    $bar = PixelGetColor( 33 , 385 )
    Wend
Sleep(200)
EndFunc





;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Func varcheck()
MsgBox(0, "Vars", "Final:" & $final & ", Char:" & $charname)
EndFunc
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Func cname()
$charname = InputBox("Char Name", "Char Name? (Case Sensitive)" , "", " M15")
EndFunc

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Func ini()
;
$xehp = IniRead("config.ini", "Enemy", "xHp", "NotFound")
$yehp = IniRead("config.ini", "Enemy", "yhp", "NotFound")
$xehp2 = IniRead("config.ini", "Enemy", "xhp2", "NotFound")
$yehp2 = IniRead("config.ini", "Enemy", "yhp2", "NotFound")
;
$xhp = IniRead("config.ini", "User", "xHp", "NotFound")
$yhp = IniRead("config.ini", "User", "yhp", "NotFound")
$xhp2 = IniRead("config.ini", "User", "xhp2", "NotFound")
$yhp2 = IniRead("config.ini", "User", "yhp2", "NotFound")
;
;
$xrevive = IniRead("config.ini", "User", "xrevive", "NotFound")
$yrevive = IniRead("config.ini", "User", "yrevive", "NotFound")
$xrevive2 = IniRead("config.ini", "User", "xrevive2", "NotFound")
$yrevive2 = IniRead("config.ini", "User", "yrevive2", "NotFound")
;
;
$xsubmit = IniRead("config.ini", "User", "xsubmit", "NotFound")
$ysubmit = IniRead("config.ini", "User", "ysubmit", "NotFound")
;
$xlvl = IniRead("config.ini", "User", "xlvl", "NotFound")
$ylvl = IniRead("config.ini", "User", "ylvl", "NotFound")
$xlvl2 = IniRead("config.ini", "User", "xlvl2", "NotFound")
$ylvl2 = IniRead("config.ini", "User", "ylvl2", "NotFound")
;
;
$xfight = IniRead("config.ini", "User", "xfight", "NotFound")
$yfight = IniRead("config.ini", "User", "yfight", "NotFound")
$xfight2 = IniRead("config.ini", "User", "xfight2", "NotFound")
$yfight2 = IniRead("config.ini", "User", "yfight2", "NotFound")
EndFunc
Edited by Faleira

[quote]If whenever you feel small, useless, offended, depressed, and just generally upset always remember......you were once the fastest and most vicious sperm out of hundreds of millions![/quote]

Link to comment
Share on other sites

Are they using the same operating system as you and do they use Internet Explorer as their browser.


Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Link to comment
Share on other sites

yep, i made sure of that.

edit: i also made sure that the config file was working for them, had them check if the variables had the correct value in them, and they did.

Edited by Faleira

[quote]If whenever you feel small, useless, offended, depressed, and just generally upset always remember......you were once the fastest and most vicious sperm out of hundreds of millions![/quote]

Link to comment
Share on other sites

Are they using the same screen resolution as you. The reason for asking is that you use PixelGetColour which use co-ordinates.


Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Link to comment
Share on other sites

oh crap... i've never spotted that part before ;)

and the reason for the config file was because of the difference in resolutions :P

[quote]If whenever you feel small, useless, offended, depressed, and just generally upset always remember......you were once the fastest and most vicious sperm out of hundreds of millions![/quote]

Link to comment
Share on other sites

i give this script a fat zero becouse you use Call where it is not needed.

on a side note you should also check the collor settings. like 32 / 16 / 8 bits.

cuz if you search for a collor that cant be displayd on an 8 bit your still screwed.

Edited by w0uter

My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...