Jump to content

[Need Help] my script always error


 Share

Recommended Posts

well, i've trying to make an some script for my game,

i have created many script :

1. auto attack

2. auto healing char HP

3. auto uses char Mana Potion

4. auto healing pet hp

5. auto uses pet mana potion

this is my auto attack script

Global $Paused
HotKeySet("{PAUSE}", "TogglePause")
While 1
    Sleep(100)
WEnd
Func TogglePause()
    $Paused = NOT $Paused
SoundPlay(@WindowsDir & "mediachord.wav",0)
    While $Paused
        sleep(100)
  ToolTip("BOT Disable",253,583)
  Sleep(100)
    WEnd
If NOT $Paused Then
     SoundPlay(@WindowsDir & "mediading.wav",0)
EndIf
Sleep(100)
ToolTip("BOT Enable",253,583)
Sleep(100)
;----------------------------------------------------------------------------------------------------------------------------------------------------------------------
  While 1=1
    Send("`") ;looking for s
    Sleep(1900)
    Send("1") ;attack
    Sleep(100)
    Send("2") ;skill 2
    Sleep(100)
    Send("3") ;skill 3
    Sleep(100)
    Send("4") ;skill 4
    Sleep(100)
    send("{space}") ;pick up monster's drop item
    Sleep(100)
  WEnd
;----------------------------------------------------------------------------------------------------
EndFunc

and this is my auto heal script

Do
$coord = PixelSearch (88, 101, 137, 104, 0x5A553A)
If Not @error then
Send("Q")
EndIf
Until ProcessClose ("The Void-CRYSTAL SAGA at R2Games.com - Mozilla Firefox")=True

i combined this script become :

Global $Paused
HotKeySet("{PAUSE}", "TogglePause")
While 1
    Sleep(100)
WEnd
Func TogglePause()
    $Paused = NOT $Paused
SoundPlay(@WindowsDir & "mediachord.wav",0)
    While $Paused
        sleep(100)
  ToolTip("BOT Disable",253,583)
  Sleep(100)
    WEnd
If NOT $Paused Then
     SoundPlay(@WindowsDir & "mediading.wav",0)
EndIf
Sleep(100)
ToolTip("BOT Enable",253,583)
Sleep(100)
;----------------------------------------------------------------------------------------------------------------------------------------------------------------------
  While 1=1
    Send("`") ;looking monster
    Sleep(1900)
    Send("1") ;attack
    Sleep(100)
    Send("2") ;skill  2
    Sleep(100)
    Send("3") ;skill  3
    Sleep(100)
    Send("4") ;skill  4
    Sleep(100)
    send("{space}") ;pick up monster's drop item
    Sleep(100)
     Call("Char HP")
  WEnd
  
Func Char HP()
$coord = PixelSearch (88, 101, 149, 104, 0x5A553A)
  If Not @error then
   Send("Q")
  EndIf
EndFunc
;------------------------------------------------------------------------------------------------------------------------------------
EndFunc

but the script error, do you have any idea to help me?

;):)

======================================================

| sorry about my grammar |

======================================================

Edited by zerachiel
Link to comment
Share on other sites

  • Moderators

zerachiel,

Welcome to the AutoIt forum. ;)

You seem to have missed the Forum Rules on your way in. Please read them now and then you will understand why you will get no help and this thread will shortly be closed. :)

I hope to see you again soon with a legitimate question. :D

M23

P.S. Bumping your own thread within 24hrs is another thing not to do, by the way! :)

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

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