Search the Community
Showing results for tags 'stack overflow'.
-
This code causes an error: yacc stack overflow on line 249 Global $g_R2 = '1|0.1382|0.0031' & @CRLF & _ '2|0.1696|0.003' & @CRLF & _ '3|0.1994|0.003' & @CRLF & _ '4|0.2292|0.003' & @CRLF & _ '5|0.2592|0.0028' & @CRLF & _ '6|0.2876|0.0026' & @CRLF & _ '7|0.3131|0.0021' & @CRLF & _ '8|0.3337|0.0023' & @CRLF & _ '9|0.3563|0.0024' & @CRLF & _ '10|0.3803|0.0027' & @CRLF & _ '11|0.4071|0.0032' & @CRLF & _ '12|0.4387|0.0037' & @CRLF & _ '13|0.4758|0.0044' & @CRLF & _ '14|0.5197|0.005' & @CRLF & _ '15|0.5693|0.0051' & @CRLF & _ '16|0.6202|0.0055' & @CRLF & _ '17|0.6751|0.0057' & @CRLF & _ '18|0.7322|0.006' & @CRLF & _ '19|0.7923|0.0062' & @CRLF & _ '20|0.8545|0.0065' & @CRLF & _ '21|0.9197|0.0065' & @CRLF & _ '22|0.9846|0.0062' & @CRLF & _ '23|1.0462|0.0064' & @CRLF & _ '24|1.1106|0.0066' & @CRLF & _ '25|1.1767|0.0069' & @CRLF & _ '26|1.2452|0.007' & @CRLF & _ '27|1.3148|0.0071' & @CRLF & _ '28|1.3863|0.0074' & @CRLF & _ '29|1.4605|0.0073' & @CRLF & _ '30|1.5334|0.0074' & @CRLF & _ '31|1.6071|0.0078' & @CRLF & _ '32|1.6847|0.0078' & @CRLF & _ '33|1.7628|0.0079' & @CRLF & _ '34|1.8418|0.008' & @CRLF & _ '35|1.9222|0.0082' & @CRLF & _ '36|2.0045|0.0083' & @CRLF & _ '37|2.0874|0.0083' & @CRLF & _ '38|2.1708|0.0084' & @CRLF & _ '39|2.2553|0.0086' & @CRLF & _ '40|2.3411|0.0088' & @CRLF & _ '41|2.4293|0.0086' & @CRLF & _ '42|2.5157|0.0089' & @CRLF & _ '43|2.6045|0.009' & @CRLF & _ '44|2.6944|0.0092' & @CRLF & _ '45|2.786|0.0092' & @CRLF & _ '46|2.8776|0.0094' & @CRLF & _ '47|2.9716|0.0093' & @CRLF & _ '48|3.0642|0.0093' & @CRLF & _ '49|3.1574|0.0094' & @CRLF & _ '50|3.2512|0.0095' & @CRLF & _ '51|3.346|0.0096' & @CRLF & _ '52|3.4425|0.0099' & @CRLF & _ '53|3.5413|0.0097' & @CRLF & _ '54|3.6387|0.01' & @CRLF & _ '55|3.739|0.0099' & @CRLF & _ '56|3.8383|0.0098' & @CRLF & _ '57|3.9364|0.0101' & @CRLF & _ '58|4.0377|0.0101' & @CRLF & _ '59|4.1387|0.0101' & @CRLF & _ '60|4.2394|0.01' & @CRLF & _ '61|4.3394|0.0099' & @CRLF & _ '62|4.4384|0.0103' & @CRLF & _ '63|4.5411|0.0103' & @CRLF & _ '64|4.6443|0.0104' & @CRLF & _ '65|4.7481|0.0105' & @CRLF & _ '66|4.8528|0.0106' & @CRLF & _ '67|4.959|0.0108' & @CRLF & _ '68|5.0673|0.0106' & @CRLF & _ '69|5.1737|0.0109' & @CRLF & _ '70|5.2824|0.0107' & @CRLF & _ '71|5.3895|0.011' & @CRLF & _ '72|5.4991|0.0108' & @CRLF & _ '73|5.6075|0.0112' & @CRLF & _ '74|5.7193|0.0112' & @CRLF & _ '75|5.8308|0.0111' & @CRLF & _ '76|5.9422|0.0111' & @CRLF & _ '77|6.0531|0.011' & @CRLF & _ '78|6.1635|0.011' & @CRLF & _ '79|6.273|0.0113' & @CRLF & _ '80|6.3864|0.0114' & @CRLF & _ '81|6.5004|0.0115' & @CRLF & _ '82|6.6154|0.0117' & @CRLF & _ '83|6.732|0.0114' & @CRLF & _ '84|6.8457|0.0115' & @CRLF & _ '85|6.9602|0.0116' & @CRLF & _ '86|7.0759|0.0117' & @CRLF & _ '87|7.1933|0.0115' & @CRLF & _ '88|7.3085|0.0117' & @CRLF & _ '89|7.4251|0.0119' & @CRLF & _ '90|7.544|0.0117' & @CRLF & _ '91|7.6612|0.012' & @CRLF & _ '92|7.7811|0.0119' & @CRLF & _ '93|7.8998|0.0117' & @CRLF & _ '94|8.0168|0.0119' & @CRLF & _ '95|8.136|0.0118' & @CRLF & _ '96|8.2539|0.0121' & @CRLF & _ '97|8.3746|0.012' & @CRLF & _ '98|8.4946|0.0119' & @CRLF & _ '99|8.6135|0.0122' & @CRLF & _ '100|8.7358|0.0122' & @CRLF & _ '101|8.858|0.0122' & @CRLF & _ '102|8.9802|0.0122' & @CRLF & _ '103|9.1025|0.0122' & @CRLF & _ '104|9.2247|0.0122' & @CRLF & _ '105|9.347|0.0122' & @CRLF & _ '106|9.4693|0.0122' & @CRLF & _ '107|9.5917|0.0122' & @CRLF & _ '108|9.714|0.0122' & @CRLF & _ '109|9.8364|0.0123' & @CRLF & _ '110|9.959|0.0123' & @CRLF & _ '111|10.0816|0.0123' & @CRLF & _ '112|10.2045|0.0123' & @CRLF & _ '113|10.3278|0.0124' & @CRLF & _ '114|10.4514|0.0124' & @CRLF & _ '115|10.5758|0.0126' & @CRLF & _ '116|10.7013|0.0127' & @CRLF & _ '117|10.8284|0.0124' & @CRLF & _ '118|10.9529|0.0126' & @CRLF & _ '119|11.0785|0.0127' & @CRLF & _ '120|11.2059|0.0125' & @CRLF & _ '121|11.3305|0.0126' & @CRLF & _ '122|11.4564|0.0123' & @CRLF & _ '123|11.5791|0.0128' & @CRLF & _ '124|11.7071|0.0126' & @CRLF & _ '125|11.8329|0.0128' & @CRLF & _ '126|11.9605|0.0125' & @CRLF & _ '127|12.0856|0.0127' & @CRLF & _ '128|12.2121|0.0129' & @CRLF & _ '129|12.3408|0.0127' & @CRLF & _ '130|12.4676|0.0129' & @CRLF & _ '131|12.5966|0.0127' & @CRLF & _ '132|12.7241|0.013' & @CRLF & _ '133|12.8541|0.0129' & @CRLF & _ '134|12.9829|0.0127' & @CRLF & _ '135|13.1099|0.0129' & @CRLF & _ '136|13.2393|0.0128' & @CRLF & _ '137|13.3673|0.0126' & @CRLF & _ '138|13.4929|0.0127' & @CRLF & _ '139|13.6202|0.013' & @CRLF & _ '140|13.7501|0.0129' & @CRLF & _ '141|13.8786|0.0127' & @CRLF & _ '142|14.0053|0.0129' & @CRLF & _ '143|14.1343|0.0127' & @CRLF & _ '144|14.2615|0.013' & @CRLF & _ '145|14.3912|0.0128' & @CRLF & _ '146|14.5196|0.0126' & @CRLF & _ '147|14.6458|0.0128' & @CRLF & _ '148|14.774|0.0126' & @CRLF & _ '149|14.9002|0.0128' & @CRLF & _ '150|15.0284|0.0126' & @CRLF & _ '151|15.1544|0.0128' & @CRLF & _ '152|15.2823|0.0126' & @CRLF & _ '153|15.408|0.0127' & @CRLF & _ '154|15.5353|0.0125' & @CRLF & _ '155|15.6602|0.0126' & @CRLF & _ '156|15.7863|0.0128' & @CRLF & _ '157|15.9145|0.0131' & @CRLF & _ '158|16.0455|0.013' & @CRLF & _ '159|16.1759|0.0124' & @CRLF & _ '160|16.3|0.0125' & @CRLF & _ '161|16.4252|0.0127' & @CRLF & _ '162|16.5518|0.0124' & @CRLF & _ '163|16.6756|0.0124' & @CRLF & _ '164|16.8001|0.0121' & @CRLF & _ '165|16.9206|0.012' & @CRLF & _ '166|17.0403|0.0123' & @CRLF & _ '167|17.1637|0.0124' & @CRLF & _ '168|17.2878|0.0125' & @CRLF & _ '169|17.4128|0.0121' & @CRLF & _ '170|17.5341|0.0121' & @CRLF & _ '171|17.6549|0.012' & @CRLF & _ '172|17.7751|0.0124' & @CRLF & _ '173|17.8994|0.012' & @CRLF & _ '174|18.0196|0.0119' & @CRLF & _ '175|18.1387|0.0123' & @CRLF & _ '176|18.2613|0.0123' & @CRLF & _ '177|18.3841|0.0123' & @CRLF & _ '178|18.5073|0.0124' & @CRLF & _ '179|18.631|0.0119' & @CRLF & _ '180|18.7501|0.0118' & @CRLF & _ '181|18.8679|0.0121' & @CRLF & _ '182|18.9885|0.012' & @CRLF & _ '183|19.1083|0.0119' & @CRLF & _ '184|19.2268|0.0117' & @CRLF & _ '185|19.3435|0.0119' & @CRLF & _ '186|19.4624|0.0117' & @CRLF & _ '187|19.5798|0.0115' & @CRLF & _ '188|19.6947|0.0116' & @CRLF & _ '189|19.811|0.0118' & @CRLF & _ '190|19.9295|0.0117' & @CRLF & _ '191|20.046|0.0114' & @CRLF & _ '192|20.1598|0.0115' & @CRLF & _ '193|20.2744|0.0116' & @CRLF & _ '194|20.3903|0.0113' & @CRLF & _ '195|20.5029|0.0113' & @CRLF & _ '196|20.616|0.0114' & @CRLF & _ '197|20.7296|0.0114' & @CRLF & _ '198|20.8439|0.0115' & @CRLF & _ '199|20.9593|0.0112' & @CRLF & _ '200|21.0713|0.0112' & @CRLF & _ '201|21.1833|0.0112' & @CRLF & _ '202|21.2952|0.0112' & @CRLF & _ '203|21.407|0.0112' & @CRLF & _ '204|21.5189|0.0112' & @CRLF & _ '205|21.6306|0.0112' & @CRLF & _ '206|21.7422|0.0111' & @CRLF & _ '207|21.8535|0.0111' & @CRLF & _ '208|21.9644|0.011' & @CRLF & _ '209|22.0748|0.0104' & @CRLF & _ '210|22.1792|0.0106' & @CRLF & _ '211|22.285|0.0103' & @CRLF & _ '212|22.3875|0.0103' & @CRLF & _ '213|22.4904|0.0103' & @CRLF & _ '214|22.5938|0.0104' & @CRLF & _ '215|22.698|0.01' & @CRLF & _ '216|22.7982|0.01' & @CRLF & _ '217|22.8977|0.0103' & @CRLF & _ '218|23.0011|0.0099' & @CRLF & _ '219|23.1001|0.0098' & @CRLF & _ '220|23.1977|0.0101' & @CRLF & _ '221|23.2982|0.01' & @CRLF & _ '222|23.3982|0.0099' & @CRLF & _ '223|23.4972|0.0097' & @CRLF & _ '224|23.5947|0.0095' & @CRLF & _ '225|23.69|0.0097' & @CRLF & _ '226|23.7872|0.0095' & @CRLF & _ '227|23.882|0.0094' & @CRLF & _ '228|23.9759|0.0092' & @CRLF & _ '229|24.0684|0.0093' & @CRLF & _ '230|24.1612|0.0093' & @CRLF & _ '231|24.2546|0.0089' & @CRLF & _ '232|24.3438|0.009' & @CRLF & _ '233|24.4343|0.009' & @CRLF & _ '234|24.5241|0.0089' & @CRLF & _ '235|24.613|0.0087' & @CRLF & _ '236|24.6997|0.0088' & @CRLF & _ '237|24.7874|0.0086' & @CRLF & _ '238|24.8731|0.0085' & @CRLF & _ '239|24.9582|0.0084' & @CRLF & _ '240|25.0426|0.0081' & @CRLF & _ '241|25.1235|0.0081' & @CRLF & _ '242|25.2041|0.008' & @CRLF & _ '243|25.2841|0.0079' & @CRLF & _ '244|25.3636|0.0078' & @CRLF & _ '245|25.442|0.0077' & @CRLF & _ '246|25.5188|0.0077' & @CRLF & _ '247|25.5958|0.0077' & @CRLF & _ '248|25.6732|0.0071' & @CRLF & _ '249|25.7444|0.0071' & @CRLF & _ '250|25.8154|0.0071' & @CRLF & _ '251|25.8862|0.0069' & @CRLF & _ '252|25.9548|0.0069' & @CRLF & _ '253|26.0239|0.0068' & @CRLF & _ '254|26.092|0.0067' & @CRLF & _ '255|26.1585|0.0064' & @CRLF & _ '256|26.2225|0.0063' & @CRLF & _ '257|26.2855|0.0061' & @CRLF & _ '258|26.3468|0.0062' & @CRLF & _ '259|26.4083|0.0062' & @CRLF & _ '260|26.47|0.0059' & @CRLF & _ '261|26.5295|0.0056'
- 13 replies
-
Hello everyone, I have huge problem with "Recurison level has been exceeded - AutoIt will quit to prevent stack overflow" in my own Bot. I have no idea how rebuild my loops for eliminate this type of error. Here is my code #Region #AutoIt3Wrapper_Icon=C:\Users\barbosa\Desktop\autoIt\produkcja\angelica.ico #AutoIt3Wrapper_Compression=4 #AutoIt3Wrapper_Res_Fileversion=1.0 #AutoIt3Wrapper_Res_Fileversion_AutoIncrement=y #AutoIt3Wrapper_Run_Obfuscator=y #EndRegion #Region ; GUI generated by GUIBuilderNxt Prototype 1.0 #include <Constants.au3> #include <GUIConstantsEx.au3> #include <Misc.au3> #include <WindowsConstants.au3> #include <ButtonConstants.au3> #include <EditConstants.au3> #include <StaticConstants.au3> ;#include <nomad.au3> HotKeySet("{end}","stop") ;end for app kill Local Const $sFont = "Open Sans" ;font variable Local $sFile = "angelica.ico" ;icon variable Global $MainStyle = BitOR($WS_OVERLAPPED, $WS_CAPTION, $WS_SYSMENU, $WS_VISIBLE, $WS_CLIPSIBLINGS, $WS_MINIMIZEBOX, $FW_SEMIBOLD = 600) Global $info_task = "[ Waiting for calibration ]",$info_battlelist = "None",$info_empty = "None",$info_hotkeys = "INACTIVE",$info_100 = "None",$info_mana = "None",$info_food = "None",$info_blank = "None",$info_drop = "None",$info_hand = "None" Global $hMain = GuiCreate("Auto_Angela_Beta_1.0", 330, 559, -1, -1, $MainStyle) GUISetIcon($sFile) $label_100 = GuiCtrlCreateLabel("[F4] Mana Point "&" "&$info_100, 20, 40, 170, 20,-1) $label_mana = GuiCtrlCreateLabel("[F5] Mana Bar "&" "&$info_mana, 20, 60, 170, 20,-1) $label_empty = GuiCtrlCreateLabel("[F6] Nothing "&" "&$info_empty, 20, 80, 170, 20,-1) $label_battlelist = GuiCtrlCreateLabel("[F7] Battle List "&" "&$info_battlelist, 20, 100, 170, 20,-1) $label_food = GuiCtrlCreateLabel("[F8] Food "&" "&$info_food, 20, 120, 170, 20,-1) $label_blank = GuiCtrlCreateLabel("[F9] Blank "&" "&$info_blank, 20, 140, 170, 20,-1) $label_drop = GuiCtrlCreateLabel("[F10] Drop "&" "&$info_drop, 20, 160, 170, 20,-1) $label_hand = GuiCtrlCreateLabel("[F11] Hand "&" "&$info_hand, 20, 180, 170, 20,-1) $Group_11 = GuiCtrlCreateGroup("Configuration", 10, 10, 190, 220,-1) $Group_12 = GuiCtrlCreateGroup("Setup", 210, 10, 110, 220,-1) $btn_setting = GuiCtrlCreateButton("Setup", 220, 40, 70, 30,-1) $btn_load = GuiCtrlCreateButton("Load", 220, 100, 70, 30,-1) $btn_save = GuiCtrlCreateButton("Save", 220, 140, 70, 30,-1) $label_hotkeys = GuiCtrlCreateLabel("Status: "&$info_hotkeys, 220, 190, 90, 20,-1) $input_spell = GuiCtrlCreateInput("Adura Vita", 20, 270, 120, 20,-1) $box_house_mode = GuiCtrlCreateCheckbox("House mode", 20, 300, 90, 20,-1) $box_pk_mode = GuiCtrlCreateCheckbox("Anty PK", 20, 330, 90, 20,-1) $Checkbox_20 = GuiCtrlCreateCheckbox("Alarms", 20, 360, 90, 20,-1) $Checkbox_21 = GuiCtrlCreateCheckbox("Anty Idle", 20, 390, 90, 20,-1) $btn_auto = GuiCtrlCreateButton("Start", 200, 360, 70, 30,-1) $btn_refiler = GuiCtrlCreateButton("Rune thrower", 200, 400, 70, 20,-1);$btn_manual = GuiCtrlCreateButton("Start", 200, 360, 70, 30,-1) $Input_22 = GuiCtrlCreateInput("down", 140, 300, 60, 20,-1) $Input_23 = GuiCtrlCreateInput("up", 210, 300, 60, 20,-1) $Group_24 = GuiCtrlCreateGroup("Mode", 10, 250, 310, 180,-1) GUISetFont(9, $FW_SEMIBOLD) ;white color and bigger font ;$label_task = GuiCtrlCreateLabel($info_task, 10, 450, 370, 24,-1) GUICtrlSetColor($label_task, 0xffffff) GUISetFont(9, $FW_MEDIUM) $Label_28 = GuiCtrlCreateLabel("Auto_Angela_Beta 1.1 @ Medivia 2016", 60, 530, 370, 20,-1) Global $way_one Global $way_one Global $food_pos_x,$food_pos_y Global $hand_pos_x,$hand_pos_y Global $drop_pos_x,$drop_pos_y Global $blank_pos_x, $blank_pos_y Global $RunOrNot Global $pid Global $hotkeys = 0 ;By default hotkeys are disabled Global $mana_color, $battle_color Global $mana_100_x,$mana_100_y Global $mana_pixel_x, $mana_pixel_y Global $empty_pixel_x = 000, $empty_pixel_y = 000 Global $battle_pixel_x, $battle_pixel_y Global $is_break ;Global $MapClickEscape_x, $MapClickEscape_y ;GUICtrlSetDefColor(0xFF0000) GUISetBkColor(0x788190) ; will change background color ;GUICtrlSetBkColor($label_hand, 0xF0F4F9) GuiSetState(@SW_SHOWNORMAL) Do Switch GuiGetMsg() Case $GUI_EVENT_CLOSE ExitLoop Case $btn_setting _EnableDisable() ;function which make hotkeys enable/disable Case $btn_auto IF $info_food <> "None" OR $info_blank <> "None" OR $info_drop <> "None" OR $info_hand <> "None" OR $info_100 <> "None" OR $info_mana <> "None" Then ;simple validation data in possitions variables check_mana() ;Function is first in chain for making runes Else MsgBox(0, "Error", "You must setup coordinations") EndIf Case $btn_load load_from_file() ;load data from text file Case $btn_save save_to_file() ;dave data in text file Case $btn_refiler refiler() ;for fast refile EndSwitch Until False #EndRegion ;Func uher() ;x,y postaci = F10 DROP ;x,y uha w plecaku = F9 Blank ;kolor uha pobrany przy ustawieniu ;kolor plecaka = F6 BP Color ;odpowienio przygotowane staki plecakow ;co 400ms sprawdza czy jest dosc hp na uha ;jesli trzeba sie uchnac to sprawdza czy w miejscu na uha jest niebieska runa ;jesli nie ma to sprawdza czy jest yellow bp jesli nie ma to sygnal dzwiekowy bledu i kill uhera ;jesli jest to otwiera plecak i sprawdza czy jest niebieska runa jak nie ma to error i kill uhera ;jesli jest to ja przeciaga na postac bardzo szybko ;EndFunc Func refiler() local $i = 20 While $i > 0 MouseClickDrag($MOUSE_CLICK_LEFT, $blank_pos_x, $blank_pos_y, $drop_pos_x, $drop_pos_y, 1) $i = $i - 1 WEnd EndFunc Func save_to_file() $file = FileOpen("angela_memory.txt", 1) If $file = -1 Then MsgBox(0, "Error", "Unable to save data.") Else FileWrite($file, $mana_100_x & @CRLF) FileWrite($file, $mana_100_y & @CRLF) FileWrite($file, $mana_pixel_x & @CRLF) FileWrite($file, $mana_pixel_y & @CRLF) FileWrite($file, $empty_pixel_x & @CRLF) FileWrite($file, $empty_pixel_y & @CRLF) FileWrite($file, $battle_pixel_x & @CRLF) FileWrite($file, $battle_pixel_y & @CRLF) FileWrite($file, $food_pos_x & @CRLF) FileWrite($file, $food_pos_y & @CRLF) FileWrite($file, $blank_pos_x & @CRLF) FileWrite($file, $blank_pos_y & @CRLF) FileWrite($file, $drop_pos_x & @CRLF) FileWrite($file, $drop_pos_y & @CRLF) FileWrite($file, $hand_pos_x & @CRLF) FileWrite($file, $hand_pos_y & @CRLF) MsgBox(0, "Done", "Settings saved.") EndIf EndFunc Func load_from_file() $file = FileOpen("angela_memory.txt", $FO_READ) If $file = -1 Then MsgBox(0, "Error", "Unable to load data.") Else ;wczytywanie segmentow $mana_100_x = FileReadLine($file, 1) $mana_100_y = FileReadLine($file, 2) $info_100 = "X: "&$mana_100_x&" "&"Y: "&$mana_100_y GUICtrlSetData($label_100, "[F4] Mana point "&" "&$info_100) ;;;; $mana_pixel_x = FileReadLine($file, 3) $mana_pixel_y = FileReadLine($file, 4) $info_mana = "X: "&$mana_pixel_x&" "&"Y: "&$mana_pixel_y GUICtrlSetData($label_mana, "[F5] Mana Bar "&" "&$info_mana) ;;;; $empty_pixel_x = FileReadLine($file, 5) $empty_pixel_y = FileReadLine($file, 6) $info_empty = "X: "&$empty_pixel_x&" "&"Y: "&$empty_pixel_y GUICtrlSetData($label_empty, "[F6] Nothing "&" "&$info_empty) ;;;; $battle_pixel_x = FileReadLine($file, 7) $battle_pixel_y = FileReadLine($file, 8) $info_battlelist = "X: "&$battle_pixel_x&" "&"Y: "&$battle_pixel_y GUICtrlSetData($label_battlelist, "[F7] Battle List "&" "&$info_battlelist) ;;;; $food_pos_x = FileReadLine($file, 9) $food_pos_y = FileReadLine($file, 10) $info_food = "X: "&$food_pos_x&" "&"Y: "&$food_pos_y GUICtrlSetData($label_food, "[F8] Food "&" "&$info_food) ;;;; $blank_pos_x = FileReadLine($file, 11) $blank_pos_y = FileReadLine($file, 12) $info_blank = "X: "&$blank_pos_x&" "&"Y: "&$blank_pos_y GUICtrlSetData($label_blank, "[F9] Blank "&" "&$info_blank) ;;;; $drop_pos_x = FileReadLine($file, 13) $drop_pos_y = FileReadLine($file, 14) $info_drop = "X: "&$drop_pos_x&" "&"Y: "&$drop_pos_y GUICtrlSetData($label_drop, "[F10] Drop "&" "&$info_drop) ;;;; $hand_pos_x = FileReadLine($file, 15) $hand_pos_y = FileReadLine($file, 16) $info_hand = "X: "&$hand_pos_x&" "&"Y: "&$hand_pos_y GUICtrlSetData($label_hand, "[F11] Hand "&" "&$info_hand) ;;;; FileClose($file) MsgBox(0, "Done", "Settings loaded") EndIf EndFunc Func stop() Exit EndFunc Func kill() Exit 0 EndFunc ;functions checking if checkbox checked Func _IsChecked_pk_mode($box_pk_mode) Return BitAND(GUICtrlRead($box_pk_mode), $GUI_CHECKED) = $GUI_CHECKED EndFunc ;==>_IsChecked Func _IsChecked_house_mode($box_house_mode) Return BitAND(GUICtrlRead($box_house_mode), $GUI_CHECKED) = $GUI_CHECKED EndFunc ;==>_IsChecked Func floor_maker() ;GUICtrlSetData($label_task, "[ Burning rune.. ]") $spell_name = GUICtrlRead($input_spell) $way_one = GUICtrlRead($Input_22) $way_two = GUICtrlRead($Input_23) If _IsChecked_house_mode($box_house_mode) Then ControlSend("Medivia","","", "{" & $way_one & "}" ) EndIf Sleep(1000) MouseClickDrag($MOUSE_CLICK_LEFT, $blank_pos_x, $blank_pos_y, $hand_pos_x, $hand_pos_y, 2) ControlSend("Medivia","","",$spell_name) ControlSend("Medivia","","","{enter}") MouseClickDrag($MOUSE_CLICK_LEFT, $hand_pos_x, $hand_pos_y, $drop_pos_x, $drop_pos_y, 2) Sleep(300) MouseClick($MOUSE_CLICK_RIGHT, $food_pos_x, $food_pos_y, 4, 10) Sleep(400) MouseClick($MOUSE_CLICK_RIGHT, $food_pos_x, $food_pos_y, 4, 10) Sleep(300) If _IsChecked_house_mode($box_house_mode) Then ControlSend("Medivia","","", "{" & $way_two & "}" ) EndIf Beep(1000, 150) check_mana() EndFunc Func _EnableDisable() If $hotkeys = 0 Then HotKeySet("{F4}", "mana_100") HotKeySet("{F5}", "mana_get_color") ;HotKeySet("{F6}", "MapClickEscape") HotKeySet("{F7}", "battle_get_color");Pobiera kolor do zmiennej $battle_color HotKeySet("{F8}", "mouse_pos_food") HotKeySet("{F9}", "mouse_pos_blank") HotKeySet("{F10}", "mouse_pos_drop") HotKeySet("{F11}", "mouse_pos_hand") $hotkeys = 1 $info_hotkeys = "ACTIVE" GUICtrlSetData($label_hotkeys, "Status: "&" "&$info_hotkeys) GUICtrlSetData($label_task, "[ Calibration in progress ]") Else HotKeySet("{F4}") HotKeySet("{F5}") HotKeySet("{F6}") HotKeySet("{F7}") HotKeySet("{F8}") HotKeySet("{F9}") HotKeySet("{F10}") HotKeySet("{F11}") $hotkeys = 0 $info_hotkeys = "INACTIVE" GUICtrlSetData($label_hotkeys, "Status: "&" "&$info_hotkeys) GUICtrlSetData($label_task, "[ End of calibration ]") EndIf EndFunc Func check_mana() ;sleep(700) ;IsSafty() $current_color = PixelGetColor($mana_100_x,$mana_100_y) ;Taking current color from defined mana break point on maan bar $BattleListColor = PixelGetColor($battle_pixel_x, $battle_pixel_y) ;Taking current color from defined posiotion on battle list If _IsChecked_pk_mode($box_pk_mode) Then ;only if pk_mode checkbox is checked If $BattleListColor = $battle_color Then ;If collor on battle list point didnt change, means nothing (player/monster) enter on out screen $RunOrNot = True Else $RunOrNot = False EndIf EndIf If Not ($RunOrNot = False) Then ;If variable RunOrNot are not false it mean is true = is safe If $mana_color = $current_color Then ;If mana color flood mana bar break point floor_maker() ;rune making function Else ;GUICtrlSetData($label_task, "[ Waiting for mana.. ]") Sleep(1000) check_mana() ;Mana arnt ready so back to mana checking EndIf Else ;If not safty then run escape function runforestrun() EndIf EndFunc Func runforestrun() $way_one = GUICtrlRead($Input_22) $way_two = GUICtrlRead($Input_23) ControlSend("Medivia","","", "{" & $way_one & "}" ) Sleep(5000) Do ;GUICtrlSetData($label_task, "[ Not safty outside!! ]") Beep(700,300) Beep(200,500) Sleep(5000) ;IsSafty() $BattleListColor = PixelGetColor($battle_pixel_x, $battle_pixel_y) If $BattleListColor = $battle_color Then $RunOrNot = True Else $RunOrNot = False EndIf Until $RunOrNot = True MouseClick($MOUSE_CLICK_RIGHT, $food_pos_x, $food_pos_y, 4) Sleep(1000) ControlSend("Medivia","","", "{" & $way_two & "}" ) Sleep(2000) check_mana() EndFunc Func mana_100() $pos = MouseGetPos() $mana_100_x = $pos[0] $mana_100_y = $pos[1] $info_100 = "X: "&$mana_100_x&" "&"Y: "&$mana_100_y GUICtrlSetData($label_100, "[F4] Mana point "&" "&$info_100) EndFunc Func mana_get_color() $pos = MouseGetPos() $mana_pixel_x = $pos[0] $mana_pixel_y = $pos[1] $mana_color = PixelGetColor($mana_pixel_x, $mana_pixel_y) $info_mana = "X: "&$mana_pixel_x&" "&"Y: "&$mana_pixel_y GUICtrlSetData($label_mana, "[F5] Mana Bar "&" "&$info_mana) EndFunc Func battle_get_color() $pos = MouseGetPos() $battle_pixel_x = $pos[0] $battle_pixel_y = $pos[1] $battle_color = PixelGetColor($battle_pixel_x, $battle_pixel_y) $info_battlelist = "X: "&$battle_pixel_x&" "&"Y: "&$battle_pixel_y GUICtrlSetData($label_battlelist, "[F7] Battle List "&" "&$info_battlelist) EndFunc Func mouse_pos_food() $pos = MouseGetPos() $food_pos_x = $pos[0] $food_pos_y = $pos[1] $info_food = "X: "&$food_pos_x&" "&"Y: "&$food_pos_y GUICtrlSetData($label_food, "[F8] Food "&" "&$info_food) EndFunc Func mouse_pos_hand() $pos = MouseGetPos() $hand_pos_x = $pos[0] $hand_pos_y = $pos[1] $info_hand = "X: "&$hand_pos_x&" "&"Y: "&$hand_pos_y GUICtrlSetData($label_hand, "[F11] Hand "&" "&$info_hand) EndFunc Func mouse_pos_drop() $pos = MouseGetPos() $drop_pos_x = $pos[0] $drop_pos_y = $pos[1] $info_drop = "X: "&$drop_pos_x&" "&"Y: "&$drop_pos_y GUICtrlSetData($label_drop, "[F10] Drop "&" "&$info_drop) EndFunc Func mouse_pos_blank() $pos = MouseGetPos() $blank_pos_x = $pos[0] $blank_pos_y = $pos[1] $info_blank = "X: "&$blank_pos_x&" "&"Y: "&$blank_pos_y GUICtrlSetData($label_blank, "[F9] Blank "&" "&$info_blank) EndFunc Func afk() ControlSend("Medivia","","","{ctrldown}{down}{ctrlup}") Sleep(350) ControlSend("Medivia","","","{ctrldown}{up}{ctrlup}") EndFunc
- 4 replies
-
- bot
- stack overflow
-
(and 2 more)
Tagged with: