Skocz do zawartości
  • 👋 Witaj na MPCForum!

    Przeglądasz forum jako gość, co oznacza, że wiele świetnych funkcji jest jeszcze przed Tobą! 😎

    • Pełny dostęp do działów i ukrytych treści
    • Możliwość pisania i odpowiadania w tematach
    • System prywatnych wiadomości
    • Zbieranie reputacji i rozwijanie swojego profilu
    • Członkostwo w jednej z największych społeczności graczy

    👉 Dołączenie zajmie Ci mniej niż minutę – a zyskasz znacznie więcej!

    Zarejestruj się teraz

Autoit script error


Rekomendowane odpowiedzi

Opublikowano

Witam, przy próbie kompilacji skryptu, wyskakuje mi błąd:

 

https://imgur.com/BGJsZdX

 

Po kliknięciku Ok następny:

 

https://imgur.com/FOJTwRQ

 

 

Skrypt:

Spoiler

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <nomad.au3>
#include <Timers.au3>
#Region ### START Koda GUI section ### Form=C:\Users\Valar\Desktop\bot\Form1.kxf
$Form1 = GUICreate("bot do tibi", 192, 368, 192, 124)
$Button1 = GUICtrlCreateButton("spell caster", 8, 16, 75, 25), $WS_GROUP
$Input1 = GUICtrlCreateInput("czar", 0, 64, 121, 21)
$Input2 = GUICtrlCreateInput("mana", 0, 104, 121, 21)
$Button2 = GUICtrlCreateButton("anty-idle", 8, 136, 75, 25), $WS_GROUP
$Input3 = GUICtrlCreateInput("czas", 0, 176, 121, 21)
$Button3 = GUICtrlCreateButton("jedzenie fooda", 8, 208, 75, 25), $WS_GROUP
$Input4 = GUICtrlCreateInput("guzik", 0, 256, 121, 21)
$Input5 = GUICtrlCreateInput("czas", 0, 296, 121, 21)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        case $Button1
            global $pid = ProcessExists("Kasteria.exe")
            $memaaa = _MemoryOpen($pid)
            _Timer_SetTimer($form1,500,"spell")
        case $Button2
            $ff = GUICtrlRead($input3)
            $ff *= 1000
            _Timer_SetTimer($form1,$ff,"afk")
        case $Button3
            $ks = GUICtrlRead($Input4)
            $ksks = GUICtrlRead($Input5)
            _Timer_SetTimer($form1,$ksks,"food")
    EndSwitch
WEnd
func food($1,$2,$3,$4)
    ControlSend("Kasteria","","",$ks)
    EndFunc
func afk($1,$2,$3,$4)
    ControlSend("Kasteria","","","{ctrldown}{down}{ctrlup}")
    ControlSend("Kasteria","","","{ctrldown}{up}{ctrlup}")
    ControlSend("Kasteria","","","{ctrldown}{left}{ctrlup}")
    ControlSend("Kasteria","","","{ctrldown}{right}{ctrlup}")
EndFunc

Func spell()
    $kk = guictrlread($input2)
    $mem = _MemoryRead(0x00635EFO,$memaaa)
    $if $mem >= $kk then
        controlsend("Kasteria","","",guictrlread($input1))
        controlsend("Kasteria","","","{enter}")
EndIf
EndFunc

 

 

Mógłby ktoś pomóc?

Pozdrawiam

 

 

Opublikowano

Wydaje mi się, że to nie wina skryptu a powłoki w której pracujesz czyli AutoIt3Wrapper. Nie pracowałem w tej powłoce nigdy i tak w sumie nie do końca wiem co to jest, ale Imo to nie wina skryptu.

Opublikowano
  • $WS_GROUP -> powinien być w nawiasie, a nie tak jak u Ciebie
  •  $if $mem >= $kk then -> wywali błąd, nie wiem co chciałeś stworzyć, ale pewnie literówka zamiast If $mem 

Czyli kod który się kompiluje wygląda tak:

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <nomad.au3>
#include <Timers.au3>
#Region ### START Koda GUI section ### Form=C:\Users\Valar\Desktop\bot\Form1.kxf
$Form1 = GUICreate("bot do tibi", 192, 368, 192, 124)
$Button1 = GUICtrlCreateButton("spell caster", 8, 16, 75, 25, $WS_GROUP)
$Input1 = GUICtrlCreateInput("czar", 0, 64, 121, 21)
$Input2 = GUICtrlCreateInput("mana", 0, 104, 121, 21)
$Button2 = GUICtrlCreateButton("anty-idle", 8, 136, 75, 25, $WS_GROUP)
$Input3 = GUICtrlCreateInput("czas", 0, 176, 121, 21)
$Button3 = GUICtrlCreateButton("jedzenie fooda", 8, 208, 75, 25, $WS_GROUP)
$Input4 = GUICtrlCreateInput("guzik", 0, 256, 121, 21)
$Input5 = GUICtrlCreateInput("czas", 0, 296, 121, 21)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        case $Button1
            global $pid = ProcessExists("Kasteria.exe")
            $memaaa = _MemoryOpen($pid)
            _Timer_SetTimer($form1,500,"spell")
        case $Button2
            $ff = GUICtrlRead($input3)
            $ff *= 1000
            _Timer_SetTimer($form1,$ff,"afk")
        case $Button3
            $ks = GUICtrlRead($Input4)
            $ksks = GUICtrlRead($Input5)
            _Timer_SetTimer($form1,$ksks,"food")
    EndSwitch
WEnd
func food($1,$2,$3,$4)
    ControlSend("Kasteria","","",$ks)
    EndFunc
func afk($1,$2,$3,$4)
    ControlSend("Kasteria","","","{ctrldown}{down}{ctrlup}")
    ControlSend("Kasteria","","","{ctrldown}{up}{ctrlup}")
    ControlSend("Kasteria","","","{ctrldown}{left}{ctrlup}")
    ControlSend("Kasteria","","","{ctrldown}{right}{ctrlup}")
EndFunc

Func spell()
    $kk = guictrlread($input2)
    $mem = _MemoryRead(0x00635EFO,$memaaa)
    if $mem >= $kk then
        controlsend("Kasteria","","",guictrlread($input1))
        controlsend("Kasteria","","","{enter}")
EndIf
EndFunc

Poza tym, zobacz mojego bocika, na ten sam ots, sprzed 2 lat, kod tam udostępniłem :)

 

 

Zarchiwizowany

Ten temat przebywa obecnie w archiwum. Dodawanie nowych odpowiedzi zostało zablokowane.

×
×
  • Dodaj nową pozycję...