Guest User

Untitled

a guest
Feb 19th, 2014
356
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 82.04 KB | None | 0 0
  1. Opt("TrayIconHide", 1)
  2. Opt("TrayMenuMode", 1)
  3. Opt("TrayOnEventMode", 1)
  4. If @OSVersion = "WIN_XP" Then MsgBox(64, "", "Aktualna wersja programu WF Iris Bot nie działa poprawnie na Twojej wersji systemu operacyjnego." & @CRLF & "W razie problemów zmień oprogramowanie na nowsze, aby program działał prawidłowo." & @CRLF & @CRLF & "OS: " & @OSVersion)
  5. Global Const $gui_event_close = -3
  6. Global Const $gui_event_minimize = -4
  7. Global Const $gui_checked = 1
  8. Global Const $gui_show = 16
  9. Global Const $gui_hide = 32
  10. Global Const $gui_disable = 128
  11. Global Const $gui_focus = 256
  12. Global Const $gui_bkcolor_transparent = -2
  13. Global Const $ws_minimizebox = 131072
  14. Global Const $ws_sysmenu = 524288
  15. Global Const $ws_caption = 12582912
  16. Global Const $ws_popup = -2147483648
  17. Global Const $gui_ss_default_gui = BitOR($ws_minimizebox, $ws_caption, $ws_popup, $ws_sysmenu)
  18. Global Const $es_left = 0
  19. Global Const $es_password = 32
  20. Global Const $es_autovscroll = 64
  21. Global Const $es_autohscroll = 128
  22. Global Const $es_wantreturn = 4096
  23. Global Const $__editconstant_ws_vscroll = 2097152
  24. Global Const $__editconstant_ws_hscroll = 1048576
  25. Global Const $gui_ss_default_edit = BitOR($es_wantreturn, $__editconstant_ws_vscroll, $__editconstant_ws_hscroll, $es_autovscroll, $es_autohscroll)
  26. Global Const $gui_ss_default_input = BitOR($es_left, $es_autohscroll)
  27. Global Const $cbs_autohscroll = 64
  28. Global Const $cbs_dropdown = 2
  29. Global Const $cbs_dropdownlist = 3
  30. Global Const $__comboboxconstant_ws_vscroll = 2097152
  31. Global Const $gui_ss_default_combo = BitOR($cbs_dropdown, $cbs_autohscroll, $__comboboxconstant_ws_vscroll)
  32. Global Const $ss_center = 1
  33. Global Const $ss_bitmap = 14
  34.  
  35. Func a2d00401947($s_string, $s_start, $s_end, $v_case = -1)
  36. Local $s_case = ""
  37. If $v_case = Default OR $v_case = -1 Then $s_case = "(?i)"
  38. Local $s_pattern_escape = "(\.|\||\*|\?|\+|\(|\)|\{|\}|\[|\]|\^|\$|\\)"
  39. $s_start = StringRegExpReplace($s_start, $s_pattern_escape, "\\$1")
  40. $s_end = StringRegExpReplace($s_end, $s_pattern_escape, "\\$1")
  41. If $s_start = "" Then $s_start = "\A"
  42. If $s_end = "" Then $s_end = "\z"
  43. Local $a_ret = StringRegExp($s_string, "(?s)" & $s_case & $s_start & "(.*?)" & $s_end, 3)
  44. If @error Then Return SetError(1, 0, 0)
  45. Return $a_ret
  46. EndFunc
  47.  
  48. Global Const $bs_left = 256
  49. Global Const $bs_bitmap = 128
  50. Global Const $gui_ss_default_checkbox = 0
  51. Global Const $bm_getimage = 246
  52. Global Const $bm_setimage = 247
  53. Global Const $gwl_style = -16
  54. Global Const $image_bitmap = 0
  55. Global Const $load_library_as_datafile = 2
  56. Global Const $tagpoint = "struct;long X;long Y;endstruct"
  57. Global Const $tagrect = "struct;long Left;long Top;long Right;long Bottom;endstruct"
  58. Global Const $tagsystemtime = "struct;word Year;word Month;word Dow;word Day;word Hour;word Minute;word Second;word MSeconds;endstruct"
  59. Global Const $tagnmhdr = "struct;hwnd hWndFrom;uint_ptr IDFrom;INT Code;endstruct"
  60. Global Const $tagcomboboxexitem = "uint Mask;int_ptr Item;ptr Text;int TextMax;int Image;int SelectedImage;int OverlayImage;" & "int Indent;lparam Param"
  61. Global Const $tagnmcomboboxex = $tagnmhdr & ";uint Mask;int_ptr Item;ptr Text;int TextMax;int Image;" & "int SelectedImage;int OverlayImage;int Indent;lparam Param"
  62. Global Const $tagdtprange = "word MinYear;word MinMonth;word MinDOW;word MinDay;word MinHour;word MinMinute;" & "word MinSecond;word MinMSecond;word MaxYear;word MaxMonth;word MaxDOW;word MaxDay;word MaxHour;" & "word MaxMinute;word MaxSecond;word MaxMSecond;bool MinValid;bool MaxValid"
  63. Global Const $tageventlogrecord = "dword Length;dword Reserved;dword RecordNumber;dword TimeGenerated;dword TimeWritten;dword EventID;" & "word EventType;word NumStrings;word EventCategory;word ReservedFlags;dword ClosingRecordNumber;dword StringOffset;" & "dword UserSidLength;dword UserSidOffset;dword DataLength;dword DataOffset"
  64. Global Const $taggdipstartupinput = "uint Version;ptr Callback;bool NoThread;bool NoCodecs"
  65. Global Const $taggdipimagecodecinfo = "byte CLSID[16];byte FormatID[16];ptr CodecName;ptr DllName;ptr FormatDesc;ptr FileExt;" & "ptr MimeType;dword Flags;dword Version;dword SigCount;dword SigSize;ptr SigPattern;ptr SigMask"
  66. Global Const $taglvitem = "struct;uint Mask;int Item;int SubItem;uint State;uint StateMask;ptr Text;int TextMax;int Image;lparam Param;" & "int Indent;int GroupID;uint Columns;ptr pColumns;ptr piColFmt;int iGroup;endstruct"
  67. Global Const $tagnmlistview = $tagnmhdr & ";int Item;int SubItem;uint NewState;uint OldState;uint Changed;" & "struct;long ActionX;long ActionY;endstruct;lparam Param"
  68. Global Const $tagnmlvcustomdraw = "struct;" & $tagnmhdr & ";dword dwDrawStage;handle hdc;" & $tagrect & ";dword_ptr dwItemSpec;uint uItemState;lparam lItemlParam;endstruct" & ";dword clrText;dword clrTextBk;int iSubItem;dword dwItemType;dword clrFace;int iIconEffect;" & "int iIconPhase;int iPartId;int iStateId;struct;long TextLeft;long TextTop;long TextRight;long TextBottom;endstruct;uint uAlign"
  69. Global Const $tagnmitemactivate = $tagnmhdr & ";int Index;int SubItem;uint NewState;uint OldState;uint Changed;" & $tagpoint & ";lparam lParam;uint KeyFlags"
  70. Global Const $tagmchittestinfo = "uint Size;" & $tagpoint & ";uint Hit;" & $tagsystemtime & ";" & $tagrect & ";int iOffset;int iRow;int iCol"
  71. Global Const $tagmcmonthrange = "word MinYear;word MinMonth;word MinDOW;word MinDay;word MinHour;word MinMinute;word MinSecond;" & "word MinMSeconds;word MaxYear;word MaxMonth;word MaxDOW;word MaxDay;word MaxHour;word MaxMinute;word MaxSecond;" & "word MaxMSeconds;short Span"
  72. Global Const $tagmcrange = "word MinYear;word MinMonth;word MinDOW;word MinDay;word MinHour;word MinMinute;word MinSecond;" & "word MinMSeconds;word MaxYear;word MaxMonth;word MaxDOW;word MaxDay;word MaxHour;word MaxMinute;word MaxSecond;" & "word MaxMSeconds;short MinSet;short MaxSet"
  73. Global Const $tagmcselrange = "word MinYear;word MinMonth;word MinDOW;word MinDay;word MinHour;word MinMinute;word MinSecond;" & "word MinMSeconds;word MaxYear;word MaxMonth;word MaxDOW;word MaxDay;word MaxHour;word MaxMinute;word MaxSecond;" & "word MaxMSeconds"
  74. Global Const $tagnmselchange = $tagnmhdr & ";struct;word BegYear;word BegMonth;word BegDOW;word BegDay;word BegHour;word BegMinute;word BegSecond;word BegMSeconds;endstruct;" & "struct;word EndYear;word EndMonth;word EndDOW;word EndDay;word EndHour;word EndMinute;word EndSecond;word EndMSeconds;endstruct"
  75. Global Const $tagtvitem = "struct;uint Mask;handle hItem;uint State;uint StateMask;ptr Text;int TextMax;int Image;int SelectedImage;" & "int Children;lparam Param;endstruct"
  76. Global Const $tagnmtreeview = $tagnmhdr & ";uint Action;" & "struct;uint OldMask;handle OldhItem;uint OldState;uint OldStateMask;" & "ptr OldText;int OldTextMax;int OldImage;int OldSelectedImage;int OldChildren;lparam OldParam;endstruct;" & "struct;uint NewMask;handle NewhItem;uint NewState;uint NewStateMask;" & "ptr NewText;int NewTextMax;int NewImage;int NewSelectedImage;int NewChildren;lparam NewParam;endstruct;" & "struct;long PointX;long PointY;endstruct"
  77. Global Const $tagnmtvcustomdraw = "struct;" & $tagnmhdr & ";dword DrawStage;handle HDC;" & $tagrect & ";dword_ptr ItemSpec;uint ItemState;lparam ItemParam;endstruct" & ";dword ClrText;dword ClrTextBk;int Level"
  78. Global Const $tagmenuiteminfo = "uint Size;uint Mask;uint Type;uint State;uint ID;handle SubMenu;handle BmpChecked;handle BmpUnchecked;" & "ulong_ptr ItemData;ptr TypeData;uint CCH;handle BmpItem"
  79. Global Const $tagrebarbandinfo = "uint cbSize;uint fMask;uint fStyle;dword clrFore;dword clrBack;ptr lpText;uint cch;" & "int iImage;hwnd hwndChild;uint cxMinChild;uint cyMinChild;uint cx;handle hbmBack;uint wID;uint cyChild;uint cyMaxChild;" & "uint cyIntegral;uint cxIdeal;lparam lParam;uint cxHeader;" & $tagrect & ";uint uChevronState"
  80. Global Const $tagnmrbautosize = $tagnmhdr & ";bool fChanged;" & "struct;long TargetLeft;long TargetTop;long TargetRight;long TargetBottom;endstruct;" & "struct;long ActualLeft;long ActualTop;long ActualRight;long ActualBottom;endstruct"
  81. Global Const $tagnmrebarchildsize = $tagnmhdr & ";uint uBand;uint wID;" & "struct;long CLeft;long CTop;long CRight;long CBottom;endstruct;" & "struct;long BLeft;long BTop;long BRight;long BBottom;endstruct"
  82. Global Const $tagnmtoolbar = $tagnmhdr & ";int iItem;" & "struct;int iBitmap;int idCommand;byte fsState;byte fsStyle;dword_ptr dwData;int_ptr iString;endstruct" & ";int cchText;ptr pszText;" & $tagrect
  83. Global Const $tagopenfilename = "dword StructSize;hwnd hwndOwner;handle hInstance;ptr lpstrFilter;ptr lpstrCustomFilter;" & "dword nMaxCustFilter;dword nFilterIndex;ptr lpstrFile;dword nMaxFile;ptr lpstrFileTitle;dword nMaxFileTitle;" & "ptr lpstrInitialDir;ptr lpstrTitle;dword Flags;word nFileOffset;word nFileExtension;ptr lpstrDefExt;lparam lCustData;" & "ptr lpfnHook;ptr lpTemplateName;ptr pvReserved;dword dwReserved;dword FlagsEx"
  84. Global Const $tagbitmapinfo = "struct;dword Size;long Width;long Height;word Planes;word BitCount;dword Compression;dword SizeImage;" & "long XPelsPerMeter;long YPelsPerMeter;dword ClrUsed;dword ClrImportant;endstruct;dword RGBQuad"
  85. Global Const $tagscrollbarinfo = "dword cbSize;" & $tagrect & ";int dxyLineButton;int xyThumbTop;" & "int xyThumbBottom;int reserved;dword rgstate[6]"
  86. Global Const $taglogfont = "long Height;long Width;long Escapement;long Orientation;long Weight;byte Italic;byte Underline;" & "byte Strikeout;byte CharSet;byte OutPrecision;byte ClipPrecision;byte Quality;byte PitchAndFamily;wchar FaceName[32]"
  87. Global Const $tagstartupinfo = "dword Size;ptr Reserved1;ptr Desktop;ptr Title;dword X;dword Y;dword XSize;dword YSize;dword XCountChars;" & "dword YCountChars;dword FillAttribute;dword Flags;word ShowWindow;word Reserved2;ptr Reserved3;handle StdInput;" & "handle StdOutput;handle StdError"
  88. Global Const $tagtextmetric = "long tmHeight;long tmAscent;long tmDescent;long tmInternalLeading;long tmExternalLeading;" & "long tmAveCharWidth;long tmMaxCharWidth;long tmWeight;long tmOverhang;long tmDigitizedAspectX;long tmDigitizedAspectY;" & "wchar tmFirstChar;wchar tmLastChar;wchar tmDefaultChar;wchar tmBreakChar;byte tmItalic;byte tmUnderlined;byte tmStruckOut;" & "byte tmPitchAndFamily;byte tmCharSet"
  89.  
  90. Func a2d00503f58($ierrcode, $curerr = @error, $curext = @extended)
  91. DllCall("kernel32.dll", "none", "SetLastError", "dword", $ierrcode)
  92. Return SetError($curerr, $curext)
  93. EndFunc
  94.  
  95. Func a0e00601708($hwnd, $imsg, $wparam = 0, $lparam = 0, $ireturn = 0, $wparamtype = "wparam", $lparamtype = "lparam", $sreturntype = "lresult")
  96. Local $aresult = DllCall("user32.dll", $sreturntype, "SendMessageW", "hwnd", $hwnd, "uint", $imsg, $wparamtype, $wparam, $lparamtype, $lparam)
  97. If @error Then Return SetError(@error, @extended, "")
  98. If $ireturn >= 0 AND $ireturn <= 4 Then Return $aresult[$ireturn]
  99. Return $aresult
  100. EndFunc
  101.  
  102. Global Const $hgdi_error = Ptr(-1)
  103. Global Const $invalid_handle_value = Ptr(-1)
  104. Global Const $kf_extended = 256
  105. Global Const $kf_altdown = 8192
  106. Global Const $kf_up = 32768
  107. Global Const $llkhf_extended = BitShift($kf_extended, 8)
  108. Global Const $llkhf_altdown = BitShift($kf_altdown, 8)
  109. Global Const $llkhf_up = BitShift($kf_up, 8)
  110. Global Const $tagmemorystatusex = "dword Length;dword MemoryLoad;" & "uint64 TotalPhys;uint64 AvailPhys;uint64 TotalPageFile;uint64 AvailPageFile;" & "uint64 TotalVirtual;uint64 AvailVirtual;uint64 AvailExtendedVirtual"
  111.  
  112. Func a1400701660($hobject)
  113. Local $aresult = DllCall("gdi32.dll", "bool", "DeleteObject", "handle", $hobject)
  114. If @error Then Return SetError(@error, @extended, False)
  115. Return $aresult[0]
  116. EndFunc
  117.  
  118. Func a4c00802831($hmodule)
  119. Local $aresult = DllCall("kernel32.dll", "bool", "FreeLibrary", "handle", $hmodule)
  120. If @error Then Return SetError(@error, @extended, False)
  121. Return $aresult[0]
  122. EndFunc
  123.  
  124. Func a5b00903d1c($hwnd)
  125. If NOT IsHWnd($hwnd) Then $hwnd = GUICtrlGetHandle($hwnd)
  126. Local $aresult = DllCall("user32.dll", "int", "GetClassNameW", "hwnd", $hwnd, "wstr", "", "int", 4096)
  127. If @error Then Return SetError(@error, @extended, False)
  128. Return SetExtended($aresult[0], $aresult[2])
  129. EndFunc
  130.  
  131. Func a4600a03548($hwnd)
  132. Local $aresult = DllCall("user32.dll", "int", "GetDlgCtrlID", "hwnd", $hwnd)
  133. If @error Then Return SetError(@error, @extended, 0)
  134. Return $aresult[0]
  135. EndFunc
  136.  
  137. Func a4e00b00643($smodulename)
  138. Local $smodulenametype = "wstr"
  139. If $smodulename = "" Then
  140. $smodulename = 0
  141. $smodulenametype = "ptr"
  142. EndIf
  143. Local $aresult = DllCall("kernel32.dll", "handle", "GetModuleHandleW", $smodulenametype, $smodulename)
  144. If @error Then Return SetError(@error, @extended, 0)
  145. Return $aresult[0]
  146. EndFunc
  147.  
  148. Func a3d00c0600c($hwnd, $iindex)
  149. Local $sfuncname = "GetWindowLongW"
  150. If @AutoItX64 Then $sfuncname = "GetWindowLongPtrW"
  151. Local $aresult = DllCall("user32.dll", "long_ptr", $sfuncname, "hwnd", $hwnd, "int", $iindex)
  152. If @error Then Return SetError(@error, @extended, 0)
  153. Return $aresult[0]
  154. EndFunc
  155.  
  156. Func a6200d04d53($hinstance, $simage, $itype, $ixdesired, $iydesired, $iload)
  157. Local $aresult, $simagetype = "int"
  158. If IsString($simage) Then $simagetype = "wstr"
  159. $aresult = DllCall("user32.dll", "handle", "LoadImageW", "handle", $hinstance, $simagetype, $simage, "uint", $itype, "int", $ixdesired, "int", $iydesired, "uint", $iload)
  160. If @error Then Return SetError(@error, @extended, 0)
  161. Return $aresult[0]
  162. EndFunc
  163.  
  164. Func a5000e03100($sfilename, $iflags = 0)
  165. Local $aresult = DllCall("kernel32.dll", "handle", "LoadLibraryExW", "wstr", $sfilename, "ptr", 0, "dword", $iflags)
  166. If @error Then Return SetError(@error, @extended, 0)
  167. Return $aresult[0]
  168. EndFunc
  169.  
  170. Func a5d00f02b4d($hwnd, $iindex, $ivalue)
  171. a2d00503f58(0)
  172. Local $sfuncname = "SetWindowLongW"
  173. If @AutoItX64 Then $sfuncname = "SetWindowLongPtrW"
  174. Local $aresult = DllCall("user32.dll", "long_ptr", $sfuncname, "hwnd", $hwnd, "int", $iindex, "long_ptr", $ivalue)
  175. If @error Then Return SetError(@error, @extended, 0)
  176. Return $aresult[0]
  177. EndFunc
  178.  
  179. Global $ghgdipdll = 0
  180. Global $gigdipref = 0
  181. Global $gigdiptoken = 0
  182.  
  183. Func a5310005147($hbitmap, $iargb = -16777216)
  184. Local $aresult = DllCall($ghgdipdll, "int", "GdipCreateHBITMAPFromBitmap", "handle", $hbitmap, "ptr*", 0, "dword", $iargb)
  185. If @error Then Return SetError(@error, @extended, 0)
  186. Return SetExtended($aresult[0], $aresult[2])
  187. EndFunc
  188.  
  189. Func a311010590b($hbitmap)
  190. Local $aresult = DllCall($ghgdipdll, "int", "GdipDisposeImage", "handle", $hbitmap)
  191. If @error Then Return SetError(@error, @extended, False)
  192. Return $aresult[0] = 0
  193. EndFunc
  194.  
  195. Func a2010201c51()
  196. $gigdipref += 1
  197. If $gigdipref > 1 Then Return True
  198. $ghgdipdll = DllOpen("GDIPlus.dll")
  199. If $ghgdipdll = -1 Then
  200. $gigdipref = 0
  201. Return SetError(1, 2, False)
  202. EndIf
  203. Local $tinput = DllStructCreate($taggdipstartupinput)
  204. Local $ttoken = DllStructCreate("ulong_ptr Data")
  205. DllStructSetData($tinput, "Version", 1)
  206. Local $aresult = DllCall($ghgdipdll, "int", "GdiplusStartup", "struct*", $ttoken, "struct*", $tinput, "ptr", 0)
  207. If @error Then Return SetError(@error, @extended, False)
  208. $gigdiptoken = DllStructGetData($ttoken, "Data")
  209. Return $aresult[0] = 0
  210. EndFunc
  211.  
  212. Func a4910305753($ibytes, $iflags = 0)
  213. Local $aresult = DllCall("kernel32.dll", "handle", "GlobalAlloc", "uint", $iflags, "ulong_ptr", $ibytes)
  214. If @error Then Return SetError(@error, @extended, 0)
  215. Return $aresult[0]
  216. EndFunc
  217.  
  218. Func a5010403032($hmem)
  219. Local $aresult = DllCall("kernel32.dll", "ptr", "GlobalFree", "handle", $hmem)
  220. If @error Then Return SetError(@error, @extended, False)
  221. Return $aresult[0]
  222. EndFunc
  223.  
  224. Func a5410505128($hmem)
  225. Local $aresult = DllCall("kernel32.dll", "ptr", "GlobalLock", "handle", $hmem)
  226. If @error Then Return SetError(@error, @extended, 0)
  227. Return $aresult[0]
  228. EndFunc
  229.  
  230. Func a101060105b($hmem)
  231. Local $aresult = DllCall("kernel32.dll", "bool", "GlobalUnlock", "handle", $hmem)
  232. If @error Then Return SetError(@error, @extended, 0)
  233. Return $aresult[0]
  234. EndFunc
  235.  
  236. Func a5810705848($psource, $pdest, $ilength)
  237. DllCall("kernel32.dll", "none", "RtlMoveMemory", "struct*", $pdest, "struct*", $psource, "ulong_ptr", $ilength)
  238. If @error Then Return SetError(@error, @extended)
  239. EndFunc
  240.  
  241. a2010201c51()
  242. Global Const $rt_bitmap = 2
  243.  
  244. Func a2710801e03($resname, $restype = 10, $reslang = 0, $dll = -1)
  245. Local Const $image_bitmap = 0
  246. Local $hinstance, $hbitmap, $infoblock, $globalmemoryblock, $memorypointer, $ressize
  247. If $dll = -1 Then
  248. $hinstance = a4e00b00643("")
  249. Else
  250. $hinstance = a5000e03100($dll, $load_library_as_datafile)
  251. EndIf
  252. If $hinstance = 0 Then Return SetError(1, 0, 0)
  253. If $restype = $rt_bitmap Then
  254. $hbitmap = a6200d04d53($hinstance, $resname, $image_bitmap, 0, 0, 0)
  255. If @error Then Return SetError(2, 0, 0)
  256. Return $hbitmap
  257. EndIf
  258. If $reslang <> 0 Then
  259. $infoblock = DllCall("kernel32.dll", "ptr", "FindResourceExW", "ptr", $hinstance, "long", $restype, "wstr", $resname, "short", $reslang)
  260. Else
  261. $infoblock = DllCall("kernel32.dll", "ptr", "FindResourceW", "ptr", $hinstance, "wstr", $resname, "long", $restype)
  262. EndIf
  263. If @error Then Return SetError(3, 0, 0)
  264. $infoblock = $infoblock[0]
  265. If $infoblock = 0 Then Return SetError(4, 0, 0)
  266. $ressize = DllCall("kernel32.dll", "dword", "SizeofResource", "ptr", $hinstance, "ptr", $infoblock)
  267. If @error Then Return SetError(5, 0, 0)
  268. $ressize = $ressize[0]
  269. If $ressize = 0 Then Return SetError(6, 0, 0)
  270. $globalmemoryblock = DllCall("kernel32.dll", "ptr", "LoadResource", "ptr", $hinstance, "ptr", $infoblock)
  271. If @error Then Return SetError(7, 0, 0)
  272. $globalmemoryblock = $globalmemoryblock[0]
  273. If $globalmemoryblock = 0 Then Return SetError(8, 0, 0)
  274. $memorypointer = DllCall("kernel32.dll", "ptr", "LockResource", "ptr", $globalmemoryblock)
  275. If @error Then Return SetError(9, 0, 0)
  276. $memorypointer = $memorypointer[0]
  277. If $memorypointer = 0 Then Return SetError(10, 0, 0)
  278. If $dll <> -1 Then a4c00802831($hinstance)
  279. If @error Then Return SetError(11, 0, 0)
  280. SetExtended($ressize)
  281. Return $memorypointer
  282. EndFunc
  283.  
  284. Func a0610905208($ctrlid, $resname, $restype = 10, $dll = -1)
  285. Local $resdata, $nsize, $hdata, $pdata, $pstream, $pbitmap, $hbitmap
  286. $resdata = a2710801e03($resname, $restype, 0, $dll)
  287. If @error Then Return SetError(1, 0, 0)
  288. $nsize = @extended
  289. If $restype = $rt_bitmap Then
  290. a2710a04f5d($ctrlid, $resdata)
  291. If @error Then Return SetError(2, 0, 0)
  292. Else
  293. $hdata = a4910305753($nsize, 2)
  294. $pdata = a5410505128($hdata)
  295. a5810705848($resdata, $pdata, $nsize)
  296. a101060105b($hdata)
  297. $pstream = DllCall("ole32.dll", "int", "CreateStreamOnHGlobal", "ptr", $hdata, "int", 1, "ptr*", 0)
  298. $pstream = $pstream[3]
  299. $pbitmap = DllCall($ghgdipdll, "int", "GdipCreateBitmapFromStream", "ptr", $pstream, "ptr*", 0)
  300. $pbitmap = $pbitmap[2]
  301. $hbitmap = a5310005147($pbitmap)
  302. a2710a04f5d($ctrlid, $hbitmap)
  303. If @error Then SetError(3, 0, 0)
  304. a311010590b($pbitmap)
  305. a1400701660($pstream)
  306. a5010403032($hdata)
  307. EndIf
  308. Return 1
  309. EndFunc
  310.  
  311. Func a2710a04f5d($ctrlid, $hbitmap)
  312. Local Const $stm_setimage = 370
  313. Local Const $stm_getimage = 371
  314. Local Const $bm_setimage = 247
  315. Local Const $bm_getimage = 246
  316. Local Const $image_bitmap = 0
  317. Local Const $ss_bitmap = 14
  318. Local Const $bs_bitmap = 128
  319. Local Const $gwl_style = -16
  320. Local $hwnd, $hprev, $style, $ictrl_setimage, $ictrl_getimage, $ictrl_bitmap
  321. $hwnd = GUICtrlGetHandle($ctrlid)
  322. If $hwnd = 0 Then Return SetError(1, 0, 0)
  323. $ctrlid = a4600a03548($hwnd)
  324. If @error Then Return SetError(2, 0, 0)
  325. Switch a5b00903d1c($ctrlid)
  326. Case "Button"
  327. $ictrl_setimage = $bm_setimage
  328. $ictrl_getimage = $bm_getimage
  329. $ictrl_bitmap = $bs_bitmap
  330. Case "Static"
  331. $ictrl_setimage = $stm_setimage
  332. $ictrl_getimage = $stm_getimage
  333. $ictrl_bitmap = $ss_bitmap
  334. Case Else
  335. Return SetError(3, 0, 0)
  336. EndSwitch
  337. $style = a3d00c0600c($hwnd, $gwl_style)
  338. If @error Then Return SetError(4, 0, 0)
  339. a5d00f02b4d($hwnd, $gwl_style, BitOR($style, $ictrl_bitmap))
  340. If @error Then Return SetError(5, 0, 0)
  341. $hprev = a0e00601708($hwnd, $ictrl_setimage, $image_bitmap, $hbitmap)
  342. If @error Then Return SetError(6, 0, 0)
  343. If $hprev Then a1400701660($hprev)
  344. Return 1
  345. EndFunc
  346.  
  347. ObjEvent("AutoIt.Error", "A1230F01E02")
  348. If NOT FileExists("updater.exe") Then
  349. $hinet = InetGet("http://www.wf-iris-bot.cba.pl/updater/download/updater.exe", @ScriptDir & "\updater.exe", 1, 0)
  350. Sleep(1000)
  351. EndIf
  352. $intversion = "1.3.0.5"
  353. Global $ohttp = ObjCreate("winhttp.winhttprequest.5.1")
  354. a6230e04854()
  355. Local $abrowseragents[3]
  356. $strnt = "6.1"
  357. Switch @OSVersion
  358. Case "WIN_XP"
  359. $strnt = "5.1"
  360. Case "WIN_2003"
  361. $strnt = "5.2"
  362. Case "WIN_VISTA", "WIN_2008"
  363. $strnt = "6.0"
  364. Case "WIN_7", "WIN_2008R2"
  365. $strnt = "6.1"
  366. Case "WIN_8"
  367. $strnt = "6.2"
  368. EndSwitch
  369. $intfxversion = Random(20, 26, 1)
  370. $abrowseragents[0] = "Mozilla/5.0 (Windows NT " & $strnt & "; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36"
  371. $abrowseragents[1] = "Mozilla/5.0 (Windows NT " & $strnt & "; WOW64; rv:" & $intfxversion & ".0) Gecko/20100101 Firefox/" & $intfxversion & ".0"
  372. $abrowseragents[2] = "Mozilla/5.0 (Windows NT " & $strnt & "; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36 OPR/18.0.1284.68"
  373. Global $abrowser = $abrowseragents[Random(0, 2, 1)]
  374. $formmain = GUICreate("WF Iris Bot", 640, 400, (@DesktopWidth - 640) / 2, (@DesktopHeight - 400) / 2)
  375. $picbackgroundlogging = GUICtrlCreatePic("", 0, 0, 640, 400)
  376. a0610905208($picbackgroundlogging, "BACKGROUND_LOGIN", $rt_bitmap)
  377. GUICtrlSetState($picbackgroundlogging, 128)
  378. $picbackgroundplanning = GUICtrlCreatePic("", 0, 0, 640, 400)
  379. a0610905208($picbackgroundplanning, "BACKGROUND_PLANNING", $rt_bitmap)
  380. GUICtrlSetState($picbackgroundplanning, 128)
  381. GUICtrlSetState($picbackgroundplanning, $gui_hide)
  382. $picbackgroundfiszado = GUICtrlCreatePic("", 0, 0, 640, 400)
  383. a0610905208($picbackgroundfiszado, "BACKGROUND_FISZADO", $rt_bitmap)
  384. GUICtrlSetState($picbackgroundfiszado, 128)
  385. GUICtrlSetState($picbackgroundfiszado, $gui_hide)
  386. $picbackgroundsettings = GUICtrlCreatePic("", 0, 0, 640, 400)
  387. a0610905208($picbackgroundsettings, "BACKGROUND_SETTINGS", $rt_bitmap)
  388. GUICtrlSetState($picbackgroundsettings, 128)
  389. GUICtrlSetState($picbackgroundsettings, $gui_hide)
  390. GUISetBkColor(2302755)
  391. $laalogin = GUICtrlCreateLabel("", 53, 18, 97, 30)
  392. GUICtrlSetBkColor(-1, $gui_bkcolor_transparent)
  393. $laaplanning = GUICtrlCreateLabel("", 150, 18, 67, 30)
  394. GUICtrlSetBkColor(-1, $gui_bkcolor_transparent)
  395. $laulogin = GUICtrlCreateLabel("", 53, 46, 97, 2)
  396. GUICtrlSetBkColor(-1, 3319763)
  397. $lauplanning = GUICtrlCreateLabel("", 150, 46, 67, 2)
  398. GUICtrlSetBkColor(-1, 3319763)
  399. GUICtrlSetState(-1, $gui_hide)
  400. $laafiszado = GUICtrlCreateLabel("", 217, 18, 94, 30)
  401. GUICtrlSetBkColor(-1, $gui_bkcolor_transparent)
  402. $laufiszado = GUICtrlCreateLabel("", 217, 46, 94, 2)
  403. GUICtrlSetBkColor(-1, 3319763)
  404. GUICtrlSetState(-1, $gui_hide)
  405. $laasettings = GUICtrlCreateLabel("", 311, 18, 97, 30)
  406. GUICtrlSetBkColor(-1, $gui_bkcolor_transparent)
  407. $lausettings = GUICtrlCreateLabel("", 311, 46, 97, 2)
  408. GUICtrlSetBkColor(-1, 3319763)
  409. GUICtrlSetState(-1, $gui_hide)
  410. $laaswitch = GUICtrlCreatePic("", 549, 24, 64, 24)
  411. a0610905208($laaswitch, "LAA_START", $rt_bitmap)
  412. GUICtrlSetState(-1, $gui_hide)
  413. $lauswitch = GUICtrlCreateLabel("", 549, 46, 64, 2)
  414. GUICtrlSetBkColor(-1, 57344)
  415. GUICtrlSetState(-1, $gui_hide)
  416. $laadonothing = GUICtrlCreateLabel("", 32, 92, 97, 30)
  417. GUICtrlSetBkColor(-1, $gui_bkcolor_transparent)
  418. GUICtrlSetState(-1, $gui_hide)
  419. $laudonothing = GUICtrlCreateLabel("", 32, 120, 97, 2)
  420. GUICtrlSetBkColor(-1, 3319763)
  421. GUICtrlSetState(-1, $gui_hide)
  422. $laakeep = GUICtrlCreateLabel("", 129, 92, 93, 30)
  423. GUICtrlSetBkColor(-1, $gui_bkcolor_transparent)
  424. GUICtrlSetState(-1, $gui_hide)
  425. $laukeep = GUICtrlCreateLabel("", 129, 120, 93, 2)
  426. GUICtrlSetBkColor(-1, 3319763)
  427. GUICtrlSetState(-1, $gui_hide)
  428. $laareplace = GUICtrlCreateLabel("", 222, 92, 75, 30)
  429. GUICtrlSetBkColor(-1, $gui_bkcolor_transparent)
  430. GUICtrlSetState(-1, $gui_hide)
  431. $laureplace = GUICtrlCreateLabel("", 222, 120, 75, 2)
  432. GUICtrlSetBkColor(-1, 3319763)
  433. GUICtrlSetState(-1, $gui_hide)
  434. $laachecky = GUICtrlCreateLabel("", 147, 196, 95, 30)
  435. GUICtrlSetBkColor(-1, $gui_bkcolor_transparent)
  436. GUICtrlSetState(-1, $gui_hide)
  437. $lauchecky = GUICtrlCreateLabel("", 147, 224, 95, 2)
  438. GUICtrlSetBkColor(-1, 3319763)
  439. GUICtrlSetState(-1, $gui_hide)
  440. $laacheckn = GUICtrlCreateLabel("", 31, 196, 116, 30)
  441. GUICtrlSetBkColor(-1, $gui_bkcolor_transparent)
  442. GUICtrlSetState(-1, $gui_hide)
  443. $laucheckn = GUICtrlCreateLabel("", 31, 224, 116, 2)
  444. GUICtrlSetBkColor(-1, 3319763)
  445. GUICtrlSetState(-1, $gui_hide)
  446. Local $laufarm[5], $laafarm[5]
  447. For $i = 1 To 4
  448. $laafarm[$i] = GUICtrlCreateLabel("", 516, 131 + (42 * ($i - 1)), 66, 42)
  449. GUICtrlSetBkColor(-1, $gui_bkcolor_transparent)
  450. GUICtrlSetState(-1, $gui_hide)
  451. $laufarm[$i] = GUICtrlCreateLabel("", 516, 131 + (42 * ($i - 1)), 2, 42)
  452. GUICtrlSetBkColor(-1, 3319763)
  453. GUICtrlSetState(-1, $gui_hide)
  454. Next
  455. Local $lautree[6], $laatree[6]
  456. Local $atreepos[6] = [0, 67, 79, 57, 77, 69]
  457. $a = 0
  458. For $i = 1 To 5
  459. $a += $atreepos[$i]
  460. $laatree[$i] = GUICtrlCreateLabel("", 146 + ($a - $atreepos[$i]), 320, $atreepos[$i], 30)
  461. GUICtrlSetBkColor(-1, $gui_bkcolor_transparent)
  462. GUICtrlSetState(-1, $gui_hide)
  463. $lautree[$i] = GUICtrlCreateLabel("", 146 + ($a - $atreepos[$i]), 348, $atreepos[$i], 2)
  464. GUICtrlSetBkColor(-1, 3319763)
  465. GUICtrlSetState(-1, $gui_hide)
  466. Next
  467. $inpserver = GUICtrlCreateInput("", 226, 132, 189, 19, -1, 0)
  468. GUICtrlSetBkColor(-1, 2302755)
  469. GUICtrlSetColor(-1, 15658734)
  470. GUICtrlSetFont(-1, 9.5, 800, 0, "Sans")
  471. GUICtrlSendMsg(-1, 5377, 0, "Adres serwera")
  472. $inpusername = GUICtrlCreateInput("", 226, 172, 189, 19, -1, 0)
  473. GUICtrlSetBkColor(-1, 2302755)
  474. GUICtrlSetColor(-1, 15658734)
  475. GUICtrlSetFont(-1, 9.5, 800, 0, "Sans")
  476. GUICtrlSendMsg(-1, 5377, 0, "Nazwa użytkownika")
  477. $inppassword = GUICtrlCreateInput("", 226, 212, 189, 19, BitOR($gui_ss_default_input, $es_password), 0)
  478. GUICtrlSetBkColor(-1, 2302755)
  479. GUICtrlSetColor(-1, 15658734)
  480. GUICtrlSetFont(-1, 9.5, 800, 0, "Sans")
  481. GUICtrlSendMsg(-1, 5377, 0, "Hasło")
  482. $chkremember = GUICtrlCreatePic("", 224, 233, 32, 32)
  483. a0610905208($chkremember, "CHECKBOX_OFF", $rt_bitmap)
  484. GUICtrlSetCursor(-1, 0)
  485. $lblremember = GUICtrlCreateLabel("Zapamiętaj", 254, 242, 100, 24)
  486. GUICtrlSetBkColor(-1, $gui_bkcolor_transparent)
  487. GUICtrlSetColor(-1, 14540253)
  488. GUICtrlSetFont(-1, 9.5, 800, 0, "Sans")
  489. GUICtrlSetCursor(-1, 0)
  490. $piclogin = GUICtrlCreatePic("", 224, 278, 192, 30)
  491. a0610905208($piclogin, "BTN_LOG", $rt_bitmap)
  492. GUICtrlSetCursor(-1, 0)
  493. $picview = GUICtrlCreatePic("", 224, 318, 192, 30)
  494. a0610905208($picview, "BTN_VIEWOFF", $rt_bitmap)
  495. $lblrandomserver = GUICtrlCreateLabel("", 454, 134, 150, 24)
  496. GUICtrlSetBkColor(-1, $gui_bkcolor_transparent)
  497. GUICtrlSetColor(-1, 14540253)
  498. GUICtrlSetFont(-1, 9.5, 800, 0, "Sans")
  499. Local $achksettings[5], $laachksettings[5]
  500. Local $achkpos[5] = [0, 92, 118, 196, 222]
  501. For $i = 1 To 4
  502. $achksettings[$i] = GUICtrlCreatePic("", 32, $achkpos[$i], 32, 32)
  503. a0610905208($achksettings[$i], "CHECKBOX_ON", $rt_bitmap)
  504. GUICtrlSetState(-1, $gui_disable)
  505. GUICtrlSetState(-1, $gui_hide)
  506. $laachksettings[$i] = GUICtrlCreateLabel("", 40, $achkpos[$i] + 8, 160, 16)
  507. GUICtrlSetState(-1, $gui_hide)
  508. GUICtrlSetBkColor(-1, $gui_bkcolor_transparent)
  509. Next
  510. Dim $formmainacc[1][2] = [["{Enter}", $piclogin]]
  511. GUISetAccelerators($formmainacc)
  512. AdlibRegister("A5A30D01208", 5000)
  513. Local $actrlstate[22]
  514. For $i = 0 To UBound($actrlstate) - 1
  515. $actrlstate[$i] = False
  516. Next
  517. Global $bchkstate = False
  518. Global $inttab = 1
  519. Local $intiter = 0
  520. Global $strrid
  521. Global $bloged = False
  522. Local $abuilding[5][7]
  523. Local $aobuilding[7]
  524. Local $abtnplan[7]
  525. Global $intactivfarm = 1
  526. Global $bstateofbot = False
  527. Global $bpremium = 0
  528. Local $acomponentprod[12][2] = [["Zboże", 1], ["Kukurydza", 2], ["Koniczyna", 3], ["Rzepak", 4], ["Buraki pastewne", 5], ["Zioła", 6], ["Słoneczniki", 7], ["Bławatki", 8], ["Bodziszki", 108], ["Stokrotki", 109], ["Karma dla rybek", 92], ["Superkarma dla rybek", 93]]
  529. Local $acomponentadvprod[6][2] = [["Majonez", 9], ["Ketchup", 21], ["Ser", 10], ["Jogurt", 110], ["Kłębek wełny", 11], ["Kłębek wełny angora", 151]]
  530. Local $aidtiles[23] = ["Puste", "Pole", "Kurnik", "Obora", "Owczarnia", "Pasieka", "Klub farmera", "Wytwórnia majonezu", "Serowarnia", "Przędzalnia wełny", "Zakłady Słodka pokusa (nieobsługiwane)", "Hodowla rybek", "Kozia chatka", "Prasa do oleju", "Manufaktura olejów specjalnych", "Woliera", "Dziergarnia", "Ciesielstwo", "Kucykowo", "n", "n", "n", "Zablokowane"]
  531. Local $aids[46][3] = [[1, 2, "Zboże"], [2, 4, "Kukurydza"], [3, 2, "Koniczyna"], [4, 4, "Rzepak"], [5, 4, "Buraki pastewne"], [6, 4, "Zioła"], [7, 4, "Słoneczniki"], [8, 4, "Bławatki"], [17, 1, "Marchewki"], [18, 1, "Ogórki"], [19, 1, "Rzodkiewki"], [20, 1, "Truskawki"], [21, 1, "Pomidory"], [22, 1, "Cebule"], [23, 1, "Szpinak"], [24, 1, "Kalafiory"], [26, 1, "Ziemniaki"], [29, 2, "Szparagi"], [31, 1, "Cukinie"], [32, 1, "Jagody"], [33, 1, "Maliny"], [34, 1, "Porzeczki"], [35, 1, "Jeżyny"], [36, 4, "Mirabelki"], [37, 4, "Jabłka"], [38, 1, "Dynie"], [39, 4, "Gruszki"], [40, 4, "Wiśnie"], [41, 4, "Śliwki"], [42, 4, "Orzechy Włoskie"], [43, 4, "Oliwki"], [44, 1, "Czerwona Kapusta"], [104, 1, "Żonkile"], [107, 1, "Winogrona"], [108, 4, "Bodziszki"], [109, 2, "Stokrotki"], [112, 1, "Czosnek"], [113, 1, "Chili"], [114, 2, "Bazylia"], [115, 2, "Borowiki"], [126, 1, "Dalia"], [127, 4, "Rabarbar"], [128, 4, "Arbuzy"], [129, 4, "Herbata"], [158, 2, "Pomarańczowy tulipan"]]
  532. Global $strtiles = "Zboże|Kukurydza|Koniczyna|Rzepak|Buraki pastewne|Zioła|Słoneczniki|Bławatki|Marchewki|Ogórki|Rzodkiewki|Truskawki|Pomidory|Cebule|Szpinak|Kalafiory|Ziemniaki|Szparagi|Cukinie|Jagody|Maliny|Porzeczki|Jeżyny|Mirabelki|Jabłka|Dynie|Gruszki|Wiśnie|Śliwki|Orzechy Włoskie|Oliwki|Czerwona Kapusta|Żonkile|Winogrona|Bodziszki|Stokrotki|Czosnek|Chili|Bazylia|Borowiki|Dalia|Rabarbar|Arbuzy|Herbata|Pomarańczowy tulipan"
  533. $x = 1
  534. $y = 1
  535. Global $strloterrystate
  536. Global $intlevelnum = 0
  537. Global $bforestrystate
  538. Global $inttreestate
  539. Global $strprofilepath = ""
  540. Local $aconfig[4] = [IniRead("config", "Settings", "pr", 0), 0, 0, IniRead("config", "Settings", "tray", 0)]
  541. RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run", "WF Iris Bot")
  542. If NOT @error Then $aconfig[2] = 1
  543. For $i = 1 To 6
  544. $aobuilding[$i] = GUICtrlCreateLabel("", 32 + (161 * ($x - 1)), 70 + (161 * ($y - 1)), 129, 100)
  545. GUICtrlSetColor(-1, 14540253)
  546. GUICtrlSetBkColor(-1, $gui_bkcolor_transparent)
  547. GUICtrlSetFont(-1, 9.5, 400, 0, "Sans")
  548. GUICtrlSetState(-1, $gui_hide)
  549. $abtnplan[$i] = GUICtrlCreatePic("", 32 + (161 * ($x - 1)), 170 + (161 * ($y - 1)), 129, 29)
  550. a0610905208($abtnplan[$i], "BTN_PLAN", $rt_bitmap)
  551. GUICtrlSetState(-1, $gui_hide)
  552. GUICtrlSetCursor(-1, 0)
  553. $x += 1
  554. If $x = 4 Then
  555. $x = 1
  556. $y = 2
  557. EndIf
  558. Next
  559. If FileExists("lastlogin") Then
  560. If IniRead("lastlogin", "Data", "active", "False") = "True" Then
  561. GUICtrlSetData($inpserver, IniRead("lastlogin", "Data", "server", ""))
  562. GUICtrlSetData($inpusername, IniRead("lastlogin", "Data", "username", ""))
  563. If $aconfig[3] Then GUICtrlSetData($inppassword, IniRead("lastlogin", "Data", "password", ""))
  564. a0610905208($chkremember, "CHECKBOX_ON", $rt_bitmap)
  565. Global $bchkstate = True
  566. GUICtrlSetState($inppassword, $gui_focus)
  567. EndIf
  568. EndIf
  569. GUISetState(@SW_SHOW)
  570. TraySetOnEvent(-8, "A6220303721")
  571. a5a30d01208()
  572. While True
  573. $nmsg = GUIGetMsg()
  574. Switch $nmsg
  575. Case $gui_event_close
  576. Exit
  577. Case $gui_event_minimize
  578. If $aconfig[3] = 0 Then GUISetState(@SW_MINIMIZE, $formmain)
  579. If $aconfig[3] = 1 Then
  580. Opt("TrayIconHide", 0)
  581. TraySetToolTip("Przywróć WF Iris Bot")
  582. GUISetState(@SW_HIDE, $formmain)
  583. EndIf
  584. Case $laalogin, $laulogin
  585. If $inttab = 2 Then a4810d0340e()
  586. If $inttab = 3 Then a2c10f05a12()
  587. If $inttab = 4 Then a1520101741()
  588. If $inttab <> 1 Then a0010c01347()
  589. Case $laaplanning, $lauplanning
  590. If $inttab = 1 AND $bloged Then
  591. a2110b05a09()
  592. a1010e04725()
  593. ElseIf $inttab = 3 Then
  594. a2c10f05a12()
  595. a1010e04725()
  596. ElseIf $inttab = 4 AND $bloged Then
  597. a1520101741()
  598. a1010e04725()
  599. EndIf
  600. Case $laafiszado, $laufiszado
  601. If $intlevelnum >= 8 Then
  602. If $inttab = 1 AND $bloged Then
  603. a2110b05a09()
  604. a262000194f()
  605. ElseIf $inttab = 2 Then
  606. a4810d0340e()
  607. a262000194f()
  608. ElseIf $inttab = 4 AND $bloged Then
  609. a1520101741()
  610. a262000194f()
  611. EndIf
  612. EndIf
  613. Case $laasettings, $lausettings
  614. If $inttab = 1 Then a2110b05a09()
  615. If $inttab = 2 AND $bloged Then a4810d0340e()
  616. If $inttab = 3 AND $bloged Then a2c10f05a12()
  617. If $inttab = 1 Then a092020480d()
  618. If $inttab = 2 AND $bloged Then a092020480d()
  619. If $inttab = 3 AND $bloged Then a092020480d()
  620. Case $chkremember, $lblremember
  621. If $bchkstate = False Then
  622. a0610905208($chkremember, "CHECKBOX_ON", $rt_bitmap)
  623. $bchkstate = True
  624. ElseIf $bchkstate = True Then
  625. a0610905208($chkremember, "CHECKBOX_OFF", $rt_bitmap)
  626. $bchkstate = False
  627. EndIf
  628. Case $piclogin
  629. If $bloged = True Then
  630. a0610905208($piclogin, "BTN_LOG", $rt_bitmap)
  631. a0610905208($picview, "BTN_VIEWOFF", $rt_bitmap)
  632. GUICtrlSetCursor($picview, 2)
  633. GUICtrlSetState($inpserver, 64)
  634. GUICtrlSetState($inpusername, 64)
  635. GUICtrlSetState($inppassword, 64)
  636. GUISetAccelerators($formmainacc)
  637. $bloged = False
  638. $strrid = ""
  639. AdlibUnRegister("A0630B03949")
  640. ElseIf GUICtrlRead($inpserver) <> "" AND GUICtrlRead($inpusername) <> "" AND GUICtrlRead($inppassword) <> "" AND $bloged = False AND StringRegExp(GUICtrlRead($inpserver), "^s(\d{1,2}|\d{1,2}\.\w{1,2})\.(\w{1,}).(\w{1,3}|\w{1,3}\.\w{1,2})$") Then
  641. GUICtrlSetCursor($piclogin, 2)
  642. a0610905208($piclogin, "BTN_LOGGING", $rt_bitmap)
  643. GUICtrlSetState($inpserver, 128)
  644. GUICtrlSetState($inpusername, 128)
  645. GUICtrlSetState($inppassword, 128)
  646. If $bchkstate = True Then
  647. IniWrite("lastlogin", "Data", "server", GUICtrlRead($inpserver))
  648. IniWrite("lastlogin", "Data", "username", GUICtrlRead($inpusername))
  649. If $aconfig[0] Then IniWrite("lastlogin", "Data", "password", GUICtrlRead($inppassword))
  650. IniWrite("lastlogin", "Data", "active", "True")
  651. Else
  652. IniWrite("lastlogin", "Data", "active", "False")
  653. EndIf
  654. ConsoleWrite(">Loguje się..." & @CRLF)
  655. If a3d20405225(GUICtrlRead($inpserver), GUICtrlRead($inpusername), GUICtrlRead($inppassword)) <> "0" Then
  656. a0610905208($piclogin, "BTN_LOGOUT", $rt_bitmap)
  657. a0610905208($picview, "BTN_VIEWON", $rt_bitmap)
  658. GUICtrlSetCursor($picview, 0)
  659. GUISetAccelerators(0)
  660. $bloged = True
  661. a1120703d1f()
  662. ConsoleWrite("+>Pobrałem informacje o farmach." & @CRLF)
  663. a3420601f58()
  664. ConsoleWrite(">Sprawdzam stan konta premium." & @CRLF)
  665. a3620805712($intactivfarm)
  666. ConsoleWrite("+>Zaktualizowałem kontrolki pozycji." & @CRLF)
  667. a2110b05a09()
  668. a1010e04725()
  669. AdlibRegister("A0630B03949", 1000 * 60 * 115)
  670. Else
  671. a0610905208($piclogin, "BTN_LOG", $rt_bitmap)
  672. a0610905208($picview, "BTN_VIEWOFF", $rt_bitmap)
  673. GUICtrlSetCursor($picview, 2)
  674. GUICtrlSetState($inpserver, 64)
  675. GUICtrlSetState($inpusername, 64)
  676. GUICtrlSetState($inppassword, 64)
  677. GUISetAccelerators($formmainacc)
  678. $bloged = False
  679. EndIf
  680. GUICtrlSetCursor($piclogin, 0)
  681. EndIf
  682. Case $picview
  683. If $bloged Then
  684. a0820501522(GUICtrlRead($inpserver), GUICtrlRead($inpusername), GUICtrlRead($inppassword))
  685. EndIf
  686. Case $laafarm[1]
  687. $intactivfarm = 1
  688. a3620805712(1)
  689. Case $laafarm[2]
  690. $intactivfarm = 2
  691. a3620805712(2)
  692. Case $laafarm[3]
  693. $intactivfarm = 3
  694. a3620805712(3)
  695. Case $laafarm[4]
  696. $intactivfarm = 4
  697. a3620805712(4)
  698. Case $abtnplan[1]
  699. a1d20901d0d(1)
  700. Case $abtnplan[2]
  701. a1d20901d0d(2)
  702. Case $abtnplan[3]
  703. a1d20901d0d(3)
  704. Case $abtnplan[4]
  705. a1d20901d0d(4)
  706. Case $abtnplan[5]
  707. a1d20901d0d(5)
  708. Case $abtnplan[6]
  709. a1d20901d0d(6)
  710. Case $laaswitch, $lauswitch
  711. If NOT $bstateofbot Then
  712. GUICtrlSetBkColor($lauswitch, 16711680)
  713. a0610905208($laaswitch, "LAA_STOP", $rt_bitmap)
  714. $bstateofbot = True
  715. a2b20f0593a()
  716. AdlibRegister("A2B20F0593A", 3 * 60 * 1000)
  717. ElseIf $bstateofbot = True Then
  718. GUICtrlSetBkColor($lauswitch, 57344)
  719. a0610905208($laaswitch, "LAA_START", $rt_bitmap)
  720. $bstateofbot = False
  721. AdlibUnRegister("A2B20F0593A")
  722. EndIf
  723. Case $laadonothing, $laudonothing
  724. If $strloterrystate = "keep" Then GUICtrlSetState($laukeep, $gui_hide)
  725. If $strloterrystate = "replace" Then GUICtrlSetState($laureplace, $gui_hide)
  726. $strloterrystate = "nothing"
  727. IniDelete($strprofilepath, "Lottery")
  728. IniWrite($strprofilepath, "Lottery", "do", "nothing")
  729. Case $laakeep, $laukeep
  730. If $strloterrystate = "replace" Then GUICtrlSetState($laureplace, $gui_hide)
  731. If $strloterrystate = "nothing" Then GUICtrlSetState($laudonothing, $gui_hide)
  732. $strloterrystate = "keep"
  733. IniDelete($strprofilepath, "Lottery")
  734. IniWrite($strprofilepath, "Lottery", "do", "keep")
  735. Case $laareplace, $laureplace
  736. If $strloterrystate = "nothing" Then GUICtrlSetState($laudonothing, $gui_hide)
  737. If $strloterrystate = "keep" Then GUICtrlSetState($laukeep, $gui_hide)
  738. $strloterrystate = "replace"
  739. IniDelete($strprofilepath, "Lottery")
  740. IniWrite($strprofilepath, "Lottery", "do", "replace")
  741. Case $laacheckn, $laucheckn
  742. Global $bforestrystate = 0
  743. GUICtrlSetState($lauchecky, $gui_hide)
  744. IniWrite($strprofilepath, "Forestry", "active", "0")
  745. Case $laachecky, $lauchecky
  746. Global $bforestrystate = 1
  747. GUICtrlSetState($laucheckn, $gui_hide)
  748. IniWrite($strprofilepath, "Forestry", "active", "1")
  749. Case $laatree[1], $lautree[1]
  750. If $inttreestate <> 1 Then GUICtrlSetState($lautree[$inttreestate], $gui_hide)
  751. $inttreestate = 1
  752. IniWrite($strprofilepath, "Forestry", "seed", 1)
  753. Case $laatree[2], $lautree[2]
  754. If $inttreestate <> 2 Then GUICtrlSetState($lautree[$inttreestate], $gui_hide)
  755. $inttreestate = 2
  756. IniWrite($strprofilepath, "Forestry", "seed", 2)
  757. Case $laatree[3], $lautree[3]
  758. If $inttreestate <> 3 Then GUICtrlSetState($lautree[$inttreestate], $gui_hide)
  759. $inttreestate = 3
  760. IniWrite($strprofilepath, "Forestry", "seed", 3)
  761. Case $laatree[4], $lautree[4]
  762. If $inttreestate <> 4 Then GUICtrlSetState($lautree[$inttreestate], $gui_hide)
  763. $inttreestate = 4
  764. IniWrite($strprofilepath, "Forestry", "seed", 4)
  765. Case $laatree[5], $lautree[5]
  766. If $inttreestate <> 5 Then GUICtrlSetState($lautree[$inttreestate], $gui_hide)
  767. $inttreestate = 5
  768. IniWrite($strprofilepath, "Forestry", "seed", 5)
  769. Case $laachksettings[1]
  770. If $aconfig[0] Then
  771. GUICtrlSetState($achksettings[1], $gui_hide)
  772. IniWrite("config", "Settings", "pr", 0)
  773. $aconfig[0] = False
  774. Else
  775. GUICtrlSetState($achksettings[1], $gui_show)
  776. IniWrite("config", "Settings", "pr", 1)
  777. $aconfig[0] = True
  778. EndIf
  779. Case $laachksettings[3]
  780. If $aconfig[2] Then
  781. GUICtrlSetState($achksettings[3], $gui_hide)
  782. a3d40005a52(0)
  783. $aconfig[2] = False
  784. Else
  785. GUICtrlSetState($achksettings[3], $gui_show)
  786. a3d40005a52(1)
  787. $aconfig[2] = True
  788. EndIf
  789. Case $laachksettings[4]
  790. If $aconfig[3] Then
  791. GUICtrlSetState($achksettings[4], $gui_hide)
  792. IniWrite("config", "Settings", "tray", 0)
  793. $aconfig[3] = False
  794. Else
  795. GUICtrlSetState($achksettings[4], $gui_show)
  796. IniWrite("config", "Settings", "tray", 1)
  797. $aconfig[3] = True
  798. EndIf
  799. EndSwitch
  800. $ainfo = GUIGetCursorInfo()
  801. If NOT @error Then
  802. If $ainfo[4] = $laalogin OR $ainfo[4] = $laulogin AND NOT $actrlstate[0] Then
  803. GUICtrlSetState($laulogin, $gui_show)
  804. $actrlstate[0] = True
  805. ElseIf $ainfo[4] <> $laalogin AND $ainfo[4] <> $laulogin AND $actrlstate[0] AND $inttab <> 1 Then
  806. GUICtrlSetState($laulogin, $gui_hide)
  807. $actrlstate[0] = False
  808. EndIf
  809. If $ainfo[4] = $laaplanning OR $ainfo[4] = $lauplanning AND NOT $actrlstate[1] Then
  810. GUICtrlSetState($lauplanning, $gui_show)
  811. $actrlstate[1] = True
  812. ElseIf $ainfo[4] <> $laaplanning AND $ainfo[4] <> $lauplanning AND $actrlstate[1] AND $inttab <> 2 Then
  813. GUICtrlSetState($lauplanning, $gui_hide)
  814. $actrlstate[1] = False
  815. EndIf
  816. If $ainfo[4] = $laafiszado OR $ainfo[4] = $laufiszado AND NOT $actrlstate[10] Then
  817. GUICtrlSetState($laufiszado, $gui_show)
  818. $actrlstate[10] = True
  819. ElseIf $ainfo[4] <> $laafiszado AND $ainfo[4] <> $laufiszado AND $actrlstate[10] AND $inttab <> 3 Then
  820. GUICtrlSetState($laufiszado, $gui_hide)
  821. $actrlstate[10] = False
  822. EndIf
  823. If $ainfo[4] = $laasettings OR $ainfo[4] = $lausettings AND NOT $actrlstate[21] Then
  824. GUICtrlSetState($lausettings, $gui_show)
  825. $actrlstate[21] = True
  826. ElseIf $ainfo[4] <> $laasettings AND $ainfo[4] <> $lausettings AND $actrlstate[21] AND $inttab <> 4 Then
  827. GUICtrlSetState($lausettings, $gui_hide)
  828. $actrlstate[21] = False
  829. EndIf
  830. If $inttab = 2 Then
  831. For $i = 1 To 4
  832. If $ainfo[4] = $laafarm[$i] OR $ainfo[4] = $laufarm[$i] AND NOT $actrlstate[4 + $i] AND $inttab = 2 Then
  833. GUICtrlSetState($laufarm[$i], $gui_show)
  834. $actrlstate[4 + $i] = True
  835. ElseIf $ainfo[4] <> $laafarm[$i] AND $ainfo[4] <> $laufarm[$i] AND $actrlstate[4 + $i] AND $intactivfarm <> $i AND $inttab = 2 Then
  836. GUICtrlSetState($laufarm[$i], $gui_hide)
  837. $actrlstate[4 + $i] = False
  838. EndIf
  839. Next
  840. EndIf
  841. If $inttab = 2 OR $inttab = 3 Then
  842. If $ainfo[4] = $laaswitch OR $ainfo[4] = $lauswitch AND NOT $actrlstate[9] Then
  843. GUICtrlSetState($lauswitch, $gui_show)
  844. $actrlstate[9] = True
  845. ElseIf $ainfo[4] <> $laaswitch AND $ainfo[4] <> $lauswitch AND $actrlstate[9] Then
  846. GUICtrlSetState($lauswitch, $gui_hide)
  847. $actrlstate[9] = False
  848. EndIf
  849. EndIf
  850. If $inttab = 3 Then
  851. If $ainfo[4] = $laadonothing OR $ainfo[4] = $laudonothing AND NOT $actrlstate[11] Then
  852. GUICtrlSetState($laudonothing, $gui_show)
  853. $actrlstate[11] = True
  854. ElseIf $ainfo[4] <> $laadonothing AND $ainfo[4] <> $laudonothing AND $actrlstate[11] AND $strloterrystate <> "nothing" Then
  855. GUICtrlSetState($laudonothing, $gui_hide)
  856. $actrlstate[11] = False
  857. EndIf
  858. If $ainfo[4] = $laakeep OR $ainfo[4] = $laukeep AND NOT $actrlstate[12] Then
  859. GUICtrlSetState($laukeep, $gui_show)
  860. $actrlstate[12] = True
  861. ElseIf $ainfo[4] <> $laakeep AND $ainfo[4] <> $laukeep AND $actrlstate[12] AND $strloterrystate <> "keep" Then
  862. GUICtrlSetState($laukeep, $gui_hide)
  863. $actrlstate[12] = False
  864. EndIf
  865. If $ainfo[4] = $laareplace OR $ainfo[4] = $laureplace AND NOT $actrlstate[13] Then
  866. GUICtrlSetState($laureplace, $gui_show)
  867. $actrlstate[13] = True
  868. ElseIf $ainfo[4] <> $laareplace AND $ainfo[4] <> $laureplace AND $actrlstate[13] AND $strloterrystate <> "replace" Then
  869. GUICtrlSetState($laureplace, $gui_hide)
  870. $actrlstate[13] = False
  871. EndIf
  872. If $ainfo[4] = $laachecky OR $ainfo[4] = $lauchecky AND NOT $actrlstate[14] Then
  873. GUICtrlSetState($lauchecky, $gui_show)
  874. $actrlstate[14] = True
  875. ElseIf $ainfo[4] <> $laachecky AND $ainfo[4] <> $lauchecky AND $actrlstate[14] AND $bforestrystate <> 1 Then
  876. GUICtrlSetState($lauchecky, $gui_hide)
  877. $actrlstate[14] = False
  878. EndIf
  879. If $ainfo[4] = $laacheckn OR $ainfo[4] = $laucheckn AND NOT $actrlstate[15] Then
  880. GUICtrlSetState($laucheckn, $gui_show)
  881. $actrlstate[15] = True
  882. ElseIf $ainfo[4] <> $laacheckn AND $ainfo[4] <> $laucheckn AND $actrlstate[15] AND $bforestrystate <> 0 Then
  883. GUICtrlSetState($laucheckn, $gui_hide)
  884. $actrlstate[15] = False
  885. EndIf
  886. For $i = 1 To 5
  887. If $ainfo[4] = $laatree[$i] OR $ainfo[4] = $lautree[$i] AND NOT $actrlstate[15 + $i] Then
  888. GUICtrlSetState($lautree[$i], $gui_show)
  889. $actrlstate[15 + $i] = True
  890. ElseIf $ainfo[4] <> $laatree[$i] AND $ainfo[4] <> $lautree[$i] AND $actrlstate[15 + $i] AND $inttreestate <> $i Then
  891. GUICtrlSetState($lautree[$i], $gui_hide)
  892. $actrlstate[15 + $i] = False
  893. EndIf
  894. Next
  895. EndIf
  896. EndIf
  897. WEnd
  898.  
  899. Func a2110b05a09()
  900. GUICtrlSetState($picbackgroundlogging, $gui_hide)
  901. GUICtrlSetState($inpserver, $gui_hide)
  902. GUICtrlSetState($inpusername, $gui_hide)
  903. GUICtrlSetState($inppassword, $gui_hide)
  904. GUICtrlSetState($lblrandomserver, $gui_hide)
  905. GUICtrlSetState($chkremember, $gui_hide)
  906. GUICtrlSetState($lblremember, $gui_hide)
  907. GUICtrlSetState($piclogin, $gui_hide)
  908. GUICtrlSetState($picview, $gui_hide)
  909. GUICtrlSetState($laulogin, $gui_hide)
  910. GUISetAccelerators(0)
  911. AdlibUnRegister("A5A30D01208")
  912. EndFunc
  913.  
  914. Func a0010c01347()
  915. $inttab = 1
  916. GUICtrlSetState($picbackgroundlogging, $gui_show)
  917. GUICtrlSetState($inpserver, $gui_show)
  918. GUICtrlSetState($inpusername, $gui_show)
  919. GUICtrlSetState($inppassword, $gui_show)
  920. GUICtrlSetState($lblrandomserver, $gui_show)
  921. GUICtrlSetState($chkremember, $gui_show)
  922. GUICtrlSetState($lblremember, $gui_show)
  923. GUICtrlSetState($piclogin, $gui_show)
  924. GUICtrlSetState($picview, $gui_show)
  925. GUICtrlSetState($laulogin, $gui_show)
  926. If $bloged = False Then GUISetAccelerators($formmainacc)
  927. AdlibRegister("A5A30D01208", 5000)
  928. EndFunc
  929.  
  930. Func a4810d0340e()
  931. GUICtrlSetState($picbackgroundplanning, $gui_hide)
  932. GUICtrlSetState($laaswitch, $gui_hide)
  933. GUICtrlSetState($lauplanning, $gui_hide)
  934. GUICtrlSetState($laufarm[$intactivfarm], $gui_hide)
  935. For $i = 1 To 6
  936. GUICtrlSetState($aobuilding[$i], $gui_hide)
  937. GUICtrlSetState($abtnplan[$i], $gui_hide)
  938. Next
  939. For $i = 1 To 4
  940. GUICtrlSetState($laufarm[$i], $gui_hide)
  941. GUICtrlSetState($laafarm[$i], $gui_hide)
  942. Next
  943. EndFunc
  944.  
  945. Func a1010e04725()
  946. $inttab = 2
  947. GUICtrlSetState($picbackgroundplanning, $gui_show)
  948. GUICtrlSetState($laaswitch, $gui_show)
  949. GUICtrlSetState($lauplanning, $gui_show)
  950. GUICtrlSetState($laufarm[$intactivfarm], $gui_show)
  951. For $i = 1 To 6
  952. GUICtrlSetState($aobuilding[$i], $gui_show)
  953. If $abuilding[$intactivfarm][$i] <> 22 AND $abuilding[$intactivfarm][$i] <> 0 Then GUICtrlSetState($abtnplan[$i], $gui_show)
  954. Next
  955. For $i = 1 To 4
  956. If $intactivfarm = $i Then GUICtrlSetState($laufarm[$i], $gui_show)
  957. GUICtrlSetState($laafarm[$i], $gui_show)
  958. Next
  959. EndFunc
  960.  
  961. Func a2c10f05a12()
  962. GUICtrlSetState($picbackgroundfiszado, $gui_hide)
  963. GUICtrlSetState($laaswitch, $gui_hide)
  964. GUICtrlSetState($laadonothing, $gui_hide)
  965. GUICtrlSetState($laakeep, $gui_hide)
  966. GUICtrlSetState($laareplace, $gui_hide)
  967. GUICtrlSetState($laudonothing, $gui_hide)
  968. GUICtrlSetState($laukeep, $gui_hide)
  969. GUICtrlSetState($laureplace, $gui_hide)
  970. GUICtrlSetState($laachecky, $gui_hide)
  971. GUICtrlSetState($lauchecky, $gui_hide)
  972. GUICtrlSetState($laacheckn, $gui_hide)
  973. GUICtrlSetState($laucheckn, $gui_hide)
  974. For $i = 1 To 5
  975. GUICtrlSetState($lautree[$i], $gui_hide)
  976. GUICtrlSetState($laatree[$i], $gui_hide)
  977. Next
  978. EndFunc
  979.  
  980. Func a262000194f()
  981. $inttab = 3
  982. GUICtrlSetState($picbackgroundfiszado, $gui_show)
  983. GUICtrlSetState($laaswitch, $gui_show)
  984. GUICtrlSetState($laadonothing, $gui_show)
  985. GUICtrlSetState($laakeep, $gui_show)
  986. GUICtrlSetState($laareplace, $gui_show)
  987. Global $strloterrystate = IniRead($strprofilepath, "Lottery", "do", "nothing")
  988. If $strloterrystate = "nothing" Then GUICtrlSetState($laudonothing, $gui_show)
  989. If $strloterrystate = "keep" Then GUICtrlSetState($laukeep, $gui_show)
  990. If $strloterrystate = "replace" Then GUICtrlSetState($laureplace, $gui_show)
  991. GUICtrlSetState($laachecky, $gui_show)
  992. GUICtrlSetState($laacheckn, $gui_show)
  993. If $bforestrystate = 0 Then GUICtrlSetState($laucheckn, $gui_show)
  994. If $bforestrystate = 1 Then GUICtrlSetState($lauchecky, $gui_show)
  995. For $i = 1 To 5
  996. If $i = $inttreestate Then GUICtrlSetState($lautree[$i], $gui_show)
  997. GUICtrlSetState($laatree[$i], $gui_show)
  998. Next
  999. EndFunc
  1000.  
  1001. Func a1520101741()
  1002. GUICtrlSetState($picbackgroundsettings, $gui_hide)
  1003. For $i = 1 To 4
  1004. GUICtrlSetState($achksettings[$i], $gui_hide)
  1005. GUICtrlSetState($laachksettings[$i], $gui_hide)
  1006. Next
  1007. EndFunc
  1008.  
  1009. Func a092020480d()
  1010. $inttab = 4
  1011. GUICtrlSetState($picbackgroundsettings, $gui_show)
  1012. For $i = 1 To 4
  1013. If $aconfig[$i - 1] = 1 Then GUICtrlSetState($achksettings[$i], $gui_show)
  1014. GUICtrlSetState($laachksettings[$i], $gui_show)
  1015. Next
  1016. EndFunc
  1017.  
  1018. Func a6220303721()
  1019. GUISetState(@SW_SHOW, $formmain)
  1020. Opt("TrayIconHide", 1)
  1021. EndFunc
  1022.  
  1023. Func a3d20405225($strserver, $strusername, $strpassword)
  1024. $asplitserver = StringRegExp($strserver, "^s(\d{1,2})\.([\w|\.]{1,})$", 3)
  1025. $ohttp.open("POST", "http://www." & $asplitserver[1] & "/ajax/createtoken.php")
  1026. $ohttp.setrequestheader("Content-Type", "application/x-www-form-urlencoded")
  1027. $ohttp.setrequestheader("User-Agent", $abrowser)
  1028. $ohttp.send("server=" & $asplitserver[0] & "&username=" & $strusername & "&password=" & $strpassword & "&ref=gomffpl&retid=")
  1029. $strreflink = StringReplace(StringTrimRight(StringTrimLeft($ohttp.responsetext, 4), 2), "\/", "/")
  1030. $bstatus = StringRight(StringLeft($ohttp.responsetext, 2), 1)
  1031. If $bstatus <> "0" Then
  1032. $bskip = False
  1033. $ohttp.open("GET", $strreflink)
  1034. $ohttp.setrequestheader("Content-Type", "text/html")
  1035. $ohttp.setrequestheader("User-Agent", $abrowser)
  1036. $ohttp.send()
  1037. If @OSVersion = "WIN_XP" Then
  1038. For $i = 1 To 1000
  1039. $stranalyse = StringMid($ohttp.responsetext, $i, 7)
  1040. If $stranalyse = "var rid" Then
  1041. Global $strrid = StringTrimLeft(StringMid($ohttp.responsetext, $i, 43), 11)
  1042. $bskip = True
  1043. ExitLoop 1
  1044. EndIf
  1045. Next
  1046. EndIf
  1047. $strprofilepath = "profiles\" & $strserver & "\" & $strusername & ".prof"
  1048. If NOT FileExists("profiles") OR NOT StringInStr(FileGetAttrib("profiles"), "D") Then DirCreate("profiles")
  1049. If NOT FileExists("profiles\" & $strserver) OR NOT StringInStr(FileGetAttrib("profiles\" & $strserver), "D") Then DirCreate("profiles\" & $strserver)
  1050. If NOT $bskip Then
  1051. $aresultsrid = StringRegExp($ohttp.responsetext, "var rid = \'(\w{1,32})\';", 3)
  1052. If NOT @error Then
  1053. Global $strrid = $aresultsrid[0]
  1054. Else
  1055. $asplitcrlf = StringSplit($ohttp.responsetext, @CRLF)
  1056. If NOT @error Then
  1057. Global $strrid = StringTrimLeft(StringTrimRight($asplitcrlf[12], 2), 12)
  1058. EndIf
  1059. EndIf
  1060. EndIf
  1061. Global $intlevelnum = a1d30c0094f()
  1062. Global $strloterrystate = IniRead($strprofilepath, "Lottery", "do", "nothing")
  1063. Global $bforestrystate = IniRead($strprofilepath, "Forestry", "active", 0)
  1064. Global $inttreestate = IniRead($strprofilepath, "Forestry", "seed", 1)
  1065. EndIf
  1066. Return $bstatus
  1067. EndFunc
  1068.  
  1069. Func a0820501522($strserver, $strusername, $strpassword)
  1070. $asplitserver = StringRegExp($strserver, "^s(\d{1,2})\.([\w|\.]{1,})$", 3)
  1071. $ohttp.open("POST", "http://www." & $asplitserver[1] & "/ajax/createtoken.php")
  1072. $ohttp.setrequestheader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8")
  1073. $ohttp.setrequestheader("User-Agent", $abrowser)
  1074. $ohttp.send("server=" & $asplitserver[0] & "&username=" & $strusername & "&password=" & $strpassword & "&ref=gomffpl&retid=")
  1075. $strreflink = StringReplace(StringTrimRight(StringTrimLeft($ohttp.responsetext, 4), 2), "\/", "/")
  1076. $bstatus = StringRight(StringLeft($ohttp.responsetext, 2), 1)
  1077. If $bstatus <> "0" Then ShellExecute($strreflink)
  1078. EndFunc
  1079.  
  1080. Func a3420601f58()
  1081. $ohttp.open("GET", "http://" & GUICtrlRead($inpserver) & "/farm/ajax.php?rid=" & $strrid & "&mode=getuserfarminfos&farm=1")
  1082. $ohttp.setrequestheader("User-Agent", $abrowser)
  1083. $ohttp.send()
  1084. $apremiumsplit = StringRegExp($ohttp.responsetext, 'premium\"\:(\d)\,\"premium_bis', 3)
  1085. $bpremium = Int($apremiumsplit[0])
  1086. EndFunc
  1087.  
  1088. Func a1120703d1f()
  1089. For $i = 1 To 4
  1090. $ohttp.open("GET", "http://" & GUICtrlRead($inpserver) & "/farm/ajax.php?rid=" & $strrid & "&mode=getuserfarminfos&farm=" & $i)
  1091. $ohttp.setrequestheader("User-Agent", $abrowser)
  1092. $ohttp.send()
  1093. If $ohttp.responsetext = "0" Then
  1094. For $j = 1 To 6
  1095. $abuilding[$i][$j] = 0
  1096. Next
  1097. Else
  1098. $asplitinfos = StringRegExp($ohttp.responsetext, '\"\d\":\{\"buildingid\"\:\"(\d{1,})\"', 3)
  1099. For $j = 1 To 6
  1100. $abuilding[$i][$j] = $asplitinfos[$j - 1]
  1101. Next
  1102. EndIf
  1103. Next
  1104. EndFunc
  1105.  
  1106. Func a3620805712($intfarm)
  1107. For $i = 1 To 6
  1108. If $bpremium = 0 AND $intactivfarm = 1 AND $i = 5 Then $abuilding[$intfarm][$i] = 22
  1109. If $bpremium = 0 AND $intactivfarm = 2 AND $i = 2 Then $abuilding[$intfarm][$i] = 22
  1110. If $bpremium = 0 AND $intactivfarm = 2 AND $i = 4 Then $abuilding[$intfarm][$i] = 22
  1111. If $bpremium = 0 AND $intactivfarm = 3 Then $abuilding[$intfarm][$i] = 22
  1112. If $bpremium = 0 AND $intactivfarm = 4 Then $abuilding[$intfarm][$i] = 22
  1113. If $abuilding[$intfarm][$i] = 22 OR $abuilding[$intfarm][$i] = 0 Then
  1114. GUICtrlSetState($abtnplan[$i], $gui_hide)
  1115. Else
  1116. GUICtrlSetState($abtnplan[$i], $gui_show)
  1117. EndIf
  1118. GUICtrlSetData($aobuilding[$i], " " & $aidtiles[$abuilding[$intfarm][$i]])
  1119. Next
  1120. EndFunc
  1121.  
  1122. Func a1d20901d0d($intpos)
  1123. If $abuilding[$intactivfarm][$intpos] = "1" Then a3a20a00657($intpos)
  1124. If $abuilding[$intactivfarm][$intpos] = "2" Then a4520b06110($intpos, 2)
  1125. If $abuilding[$intactivfarm][$intpos] = "3" Then a4520b06110($intpos, 3)
  1126. If $abuilding[$intactivfarm][$intpos] = "4" Then a4520b06110($intpos, 4)
  1127. If $abuilding[$intactivfarm][$intpos] = "5" Then a4520b06110($intpos, 5)
  1128. If $abuilding[$intactivfarm][$intpos] = "7" Then a5c20c02916($intpos, 7)
  1129. If $abuilding[$intactivfarm][$intpos] = "8" Then a5c20c02916($intpos, 8)
  1130. If $abuilding[$intactivfarm][$intpos] = "9" Then a5c20c02916($intpos, 9)
  1131. If $abuilding[$intactivfarm][$intpos] = "11" Then a4520b06110($intpos, 11)
  1132. If $abuilding[$intactivfarm][$intpos] = "12" Then a4520b06110($intpos, 12)
  1133. EndFunc
  1134.  
  1135. Func a3a20a00657($intpos)
  1136. $formplanninggarden = GUICreate("Pole", 267, 122, 192, 164, -1, -1, $formmain)
  1137. $cmbtype = GUICtrlCreateCombo("", 24, 16, 217, 25, BitOR($cbs_dropdownlist, $cbs_autohscroll))
  1138. GUICtrlSetData(-1, $strtiles, IniRead($strprofilepath, "Farm" & $intactivfarm & "Pos" & $intpos, "seed", ""))
  1139. $btnsave = GUICtrlCreateButton("Zapisz", 24, 78, 217, 33)
  1140. GUICtrlSetCursor(-1, 0)
  1141. $chkwater = GUICtrlCreateCheckbox("Podlewaj", 96, 40, 73, 25, BitOR($gui_ss_default_checkbox, $bs_left))
  1142. If Int(IniRead($strprofilepath, "Farm" & $intactivfarm & "Pos" & $intpos, "water", 0)) = 1 Then GUICtrlSetState(-1, $gui_checked)
  1143. GUISetState(@SW_SHOW)
  1144. While True
  1145. $nmsg = GUIGetMsg()
  1146. Switch $nmsg
  1147. Case $gui_event_close
  1148. GUIDelete($formplanninggarden)
  1149. ExitLoop
  1150. Case $btnsave
  1151. GUICtrlSetState($btnsave, 128)
  1152. GUICtrlSetData($btnsave, "Zapisywanie...")
  1153. IniDelete($strprofilepath, "Farm" & $intactivfarm & "Pos" & $intpos)
  1154. IniWrite($strprofilepath, "Farm" & $intactivfarm & "Pos" & $intpos, "seed", GUICtrlRead($cmbtype))
  1155. IniWrite($strprofilepath, "Farm" & $intactivfarm & "Pos" & $intpos, "water", Mod(Int(GUICtrlRead($chkwater)), 2))
  1156. ConsoleWrite("+>Zapisałem nowe ustawienia pozycji " & $intpos & " na " & $intactivfarm & " farmie." & @CRLF)
  1157. Sleep(500)
  1158. GUIDelete($formplanninggarden)
  1159. ExitLoop
  1160. EndSwitch
  1161. WEnd
  1162. EndFunc
  1163.  
  1164. Func a4520b06110($intpos, $inttype)
  1165. $formplanningbuilding = GUICreate($aidtiles[$inttype], 320, 136, (@DesktopWidth - 320) / 2, (@DesktopHeight - 136) / 2, -1, -1, $formmain)
  1166. $picbackgroundb = GUICtrlCreatePic("", 0, 0, 320, 136)
  1167. a0610905208($picbackgroundb, "BACKGROUND_BUILDING", $rt_bitmap)
  1168. GUICtrlSetState(-1, 128)
  1169. $intdefaultvalue = IniRead($strprofilepath, "Farm" & $intactivfarm & "Pos" & $intpos, "amount", 1)
  1170. $inpamount = GUICtrlCreateInput($intdefaultvalue, 161, 95, 158, 19, -1, 0)
  1171. GUICtrlSetBkColor(-1, 2302755)
  1172. GUICtrlSetColor(-1, 15658734)
  1173. GUICtrlSetFont(-1, 9.5, 800, 0, "Sans")
  1174. GUICtrlSendMsg(-1, 5377, 0, "Ilość")
  1175. $lbloption1 = GUICtrlCreateLabel("", 16, 75, 144, 20, $ss_center)
  1176. GUICtrlSetBkColor(-1, $gui_bkcolor_transparent)
  1177. GUICtrlSetColor(-1, 15658734)
  1178. GUICtrlSetFont(-1, 9.5, 800, 0, "Sans")
  1179. $lbloption2 = GUICtrlCreateLabel("", 160, 75, 144, 20, $ss_center)
  1180. GUICtrlSetBkColor(-1, $gui_bkcolor_transparent)
  1181. GUICtrlSetColor(-1, 15658734)
  1182. GUICtrlSetFont(-1, 9.5, 800, 0, "Sans")
  1183. If $inttype = 2 Then
  1184. GUICtrlSetData($lbloption1, "Zboże")
  1185. GUICtrlSetData(-1, "Kukurydza")
  1186. ElseIf $inttype = 3 Then
  1187. GUICtrlSetData($lbloption1, "Koniczyna")
  1188. GUICtrlSetData(-1, "Rzepak")
  1189. ElseIf $inttype = 4 Then
  1190. GUICtrlSetData($lbloption1, "Buraki pastewne")
  1191. GUICtrlSetData(-1, "Zioła")
  1192. ElseIf $inttype = 4 Then
  1193. GUICtrlSetData($lbloption1, "Słoneczniki")
  1194. GUICtrlSetData(-1, "Bławatki")
  1195. ElseIf $inttype = 11 Then
  1196. GUICtrlSetData($lbloption1, "Karma dla rybek")
  1197. GUICtrlSetData(-1, "Superkarma dla rybek")
  1198. ElseIf $inttype = 12 Then
  1199. GUICtrlSetData($lbloption1, "Bodziszki")
  1200. GUICtrlSetData(-1, "Stokrotki")
  1201. EndIf
  1202. $lausave = GUICtrlCreateLabel("", 132, 46, 68, 2)
  1203. GUICtrlSetBkColor(-1, 3319763)
  1204. GUICtrlSetState(-1, $gui_hide)
  1205. $lauclose = GUICtrlCreateLabel("", 200, 46, 76, 2)
  1206. GUICtrlSetBkColor(-1, 3319763)
  1207. GUICtrlSetState(-1, $gui_hide)
  1208. $laasave = GUICtrlCreateLabel("", 132, 18, 68, 30)
  1209. GUICtrlSetBkColor(-1, $gui_bkcolor_transparent)
  1210. $laaclose = GUICtrlCreateLabel("", 200, 18, 76, 30)
  1211. GUICtrlSetBkColor(-1, $gui_bkcolor_transparent)
  1212. $laaoption1 = GUICtrlCreateLabel("", 16, 64, 144, 30)
  1213. GUICtrlSetBkColor(-1, $gui_bkcolor_transparent)
  1214. $laaoption2 = GUICtrlCreateLabel("", 160, 64, 144, 30)
  1215. GUICtrlSetBkColor(-1, $gui_bkcolor_transparent)
  1216. $lauoption1 = GUICtrlCreateLabel("", 16, 92, 144, 2)
  1217. GUICtrlSetBkColor(-1, 3319763)
  1218. $lauoption2 = GUICtrlCreateLabel("", 160, 92, 144, 2)
  1219. GUICtrlSetBkColor(-1, 3319763)
  1220. Local $boption = False
  1221. For $i = 0 To UBound($acomponentprod) - 1
  1222. If Int(IniRead($strprofilepath, "Farm" & $intactivfarm & "Pos" & $intpos, "pid", "null")) = $acomponentprod[$i][1] Then
  1223. If $acomponentprod[$i][0] = GUICtrlRead($lbloption1) Then
  1224. $boption = False
  1225. GUICtrlSetState($lauoption2, $gui_hide)
  1226. ElseIf $acomponentprod[$i][0] = GUICtrlRead($lbloption2) Then
  1227. $boption = True
  1228. GUICtrlSetState($lauoption1, $gui_hide)
  1229. EndIf
  1230. ExitLoop
  1231. EndIf
  1232. Next
  1233. Local $actrlstateab[4] = [False, False, False, False]
  1234. GUISetState(@SW_SHOW)
  1235. While True
  1236. Switch GUIGetMsg()
  1237. Case -3, $lauclose, $laaclose
  1238. GUIDelete($formplanningbuilding)
  1239. ExitLoop
  1240. Case $lausave, $laasave
  1241. IniDelete($strprofilepath, "Farm" & $intactivfarm & "Pos" & $intpos)
  1242. If NOT $boption Then
  1243. $strnameofprod = GUICtrlRead($lbloption1)
  1244. Else
  1245. $strnameofprod = GUICtrlRead($lbloption2)
  1246. EndIf
  1247. For $i = 0 To UBound($acomponentprod) - 1
  1248. If $strnameofprod = $acomponentprod[$i][0] Then IniWrite($strprofilepath, "Farm" & $intactivfarm & "Pos" & $intpos, "pid", $acomponentprod[$i][1])
  1249. Next
  1250. IniWrite($strprofilepath, "Farm" & $intactivfarm & "Pos" & $intpos, "amount", GUICtrlRead($inpamount))
  1251. ConsoleWrite("+>Zapisałem nowe ustawienia pozycji " & $intpos & " na " & $intactivfarm & " farmie." & @CRLF)
  1252. Case $laaoption1, $lauoption1, $lbloption1
  1253. GUICtrlSetState($lauoption2, $gui_hide)
  1254. $boption = False
  1255. Case $laaoption2, $lauoption2, $lbloption2
  1256. GUICtrlSetState($lauoption1, $gui_hide)
  1257. $boption = True
  1258. EndSwitch
  1259. $ainfo = GUIGetCursorInfo()
  1260. If NOT @error Then
  1261. If $ainfo[4] = $lauclose OR $ainfo[4] = $laaclose AND $actrlstateab[0] = False Then
  1262. GUICtrlSetState($lauclose, $gui_show)
  1263. $actrlstateab[0] = True
  1264. ElseIf $ainfo[4] <> $lauclose AND $ainfo[4] <> $laaclose AND $actrlstateab[0] = True Then
  1265. GUICtrlSetState($lauclose, $gui_hide)
  1266. $actrlstateab[0] = False
  1267. EndIf
  1268. If $ainfo[4] = $lausave OR $ainfo[4] = $laasave AND $actrlstateab[1] = False Then
  1269. GUICtrlSetState($lausave, $gui_show)
  1270. $actrlstateab[1] = True
  1271. ElseIf $ainfo[4] <> $lausave AND $ainfo[4] <> $laasave AND $actrlstateab[1] = True Then
  1272. GUICtrlSetState($lausave, $gui_hide)
  1273. $actrlstateab[1] = False
  1274. EndIf
  1275. If $ainfo[4] = $lauoption1 OR $ainfo[4] = $laaoption1 OR $ainfo[4] = $lbloption1 AND $actrlstateab[2] = False Then
  1276. GUICtrlSetState($lauoption1, $gui_show)
  1277. $actrlstateab[2] = True
  1278. ElseIf $ainfo[4] <> $lauoption1 AND $ainfo[4] <> $laaoption1 AND $ainfo[4] <> $lbloption1 AND $actrlstateab[2] = True AND $boption <> False Then
  1279. GUICtrlSetState($lauoption1, $gui_hide)
  1280. $actrlstateab[2] = False
  1281. EndIf
  1282. If $ainfo[4] = $lauoption2 OR $ainfo[4] = $laaoption2 AND $ainfo[4] <> $lbloption1 OR $ainfo[4] = $lbloption2 AND $actrlstateab[3] = False Then
  1283. GUICtrlSetState($lauoption2, $gui_show)
  1284. $actrlstateab[3] = True
  1285. ElseIf $ainfo[4] <> $lauoption2 AND $ainfo[4] <> $laaoption2 AND $ainfo[4] <> $lbloption2 AND $actrlstateab[3] = True AND $boption <> True Then
  1286. GUICtrlSetState($lauoption2, $gui_hide)
  1287. $actrlstateab[3] = False
  1288. EndIf
  1289. EndIf
  1290. WEnd
  1291. EndFunc
  1292.  
  1293. Func a5c20c02916($intpos, $inttype)
  1294. $formplanningbuilding = GUICreate($aidtiles[$inttype], 320, 120, (@DesktopWidth - 320) / 2, (@DesktopHeight - 120) / 2, -1, -1, $formmain)
  1295. $picbackgroundab = GUICtrlCreatePic("", 0, 0, 320, 120)
  1296. a0610905208($picbackgroundab, "BACKGROUND_ADVBUILDING", $rt_bitmap)
  1297. GUICtrlSetState(-1, 128)
  1298. $lbloption1 = GUICtrlCreateLabel("", 16, 75, 144, 20, $ss_center)
  1299. GUICtrlSetBkColor(-1, $gui_bkcolor_transparent)
  1300. GUICtrlSetColor(-1, 15658734)
  1301. GUICtrlSetFont(-1, 9.5, 800, 0, "Sans")
  1302. $lbloption2 = GUICtrlCreateLabel("", 160, 75, 144, 20, $ss_center)
  1303. GUICtrlSetBkColor(-1, $gui_bkcolor_transparent)
  1304. GUICtrlSetColor(-1, 15658734)
  1305. GUICtrlSetFont(-1, 9.5, 800, 0, "Sans")
  1306. If $inttype = 7 Then
  1307. GUICtrlSetData($lbloption1, "Majonez")
  1308. GUICtrlSetData(-1, "Ketchup")
  1309. ElseIf $inttype = 8 Then
  1310. GUICtrlSetData($lbloption1, "Ser")
  1311. GUICtrlSetData(-1, "Jogurt")
  1312. ElseIf $inttype = 9 Then
  1313. GUICtrlSetData($lbloption1, "Kłębek wełny")
  1314. GUICtrlSetData(-1, "Kłębek wełny angora")
  1315. EndIf
  1316. $lausave = GUICtrlCreateLabel("", 132, 46, 68, 2)
  1317. GUICtrlSetBkColor(-1, 3319763)
  1318. GUICtrlSetState(-1, $gui_hide)
  1319. $lauclose = GUICtrlCreateLabel("", 200, 46, 76, 2)
  1320. GUICtrlSetBkColor(-1, 3319763)
  1321. GUICtrlSetState(-1, $gui_hide)
  1322. $laasave = GUICtrlCreateLabel("", 132, 18, 68, 30)
  1323. GUICtrlSetBkColor(-1, $gui_bkcolor_transparent)
  1324. $laaclose = GUICtrlCreateLabel("", 200, 18, 76, 30)
  1325. GUICtrlSetBkColor(-1, $gui_bkcolor_transparent)
  1326. $laaoption1 = GUICtrlCreateLabel("", 16, 64, 144, 30)
  1327. GUICtrlSetBkColor(-1, $gui_bkcolor_transparent)
  1328. $laaoption2 = GUICtrlCreateLabel("", 160, 64, 144, 30)
  1329. GUICtrlSetBkColor(-1, $gui_bkcolor_transparent)
  1330. $lauoption1 = GUICtrlCreateLabel("", 16, 92, 144, 2)
  1331. GUICtrlSetBkColor(-1, 3319763)
  1332. $lauoption2 = GUICtrlCreateLabel("", 160, 92, 144, 2)
  1333. GUICtrlSetBkColor(-1, 3319763)
  1334. Local $boption = False
  1335. For $i = 0 To UBound($acomponentadvprod) - 1
  1336. If Int(IniRead($strprofilepath, "Farm" & $intactivfarm & "Pos" & $intpos, "pid", "null")) = $acomponentadvprod[$i][1] Then
  1337. If $acomponentadvprod[$i][0] = GUICtrlRead($lbloption1) Then
  1338. $boption = False
  1339. GUICtrlSetState($lauoption2, $gui_hide)
  1340. ElseIf $acomponentadvprod[$i][0] = GUICtrlRead($lbloption2) Then
  1341. $boption = True
  1342. GUICtrlSetState($lauoption1, $gui_hide)
  1343. EndIf
  1344. ExitLoop
  1345. EndIf
  1346. Next
  1347. Local $actrlstateab[4] = [False, False, False, False]
  1348. GUISetState(@SW_SHOW)
  1349. While True
  1350. Switch GUIGetMsg()
  1351. Case -3, $lauclose, $laaclose
  1352. GUIDelete($formplanningbuilding)
  1353. ExitLoop
  1354. Case $lausave, $laasave
  1355. IniDelete($strprofilepath, "Farm" & $intactivfarm & "Pos" & $intpos)
  1356. If NOT $boption Then
  1357. $strnameofprod = GUICtrlRead($lbloption1)
  1358. Else
  1359. $strnameofprod = GUICtrlRead($lbloption2)
  1360. EndIf
  1361. For $i = 0 To UBound($acomponentadvprod) - 1
  1362. If $strnameofprod = $acomponentadvprod[$i][0] Then IniWrite($strprofilepath, "Farm" & $intactivfarm & "Pos" & $intpos, "pid", $acomponentadvprod[$i][1])
  1363. Next
  1364. Case $laaoption1, $lauoption1, $lbloption1
  1365. GUICtrlSetState($lauoption2, $gui_hide)
  1366. $boption = False
  1367. Case $laaoption2, $lauoption2, $lbloption2
  1368. GUICtrlSetState($lauoption1, $gui_hide)
  1369. $boption = True
  1370. EndSwitch
  1371. $ainfo = GUIGetCursorInfo()
  1372. If NOT @error Then
  1373. If $ainfo[4] = $lauclose OR $ainfo[4] = $laaclose AND $actrlstateab[0] = False Then
  1374. GUICtrlSetState($lauclose, $gui_show)
  1375. $actrlstateab[0] = True
  1376. ElseIf $ainfo[4] <> $lauclose AND $ainfo[4] <> $laaclose AND $actrlstateab[0] = True Then
  1377. GUICtrlSetState($lauclose, $gui_hide)
  1378. $actrlstateab[0] = False
  1379. EndIf
  1380. If $ainfo[4] = $lausave OR $ainfo[4] = $laasave AND $actrlstateab[1] = False Then
  1381. GUICtrlSetState($lausave, $gui_show)
  1382. $actrlstateab[1] = True
  1383. ElseIf $ainfo[4] <> $lausave AND $ainfo[4] <> $laasave AND $actrlstateab[1] = True Then
  1384. GUICtrlSetState($lausave, $gui_hide)
  1385. $actrlstateab[1] = False
  1386. EndIf
  1387. If $ainfo[4] = $lauoption1 OR $ainfo[4] = $laaoption1 OR $ainfo[4] = $lbloption1 AND $actrlstateab[2] = False Then
  1388. GUICtrlSetState($lauoption1, $gui_show)
  1389. $actrlstateab[2] = True
  1390. ElseIf $ainfo[4] <> $lauoption1 AND $ainfo[4] <> $laaoption1 AND $ainfo[4] <> $lbloption1 AND $actrlstateab[2] = True AND $boption <> False Then
  1391. GUICtrlSetState($lauoption1, $gui_hide)
  1392. $actrlstateab[2] = False
  1393. EndIf
  1394. If $ainfo[4] = $lauoption2 OR $ainfo[4] = $laaoption2 AND $ainfo[4] <> $lbloption1 OR $ainfo[4] = $lbloption2 AND $actrlstateab[3] = False Then
  1395. GUICtrlSetState($lauoption2, $gui_show)
  1396. $actrlstateab[3] = True
  1397. ElseIf $ainfo[4] <> $lauoption2 AND $ainfo[4] <> $laaoption2 AND $ainfo[4] <> $lbloption2 AND $actrlstateab[3] = True AND $boption <> True Then
  1398. GUICtrlSetState($lauoption2, $gui_hide)
  1399. $actrlstateab[3] = False
  1400. EndIf
  1401. EndIf
  1402. WEnd
  1403. EndFunc
  1404.  
  1405. Func a6320d00030($intfarm, $intpos)
  1406. $ohttp.open("GET", "http://" & GUICtrlRead($inpserver) & "/farm/ajax.php?rid=" & $strrid & "&mode=inner_init&farm=" & $intfarm & "&position=" & $intpos)
  1407. $ohttp.setrequestheader("User-Agent", $abrowser)
  1408. $ohttp.send()
  1409. Return $ohttp.responsetext
  1410. EndFunc
  1411.  
  1412. Func a2c20e0525c($intfarm, $intpos)
  1413. $ohttp.open("GET", "http://" & GUICtrlRead($inpserver) & "/farm/ajax.php?rid=" & $strrid & "&mode=innerinfos&farm=" & $intfarm & "&position=" & $intpos)
  1414. $ohttp.setrequestheader("User-Agent", $abrowser)
  1415. $ohttp.send()
  1416. Return $ohttp.responsetext
  1417. EndFunc
  1418.  
  1419. Func a2b20f0593a()
  1420. If NOT FileExists($strprofilepath) Then
  1421. MsgBox(48, "", "Twój profil jest pusty, aby bot mógł pracować musisz ustawić co ma robić." & @CRLF & "Aby tego dokonać przejdź do zakładki 'FARMA' lub 'EL FISZADO'." & @CRLF & "Po odpowiednim skonfigurowaniu, możesz nacisnąć 'START', aby bot co 3 minuty sprawdzał stan Twojej farmy.")
  1422. GUICtrlSetBkColor($lauswitch, 57344)
  1423. a0610905208($laaswitch, "LAA_START", $rt_bitmap)
  1424. $bstateofbot = False
  1425. AdlibUnRegister("A2B20F0593A")
  1426. Return
  1427. EndIf
  1428. a0610905208($laaswitch, "LAA_WORK", $rt_bitmap)
  1429. $strlast = IniRead($strprofilepath, "Lottery", "last", "null")
  1430. If $strlast <> @YEAR & ":" & @YDAY Then
  1431. $strloterrystate = IniRead($strprofilepath, "Lottery", "do", "nothing")
  1432. If $strloterrystate <> "nothing" Then
  1433. $ohttp.open("GET", "http://" & GUICtrlRead($inpserver) & "/city/ajax.php?rid=" & $strrid & "&city=2&mode=newlot")
  1434. $ohttp.setrequestheader("User-Agent", $abrowser)
  1435. $ohttp.send()
  1436. EndIf
  1437. If $strloterrystate = "replace" Then
  1438. $ohttp.open("GET", "http://" & GUICtrlRead($inpserver) & "/city/ajax.php?rid=" & $strrid & "&city=2&mode=lotgetprize")
  1439. $ohttp.setrequestheader("User-Agent", $abrowser)
  1440. $ohttp.send()
  1441. EndIf
  1442. IniWrite($strprofilepath, "Lottery", "last", @YEAR & ":" & @YDAY)
  1443. EndIf
  1444. For $i = 1 To 4
  1445. For $j = 1 To 6
  1446. IniReadSection($strprofilepath, "Farm" & $i & "Pos" & $j)
  1447. If NOT @error Then
  1448. If $abuilding[$i][$j] = "1" Then a1830001d48($i, $j)
  1449. If $abuilding[$i][$j] = "2" Then a4430104834($i, $j)
  1450. If $abuilding[$i][$j] = "3" Then a4430104834($i, $j)
  1451. If $abuilding[$i][$j] = "4" Then a4430104834($i, $j)
  1452. If $abuilding[$i][$j] = "5" Then a4430104834($i, $j)
  1453. If $abuilding[$i][$j] = "7" Then a4430104834($i, $j)
  1454. If $abuilding[$i][$j] = "8" Then a4430104834($i, $j)
  1455. If $abuilding[$i][$j] = "9" Then a4430104834($i, $j)
  1456. If $abuilding[$i][$j] = "11" Then a4430104834($i, $j)
  1457. If $abuilding[$i][$j] = "12" Then a4430104834($i, $j)
  1458. EndIf
  1459. Next
  1460. Next
  1461. a0730806103()
  1462. Global $intlevelnum = a1d30c0094f()
  1463. a0610905208($laaswitch, "LAA_STOP", $rt_bitmap)
  1464. EndFunc
  1465.  
  1466. Func a1830001d48($intfarm, $intpos)
  1467. $ohttp.open("GET", "http://" & GUICtrlRead($inpserver) & "/farm/ajax.php?rid=" & $strrid & "&mode=gardeninit&farm=" & $intfarm & "&position=" & $intpos)
  1468. $ohttp.setrequestheader("User-Agent", $abrowser)
  1469. $ohttp.send()
  1470. $asplitphase = StringRegExp($ohttp.responsetext, 'phase":(\d)', 3)
  1471. For $i = 1 To 120
  1472. If $asplitphase[$i] = "4" OR UBound($asplitphase) < 120 Then
  1473. a403060235f($intfarm, $intpos)
  1474. ExitLoop
  1475. Else
  1476. Return
  1477. EndIf
  1478. Next
  1479. a0330703e5f($intfarm, $intpos)
  1480. EndFunc
  1481.  
  1482. Func a4430104834($intfarm, $intpos)
  1483. If $abuilding[$intfarm][$intpos] = "2" OR $abuilding[$intfarm][$intpos] = "3" OR $abuilding[$intfarm][$intpos] = "4" OR $abuilding[$intfarm][$intpos] = "5" OR $abuilding[$intfarm][$intpos] = "11" OR $abuilding[$intfarm][$intpos] = "12" Then
  1484. $bremain = StringRegExp(a6320d00030($intfarm, $intpos), 'remain\"\:(\d{1,}),\"')
  1485. $aremain = StringRegExp(a6320d00030($intfarm, $intpos), 'remain\"\:(\d{1,}),\"', 3)
  1486. If NOT $bremain Then
  1487. a4e30203254($intfarm, $intpos)
  1488. EndIf
  1489. If $bremain AND $aremain[0] = "1" Then
  1490. a0c30402354($intfarm, $intpos)
  1491. a4e30203254($intfarm, $intpos)
  1492. EndIf
  1493. ElseIf $abuilding[$intfarm][$intpos] = "7" OR $abuilding[$intfarm][$intpos] = "8" OR $abuilding[$intfarm][$intpos] = "9" Then
  1494. $strinfo = a2c20e0525c($intfarm, $intpos)
  1495. $bcheck1 = StringRegExp($strinfo, '\{\"datablock\"\:\[1\,\{\"(\d{1,})\"\:2\,\"pid\"')
  1496. $bcheck2 = StringRegExp($strinfo, '\{\"datablock\"\:\[1\,\{\"(\d{1,})\"\:0\,')
  1497. If $bcheck1 OR $bcheck2 Then
  1498. a033050194b($intfarm, $intpos)
  1499. a0730304529($intfarm, $intpos)
  1500. EndIf
  1501. EndIf
  1502. EndFunc
  1503.  
  1504. Func a4e30203254($intfarm, $intpos)
  1505. $intpid = IniRead($strprofilepath, "Farm" & $intfarm & "Pos" & $intpos, "pid", "null")
  1506. $intamount = IniRead($strprofilepath, "Farm" & $intfarm & "Pos" & $intpos, "amount", "1")
  1507. $intlevelnum = a1d30c0094f()
  1508. If $intpid = "null" Then Return
  1509. If $bpremium = 1 OR ($intlevelnum >= 5 AND $intlevelnum < 10) Then
  1510. $ohttp.open("GET", "http://" & GUICtrlRead($inpserver) & "/farm/ajax.php?rid=" & $strrid & "&mode=inner_feed&farm=" & $intfarm & "&position=" & $intpos & "&pid=" & $intpid & "&amount=" & $intamount)
  1511. $ohttp.setrequestheader("User-Agent", $abrowser)
  1512. $ohttp.send()
  1513. Return True
  1514. EndIf
  1515. For $i = 1 To $intamount
  1516. $ohttp.open("GET", "http://" & GUICtrlRead($inpserver) & "/farm/ajax.php?rid=" & $strrid & "&mode=inner_feed&farm=" & $intfarm & "&position=" & $intpos & "&pid=" & $intpid & "&amount=1")
  1517. $ohttp.setrequestheader("User-Agent", $abrowser)
  1518. $ohttp.send()
  1519. Next
  1520. EndFunc
  1521.  
  1522. Func a0730304529($intfarm, $intpos)
  1523. $intadvpid = IniRead($strprofilepath, "Farm" & $intfarm & "Pos" & $intpos, "pid", "null")
  1524. $ohttp.open("GET", "http://" & GUICtrlRead($inpserver) & "/farm/ajax.php?rid=" & $strrid & "&mode=setadvancedproduction&farm=" & $intfarm & "&position=" & $intpos & "&id=" & $intadvpid & "&product=" & $intadvpid)
  1525. $ohttp.setrequestheader("User-Agent", $abrowser)
  1526. $ohttp.send()
  1527. EndFunc
  1528.  
  1529. Func a0c30402354($intfarm, $intpos)
  1530. $ohttp.open("GET", "http://" & GUICtrlRead($inpserver) & "/farm/ajax.php?rid=" & $strrid & "&mode=inner_crop&farm=" & $intfarm & "&position=" & $intpos)
  1531. $ohttp.setrequestheader("User-Agent", $abrowser)
  1532. $ohttp.send()
  1533. EndFunc
  1534.  
  1535. Func a033050194b($intfarm, $intpos)
  1536. $ohttp.open("GET", "http://" & GUICtrlRead($inpserver) & "/farm/ajax.php?rid=" & $strrid & "&mode=getadvancedcrop&farm=" & $intfarm & "&position=" & $intpos)
  1537. $ohttp.setrequestheader("User-Agent", $abrowser)
  1538. $ohttp.send()
  1539. EndFunc
  1540.  
  1541. Func a403060235f($intfarm, $intpos)
  1542. $ohttp.open("GET", "http://" & GUICtrlRead($inpserver) & "/farm/ajax.php?rid=" & $strrid & "&mode=getuserfarminfos&farm=1")
  1543. $ohttp.setrequestheader("User-Agent", $abrowser)
  1544. $ohttp.send()
  1545. $alevelnumsplit = StringRegExp($ohttp.responsetext, 'levelnum\"\:\"(\d{1,})', 3)
  1546. If Int($alevelnumsplit[0]) < 4 Then
  1547. Local $avirtualgarden[121]
  1548. $ohttp.open("GET", "http://" & GUICtrlRead($inpserver) & "/farm/ajax.php?rid=" & $strrid & "&mode=gardeninit&farm=" & $intfarm & "&position=" & $intpos)
  1549. $ohttp.setrequestheader("User-Agent", $abrowser)
  1550. $ohttp.send()
  1551. $teil_nr = StringRegExp($ohttp.responsetext, 'teil_nr":"(\d{1,})"', 3)
  1552. $j = 1
  1553. For $i = 1 To 120
  1554. If $teil_nr[$j - 1] = $i Then
  1555. $avirtualgarden[$i] = $teil_nr[$j - 1]
  1556. $j += 1
  1557. Else
  1558. $avirtualgarden[$i] = "empty"
  1559. EndIf
  1560. Next
  1561. Local $aphase[121]
  1562. $asplitphase = StringRegExp($ohttp.responsetext, 'phase":(\d)', 3)
  1563. $j = 1
  1564. For $i = 1 To 120
  1565. If $avirtualgarden[$i] <> "empty" Then
  1566. $aphase[$i] = $asplitphase[$j - 1]
  1567. $j += 1
  1568. Else
  1569. $aphase[$i] = "0"
  1570. EndIf
  1571. Next
  1572. Local $ainhalt[121]
  1573. $asplitinhalt = StringRegExp($ohttp.responsetext, 'inhalt\"\:\"(\d{1,})\"', 3)
  1574. $j = 1
  1575. For $i = 1 To 120
  1576. If $avirtualgarden[$i] <> "empty" Then
  1577. $ainhalt[$i] = $asplitinhalt[$j - 1]
  1578. $j += 1
  1579. EndIf
  1580. Next
  1581. Local $asizex[121], $asizey[121]
  1582. $asplitsizex = StringRegExp($ohttp.responsetext, 'x":(\d)', 3)
  1583. $asplitsizey = StringRegExp($ohttp.responsetext, 'y":(\d)', 3)
  1584. $j = 1
  1585. For $i = 1 To 120
  1586. If $avirtualgarden[$i] <> "empty" Then
  1587. $asizex[$i] = $asplitsizex[$j - 1]
  1588. $asizey[$i] = $asplitsizey[$j - 1]
  1589. $j += 1
  1590. EndIf
  1591. Next
  1592. For $j = 1 To 120
  1593. If $avirtualgarden[$j] <> "empty" Then
  1594. If $asizex[$j] * $asizey[$j] = 1 AND $aphase[$j] = "4" Then
  1595. $ohttp.open("GET", "http://" & GUICtrlRead($inpserver) & "/save/ernte.php?rid=" & $strrid & "&pflanze[]=" & $ainhalt[$j] & "&feld[]=" & $j & "&felder[]=" & $j & "&position=" & $intpos & "&farm=" & $intfarm)
  1596. $ohttp.setrequestheader("User-Agent", $abrowser)
  1597. $ohttp.send()
  1598. ElseIf $asizex[$j] * $asizey[$j] = 2 AND $aphase[$j] = "4" Then
  1599. $ohttp.open("GET", "http://" & GUICtrlRead($inpserver) & "/save/ernte.php?rid=" & $strrid & "&pflanze[]=" & $ainhalt[$j] & "&feld[]=" & $j & "&felder[]=" & $j & "," & $j + 1 & "&position=" & $intpos & "&farm=" & $intfarm)
  1600. $ohttp.setrequestheader("User-Agent", $abrowser)
  1601. $ohttp.send()
  1602. ElseIf $asizex[$j] * $asizey[$j] = 4 AND $aphase[$j] = "4" Then
  1603. $ohttp.open("GET", "http://" & GUICtrlRead($inpserver) & "/save/ernte.php?rid=" & $strrid & "&pflanze[]=" & $ainhalt[$j] & "&feld[]=" & $j & "&felder[]=" & $j & "," & $j + 1 & "," & $j + 12 & "," & $j + 13 & "&position=" & $intpos & "&farm=" & $intfarm)
  1604. $ohttp.setrequestheader("User-Agent", $abrowser)
  1605. $ohttp.send()
  1606. EndIf
  1607. EndIf
  1608. Next
  1609. Else
  1610. $ohttp.open("GET", "http://" & GUICtrlRead($inpserver) & "/farm/ajax.php?rid=" & $strrid & "&mode=cropgarden&farm=" & $intfarm & "&position=" & $intpos)
  1611. $ohttp.setrequestheader("Content-Type", "text/html")
  1612. $ohttp.setrequestheader("User-Agent", $abrowser)
  1613. $ohttp.send()
  1614. EndIf
  1615. EndFunc
  1616.  
  1617. Func a0330703e5f($intfarm, $intpos)
  1618. $strnameofseed = IniRead($strprofilepath, "Farm" & $intfarm & "Pos" & $intpos, "seed", "error")
  1619. If $strnameofseed = "error" Then Return
  1620. $intid = "null"
  1621. $ohttp.open("GET", "http://" & GUICtrlRead($inpserver) & "/farm/ajax.php?rid=" & $strrid & "&mode=getuserfarminfos&farm=1")
  1622. $ohttp.setrequestheader("User-Agent", $abrowser)
  1623. $ohttp.send()
  1624. $alevelnumsplit = StringRegExp($ohttp.responsetext, 'levelnum\"\:\"(\d{1,})', 3)
  1625. $intlevelnum = Int($alevelnumsplit[0])
  1626. For $i = 0 To UBound($aids) - 1
  1627. If $aids[$i][2] = $strnameofseed Then
  1628. $intid = $aids[$i][0]
  1629. $intsize = $aids[$i][1]
  1630. ExitLoop
  1631. EndIf
  1632. Next
  1633. If $intid = "null" Then Return
  1634. $strwater = IniRead($strprofilepath, "Farm" & $intfarm & "Pos" & $intpos, "water", "0")
  1635. If $intsize = 1 Then
  1636. For $i = 1 To 120
  1637. $ohttp.open("GET", "http://" & GUICtrlRead($inpserver) & "/save/pflanz.php?rid=" & $strrid & "&pflanze[]=" & $intid & "&feld[]=" & $i & "&felder[]=" & $i & "&position=" & $intpos & "&farm=" & $intfarm)
  1638. $ohttp.setrequestheader("User-Agent", $abrowser)
  1639. $ohttp.setrequestheader("Content-Type", "text/html")
  1640. $ohttp.send()
  1641. If $strwater = "1" AND ($intlevelnum < 5 OR $intlevelnum >= 10 AND $bpremium = 0) Then
  1642. $ohttp.open("GET", "http://" & GUICtrlRead($inpserver) & "/save/wasser.php?rid=" & $strrid & "&feld[]=" & $i & "&felder[]=" & $i & "&position=" & $intpos & "&farm=" & $intfarm)
  1643. $ohttp.setrequestheader("User-Agent", $abrowser)
  1644. $ohttp.setrequestheader("Content-Type", "text/html")
  1645. $ohttp.send()
  1646. EndIf
  1647. Next
  1648. If $strwater = "1" AND (($intlevelnum >= 5 AND $intlevelnum < 10) OR $bpremium = 1) Then
  1649. $ohttp.open("GET", "http://" & GUICtrlRead($inpserver) & "/farm/ajax.php?rid=" & $strrid & "&mode=watergarden&farm=" & $intfarm & "&position=" & $intpos)
  1650. $ohttp.setrequestheader("User-Agent", $abrowser)
  1651. $ohttp.send()
  1652. EndIf
  1653. ElseIf $intsize = 2 Then
  1654. For $i = 1 To 120
  1655. $ohttp.open("GET", "http://" & GUICtrlRead($inpserver) & "/save/pflanz.php?rid=" & $strrid & "&pflanze[]=" & $intid & "&feld[]=" & $i & "&felder[]=" & $i & "," & $i + 1 & "&position=" & $intpos & "&farm=" & $intfarm)
  1656. $ohttp.setrequestheader("User-Agent", $abrowser)
  1657. $ohttp.setrequestheader("Content-Type", "text/html")
  1658. $ohttp.send()
  1659. If $strwater = "1" AND ($intlevelnum < 5 OR $intlevelnum >= 10 AND $bpremium = 0) Then
  1660. $ohttp.open("GET", "http://" & GUICtrlRead($inpserver) & "/save/wasser.php?rid=" & $strrid & "&feld[]=" & $i & "&felder[]=" & $i & "&position=" & $intpos & "&farm=" & $intfarm)
  1661. $ohttp.setrequestheader("User-Agent", $abrowser)
  1662. $ohttp.setrequestheader("Content-Type", "text/html")
  1663. $ohttp.send()
  1664. EndIf
  1665. Next
  1666. If $strwater = "1" AND (($intlevelnum >= 5 AND $intlevelnum < 10) OR $bpremium = 1) Then
  1667. $ohttp.open("GET", "http://" & GUICtrlRead($inpserver) & "/farm/ajax.php?rid=" & $strrid & "&mode=watergarden&farm=" & $intfarm & "&position=" & $intpos)
  1668. $ohttp.setrequestheader("User-Agent", $abrowser)
  1669. $ohttp.send()
  1670. EndIf
  1671. ElseIf $intsize = 4 Then
  1672. For $i = 1 To 120
  1673. $ohttp.open("GET", "http://" & GUICtrlRead($inpserver) & "/save/pflanz.php?rid=" & $strrid & "&pflanze[]=" & $intid & "&feld[]=" & $i & "&felder[]=" & $i & "," & $i + 1 & "," & $i + 12 & "," & $i + 13 & "&position=" & $intpos & "&farm=" & $intfarm)
  1674. $ohttp.setrequestheader("User-Agent", $abrowser)
  1675. $ohttp.setrequestheader("Content-Type", "text/html")
  1676. $ohttp.send()
  1677. If $strwater = "1" AND ($intlevelnum < 5 OR $intlevelnum >= 10 AND $bpremium = 0) Then
  1678. $ohttp.open("GET", "http://" & GUICtrlRead($inpserver) & "/save/wasser.php?rid=" & $strrid & "&feld[]=" & $i & "&felder[]=" & $i & "&position=" & $intpos & "&farm=" & $intfarm)
  1679. $ohttp.setrequestheader("User-Agent", $abrowser)
  1680. $ohttp.setrequestheader("Content-Type", "text/html")
  1681. $ohttp.send()
  1682. EndIf
  1683. Next
  1684. If $strwater = "1" AND (($intlevelnum >= 5 AND $intlevelnum < 10) OR $bpremium = 1) Then
  1685. $ohttp.open("GET", "http://" & GUICtrlRead($inpserver) & "/farm/ajax.php?rid=" & $strrid & "&mode=watergarden&farm=" & $intfarm & "&position=" & $intpos)
  1686. $ohttp.setrequestheader("User-Agent", $abrowser)
  1687. $ohttp.send()
  1688. EndIf
  1689. EndIf
  1690. $strconsolewritewater = ""
  1691. If $strwater = "1" Then $strconsolewritewater = " i podlewanie"
  1692. EndFunc
  1693.  
  1694. Func a0730806103()
  1695. If $bforestrystate = 0 Then Return
  1696. $ohttp.open("GET", "http://" & GUICtrlRead($inpserver) & "/forestry/ajax.php?rid=" & $strrid & "&action=initforestry")
  1697. $ohttp.setrequestheader("User-Agent", $abrowser)
  1698. $ohttp.send()
  1699. $strpattern = '"position":"(\d{1,})","block":"0","category":1,"ready":1,"remain":0,"'
  1700. $areadysplit = StringRegExp($ohttp.responsetext, $strpattern, 3)
  1701. If NOT @error Then
  1702. For $i = 0 To UBound($areadysplit) - 1
  1703. a0f30900c30($areadysplit[$i])
  1704. a6030a03009($areadysplit[$i])
  1705. Next
  1706. EndIf
  1707. $aemptysplit = StringRegExp($ohttp.responsetext, '"position":"(\d{1,})","bl', 3)
  1708. Local $aemptystatus[26]
  1709. If NOT @error Then
  1710. For $i = 0 To UBound($aemptysplit) - 1
  1711. $aemptystatus[Int($aemptysplit[$i])] = "n"
  1712. Next
  1713. For $i = 1 To 25
  1714. If $aemptystatus[$i] <> "n" Then a6030a03009($i)
  1715. Next
  1716. EndIf
  1717. EndFunc
  1718.  
  1719. Func a0f30900c30($intpos)
  1720. $ohttp.open("GET", "http://" & GUICtrlRead($inpserver) & "/forestry/ajax.php?rid=" & $strrid & "&action=crop&params=&z[]=" & $intpos & "&p[]=1")
  1721. $ohttp.setrequestheader("User-Agent", $abrowser)
  1722. $ohttp.send()
  1723. EndFunc
  1724.  
  1725. Func a6030a03009($intpos)
  1726. $intseed = IniRead($strprofilepath, "Forestry", "seed", 1)
  1727. If $intseed = "null" Then Return
  1728. $ohttp.open("GET", "http://" & GUICtrlRead($inpserver) & "/forestry/ajax.php?rid=" & $strrid & "&action=plant&params=&z[]=" & $intpos & "&p[]=" & $intseed)
  1729. $ohttp.setrequestheader("User-Agent", $abrowser)
  1730. $ohttp.send()
  1731. EndFunc
  1732.  
  1733. Func a0630b03949()
  1734. $asplitserver = StringRegExp(GUICtrlRead($inpserver), "^s(\d{1,2})\.([\w|\.]{1,})$", 3)
  1735. $ohttp.open("POST", "http://www." & $asplitserver[1] & "/ajax/createtoken.php")
  1736. $ohttp.setrequestheader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8")
  1737. $ohttp.setrequestheader("User-Agent", $abrowser)
  1738. $ohttp.send("server=" & $asplitserver[0] & "&username=" & GUICtrlRead($inpusername) & "&password=" & GUICtrlRead($inppassword) & "&ref=gomffpl&retid=")
  1739. $strreflink = StringReplace(StringTrimRight(StringTrimLeft($ohttp.responsetext, 4), 2), "\/", "/")
  1740. $bstatus = StringRight(StringLeft($ohttp.responsetext, 2), 1)
  1741. $ohttp.open("GET", $strreflink)
  1742. $ohttp.setrequestheader("Content-Type", "text/html")
  1743. $ohttp.setrequestheader("User-Agent", $abrowser)
  1744. $ohttp.send()
  1745. $aresultsrid = a2d00401947($ohttp.responsetext, "var rid = '", "'")
  1746. Global $strrid = $aresultsrid[0]
  1747. EndFunc
  1748.  
  1749. Func a1d30c0094f()
  1750. $ohttp.open("GET", "http://" & GUICtrlRead($inpserver) & "/farm/ajax.php?rid=" & $strrid & "&mode=getuserfarminfos&farm=1")
  1751. $ohttp.setrequestheader("User-Agent", $abrowser)
  1752. $ohttp.send()
  1753. $alevelnumsplit = StringRegExp($ohttp.responsetext, 'levelnum\"\:\"(\d{1,})', 3)
  1754. Return Int($alevelnumsplit[0])
  1755. EndFunc
  1756.  
  1757. Func a5a30d01208()
  1758. Local $arandomserver[5] = ["wolnifarmerzy.pl", "myfreefarm.de", "myfreefarm.co.uk"]
  1759. If $inttab = 1 Then
  1760. If $intiter > 0 Then
  1761. GUICtrlSetData($lblrandomserver, "np. s" & Random(1, 25, 1) & "." & $arandomserver[Random(0, 2, 1)])
  1762. Else
  1763. GUICtrlSetData($lblrandomserver, "np. s" & Random(1, 20, 1) & "." & $arandomserver[0])
  1764. $intiter = 1
  1765. EndIf
  1766. EndIf
  1767. EndFunc
  1768.  
  1769. Func a6230e04854()
  1770. $ohttp.open("GET", "http://www.wf-iris-bot.cba.pl/updater/showVersion.php")
  1771. $ohttp.send()
  1772. $asplitversion = StringRegExp($ohttp.responsetext, "<version>(\d.\d.\d.\d)</version>", 3)
  1773. If NOT @error Then
  1774. If Int(StringReplace($asplitversion[0], ".", "")) > Int(StringReplace($intversion, ".", "")) Then
  1775. Run("updater.exe")
  1776. Exit
  1777. EndIf
  1778. EndIf
  1779. EndFunc
  1780.  
  1781. Func a1230f01e02()
  1782. MsgBox(48, "", "Błąd ogólny")
  1783. EndFunc
  1784.  
  1785. Func a3d40005a52($bstate)
  1786. If $bstate Then
  1787. RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run", "WF Iris Bot", "REG_SZ", '"' & @ScriptFullPath & '"')
  1788. Else
  1789. RegDelete("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run", "WF Iris Bot")
  1790. EndIf
  1791. EndFunc
Advertisement
Add Comment
Please, Sign In to add comment