Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Opt("TrayIconHide", 1)
- Opt("TrayMenuMode", 1)
- Opt("TrayOnEventMode", 1)
- 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)
- Global Const $gui_event_close = -3
- Global Const $gui_event_minimize = -4
- Global Const $gui_checked = 1
- Global Const $gui_show = 16
- Global Const $gui_hide = 32
- Global Const $gui_disable = 128
- Global Const $gui_focus = 256
- Global Const $gui_bkcolor_transparent = -2
- Global Const $ws_minimizebox = 131072
- Global Const $ws_sysmenu = 524288
- Global Const $ws_caption = 12582912
- Global Const $ws_popup = -2147483648
- Global Const $gui_ss_default_gui = BitOR($ws_minimizebox, $ws_caption, $ws_popup, $ws_sysmenu)
- Global Const $es_left = 0
- Global Const $es_password = 32
- Global Const $es_autovscroll = 64
- Global Const $es_autohscroll = 128
- Global Const $es_wantreturn = 4096
- Global Const $__editconstant_ws_vscroll = 2097152
- Global Const $__editconstant_ws_hscroll = 1048576
- Global Const $gui_ss_default_edit = BitOR($es_wantreturn, $__editconstant_ws_vscroll, $__editconstant_ws_hscroll, $es_autovscroll, $es_autohscroll)
- Global Const $gui_ss_default_input = BitOR($es_left, $es_autohscroll)
- Global Const $cbs_autohscroll = 64
- Global Const $cbs_dropdown = 2
- Global Const $cbs_dropdownlist = 3
- Global Const $__comboboxconstant_ws_vscroll = 2097152
- Global Const $gui_ss_default_combo = BitOR($cbs_dropdown, $cbs_autohscroll, $__comboboxconstant_ws_vscroll)
- Global Const $ss_center = 1
- Global Const $ss_bitmap = 14
- Func a2d00401947($s_string, $s_start, $s_end, $v_case = -1)
- Local $s_case = ""
- If $v_case = Default OR $v_case = -1 Then $s_case = "(?i)"
- Local $s_pattern_escape = "(\.|\||\*|\?|\+|\(|\)|\{|\}|\[|\]|\^|\$|\\)"
- $s_start = StringRegExpReplace($s_start, $s_pattern_escape, "\\$1")
- $s_end = StringRegExpReplace($s_end, $s_pattern_escape, "\\$1")
- If $s_start = "" Then $s_start = "\A"
- If $s_end = "" Then $s_end = "\z"
- Local $a_ret = StringRegExp($s_string, "(?s)" & $s_case & $s_start & "(.*?)" & $s_end, 3)
- If @error Then Return SetError(1, 0, 0)
- Return $a_ret
- EndFunc
- Global Const $bs_left = 256
- Global Const $bs_bitmap = 128
- Global Const $gui_ss_default_checkbox = 0
- Global Const $bm_getimage = 246
- Global Const $bm_setimage = 247
- Global Const $gwl_style = -16
- Global Const $image_bitmap = 0
- Global Const $load_library_as_datafile = 2
- Global Const $tagpoint = "struct;long X;long Y;endstruct"
- Global Const $tagrect = "struct;long Left;long Top;long Right;long Bottom;endstruct"
- Global Const $tagsystemtime = "struct;word Year;word Month;word Dow;word Day;word Hour;word Minute;word Second;word MSeconds;endstruct"
- Global Const $tagnmhdr = "struct;hwnd hWndFrom;uint_ptr IDFrom;INT Code;endstruct"
- Global Const $tagcomboboxexitem = "uint Mask;int_ptr Item;ptr Text;int TextMax;int Image;int SelectedImage;int OverlayImage;" & "int Indent;lparam Param"
- Global Const $tagnmcomboboxex = $tagnmhdr & ";uint Mask;int_ptr Item;ptr Text;int TextMax;int Image;" & "int SelectedImage;int OverlayImage;int Indent;lparam Param"
- 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"
- 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"
- Global Const $taggdipstartupinput = "uint Version;ptr Callback;bool NoThread;bool NoCodecs"
- 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"
- 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"
- Global Const $tagnmlistview = $tagnmhdr & ";int Item;int SubItem;uint NewState;uint OldState;uint Changed;" & "struct;long ActionX;long ActionY;endstruct;lparam Param"
- 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"
- Global Const $tagnmitemactivate = $tagnmhdr & ";int Index;int SubItem;uint NewState;uint OldState;uint Changed;" & $tagpoint & ";lparam lParam;uint KeyFlags"
- Global Const $tagmchittestinfo = "uint Size;" & $tagpoint & ";uint Hit;" & $tagsystemtime & ";" & $tagrect & ";int iOffset;int iRow;int iCol"
- 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"
- 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"
- 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"
- 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"
- 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"
- 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"
- Global Const $tagnmtvcustomdraw = "struct;" & $tagnmhdr & ";dword DrawStage;handle HDC;" & $tagrect & ";dword_ptr ItemSpec;uint ItemState;lparam ItemParam;endstruct" & ";dword ClrText;dword ClrTextBk;int Level"
- 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"
- 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"
- 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"
- 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"
- 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
- 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"
- 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"
- Global Const $tagscrollbarinfo = "dword cbSize;" & $tagrect & ";int dxyLineButton;int xyThumbTop;" & "int xyThumbBottom;int reserved;dword rgstate[6]"
- 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]"
- 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"
- 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"
- Func a2d00503f58($ierrcode, $curerr = @error, $curext = @extended)
- DllCall("kernel32.dll", "none", "SetLastError", "dword", $ierrcode)
- Return SetError($curerr, $curext)
- EndFunc
- Func a0e00601708($hwnd, $imsg, $wparam = 0, $lparam = 0, $ireturn = 0, $wparamtype = "wparam", $lparamtype = "lparam", $sreturntype = "lresult")
- Local $aresult = DllCall("user32.dll", $sreturntype, "SendMessageW", "hwnd", $hwnd, "uint", $imsg, $wparamtype, $wparam, $lparamtype, $lparam)
- If @error Then Return SetError(@error, @extended, "")
- If $ireturn >= 0 AND $ireturn <= 4 Then Return $aresult[$ireturn]
- Return $aresult
- EndFunc
- Global Const $hgdi_error = Ptr(-1)
- Global Const $invalid_handle_value = Ptr(-1)
- Global Const $kf_extended = 256
- Global Const $kf_altdown = 8192
- Global Const $kf_up = 32768
- Global Const $llkhf_extended = BitShift($kf_extended, 8)
- Global Const $llkhf_altdown = BitShift($kf_altdown, 8)
- Global Const $llkhf_up = BitShift($kf_up, 8)
- Global Const $tagmemorystatusex = "dword Length;dword MemoryLoad;" & "uint64 TotalPhys;uint64 AvailPhys;uint64 TotalPageFile;uint64 AvailPageFile;" & "uint64 TotalVirtual;uint64 AvailVirtual;uint64 AvailExtendedVirtual"
- Func a1400701660($hobject)
- Local $aresult = DllCall("gdi32.dll", "bool", "DeleteObject", "handle", $hobject)
- If @error Then Return SetError(@error, @extended, False)
- Return $aresult[0]
- EndFunc
- Func a4c00802831($hmodule)
- Local $aresult = DllCall("kernel32.dll", "bool", "FreeLibrary", "handle", $hmodule)
- If @error Then Return SetError(@error, @extended, False)
- Return $aresult[0]
- EndFunc
- Func a5b00903d1c($hwnd)
- If NOT IsHWnd($hwnd) Then $hwnd = GUICtrlGetHandle($hwnd)
- Local $aresult = DllCall("user32.dll", "int", "GetClassNameW", "hwnd", $hwnd, "wstr", "", "int", 4096)
- If @error Then Return SetError(@error, @extended, False)
- Return SetExtended($aresult[0], $aresult[2])
- EndFunc
- Func a4600a03548($hwnd)
- Local $aresult = DllCall("user32.dll", "int", "GetDlgCtrlID", "hwnd", $hwnd)
- If @error Then Return SetError(@error, @extended, 0)
- Return $aresult[0]
- EndFunc
- Func a4e00b00643($smodulename)
- Local $smodulenametype = "wstr"
- If $smodulename = "" Then
- $smodulename = 0
- $smodulenametype = "ptr"
- EndIf
- Local $aresult = DllCall("kernel32.dll", "handle", "GetModuleHandleW", $smodulenametype, $smodulename)
- If @error Then Return SetError(@error, @extended, 0)
- Return $aresult[0]
- EndFunc
- Func a3d00c0600c($hwnd, $iindex)
- Local $sfuncname = "GetWindowLongW"
- If @AutoItX64 Then $sfuncname = "GetWindowLongPtrW"
- Local $aresult = DllCall("user32.dll", "long_ptr", $sfuncname, "hwnd", $hwnd, "int", $iindex)
- If @error Then Return SetError(@error, @extended, 0)
- Return $aresult[0]
- EndFunc
- Func a6200d04d53($hinstance, $simage, $itype, $ixdesired, $iydesired, $iload)
- Local $aresult, $simagetype = "int"
- If IsString($simage) Then $simagetype = "wstr"
- $aresult = DllCall("user32.dll", "handle", "LoadImageW", "handle", $hinstance, $simagetype, $simage, "uint", $itype, "int", $ixdesired, "int", $iydesired, "uint", $iload)
- If @error Then Return SetError(@error, @extended, 0)
- Return $aresult[0]
- EndFunc
- Func a5000e03100($sfilename, $iflags = 0)
- Local $aresult = DllCall("kernel32.dll", "handle", "LoadLibraryExW", "wstr", $sfilename, "ptr", 0, "dword", $iflags)
- If @error Then Return SetError(@error, @extended, 0)
- Return $aresult[0]
- EndFunc
- Func a5d00f02b4d($hwnd, $iindex, $ivalue)
- a2d00503f58(0)
- Local $sfuncname = "SetWindowLongW"
- If @AutoItX64 Then $sfuncname = "SetWindowLongPtrW"
- Local $aresult = DllCall("user32.dll", "long_ptr", $sfuncname, "hwnd", $hwnd, "int", $iindex, "long_ptr", $ivalue)
- If @error Then Return SetError(@error, @extended, 0)
- Return $aresult[0]
- EndFunc
- Global $ghgdipdll = 0
- Global $gigdipref = 0
- Global $gigdiptoken = 0
- Func a5310005147($hbitmap, $iargb = -16777216)
- Local $aresult = DllCall($ghgdipdll, "int", "GdipCreateHBITMAPFromBitmap", "handle", $hbitmap, "ptr*", 0, "dword", $iargb)
- If @error Then Return SetError(@error, @extended, 0)
- Return SetExtended($aresult[0], $aresult[2])
- EndFunc
- Func a311010590b($hbitmap)
- Local $aresult = DllCall($ghgdipdll, "int", "GdipDisposeImage", "handle", $hbitmap)
- If @error Then Return SetError(@error, @extended, False)
- Return $aresult[0] = 0
- EndFunc
- Func a2010201c51()
- $gigdipref += 1
- If $gigdipref > 1 Then Return True
- $ghgdipdll = DllOpen("GDIPlus.dll")
- If $ghgdipdll = -1 Then
- $gigdipref = 0
- Return SetError(1, 2, False)
- EndIf
- Local $tinput = DllStructCreate($taggdipstartupinput)
- Local $ttoken = DllStructCreate("ulong_ptr Data")
- DllStructSetData($tinput, "Version", 1)
- Local $aresult = DllCall($ghgdipdll, "int", "GdiplusStartup", "struct*", $ttoken, "struct*", $tinput, "ptr", 0)
- If @error Then Return SetError(@error, @extended, False)
- $gigdiptoken = DllStructGetData($ttoken, "Data")
- Return $aresult[0] = 0
- EndFunc
- Func a4910305753($ibytes, $iflags = 0)
- Local $aresult = DllCall("kernel32.dll", "handle", "GlobalAlloc", "uint", $iflags, "ulong_ptr", $ibytes)
- If @error Then Return SetError(@error, @extended, 0)
- Return $aresult[0]
- EndFunc
- Func a5010403032($hmem)
- Local $aresult = DllCall("kernel32.dll", "ptr", "GlobalFree", "handle", $hmem)
- If @error Then Return SetError(@error, @extended, False)
- Return $aresult[0]
- EndFunc
- Func a5410505128($hmem)
- Local $aresult = DllCall("kernel32.dll", "ptr", "GlobalLock", "handle", $hmem)
- If @error Then Return SetError(@error, @extended, 0)
- Return $aresult[0]
- EndFunc
- Func a101060105b($hmem)
- Local $aresult = DllCall("kernel32.dll", "bool", "GlobalUnlock", "handle", $hmem)
- If @error Then Return SetError(@error, @extended, 0)
- Return $aresult[0]
- EndFunc
- Func a5810705848($psource, $pdest, $ilength)
- DllCall("kernel32.dll", "none", "RtlMoveMemory", "struct*", $pdest, "struct*", $psource, "ulong_ptr", $ilength)
- If @error Then Return SetError(@error, @extended)
- EndFunc
- a2010201c51()
- Global Const $rt_bitmap = 2
- Func a2710801e03($resname, $restype = 10, $reslang = 0, $dll = -1)
- Local Const $image_bitmap = 0
- Local $hinstance, $hbitmap, $infoblock, $globalmemoryblock, $memorypointer, $ressize
- If $dll = -1 Then
- $hinstance = a4e00b00643("")
- Else
- $hinstance = a5000e03100($dll, $load_library_as_datafile)
- EndIf
- If $hinstance = 0 Then Return SetError(1, 0, 0)
- If $restype = $rt_bitmap Then
- $hbitmap = a6200d04d53($hinstance, $resname, $image_bitmap, 0, 0, 0)
- If @error Then Return SetError(2, 0, 0)
- Return $hbitmap
- EndIf
- If $reslang <> 0 Then
- $infoblock = DllCall("kernel32.dll", "ptr", "FindResourceExW", "ptr", $hinstance, "long", $restype, "wstr", $resname, "short", $reslang)
- Else
- $infoblock = DllCall("kernel32.dll", "ptr", "FindResourceW", "ptr", $hinstance, "wstr", $resname, "long", $restype)
- EndIf
- If @error Then Return SetError(3, 0, 0)
- $infoblock = $infoblock[0]
- If $infoblock = 0 Then Return SetError(4, 0, 0)
- $ressize = DllCall("kernel32.dll", "dword", "SizeofResource", "ptr", $hinstance, "ptr", $infoblock)
- If @error Then Return SetError(5, 0, 0)
- $ressize = $ressize[0]
- If $ressize = 0 Then Return SetError(6, 0, 0)
- $globalmemoryblock = DllCall("kernel32.dll", "ptr", "LoadResource", "ptr", $hinstance, "ptr", $infoblock)
- If @error Then Return SetError(7, 0, 0)
- $globalmemoryblock = $globalmemoryblock[0]
- If $globalmemoryblock = 0 Then Return SetError(8, 0, 0)
- $memorypointer = DllCall("kernel32.dll", "ptr", "LockResource", "ptr", $globalmemoryblock)
- If @error Then Return SetError(9, 0, 0)
- $memorypointer = $memorypointer[0]
- If $memorypointer = 0 Then Return SetError(10, 0, 0)
- If $dll <> -1 Then a4c00802831($hinstance)
- If @error Then Return SetError(11, 0, 0)
- SetExtended($ressize)
- Return $memorypointer
- EndFunc
- Func a0610905208($ctrlid, $resname, $restype = 10, $dll = -1)
- Local $resdata, $nsize, $hdata, $pdata, $pstream, $pbitmap, $hbitmap
- $resdata = a2710801e03($resname, $restype, 0, $dll)
- If @error Then Return SetError(1, 0, 0)
- $nsize = @extended
- If $restype = $rt_bitmap Then
- a2710a04f5d($ctrlid, $resdata)
- If @error Then Return SetError(2, 0, 0)
- Else
- $hdata = a4910305753($nsize, 2)
- $pdata = a5410505128($hdata)
- a5810705848($resdata, $pdata, $nsize)
- a101060105b($hdata)
- $pstream = DllCall("ole32.dll", "int", "CreateStreamOnHGlobal", "ptr", $hdata, "int", 1, "ptr*", 0)
- $pstream = $pstream[3]
- $pbitmap = DllCall($ghgdipdll, "int", "GdipCreateBitmapFromStream", "ptr", $pstream, "ptr*", 0)
- $pbitmap = $pbitmap[2]
- $hbitmap = a5310005147($pbitmap)
- a2710a04f5d($ctrlid, $hbitmap)
- If @error Then SetError(3, 0, 0)
- a311010590b($pbitmap)
- a1400701660($pstream)
- a5010403032($hdata)
- EndIf
- Return 1
- EndFunc
- Func a2710a04f5d($ctrlid, $hbitmap)
- Local Const $stm_setimage = 370
- Local Const $stm_getimage = 371
- Local Const $bm_setimage = 247
- Local Const $bm_getimage = 246
- Local Const $image_bitmap = 0
- Local Const $ss_bitmap = 14
- Local Const $bs_bitmap = 128
- Local Const $gwl_style = -16
- Local $hwnd, $hprev, $style, $ictrl_setimage, $ictrl_getimage, $ictrl_bitmap
- $hwnd = GUICtrlGetHandle($ctrlid)
- If $hwnd = 0 Then Return SetError(1, 0, 0)
- $ctrlid = a4600a03548($hwnd)
- If @error Then Return SetError(2, 0, 0)
- Switch a5b00903d1c($ctrlid)
- Case "Button"
- $ictrl_setimage = $bm_setimage
- $ictrl_getimage = $bm_getimage
- $ictrl_bitmap = $bs_bitmap
- Case "Static"
- $ictrl_setimage = $stm_setimage
- $ictrl_getimage = $stm_getimage
- $ictrl_bitmap = $ss_bitmap
- Case Else
- Return SetError(3, 0, 0)
- EndSwitch
- $style = a3d00c0600c($hwnd, $gwl_style)
- If @error Then Return SetError(4, 0, 0)
- a5d00f02b4d($hwnd, $gwl_style, BitOR($style, $ictrl_bitmap))
- If @error Then Return SetError(5, 0, 0)
- $hprev = a0e00601708($hwnd, $ictrl_setimage, $image_bitmap, $hbitmap)
- If @error Then Return SetError(6, 0, 0)
- If $hprev Then a1400701660($hprev)
- Return 1
- EndFunc
- ObjEvent("AutoIt.Error", "A1230F01E02")
- If NOT FileExists("updater.exe") Then
- $hinet = InetGet("http://www.wf-iris-bot.cba.pl/updater/download/updater.exe", @ScriptDir & "\updater.exe", 1, 0)
- Sleep(1000)
- EndIf
- $intversion = "1.3.0.5"
- Global $ohttp = ObjCreate("winhttp.winhttprequest.5.1")
- a6230e04854()
- Local $abrowseragents[3]
- $strnt = "6.1"
- Switch @OSVersion
- Case "WIN_XP"
- $strnt = "5.1"
- Case "WIN_2003"
- $strnt = "5.2"
- Case "WIN_VISTA", "WIN_2008"
- $strnt = "6.0"
- Case "WIN_7", "WIN_2008R2"
- $strnt = "6.1"
- Case "WIN_8"
- $strnt = "6.2"
- EndSwitch
- $intfxversion = Random(20, 26, 1)
- $abrowseragents[0] = "Mozilla/5.0 (Windows NT " & $strnt & "; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36"
- $abrowseragents[1] = "Mozilla/5.0 (Windows NT " & $strnt & "; WOW64; rv:" & $intfxversion & ".0) Gecko/20100101 Firefox/" & $intfxversion & ".0"
- $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"
- Global $abrowser = $abrowseragents[Random(0, 2, 1)]
- $formmain = GUICreate("WF Iris Bot", 640, 400, (@DesktopWidth - 640) / 2, (@DesktopHeight - 400) / 2)
- $picbackgroundlogging = GUICtrlCreatePic("", 0, 0, 640, 400)
- a0610905208($picbackgroundlogging, "BACKGROUND_LOGIN", $rt_bitmap)
- GUICtrlSetState($picbackgroundlogging, 128)
- $picbackgroundplanning = GUICtrlCreatePic("", 0, 0, 640, 400)
- a0610905208($picbackgroundplanning, "BACKGROUND_PLANNING", $rt_bitmap)
- GUICtrlSetState($picbackgroundplanning, 128)
- GUICtrlSetState($picbackgroundplanning, $gui_hide)
- $picbackgroundfiszado = GUICtrlCreatePic("", 0, 0, 640, 400)
- a0610905208($picbackgroundfiszado, "BACKGROUND_FISZADO", $rt_bitmap)
- GUICtrlSetState($picbackgroundfiszado, 128)
- GUICtrlSetState($picbackgroundfiszado, $gui_hide)
- $picbackgroundsettings = GUICtrlCreatePic("", 0, 0, 640, 400)
- a0610905208($picbackgroundsettings, "BACKGROUND_SETTINGS", $rt_bitmap)
- GUICtrlSetState($picbackgroundsettings, 128)
- GUICtrlSetState($picbackgroundsettings, $gui_hide)
- GUISetBkColor(2302755)
- $laalogin = GUICtrlCreateLabel("", 53, 18, 97, 30)
- GUICtrlSetBkColor(-1, $gui_bkcolor_transparent)
- $laaplanning = GUICtrlCreateLabel("", 150, 18, 67, 30)
- GUICtrlSetBkColor(-1, $gui_bkcolor_transparent)
- $laulogin = GUICtrlCreateLabel("", 53, 46, 97, 2)
- GUICtrlSetBkColor(-1, 3319763)
- $lauplanning = GUICtrlCreateLabel("", 150, 46, 67, 2)
- GUICtrlSetBkColor(-1, 3319763)
- GUICtrlSetState(-1, $gui_hide)
- $laafiszado = GUICtrlCreateLabel("", 217, 18, 94, 30)
- GUICtrlSetBkColor(-1, $gui_bkcolor_transparent)
- $laufiszado = GUICtrlCreateLabel("", 217, 46, 94, 2)
- GUICtrlSetBkColor(-1, 3319763)
- GUICtrlSetState(-1, $gui_hide)
- $laasettings = GUICtrlCreateLabel("", 311, 18, 97, 30)
- GUICtrlSetBkColor(-1, $gui_bkcolor_transparent)
- $lausettings = GUICtrlCreateLabel("", 311, 46, 97, 2)
- GUICtrlSetBkColor(-1, 3319763)
- GUICtrlSetState(-1, $gui_hide)
- $laaswitch = GUICtrlCreatePic("", 549, 24, 64, 24)
- a0610905208($laaswitch, "LAA_START", $rt_bitmap)
- GUICtrlSetState(-1, $gui_hide)
- $lauswitch = GUICtrlCreateLabel("", 549, 46, 64, 2)
- GUICtrlSetBkColor(-1, 57344)
- GUICtrlSetState(-1, $gui_hide)
- $laadonothing = GUICtrlCreateLabel("", 32, 92, 97, 30)
- GUICtrlSetBkColor(-1, $gui_bkcolor_transparent)
- GUICtrlSetState(-1, $gui_hide)
- $laudonothing = GUICtrlCreateLabel("", 32, 120, 97, 2)
- GUICtrlSetBkColor(-1, 3319763)
- GUICtrlSetState(-1, $gui_hide)
- $laakeep = GUICtrlCreateLabel("", 129, 92, 93, 30)
- GUICtrlSetBkColor(-1, $gui_bkcolor_transparent)
- GUICtrlSetState(-1, $gui_hide)
- $laukeep = GUICtrlCreateLabel("", 129, 120, 93, 2)
- GUICtrlSetBkColor(-1, 3319763)
- GUICtrlSetState(-1, $gui_hide)
- $laareplace = GUICtrlCreateLabel("", 222, 92, 75, 30)
- GUICtrlSetBkColor(-1, $gui_bkcolor_transparent)
- GUICtrlSetState(-1, $gui_hide)
- $laureplace = GUICtrlCreateLabel("", 222, 120, 75, 2)
- GUICtrlSetBkColor(-1, 3319763)
- GUICtrlSetState(-1, $gui_hide)
- $laachecky = GUICtrlCreateLabel("", 147, 196, 95, 30)
- GUICtrlSetBkColor(-1, $gui_bkcolor_transparent)
- GUICtrlSetState(-1, $gui_hide)
- $lauchecky = GUICtrlCreateLabel("", 147, 224, 95, 2)
- GUICtrlSetBkColor(-1, 3319763)
- GUICtrlSetState(-1, $gui_hide)
- $laacheckn = GUICtrlCreateLabel("", 31, 196, 116, 30)
- GUICtrlSetBkColor(-1, $gui_bkcolor_transparent)
- GUICtrlSetState(-1, $gui_hide)
- $laucheckn = GUICtrlCreateLabel("", 31, 224, 116, 2)
- GUICtrlSetBkColor(-1, 3319763)
- GUICtrlSetState(-1, $gui_hide)
- Local $laufarm[5], $laafarm[5]
- For $i = 1 To 4
- $laafarm[$i] = GUICtrlCreateLabel("", 516, 131 + (42 * ($i - 1)), 66, 42)
- GUICtrlSetBkColor(-1, $gui_bkcolor_transparent)
- GUICtrlSetState(-1, $gui_hide)
- $laufarm[$i] = GUICtrlCreateLabel("", 516, 131 + (42 * ($i - 1)), 2, 42)
- GUICtrlSetBkColor(-1, 3319763)
- GUICtrlSetState(-1, $gui_hide)
- Next
- Local $lautree[6], $laatree[6]
- Local $atreepos[6] = [0, 67, 79, 57, 77, 69]
- $a = 0
- For $i = 1 To 5
- $a += $atreepos[$i]
- $laatree[$i] = GUICtrlCreateLabel("", 146 + ($a - $atreepos[$i]), 320, $atreepos[$i], 30)
- GUICtrlSetBkColor(-1, $gui_bkcolor_transparent)
- GUICtrlSetState(-1, $gui_hide)
- $lautree[$i] = GUICtrlCreateLabel("", 146 + ($a - $atreepos[$i]), 348, $atreepos[$i], 2)
- GUICtrlSetBkColor(-1, 3319763)
- GUICtrlSetState(-1, $gui_hide)
- Next
- $inpserver = GUICtrlCreateInput("", 226, 132, 189, 19, -1, 0)
- GUICtrlSetBkColor(-1, 2302755)
- GUICtrlSetColor(-1, 15658734)
- GUICtrlSetFont(-1, 9.5, 800, 0, "Sans")
- GUICtrlSendMsg(-1, 5377, 0, "Adres serwera")
- $inpusername = GUICtrlCreateInput("", 226, 172, 189, 19, -1, 0)
- GUICtrlSetBkColor(-1, 2302755)
- GUICtrlSetColor(-1, 15658734)
- GUICtrlSetFont(-1, 9.5, 800, 0, "Sans")
- GUICtrlSendMsg(-1, 5377, 0, "Nazwa użytkownika")
- $inppassword = GUICtrlCreateInput("", 226, 212, 189, 19, BitOR($gui_ss_default_input, $es_password), 0)
- GUICtrlSetBkColor(-1, 2302755)
- GUICtrlSetColor(-1, 15658734)
- GUICtrlSetFont(-1, 9.5, 800, 0, "Sans")
- GUICtrlSendMsg(-1, 5377, 0, "Hasło")
- $chkremember = GUICtrlCreatePic("", 224, 233, 32, 32)
- a0610905208($chkremember, "CHECKBOX_OFF", $rt_bitmap)
- GUICtrlSetCursor(-1, 0)
- $lblremember = GUICtrlCreateLabel("Zapamiętaj", 254, 242, 100, 24)
- GUICtrlSetBkColor(-1, $gui_bkcolor_transparent)
- GUICtrlSetColor(-1, 14540253)
- GUICtrlSetFont(-1, 9.5, 800, 0, "Sans")
- GUICtrlSetCursor(-1, 0)
- $piclogin = GUICtrlCreatePic("", 224, 278, 192, 30)
- a0610905208($piclogin, "BTN_LOG", $rt_bitmap)
- GUICtrlSetCursor(-1, 0)
- $picview = GUICtrlCreatePic("", 224, 318, 192, 30)
- a0610905208($picview, "BTN_VIEWOFF", $rt_bitmap)
- $lblrandomserver = GUICtrlCreateLabel("", 454, 134, 150, 24)
- GUICtrlSetBkColor(-1, $gui_bkcolor_transparent)
- GUICtrlSetColor(-1, 14540253)
- GUICtrlSetFont(-1, 9.5, 800, 0, "Sans")
- Local $achksettings[5], $laachksettings[5]
- Local $achkpos[5] = [0, 92, 118, 196, 222]
- For $i = 1 To 4
- $achksettings[$i] = GUICtrlCreatePic("", 32, $achkpos[$i], 32, 32)
- a0610905208($achksettings[$i], "CHECKBOX_ON", $rt_bitmap)
- GUICtrlSetState(-1, $gui_disable)
- GUICtrlSetState(-1, $gui_hide)
- $laachksettings[$i] = GUICtrlCreateLabel("", 40, $achkpos[$i] + 8, 160, 16)
- GUICtrlSetState(-1, $gui_hide)
- GUICtrlSetBkColor(-1, $gui_bkcolor_transparent)
- Next
- Dim $formmainacc[1][2] = [["{Enter}", $piclogin]]
- GUISetAccelerators($formmainacc)
- AdlibRegister("A5A30D01208", 5000)
- Local $actrlstate[22]
- For $i = 0 To UBound($actrlstate) - 1
- $actrlstate[$i] = False
- Next
- Global $bchkstate = False
- Global $inttab = 1
- Local $intiter = 0
- Global $strrid
- Global $bloged = False
- Local $abuilding[5][7]
- Local $aobuilding[7]
- Local $abtnplan[7]
- Global $intactivfarm = 1
- Global $bstateofbot = False
- Global $bpremium = 0
- 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]]
- Local $acomponentadvprod[6][2] = [["Majonez", 9], ["Ketchup", 21], ["Ser", 10], ["Jogurt", 110], ["Kłębek wełny", 11], ["Kłębek wełny angora", 151]]
- 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"]
- 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"]]
- 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"
- $x = 1
- $y = 1
- Global $strloterrystate
- Global $intlevelnum = 0
- Global $bforestrystate
- Global $inttreestate
- Global $strprofilepath = ""
- Local $aconfig[4] = [IniRead("config", "Settings", "pr", 0), 0, 0, IniRead("config", "Settings", "tray", 0)]
- RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run", "WF Iris Bot")
- If NOT @error Then $aconfig[2] = 1
- For $i = 1 To 6
- $aobuilding[$i] = GUICtrlCreateLabel("", 32 + (161 * ($x - 1)), 70 + (161 * ($y - 1)), 129, 100)
- GUICtrlSetColor(-1, 14540253)
- GUICtrlSetBkColor(-1, $gui_bkcolor_transparent)
- GUICtrlSetFont(-1, 9.5, 400, 0, "Sans")
- GUICtrlSetState(-1, $gui_hide)
- $abtnplan[$i] = GUICtrlCreatePic("", 32 + (161 * ($x - 1)), 170 + (161 * ($y - 1)), 129, 29)
- a0610905208($abtnplan[$i], "BTN_PLAN", $rt_bitmap)
- GUICtrlSetState(-1, $gui_hide)
- GUICtrlSetCursor(-1, 0)
- $x += 1
- If $x = 4 Then
- $x = 1
- $y = 2
- EndIf
- Next
- If FileExists("lastlogin") Then
- If IniRead("lastlogin", "Data", "active", "False") = "True" Then
- GUICtrlSetData($inpserver, IniRead("lastlogin", "Data", "server", ""))
- GUICtrlSetData($inpusername, IniRead("lastlogin", "Data", "username", ""))
- If $aconfig[3] Then GUICtrlSetData($inppassword, IniRead("lastlogin", "Data", "password", ""))
- a0610905208($chkremember, "CHECKBOX_ON", $rt_bitmap)
- Global $bchkstate = True
- GUICtrlSetState($inppassword, $gui_focus)
- EndIf
- EndIf
- GUISetState(@SW_SHOW)
- TraySetOnEvent(-8, "A6220303721")
- a5a30d01208()
- While True
- $nmsg = GUIGetMsg()
- Switch $nmsg
- Case $gui_event_close
- Exit
- Case $gui_event_minimize
- If $aconfig[3] = 0 Then GUISetState(@SW_MINIMIZE, $formmain)
- If $aconfig[3] = 1 Then
- Opt("TrayIconHide", 0)
- TraySetToolTip("Przywróć WF Iris Bot")
- GUISetState(@SW_HIDE, $formmain)
- EndIf
- Case $laalogin, $laulogin
- If $inttab = 2 Then a4810d0340e()
- If $inttab = 3 Then a2c10f05a12()
- If $inttab = 4 Then a1520101741()
- If $inttab <> 1 Then a0010c01347()
- Case $laaplanning, $lauplanning
- If $inttab = 1 AND $bloged Then
- a2110b05a09()
- a1010e04725()
- ElseIf $inttab = 3 Then
- a2c10f05a12()
- a1010e04725()
- ElseIf $inttab = 4 AND $bloged Then
- a1520101741()
- a1010e04725()
- EndIf
- Case $laafiszado, $laufiszado
- If $intlevelnum >= 8 Then
- If $inttab = 1 AND $bloged Then
- a2110b05a09()
- a262000194f()
- ElseIf $inttab = 2 Then
- a4810d0340e()
- a262000194f()
- ElseIf $inttab = 4 AND $bloged Then
- a1520101741()
- a262000194f()
- EndIf
- EndIf
- Case $laasettings, $lausettings
- If $inttab = 1 Then a2110b05a09()
- If $inttab = 2 AND $bloged Then a4810d0340e()
- If $inttab = 3 AND $bloged Then a2c10f05a12()
- If $inttab = 1 Then a092020480d()
- If $inttab = 2 AND $bloged Then a092020480d()
- If $inttab = 3 AND $bloged Then a092020480d()
- Case $chkremember, $lblremember
- If $bchkstate = False Then
- a0610905208($chkremember, "CHECKBOX_ON", $rt_bitmap)
- $bchkstate = True
- ElseIf $bchkstate = True Then
- a0610905208($chkremember, "CHECKBOX_OFF", $rt_bitmap)
- $bchkstate = False
- EndIf
- Case $piclogin
- If $bloged = True Then
- a0610905208($piclogin, "BTN_LOG", $rt_bitmap)
- a0610905208($picview, "BTN_VIEWOFF", $rt_bitmap)
- GUICtrlSetCursor($picview, 2)
- GUICtrlSetState($inpserver, 64)
- GUICtrlSetState($inpusername, 64)
- GUICtrlSetState($inppassword, 64)
- GUISetAccelerators($formmainacc)
- $bloged = False
- $strrid = ""
- AdlibUnRegister("A0630B03949")
- 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
- GUICtrlSetCursor($piclogin, 2)
- a0610905208($piclogin, "BTN_LOGGING", $rt_bitmap)
- GUICtrlSetState($inpserver, 128)
- GUICtrlSetState($inpusername, 128)
- GUICtrlSetState($inppassword, 128)
- If $bchkstate = True Then
- IniWrite("lastlogin", "Data", "server", GUICtrlRead($inpserver))
- IniWrite("lastlogin", "Data", "username", GUICtrlRead($inpusername))
- If $aconfig[0] Then IniWrite("lastlogin", "Data", "password", GUICtrlRead($inppassword))
- IniWrite("lastlogin", "Data", "active", "True")
- Else
- IniWrite("lastlogin", "Data", "active", "False")
- EndIf
- ConsoleWrite(">Loguje się..." & @CRLF)
- If a3d20405225(GUICtrlRead($inpserver), GUICtrlRead($inpusername), GUICtrlRead($inppassword)) <> "0" Then
- a0610905208($piclogin, "BTN_LOGOUT", $rt_bitmap)
- a0610905208($picview, "BTN_VIEWON", $rt_bitmap)
- GUICtrlSetCursor($picview, 0)
- GUISetAccelerators(0)
- $bloged = True
- a1120703d1f()
- ConsoleWrite("+>Pobrałem informacje o farmach." & @CRLF)
- a3420601f58()
- ConsoleWrite(">Sprawdzam stan konta premium." & @CRLF)
- a3620805712($intactivfarm)
- ConsoleWrite("+>Zaktualizowałem kontrolki pozycji." & @CRLF)
- a2110b05a09()
- a1010e04725()
- AdlibRegister("A0630B03949", 1000 * 60 * 115)
- Else
- a0610905208($piclogin, "BTN_LOG", $rt_bitmap)
- a0610905208($picview, "BTN_VIEWOFF", $rt_bitmap)
- GUICtrlSetCursor($picview, 2)
- GUICtrlSetState($inpserver, 64)
- GUICtrlSetState($inpusername, 64)
- GUICtrlSetState($inppassword, 64)
- GUISetAccelerators($formmainacc)
- $bloged = False
- EndIf
- GUICtrlSetCursor($piclogin, 0)
- EndIf
- Case $picview
- If $bloged Then
- a0820501522(GUICtrlRead($inpserver), GUICtrlRead($inpusername), GUICtrlRead($inppassword))
- EndIf
- Case $laafarm[1]
- $intactivfarm = 1
- a3620805712(1)
- Case $laafarm[2]
- $intactivfarm = 2
- a3620805712(2)
- Case $laafarm[3]
- $intactivfarm = 3
- a3620805712(3)
- Case $laafarm[4]
- $intactivfarm = 4
- a3620805712(4)
- Case $abtnplan[1]
- a1d20901d0d(1)
- Case $abtnplan[2]
- a1d20901d0d(2)
- Case $abtnplan[3]
- a1d20901d0d(3)
- Case $abtnplan[4]
- a1d20901d0d(4)
- Case $abtnplan[5]
- a1d20901d0d(5)
- Case $abtnplan[6]
- a1d20901d0d(6)
- Case $laaswitch, $lauswitch
- If NOT $bstateofbot Then
- GUICtrlSetBkColor($lauswitch, 16711680)
- a0610905208($laaswitch, "LAA_STOP", $rt_bitmap)
- $bstateofbot = True
- a2b20f0593a()
- AdlibRegister("A2B20F0593A", 3 * 60 * 1000)
- ElseIf $bstateofbot = True Then
- GUICtrlSetBkColor($lauswitch, 57344)
- a0610905208($laaswitch, "LAA_START", $rt_bitmap)
- $bstateofbot = False
- AdlibUnRegister("A2B20F0593A")
- EndIf
- Case $laadonothing, $laudonothing
- If $strloterrystate = "keep" Then GUICtrlSetState($laukeep, $gui_hide)
- If $strloterrystate = "replace" Then GUICtrlSetState($laureplace, $gui_hide)
- $strloterrystate = "nothing"
- IniDelete($strprofilepath, "Lottery")
- IniWrite($strprofilepath, "Lottery", "do", "nothing")
- Case $laakeep, $laukeep
- If $strloterrystate = "replace" Then GUICtrlSetState($laureplace, $gui_hide)
- If $strloterrystate = "nothing" Then GUICtrlSetState($laudonothing, $gui_hide)
- $strloterrystate = "keep"
- IniDelete($strprofilepath, "Lottery")
- IniWrite($strprofilepath, "Lottery", "do", "keep")
- Case $laareplace, $laureplace
- If $strloterrystate = "nothing" Then GUICtrlSetState($laudonothing, $gui_hide)
- If $strloterrystate = "keep" Then GUICtrlSetState($laukeep, $gui_hide)
- $strloterrystate = "replace"
- IniDelete($strprofilepath, "Lottery")
- IniWrite($strprofilepath, "Lottery", "do", "replace")
- Case $laacheckn, $laucheckn
- Global $bforestrystate = 0
- GUICtrlSetState($lauchecky, $gui_hide)
- IniWrite($strprofilepath, "Forestry", "active", "0")
- Case $laachecky, $lauchecky
- Global $bforestrystate = 1
- GUICtrlSetState($laucheckn, $gui_hide)
- IniWrite($strprofilepath, "Forestry", "active", "1")
- Case $laatree[1], $lautree[1]
- If $inttreestate <> 1 Then GUICtrlSetState($lautree[$inttreestate], $gui_hide)
- $inttreestate = 1
- IniWrite($strprofilepath, "Forestry", "seed", 1)
- Case $laatree[2], $lautree[2]
- If $inttreestate <> 2 Then GUICtrlSetState($lautree[$inttreestate], $gui_hide)
- $inttreestate = 2
- IniWrite($strprofilepath, "Forestry", "seed", 2)
- Case $laatree[3], $lautree[3]
- If $inttreestate <> 3 Then GUICtrlSetState($lautree[$inttreestate], $gui_hide)
- $inttreestate = 3
- IniWrite($strprofilepath, "Forestry", "seed", 3)
- Case $laatree[4], $lautree[4]
- If $inttreestate <> 4 Then GUICtrlSetState($lautree[$inttreestate], $gui_hide)
- $inttreestate = 4
- IniWrite($strprofilepath, "Forestry", "seed", 4)
- Case $laatree[5], $lautree[5]
- If $inttreestate <> 5 Then GUICtrlSetState($lautree[$inttreestate], $gui_hide)
- $inttreestate = 5
- IniWrite($strprofilepath, "Forestry", "seed", 5)
- Case $laachksettings[1]
- If $aconfig[0] Then
- GUICtrlSetState($achksettings[1], $gui_hide)
- IniWrite("config", "Settings", "pr", 0)
- $aconfig[0] = False
- Else
- GUICtrlSetState($achksettings[1], $gui_show)
- IniWrite("config", "Settings", "pr", 1)
- $aconfig[0] = True
- EndIf
- Case $laachksettings[3]
- If $aconfig[2] Then
- GUICtrlSetState($achksettings[3], $gui_hide)
- a3d40005a52(0)
- $aconfig[2] = False
- Else
- GUICtrlSetState($achksettings[3], $gui_show)
- a3d40005a52(1)
- $aconfig[2] = True
- EndIf
- Case $laachksettings[4]
- If $aconfig[3] Then
- GUICtrlSetState($achksettings[4], $gui_hide)
- IniWrite("config", "Settings", "tray", 0)
- $aconfig[3] = False
- Else
- GUICtrlSetState($achksettings[4], $gui_show)
- IniWrite("config", "Settings", "tray", 1)
- $aconfig[3] = True
- EndIf
- EndSwitch
- $ainfo = GUIGetCursorInfo()
- If NOT @error Then
- If $ainfo[4] = $laalogin OR $ainfo[4] = $laulogin AND NOT $actrlstate[0] Then
- GUICtrlSetState($laulogin, $gui_show)
- $actrlstate[0] = True
- ElseIf $ainfo[4] <> $laalogin AND $ainfo[4] <> $laulogin AND $actrlstate[0] AND $inttab <> 1 Then
- GUICtrlSetState($laulogin, $gui_hide)
- $actrlstate[0] = False
- EndIf
- If $ainfo[4] = $laaplanning OR $ainfo[4] = $lauplanning AND NOT $actrlstate[1] Then
- GUICtrlSetState($lauplanning, $gui_show)
- $actrlstate[1] = True
- ElseIf $ainfo[4] <> $laaplanning AND $ainfo[4] <> $lauplanning AND $actrlstate[1] AND $inttab <> 2 Then
- GUICtrlSetState($lauplanning, $gui_hide)
- $actrlstate[1] = False
- EndIf
- If $ainfo[4] = $laafiszado OR $ainfo[4] = $laufiszado AND NOT $actrlstate[10] Then
- GUICtrlSetState($laufiszado, $gui_show)
- $actrlstate[10] = True
- ElseIf $ainfo[4] <> $laafiszado AND $ainfo[4] <> $laufiszado AND $actrlstate[10] AND $inttab <> 3 Then
- GUICtrlSetState($laufiszado, $gui_hide)
- $actrlstate[10] = False
- EndIf
- If $ainfo[4] = $laasettings OR $ainfo[4] = $lausettings AND NOT $actrlstate[21] Then
- GUICtrlSetState($lausettings, $gui_show)
- $actrlstate[21] = True
- ElseIf $ainfo[4] <> $laasettings AND $ainfo[4] <> $lausettings AND $actrlstate[21] AND $inttab <> 4 Then
- GUICtrlSetState($lausettings, $gui_hide)
- $actrlstate[21] = False
- EndIf
- If $inttab = 2 Then
- For $i = 1 To 4
- If $ainfo[4] = $laafarm[$i] OR $ainfo[4] = $laufarm[$i] AND NOT $actrlstate[4 + $i] AND $inttab = 2 Then
- GUICtrlSetState($laufarm[$i], $gui_show)
- $actrlstate[4 + $i] = True
- ElseIf $ainfo[4] <> $laafarm[$i] AND $ainfo[4] <> $laufarm[$i] AND $actrlstate[4 + $i] AND $intactivfarm <> $i AND $inttab = 2 Then
- GUICtrlSetState($laufarm[$i], $gui_hide)
- $actrlstate[4 + $i] = False
- EndIf
- Next
- EndIf
- If $inttab = 2 OR $inttab = 3 Then
- If $ainfo[4] = $laaswitch OR $ainfo[4] = $lauswitch AND NOT $actrlstate[9] Then
- GUICtrlSetState($lauswitch, $gui_show)
- $actrlstate[9] = True
- ElseIf $ainfo[4] <> $laaswitch AND $ainfo[4] <> $lauswitch AND $actrlstate[9] Then
- GUICtrlSetState($lauswitch, $gui_hide)
- $actrlstate[9] = False
- EndIf
- EndIf
- If $inttab = 3 Then
- If $ainfo[4] = $laadonothing OR $ainfo[4] = $laudonothing AND NOT $actrlstate[11] Then
- GUICtrlSetState($laudonothing, $gui_show)
- $actrlstate[11] = True
- ElseIf $ainfo[4] <> $laadonothing AND $ainfo[4] <> $laudonothing AND $actrlstate[11] AND $strloterrystate <> "nothing" Then
- GUICtrlSetState($laudonothing, $gui_hide)
- $actrlstate[11] = False
- EndIf
- If $ainfo[4] = $laakeep OR $ainfo[4] = $laukeep AND NOT $actrlstate[12] Then
- GUICtrlSetState($laukeep, $gui_show)
- $actrlstate[12] = True
- ElseIf $ainfo[4] <> $laakeep AND $ainfo[4] <> $laukeep AND $actrlstate[12] AND $strloterrystate <> "keep" Then
- GUICtrlSetState($laukeep, $gui_hide)
- $actrlstate[12] = False
- EndIf
- If $ainfo[4] = $laareplace OR $ainfo[4] = $laureplace AND NOT $actrlstate[13] Then
- GUICtrlSetState($laureplace, $gui_show)
- $actrlstate[13] = True
- ElseIf $ainfo[4] <> $laareplace AND $ainfo[4] <> $laureplace AND $actrlstate[13] AND $strloterrystate <> "replace" Then
- GUICtrlSetState($laureplace, $gui_hide)
- $actrlstate[13] = False
- EndIf
- If $ainfo[4] = $laachecky OR $ainfo[4] = $lauchecky AND NOT $actrlstate[14] Then
- GUICtrlSetState($lauchecky, $gui_show)
- $actrlstate[14] = True
- ElseIf $ainfo[4] <> $laachecky AND $ainfo[4] <> $lauchecky AND $actrlstate[14] AND $bforestrystate <> 1 Then
- GUICtrlSetState($lauchecky, $gui_hide)
- $actrlstate[14] = False
- EndIf
- If $ainfo[4] = $laacheckn OR $ainfo[4] = $laucheckn AND NOT $actrlstate[15] Then
- GUICtrlSetState($laucheckn, $gui_show)
- $actrlstate[15] = True
- ElseIf $ainfo[4] <> $laacheckn AND $ainfo[4] <> $laucheckn AND $actrlstate[15] AND $bforestrystate <> 0 Then
- GUICtrlSetState($laucheckn, $gui_hide)
- $actrlstate[15] = False
- EndIf
- For $i = 1 To 5
- If $ainfo[4] = $laatree[$i] OR $ainfo[4] = $lautree[$i] AND NOT $actrlstate[15 + $i] Then
- GUICtrlSetState($lautree[$i], $gui_show)
- $actrlstate[15 + $i] = True
- ElseIf $ainfo[4] <> $laatree[$i] AND $ainfo[4] <> $lautree[$i] AND $actrlstate[15 + $i] AND $inttreestate <> $i Then
- GUICtrlSetState($lautree[$i], $gui_hide)
- $actrlstate[15 + $i] = False
- EndIf
- Next
- EndIf
- EndIf
- WEnd
- Func a2110b05a09()
- GUICtrlSetState($picbackgroundlogging, $gui_hide)
- GUICtrlSetState($inpserver, $gui_hide)
- GUICtrlSetState($inpusername, $gui_hide)
- GUICtrlSetState($inppassword, $gui_hide)
- GUICtrlSetState($lblrandomserver, $gui_hide)
- GUICtrlSetState($chkremember, $gui_hide)
- GUICtrlSetState($lblremember, $gui_hide)
- GUICtrlSetState($piclogin, $gui_hide)
- GUICtrlSetState($picview, $gui_hide)
- GUICtrlSetState($laulogin, $gui_hide)
- GUISetAccelerators(0)
- AdlibUnRegister("A5A30D01208")
- EndFunc
- Func a0010c01347()
- $inttab = 1
- GUICtrlSetState($picbackgroundlogging, $gui_show)
- GUICtrlSetState($inpserver, $gui_show)
- GUICtrlSetState($inpusername, $gui_show)
- GUICtrlSetState($inppassword, $gui_show)
- GUICtrlSetState($lblrandomserver, $gui_show)
- GUICtrlSetState($chkremember, $gui_show)
- GUICtrlSetState($lblremember, $gui_show)
- GUICtrlSetState($piclogin, $gui_show)
- GUICtrlSetState($picview, $gui_show)
- GUICtrlSetState($laulogin, $gui_show)
- If $bloged = False Then GUISetAccelerators($formmainacc)
- AdlibRegister("A5A30D01208", 5000)
- EndFunc
- Func a4810d0340e()
- GUICtrlSetState($picbackgroundplanning, $gui_hide)
- GUICtrlSetState($laaswitch, $gui_hide)
- GUICtrlSetState($lauplanning, $gui_hide)
- GUICtrlSetState($laufarm[$intactivfarm], $gui_hide)
- For $i = 1 To 6
- GUICtrlSetState($aobuilding[$i], $gui_hide)
- GUICtrlSetState($abtnplan[$i], $gui_hide)
- Next
- For $i = 1 To 4
- GUICtrlSetState($laufarm[$i], $gui_hide)
- GUICtrlSetState($laafarm[$i], $gui_hide)
- Next
- EndFunc
- Func a1010e04725()
- $inttab = 2
- GUICtrlSetState($picbackgroundplanning, $gui_show)
- GUICtrlSetState($laaswitch, $gui_show)
- GUICtrlSetState($lauplanning, $gui_show)
- GUICtrlSetState($laufarm[$intactivfarm], $gui_show)
- For $i = 1 To 6
- GUICtrlSetState($aobuilding[$i], $gui_show)
- If $abuilding[$intactivfarm][$i] <> 22 AND $abuilding[$intactivfarm][$i] <> 0 Then GUICtrlSetState($abtnplan[$i], $gui_show)
- Next
- For $i = 1 To 4
- If $intactivfarm = $i Then GUICtrlSetState($laufarm[$i], $gui_show)
- GUICtrlSetState($laafarm[$i], $gui_show)
- Next
- EndFunc
- Func a2c10f05a12()
- GUICtrlSetState($picbackgroundfiszado, $gui_hide)
- GUICtrlSetState($laaswitch, $gui_hide)
- GUICtrlSetState($laadonothing, $gui_hide)
- GUICtrlSetState($laakeep, $gui_hide)
- GUICtrlSetState($laareplace, $gui_hide)
- GUICtrlSetState($laudonothing, $gui_hide)
- GUICtrlSetState($laukeep, $gui_hide)
- GUICtrlSetState($laureplace, $gui_hide)
- GUICtrlSetState($laachecky, $gui_hide)
- GUICtrlSetState($lauchecky, $gui_hide)
- GUICtrlSetState($laacheckn, $gui_hide)
- GUICtrlSetState($laucheckn, $gui_hide)
- For $i = 1 To 5
- GUICtrlSetState($lautree[$i], $gui_hide)
- GUICtrlSetState($laatree[$i], $gui_hide)
- Next
- EndFunc
- Func a262000194f()
- $inttab = 3
- GUICtrlSetState($picbackgroundfiszado, $gui_show)
- GUICtrlSetState($laaswitch, $gui_show)
- GUICtrlSetState($laadonothing, $gui_show)
- GUICtrlSetState($laakeep, $gui_show)
- GUICtrlSetState($laareplace, $gui_show)
- Global $strloterrystate = IniRead($strprofilepath, "Lottery", "do", "nothing")
- If $strloterrystate = "nothing" Then GUICtrlSetState($laudonothing, $gui_show)
- If $strloterrystate = "keep" Then GUICtrlSetState($laukeep, $gui_show)
- If $strloterrystate = "replace" Then GUICtrlSetState($laureplace, $gui_show)
- GUICtrlSetState($laachecky, $gui_show)
- GUICtrlSetState($laacheckn, $gui_show)
- If $bforestrystate = 0 Then GUICtrlSetState($laucheckn, $gui_show)
- If $bforestrystate = 1 Then GUICtrlSetState($lauchecky, $gui_show)
- For $i = 1 To 5
- If $i = $inttreestate Then GUICtrlSetState($lautree[$i], $gui_show)
- GUICtrlSetState($laatree[$i], $gui_show)
- Next
- EndFunc
- Func a1520101741()
- GUICtrlSetState($picbackgroundsettings, $gui_hide)
- For $i = 1 To 4
- GUICtrlSetState($achksettings[$i], $gui_hide)
- GUICtrlSetState($laachksettings[$i], $gui_hide)
- Next
- EndFunc
- Func a092020480d()
- $inttab = 4
- GUICtrlSetState($picbackgroundsettings, $gui_show)
- For $i = 1 To 4
- If $aconfig[$i - 1] = 1 Then GUICtrlSetState($achksettings[$i], $gui_show)
- GUICtrlSetState($laachksettings[$i], $gui_show)
- Next
- EndFunc
- Func a6220303721()
- GUISetState(@SW_SHOW, $formmain)
- Opt("TrayIconHide", 1)
- EndFunc
- Func a3d20405225($strserver, $strusername, $strpassword)
- $asplitserver = StringRegExp($strserver, "^s(\d{1,2})\.([\w|\.]{1,})$", 3)
- $ohttp.open("POST", "http://www." & $asplitserver[1] & "/ajax/createtoken.php")
- $ohttp.setrequestheader("Content-Type", "application/x-www-form-urlencoded")
- $ohttp.setrequestheader("User-Agent", $abrowser)
- $ohttp.send("server=" & $asplitserver[0] & "&username=" & $strusername & "&password=" & $strpassword & "&ref=gomffpl&retid=")
- $strreflink = StringReplace(StringTrimRight(StringTrimLeft($ohttp.responsetext, 4), 2), "\/", "/")
- $bstatus = StringRight(StringLeft($ohttp.responsetext, 2), 1)
- If $bstatus <> "0" Then
- $bskip = False
- $ohttp.open("GET", $strreflink)
- $ohttp.setrequestheader("Content-Type", "text/html")
- $ohttp.setrequestheader("User-Agent", $abrowser)
- $ohttp.send()
- If @OSVersion = "WIN_XP" Then
- For $i = 1 To 1000
- $stranalyse = StringMid($ohttp.responsetext, $i, 7)
- If $stranalyse = "var rid" Then
- Global $strrid = StringTrimLeft(StringMid($ohttp.responsetext, $i, 43), 11)
- $bskip = True
- ExitLoop 1
- EndIf
- Next
- EndIf
- $strprofilepath = "profiles\" & $strserver & "\" & $strusername & ".prof"
- If NOT FileExists("profiles") OR NOT StringInStr(FileGetAttrib("profiles"), "D") Then DirCreate("profiles")
- If NOT FileExists("profiles\" & $strserver) OR NOT StringInStr(FileGetAttrib("profiles\" & $strserver), "D") Then DirCreate("profiles\" & $strserver)
- If NOT $bskip Then
- $aresultsrid = StringRegExp($ohttp.responsetext, "var rid = \'(\w{1,32})\';", 3)
- If NOT @error Then
- Global $strrid = $aresultsrid[0]
- Else
- $asplitcrlf = StringSplit($ohttp.responsetext, @CRLF)
- If NOT @error Then
- Global $strrid = StringTrimLeft(StringTrimRight($asplitcrlf[12], 2), 12)
- EndIf
- EndIf
- EndIf
- Global $intlevelnum = a1d30c0094f()
- Global $strloterrystate = IniRead($strprofilepath, "Lottery", "do", "nothing")
- Global $bforestrystate = IniRead($strprofilepath, "Forestry", "active", 0)
- Global $inttreestate = IniRead($strprofilepath, "Forestry", "seed", 1)
- EndIf
- Return $bstatus
- EndFunc
- Func a0820501522($strserver, $strusername, $strpassword)
- $asplitserver = StringRegExp($strserver, "^s(\d{1,2})\.([\w|\.]{1,})$", 3)
- $ohttp.open("POST", "http://www." & $asplitserver[1] & "/ajax/createtoken.php")
- $ohttp.setrequestheader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8")
- $ohttp.setrequestheader("User-Agent", $abrowser)
- $ohttp.send("server=" & $asplitserver[0] & "&username=" & $strusername & "&password=" & $strpassword & "&ref=gomffpl&retid=")
- $strreflink = StringReplace(StringTrimRight(StringTrimLeft($ohttp.responsetext, 4), 2), "\/", "/")
- $bstatus = StringRight(StringLeft($ohttp.responsetext, 2), 1)
- If $bstatus <> "0" Then ShellExecute($strreflink)
- EndFunc
- Func a3420601f58()
- $ohttp.open("GET", "http://" & GUICtrlRead($inpserver) & "/farm/ajax.php?rid=" & $strrid & "&mode=getuserfarminfos&farm=1")
- $ohttp.setrequestheader("User-Agent", $abrowser)
- $ohttp.send()
- $apremiumsplit = StringRegExp($ohttp.responsetext, 'premium\"\:(\d)\,\"premium_bis', 3)
- $bpremium = Int($apremiumsplit[0])
- EndFunc
- Func a1120703d1f()
- For $i = 1 To 4
- $ohttp.open("GET", "http://" & GUICtrlRead($inpserver) & "/farm/ajax.php?rid=" & $strrid & "&mode=getuserfarminfos&farm=" & $i)
- $ohttp.setrequestheader("User-Agent", $abrowser)
- $ohttp.send()
- If $ohttp.responsetext = "0" Then
- For $j = 1 To 6
- $abuilding[$i][$j] = 0
- Next
- Else
- $asplitinfos = StringRegExp($ohttp.responsetext, '\"\d\":\{\"buildingid\"\:\"(\d{1,})\"', 3)
- For $j = 1 To 6
- $abuilding[$i][$j] = $asplitinfos[$j - 1]
- Next
- EndIf
- Next
- EndFunc
- Func a3620805712($intfarm)
- For $i = 1 To 6
- If $bpremium = 0 AND $intactivfarm = 1 AND $i = 5 Then $abuilding[$intfarm][$i] = 22
- If $bpremium = 0 AND $intactivfarm = 2 AND $i = 2 Then $abuilding[$intfarm][$i] = 22
- If $bpremium = 0 AND $intactivfarm = 2 AND $i = 4 Then $abuilding[$intfarm][$i] = 22
- If $bpremium = 0 AND $intactivfarm = 3 Then $abuilding[$intfarm][$i] = 22
- If $bpremium = 0 AND $intactivfarm = 4 Then $abuilding[$intfarm][$i] = 22
- If $abuilding[$intfarm][$i] = 22 OR $abuilding[$intfarm][$i] = 0 Then
- GUICtrlSetState($abtnplan[$i], $gui_hide)
- Else
- GUICtrlSetState($abtnplan[$i], $gui_show)
- EndIf
- GUICtrlSetData($aobuilding[$i], " " & $aidtiles[$abuilding[$intfarm][$i]])
- Next
- EndFunc
- Func a1d20901d0d($intpos)
- If $abuilding[$intactivfarm][$intpos] = "1" Then a3a20a00657($intpos)
- If $abuilding[$intactivfarm][$intpos] = "2" Then a4520b06110($intpos, 2)
- If $abuilding[$intactivfarm][$intpos] = "3" Then a4520b06110($intpos, 3)
- If $abuilding[$intactivfarm][$intpos] = "4" Then a4520b06110($intpos, 4)
- If $abuilding[$intactivfarm][$intpos] = "5" Then a4520b06110($intpos, 5)
- If $abuilding[$intactivfarm][$intpos] = "7" Then a5c20c02916($intpos, 7)
- If $abuilding[$intactivfarm][$intpos] = "8" Then a5c20c02916($intpos, 8)
- If $abuilding[$intactivfarm][$intpos] = "9" Then a5c20c02916($intpos, 9)
- If $abuilding[$intactivfarm][$intpos] = "11" Then a4520b06110($intpos, 11)
- If $abuilding[$intactivfarm][$intpos] = "12" Then a4520b06110($intpos, 12)
- EndFunc
- Func a3a20a00657($intpos)
- $formplanninggarden = GUICreate("Pole", 267, 122, 192, 164, -1, -1, $formmain)
- $cmbtype = GUICtrlCreateCombo("", 24, 16, 217, 25, BitOR($cbs_dropdownlist, $cbs_autohscroll))
- GUICtrlSetData(-1, $strtiles, IniRead($strprofilepath, "Farm" & $intactivfarm & "Pos" & $intpos, "seed", ""))
- $btnsave = GUICtrlCreateButton("Zapisz", 24, 78, 217, 33)
- GUICtrlSetCursor(-1, 0)
- $chkwater = GUICtrlCreateCheckbox("Podlewaj", 96, 40, 73, 25, BitOR($gui_ss_default_checkbox, $bs_left))
- If Int(IniRead($strprofilepath, "Farm" & $intactivfarm & "Pos" & $intpos, "water", 0)) = 1 Then GUICtrlSetState(-1, $gui_checked)
- GUISetState(@SW_SHOW)
- While True
- $nmsg = GUIGetMsg()
- Switch $nmsg
- Case $gui_event_close
- GUIDelete($formplanninggarden)
- ExitLoop
- Case $btnsave
- GUICtrlSetState($btnsave, 128)
- GUICtrlSetData($btnsave, "Zapisywanie...")
- IniDelete($strprofilepath, "Farm" & $intactivfarm & "Pos" & $intpos)
- IniWrite($strprofilepath, "Farm" & $intactivfarm & "Pos" & $intpos, "seed", GUICtrlRead($cmbtype))
- IniWrite($strprofilepath, "Farm" & $intactivfarm & "Pos" & $intpos, "water", Mod(Int(GUICtrlRead($chkwater)), 2))
- ConsoleWrite("+>Zapisałem nowe ustawienia pozycji " & $intpos & " na " & $intactivfarm & " farmie." & @CRLF)
- Sleep(500)
- GUIDelete($formplanninggarden)
- ExitLoop
- EndSwitch
- WEnd
- EndFunc
- Func a4520b06110($intpos, $inttype)
- $formplanningbuilding = GUICreate($aidtiles[$inttype], 320, 136, (@DesktopWidth - 320) / 2, (@DesktopHeight - 136) / 2, -1, -1, $formmain)
- $picbackgroundb = GUICtrlCreatePic("", 0, 0, 320, 136)
- a0610905208($picbackgroundb, "BACKGROUND_BUILDING", $rt_bitmap)
- GUICtrlSetState(-1, 128)
- $intdefaultvalue = IniRead($strprofilepath, "Farm" & $intactivfarm & "Pos" & $intpos, "amount", 1)
- $inpamount = GUICtrlCreateInput($intdefaultvalue, 161, 95, 158, 19, -1, 0)
- GUICtrlSetBkColor(-1, 2302755)
- GUICtrlSetColor(-1, 15658734)
- GUICtrlSetFont(-1, 9.5, 800, 0, "Sans")
- GUICtrlSendMsg(-1, 5377, 0, "Ilość")
- $lbloption1 = GUICtrlCreateLabel("", 16, 75, 144, 20, $ss_center)
- GUICtrlSetBkColor(-1, $gui_bkcolor_transparent)
- GUICtrlSetColor(-1, 15658734)
- GUICtrlSetFont(-1, 9.5, 800, 0, "Sans")
- $lbloption2 = GUICtrlCreateLabel("", 160, 75, 144, 20, $ss_center)
- GUICtrlSetBkColor(-1, $gui_bkcolor_transparent)
- GUICtrlSetColor(-1, 15658734)
- GUICtrlSetFont(-1, 9.5, 800, 0, "Sans")
- If $inttype = 2 Then
- GUICtrlSetData($lbloption1, "Zboże")
- GUICtrlSetData(-1, "Kukurydza")
- ElseIf $inttype = 3 Then
- GUICtrlSetData($lbloption1, "Koniczyna")
- GUICtrlSetData(-1, "Rzepak")
- ElseIf $inttype = 4 Then
- GUICtrlSetData($lbloption1, "Buraki pastewne")
- GUICtrlSetData(-1, "Zioła")
- ElseIf $inttype = 4 Then
- GUICtrlSetData($lbloption1, "Słoneczniki")
- GUICtrlSetData(-1, "Bławatki")
- ElseIf $inttype = 11 Then
- GUICtrlSetData($lbloption1, "Karma dla rybek")
- GUICtrlSetData(-1, "Superkarma dla rybek")
- ElseIf $inttype = 12 Then
- GUICtrlSetData($lbloption1, "Bodziszki")
- GUICtrlSetData(-1, "Stokrotki")
- EndIf
- $lausave = GUICtrlCreateLabel("", 132, 46, 68, 2)
- GUICtrlSetBkColor(-1, 3319763)
- GUICtrlSetState(-1, $gui_hide)
- $lauclose = GUICtrlCreateLabel("", 200, 46, 76, 2)
- GUICtrlSetBkColor(-1, 3319763)
- GUICtrlSetState(-1, $gui_hide)
- $laasave = GUICtrlCreateLabel("", 132, 18, 68, 30)
- GUICtrlSetBkColor(-1, $gui_bkcolor_transparent)
- $laaclose = GUICtrlCreateLabel("", 200, 18, 76, 30)
- GUICtrlSetBkColor(-1, $gui_bkcolor_transparent)
- $laaoption1 = GUICtrlCreateLabel("", 16, 64, 144, 30)
- GUICtrlSetBkColor(-1, $gui_bkcolor_transparent)
- $laaoption2 = GUICtrlCreateLabel("", 160, 64, 144, 30)
- GUICtrlSetBkColor(-1, $gui_bkcolor_transparent)
- $lauoption1 = GUICtrlCreateLabel("", 16, 92, 144, 2)
- GUICtrlSetBkColor(-1, 3319763)
- $lauoption2 = GUICtrlCreateLabel("", 160, 92, 144, 2)
- GUICtrlSetBkColor(-1, 3319763)
- Local $boption = False
- For $i = 0 To UBound($acomponentprod) - 1
- If Int(IniRead($strprofilepath, "Farm" & $intactivfarm & "Pos" & $intpos, "pid", "null")) = $acomponentprod[$i][1] Then
- If $acomponentprod[$i][0] = GUICtrlRead($lbloption1) Then
- $boption = False
- GUICtrlSetState($lauoption2, $gui_hide)
- ElseIf $acomponentprod[$i][0] = GUICtrlRead($lbloption2) Then
- $boption = True
- GUICtrlSetState($lauoption1, $gui_hide)
- EndIf
- ExitLoop
- EndIf
- Next
- Local $actrlstateab[4] = [False, False, False, False]
- GUISetState(@SW_SHOW)
- While True
- Switch GUIGetMsg()
- Case -3, $lauclose, $laaclose
- GUIDelete($formplanningbuilding)
- ExitLoop
- Case $lausave, $laasave
- IniDelete($strprofilepath, "Farm" & $intactivfarm & "Pos" & $intpos)
- If NOT $boption Then
- $strnameofprod = GUICtrlRead($lbloption1)
- Else
- $strnameofprod = GUICtrlRead($lbloption2)
- EndIf
- For $i = 0 To UBound($acomponentprod) - 1
- If $strnameofprod = $acomponentprod[$i][0] Then IniWrite($strprofilepath, "Farm" & $intactivfarm & "Pos" & $intpos, "pid", $acomponentprod[$i][1])
- Next
- IniWrite($strprofilepath, "Farm" & $intactivfarm & "Pos" & $intpos, "amount", GUICtrlRead($inpamount))
- ConsoleWrite("+>Zapisałem nowe ustawienia pozycji " & $intpos & " na " & $intactivfarm & " farmie." & @CRLF)
- Case $laaoption1, $lauoption1, $lbloption1
- GUICtrlSetState($lauoption2, $gui_hide)
- $boption = False
- Case $laaoption2, $lauoption2, $lbloption2
- GUICtrlSetState($lauoption1, $gui_hide)
- $boption = True
- EndSwitch
- $ainfo = GUIGetCursorInfo()
- If NOT @error Then
- If $ainfo[4] = $lauclose OR $ainfo[4] = $laaclose AND $actrlstateab[0] = False Then
- GUICtrlSetState($lauclose, $gui_show)
- $actrlstateab[0] = True
- ElseIf $ainfo[4] <> $lauclose AND $ainfo[4] <> $laaclose AND $actrlstateab[0] = True Then
- GUICtrlSetState($lauclose, $gui_hide)
- $actrlstateab[0] = False
- EndIf
- If $ainfo[4] = $lausave OR $ainfo[4] = $laasave AND $actrlstateab[1] = False Then
- GUICtrlSetState($lausave, $gui_show)
- $actrlstateab[1] = True
- ElseIf $ainfo[4] <> $lausave AND $ainfo[4] <> $laasave AND $actrlstateab[1] = True Then
- GUICtrlSetState($lausave, $gui_hide)
- $actrlstateab[1] = False
- EndIf
- If $ainfo[4] = $lauoption1 OR $ainfo[4] = $laaoption1 OR $ainfo[4] = $lbloption1 AND $actrlstateab[2] = False Then
- GUICtrlSetState($lauoption1, $gui_show)
- $actrlstateab[2] = True
- ElseIf $ainfo[4] <> $lauoption1 AND $ainfo[4] <> $laaoption1 AND $ainfo[4] <> $lbloption1 AND $actrlstateab[2] = True AND $boption <> False Then
- GUICtrlSetState($lauoption1, $gui_hide)
- $actrlstateab[2] = False
- EndIf
- If $ainfo[4] = $lauoption2 OR $ainfo[4] = $laaoption2 AND $ainfo[4] <> $lbloption1 OR $ainfo[4] = $lbloption2 AND $actrlstateab[3] = False Then
- GUICtrlSetState($lauoption2, $gui_show)
- $actrlstateab[3] = True
- ElseIf $ainfo[4] <> $lauoption2 AND $ainfo[4] <> $laaoption2 AND $ainfo[4] <> $lbloption2 AND $actrlstateab[3] = True AND $boption <> True Then
- GUICtrlSetState($lauoption2, $gui_hide)
- $actrlstateab[3] = False
- EndIf
- EndIf
- WEnd
- EndFunc
- Func a5c20c02916($intpos, $inttype)
- $formplanningbuilding = GUICreate($aidtiles[$inttype], 320, 120, (@DesktopWidth - 320) / 2, (@DesktopHeight - 120) / 2, -1, -1, $formmain)
- $picbackgroundab = GUICtrlCreatePic("", 0, 0, 320, 120)
- a0610905208($picbackgroundab, "BACKGROUND_ADVBUILDING", $rt_bitmap)
- GUICtrlSetState(-1, 128)
- $lbloption1 = GUICtrlCreateLabel("", 16, 75, 144, 20, $ss_center)
- GUICtrlSetBkColor(-1, $gui_bkcolor_transparent)
- GUICtrlSetColor(-1, 15658734)
- GUICtrlSetFont(-1, 9.5, 800, 0, "Sans")
- $lbloption2 = GUICtrlCreateLabel("", 160, 75, 144, 20, $ss_center)
- GUICtrlSetBkColor(-1, $gui_bkcolor_transparent)
- GUICtrlSetColor(-1, 15658734)
- GUICtrlSetFont(-1, 9.5, 800, 0, "Sans")
- If $inttype = 7 Then
- GUICtrlSetData($lbloption1, "Majonez")
- GUICtrlSetData(-1, "Ketchup")
- ElseIf $inttype = 8 Then
- GUICtrlSetData($lbloption1, "Ser")
- GUICtrlSetData(-1, "Jogurt")
- ElseIf $inttype = 9 Then
- GUICtrlSetData($lbloption1, "Kłębek wełny")
- GUICtrlSetData(-1, "Kłębek wełny angora")
- EndIf
- $lausave = GUICtrlCreateLabel("", 132, 46, 68, 2)
- GUICtrlSetBkColor(-1, 3319763)
- GUICtrlSetState(-1, $gui_hide)
- $lauclose = GUICtrlCreateLabel("", 200, 46, 76, 2)
- GUICtrlSetBkColor(-1, 3319763)
- GUICtrlSetState(-1, $gui_hide)
- $laasave = GUICtrlCreateLabel("", 132, 18, 68, 30)
- GUICtrlSetBkColor(-1, $gui_bkcolor_transparent)
- $laaclose = GUICtrlCreateLabel("", 200, 18, 76, 30)
- GUICtrlSetBkColor(-1, $gui_bkcolor_transparent)
- $laaoption1 = GUICtrlCreateLabel("", 16, 64, 144, 30)
- GUICtrlSetBkColor(-1, $gui_bkcolor_transparent)
- $laaoption2 = GUICtrlCreateLabel("", 160, 64, 144, 30)
- GUICtrlSetBkColor(-1, $gui_bkcolor_transparent)
- $lauoption1 = GUICtrlCreateLabel("", 16, 92, 144, 2)
- GUICtrlSetBkColor(-1, 3319763)
- $lauoption2 = GUICtrlCreateLabel("", 160, 92, 144, 2)
- GUICtrlSetBkColor(-1, 3319763)
- Local $boption = False
- For $i = 0 To UBound($acomponentadvprod) - 1
- If Int(IniRead($strprofilepath, "Farm" & $intactivfarm & "Pos" & $intpos, "pid", "null")) = $acomponentadvprod[$i][1] Then
- If $acomponentadvprod[$i][0] = GUICtrlRead($lbloption1) Then
- $boption = False
- GUICtrlSetState($lauoption2, $gui_hide)
- ElseIf $acomponentadvprod[$i][0] = GUICtrlRead($lbloption2) Then
- $boption = True
- GUICtrlSetState($lauoption1, $gui_hide)
- EndIf
- ExitLoop
- EndIf
- Next
- Local $actrlstateab[4] = [False, False, False, False]
- GUISetState(@SW_SHOW)
- While True
- Switch GUIGetMsg()
- Case -3, $lauclose, $laaclose
- GUIDelete($formplanningbuilding)
- ExitLoop
- Case $lausave, $laasave
- IniDelete($strprofilepath, "Farm" & $intactivfarm & "Pos" & $intpos)
- If NOT $boption Then
- $strnameofprod = GUICtrlRead($lbloption1)
- Else
- $strnameofprod = GUICtrlRead($lbloption2)
- EndIf
- For $i = 0 To UBound($acomponentadvprod) - 1
- If $strnameofprod = $acomponentadvprod[$i][0] Then IniWrite($strprofilepath, "Farm" & $intactivfarm & "Pos" & $intpos, "pid", $acomponentadvprod[$i][1])
- Next
- Case $laaoption1, $lauoption1, $lbloption1
- GUICtrlSetState($lauoption2, $gui_hide)
- $boption = False
- Case $laaoption2, $lauoption2, $lbloption2
- GUICtrlSetState($lauoption1, $gui_hide)
- $boption = True
- EndSwitch
- $ainfo = GUIGetCursorInfo()
- If NOT @error Then
- If $ainfo[4] = $lauclose OR $ainfo[4] = $laaclose AND $actrlstateab[0] = False Then
- GUICtrlSetState($lauclose, $gui_show)
- $actrlstateab[0] = True
- ElseIf $ainfo[4] <> $lauclose AND $ainfo[4] <> $laaclose AND $actrlstateab[0] = True Then
- GUICtrlSetState($lauclose, $gui_hide)
- $actrlstateab[0] = False
- EndIf
- If $ainfo[4] = $lausave OR $ainfo[4] = $laasave AND $actrlstateab[1] = False Then
- GUICtrlSetState($lausave, $gui_show)
- $actrlstateab[1] = True
- ElseIf $ainfo[4] <> $lausave AND $ainfo[4] <> $laasave AND $actrlstateab[1] = True Then
- GUICtrlSetState($lausave, $gui_hide)
- $actrlstateab[1] = False
- EndIf
- If $ainfo[4] = $lauoption1 OR $ainfo[4] = $laaoption1 OR $ainfo[4] = $lbloption1 AND $actrlstateab[2] = False Then
- GUICtrlSetState($lauoption1, $gui_show)
- $actrlstateab[2] = True
- ElseIf $ainfo[4] <> $lauoption1 AND $ainfo[4] <> $laaoption1 AND $ainfo[4] <> $lbloption1 AND $actrlstateab[2] = True AND $boption <> False Then
- GUICtrlSetState($lauoption1, $gui_hide)
- $actrlstateab[2] = False
- EndIf
- If $ainfo[4] = $lauoption2 OR $ainfo[4] = $laaoption2 AND $ainfo[4] <> $lbloption1 OR $ainfo[4] = $lbloption2 AND $actrlstateab[3] = False Then
- GUICtrlSetState($lauoption2, $gui_show)
- $actrlstateab[3] = True
- ElseIf $ainfo[4] <> $lauoption2 AND $ainfo[4] <> $laaoption2 AND $ainfo[4] <> $lbloption2 AND $actrlstateab[3] = True AND $boption <> True Then
- GUICtrlSetState($lauoption2, $gui_hide)
- $actrlstateab[3] = False
- EndIf
- EndIf
- WEnd
- EndFunc
- Func a6320d00030($intfarm, $intpos)
- $ohttp.open("GET", "http://" & GUICtrlRead($inpserver) & "/farm/ajax.php?rid=" & $strrid & "&mode=inner_init&farm=" & $intfarm & "&position=" & $intpos)
- $ohttp.setrequestheader("User-Agent", $abrowser)
- $ohttp.send()
- Return $ohttp.responsetext
- EndFunc
- Func a2c20e0525c($intfarm, $intpos)
- $ohttp.open("GET", "http://" & GUICtrlRead($inpserver) & "/farm/ajax.php?rid=" & $strrid & "&mode=innerinfos&farm=" & $intfarm & "&position=" & $intpos)
- $ohttp.setrequestheader("User-Agent", $abrowser)
- $ohttp.send()
- Return $ohttp.responsetext
- EndFunc
- Func a2b20f0593a()
- If NOT FileExists($strprofilepath) Then
- 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.")
- GUICtrlSetBkColor($lauswitch, 57344)
- a0610905208($laaswitch, "LAA_START", $rt_bitmap)
- $bstateofbot = False
- AdlibUnRegister("A2B20F0593A")
- Return
- EndIf
- a0610905208($laaswitch, "LAA_WORK", $rt_bitmap)
- $strlast = IniRead($strprofilepath, "Lottery", "last", "null")
- If $strlast <> @YEAR & ":" & @YDAY Then
- $strloterrystate = IniRead($strprofilepath, "Lottery", "do", "nothing")
- If $strloterrystate <> "nothing" Then
- $ohttp.open("GET", "http://" & GUICtrlRead($inpserver) & "/city/ajax.php?rid=" & $strrid & "&city=2&mode=newlot")
- $ohttp.setrequestheader("User-Agent", $abrowser)
- $ohttp.send()
- EndIf
- If $strloterrystate = "replace" Then
- $ohttp.open("GET", "http://" & GUICtrlRead($inpserver) & "/city/ajax.php?rid=" & $strrid & "&city=2&mode=lotgetprize")
- $ohttp.setrequestheader("User-Agent", $abrowser)
- $ohttp.send()
- EndIf
- IniWrite($strprofilepath, "Lottery", "last", @YEAR & ":" & @YDAY)
- EndIf
- For $i = 1 To 4
- For $j = 1 To 6
- IniReadSection($strprofilepath, "Farm" & $i & "Pos" & $j)
- If NOT @error Then
- If $abuilding[$i][$j] = "1" Then a1830001d48($i, $j)
- If $abuilding[$i][$j] = "2" Then a4430104834($i, $j)
- If $abuilding[$i][$j] = "3" Then a4430104834($i, $j)
- If $abuilding[$i][$j] = "4" Then a4430104834($i, $j)
- If $abuilding[$i][$j] = "5" Then a4430104834($i, $j)
- If $abuilding[$i][$j] = "7" Then a4430104834($i, $j)
- If $abuilding[$i][$j] = "8" Then a4430104834($i, $j)
- If $abuilding[$i][$j] = "9" Then a4430104834($i, $j)
- If $abuilding[$i][$j] = "11" Then a4430104834($i, $j)
- If $abuilding[$i][$j] = "12" Then a4430104834($i, $j)
- EndIf
- Next
- Next
- a0730806103()
- Global $intlevelnum = a1d30c0094f()
- a0610905208($laaswitch, "LAA_STOP", $rt_bitmap)
- EndFunc
- Func a1830001d48($intfarm, $intpos)
- $ohttp.open("GET", "http://" & GUICtrlRead($inpserver) & "/farm/ajax.php?rid=" & $strrid & "&mode=gardeninit&farm=" & $intfarm & "&position=" & $intpos)
- $ohttp.setrequestheader("User-Agent", $abrowser)
- $ohttp.send()
- $asplitphase = StringRegExp($ohttp.responsetext, 'phase":(\d)', 3)
- For $i = 1 To 120
- If $asplitphase[$i] = "4" OR UBound($asplitphase) < 120 Then
- a403060235f($intfarm, $intpos)
- ExitLoop
- Else
- Return
- EndIf
- Next
- a0330703e5f($intfarm, $intpos)
- EndFunc
- Func a4430104834($intfarm, $intpos)
- 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
- $bremain = StringRegExp(a6320d00030($intfarm, $intpos), 'remain\"\:(\d{1,}),\"')
- $aremain = StringRegExp(a6320d00030($intfarm, $intpos), 'remain\"\:(\d{1,}),\"', 3)
- If NOT $bremain Then
- a4e30203254($intfarm, $intpos)
- EndIf
- If $bremain AND $aremain[0] = "1" Then
- a0c30402354($intfarm, $intpos)
- a4e30203254($intfarm, $intpos)
- EndIf
- ElseIf $abuilding[$intfarm][$intpos] = "7" OR $abuilding[$intfarm][$intpos] = "8" OR $abuilding[$intfarm][$intpos] = "9" Then
- $strinfo = a2c20e0525c($intfarm, $intpos)
- $bcheck1 = StringRegExp($strinfo, '\{\"datablock\"\:\[1\,\{\"(\d{1,})\"\:2\,\"pid\"')
- $bcheck2 = StringRegExp($strinfo, '\{\"datablock\"\:\[1\,\{\"(\d{1,})\"\:0\,')
- If $bcheck1 OR $bcheck2 Then
- a033050194b($intfarm, $intpos)
- a0730304529($intfarm, $intpos)
- EndIf
- EndIf
- EndFunc
- Func a4e30203254($intfarm, $intpos)
- $intpid = IniRead($strprofilepath, "Farm" & $intfarm & "Pos" & $intpos, "pid", "null")
- $intamount = IniRead($strprofilepath, "Farm" & $intfarm & "Pos" & $intpos, "amount", "1")
- $intlevelnum = a1d30c0094f()
- If $intpid = "null" Then Return
- If $bpremium = 1 OR ($intlevelnum >= 5 AND $intlevelnum < 10) Then
- $ohttp.open("GET", "http://" & GUICtrlRead($inpserver) & "/farm/ajax.php?rid=" & $strrid & "&mode=inner_feed&farm=" & $intfarm & "&position=" & $intpos & "&pid=" & $intpid & "&amount=" & $intamount)
- $ohttp.setrequestheader("User-Agent", $abrowser)
- $ohttp.send()
- Return True
- EndIf
- For $i = 1 To $intamount
- $ohttp.open("GET", "http://" & GUICtrlRead($inpserver) & "/farm/ajax.php?rid=" & $strrid & "&mode=inner_feed&farm=" & $intfarm & "&position=" & $intpos & "&pid=" & $intpid & "&amount=1")
- $ohttp.setrequestheader("User-Agent", $abrowser)
- $ohttp.send()
- Next
- EndFunc
- Func a0730304529($intfarm, $intpos)
- $intadvpid = IniRead($strprofilepath, "Farm" & $intfarm & "Pos" & $intpos, "pid", "null")
- $ohttp.open("GET", "http://" & GUICtrlRead($inpserver) & "/farm/ajax.php?rid=" & $strrid & "&mode=setadvancedproduction&farm=" & $intfarm & "&position=" & $intpos & "&id=" & $intadvpid & "&product=" & $intadvpid)
- $ohttp.setrequestheader("User-Agent", $abrowser)
- $ohttp.send()
- EndFunc
- Func a0c30402354($intfarm, $intpos)
- $ohttp.open("GET", "http://" & GUICtrlRead($inpserver) & "/farm/ajax.php?rid=" & $strrid & "&mode=inner_crop&farm=" & $intfarm & "&position=" & $intpos)
- $ohttp.setrequestheader("User-Agent", $abrowser)
- $ohttp.send()
- EndFunc
- Func a033050194b($intfarm, $intpos)
- $ohttp.open("GET", "http://" & GUICtrlRead($inpserver) & "/farm/ajax.php?rid=" & $strrid & "&mode=getadvancedcrop&farm=" & $intfarm & "&position=" & $intpos)
- $ohttp.setrequestheader("User-Agent", $abrowser)
- $ohttp.send()
- EndFunc
- Func a403060235f($intfarm, $intpos)
- $ohttp.open("GET", "http://" & GUICtrlRead($inpserver) & "/farm/ajax.php?rid=" & $strrid & "&mode=getuserfarminfos&farm=1")
- $ohttp.setrequestheader("User-Agent", $abrowser)
- $ohttp.send()
- $alevelnumsplit = StringRegExp($ohttp.responsetext, 'levelnum\"\:\"(\d{1,})', 3)
- If Int($alevelnumsplit[0]) < 4 Then
- Local $avirtualgarden[121]
- $ohttp.open("GET", "http://" & GUICtrlRead($inpserver) & "/farm/ajax.php?rid=" & $strrid & "&mode=gardeninit&farm=" & $intfarm & "&position=" & $intpos)
- $ohttp.setrequestheader("User-Agent", $abrowser)
- $ohttp.send()
- $teil_nr = StringRegExp($ohttp.responsetext, 'teil_nr":"(\d{1,})"', 3)
- $j = 1
- For $i = 1 To 120
- If $teil_nr[$j - 1] = $i Then
- $avirtualgarden[$i] = $teil_nr[$j - 1]
- $j += 1
- Else
- $avirtualgarden[$i] = "empty"
- EndIf
- Next
- Local $aphase[121]
- $asplitphase = StringRegExp($ohttp.responsetext, 'phase":(\d)', 3)
- $j = 1
- For $i = 1 To 120
- If $avirtualgarden[$i] <> "empty" Then
- $aphase[$i] = $asplitphase[$j - 1]
- $j += 1
- Else
- $aphase[$i] = "0"
- EndIf
- Next
- Local $ainhalt[121]
- $asplitinhalt = StringRegExp($ohttp.responsetext, 'inhalt\"\:\"(\d{1,})\"', 3)
- $j = 1
- For $i = 1 To 120
- If $avirtualgarden[$i] <> "empty" Then
- $ainhalt[$i] = $asplitinhalt[$j - 1]
- $j += 1
- EndIf
- Next
- Local $asizex[121], $asizey[121]
- $asplitsizex = StringRegExp($ohttp.responsetext, 'x":(\d)', 3)
- $asplitsizey = StringRegExp($ohttp.responsetext, 'y":(\d)', 3)
- $j = 1
- For $i = 1 To 120
- If $avirtualgarden[$i] <> "empty" Then
- $asizex[$i] = $asplitsizex[$j - 1]
- $asizey[$i] = $asplitsizey[$j - 1]
- $j += 1
- EndIf
- Next
- For $j = 1 To 120
- If $avirtualgarden[$j] <> "empty" Then
- If $asizex[$j] * $asizey[$j] = 1 AND $aphase[$j] = "4" Then
- $ohttp.open("GET", "http://" & GUICtrlRead($inpserver) & "/save/ernte.php?rid=" & $strrid & "&pflanze[]=" & $ainhalt[$j] & "&feld[]=" & $j & "&felder[]=" & $j & "&position=" & $intpos & "&farm=" & $intfarm)
- $ohttp.setrequestheader("User-Agent", $abrowser)
- $ohttp.send()
- ElseIf $asizex[$j] * $asizey[$j] = 2 AND $aphase[$j] = "4" Then
- $ohttp.open("GET", "http://" & GUICtrlRead($inpserver) & "/save/ernte.php?rid=" & $strrid & "&pflanze[]=" & $ainhalt[$j] & "&feld[]=" & $j & "&felder[]=" & $j & "," & $j + 1 & "&position=" & $intpos & "&farm=" & $intfarm)
- $ohttp.setrequestheader("User-Agent", $abrowser)
- $ohttp.send()
- ElseIf $asizex[$j] * $asizey[$j] = 4 AND $aphase[$j] = "4" Then
- $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)
- $ohttp.setrequestheader("User-Agent", $abrowser)
- $ohttp.send()
- EndIf
- EndIf
- Next
- Else
- $ohttp.open("GET", "http://" & GUICtrlRead($inpserver) & "/farm/ajax.php?rid=" & $strrid & "&mode=cropgarden&farm=" & $intfarm & "&position=" & $intpos)
- $ohttp.setrequestheader("Content-Type", "text/html")
- $ohttp.setrequestheader("User-Agent", $abrowser)
- $ohttp.send()
- EndIf
- EndFunc
- Func a0330703e5f($intfarm, $intpos)
- $strnameofseed = IniRead($strprofilepath, "Farm" & $intfarm & "Pos" & $intpos, "seed", "error")
- If $strnameofseed = "error" Then Return
- $intid = "null"
- $ohttp.open("GET", "http://" & GUICtrlRead($inpserver) & "/farm/ajax.php?rid=" & $strrid & "&mode=getuserfarminfos&farm=1")
- $ohttp.setrequestheader("User-Agent", $abrowser)
- $ohttp.send()
- $alevelnumsplit = StringRegExp($ohttp.responsetext, 'levelnum\"\:\"(\d{1,})', 3)
- $intlevelnum = Int($alevelnumsplit[0])
- For $i = 0 To UBound($aids) - 1
- If $aids[$i][2] = $strnameofseed Then
- $intid = $aids[$i][0]
- $intsize = $aids[$i][1]
- ExitLoop
- EndIf
- Next
- If $intid = "null" Then Return
- $strwater = IniRead($strprofilepath, "Farm" & $intfarm & "Pos" & $intpos, "water", "0")
- If $intsize = 1 Then
- For $i = 1 To 120
- $ohttp.open("GET", "http://" & GUICtrlRead($inpserver) & "/save/pflanz.php?rid=" & $strrid & "&pflanze[]=" & $intid & "&feld[]=" & $i & "&felder[]=" & $i & "&position=" & $intpos & "&farm=" & $intfarm)
- $ohttp.setrequestheader("User-Agent", $abrowser)
- $ohttp.setrequestheader("Content-Type", "text/html")
- $ohttp.send()
- If $strwater = "1" AND ($intlevelnum < 5 OR $intlevelnum >= 10 AND $bpremium = 0) Then
- $ohttp.open("GET", "http://" & GUICtrlRead($inpserver) & "/save/wasser.php?rid=" & $strrid & "&feld[]=" & $i & "&felder[]=" & $i & "&position=" & $intpos & "&farm=" & $intfarm)
- $ohttp.setrequestheader("User-Agent", $abrowser)
- $ohttp.setrequestheader("Content-Type", "text/html")
- $ohttp.send()
- EndIf
- Next
- If $strwater = "1" AND (($intlevelnum >= 5 AND $intlevelnum < 10) OR $bpremium = 1) Then
- $ohttp.open("GET", "http://" & GUICtrlRead($inpserver) & "/farm/ajax.php?rid=" & $strrid & "&mode=watergarden&farm=" & $intfarm & "&position=" & $intpos)
- $ohttp.setrequestheader("User-Agent", $abrowser)
- $ohttp.send()
- EndIf
- ElseIf $intsize = 2 Then
- For $i = 1 To 120
- $ohttp.open("GET", "http://" & GUICtrlRead($inpserver) & "/save/pflanz.php?rid=" & $strrid & "&pflanze[]=" & $intid & "&feld[]=" & $i & "&felder[]=" & $i & "," & $i + 1 & "&position=" & $intpos & "&farm=" & $intfarm)
- $ohttp.setrequestheader("User-Agent", $abrowser)
- $ohttp.setrequestheader("Content-Type", "text/html")
- $ohttp.send()
- If $strwater = "1" AND ($intlevelnum < 5 OR $intlevelnum >= 10 AND $bpremium = 0) Then
- $ohttp.open("GET", "http://" & GUICtrlRead($inpserver) & "/save/wasser.php?rid=" & $strrid & "&feld[]=" & $i & "&felder[]=" & $i & "&position=" & $intpos & "&farm=" & $intfarm)
- $ohttp.setrequestheader("User-Agent", $abrowser)
- $ohttp.setrequestheader("Content-Type", "text/html")
- $ohttp.send()
- EndIf
- Next
- If $strwater = "1" AND (($intlevelnum >= 5 AND $intlevelnum < 10) OR $bpremium = 1) Then
- $ohttp.open("GET", "http://" & GUICtrlRead($inpserver) & "/farm/ajax.php?rid=" & $strrid & "&mode=watergarden&farm=" & $intfarm & "&position=" & $intpos)
- $ohttp.setrequestheader("User-Agent", $abrowser)
- $ohttp.send()
- EndIf
- ElseIf $intsize = 4 Then
- For $i = 1 To 120
- $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)
- $ohttp.setrequestheader("User-Agent", $abrowser)
- $ohttp.setrequestheader("Content-Type", "text/html")
- $ohttp.send()
- If $strwater = "1" AND ($intlevelnum < 5 OR $intlevelnum >= 10 AND $bpremium = 0) Then
- $ohttp.open("GET", "http://" & GUICtrlRead($inpserver) & "/save/wasser.php?rid=" & $strrid & "&feld[]=" & $i & "&felder[]=" & $i & "&position=" & $intpos & "&farm=" & $intfarm)
- $ohttp.setrequestheader("User-Agent", $abrowser)
- $ohttp.setrequestheader("Content-Type", "text/html")
- $ohttp.send()
- EndIf
- Next
- If $strwater = "1" AND (($intlevelnum >= 5 AND $intlevelnum < 10) OR $bpremium = 1) Then
- $ohttp.open("GET", "http://" & GUICtrlRead($inpserver) & "/farm/ajax.php?rid=" & $strrid & "&mode=watergarden&farm=" & $intfarm & "&position=" & $intpos)
- $ohttp.setrequestheader("User-Agent", $abrowser)
- $ohttp.send()
- EndIf
- EndIf
- $strconsolewritewater = ""
- If $strwater = "1" Then $strconsolewritewater = " i podlewanie"
- EndFunc
- Func a0730806103()
- If $bforestrystate = 0 Then Return
- $ohttp.open("GET", "http://" & GUICtrlRead($inpserver) & "/forestry/ajax.php?rid=" & $strrid & "&action=initforestry")
- $ohttp.setrequestheader("User-Agent", $abrowser)
- $ohttp.send()
- $strpattern = '"position":"(\d{1,})","block":"0","category":1,"ready":1,"remain":0,"'
- $areadysplit = StringRegExp($ohttp.responsetext, $strpattern, 3)
- If NOT @error Then
- For $i = 0 To UBound($areadysplit) - 1
- a0f30900c30($areadysplit[$i])
- a6030a03009($areadysplit[$i])
- Next
- EndIf
- $aemptysplit = StringRegExp($ohttp.responsetext, '"position":"(\d{1,})","bl', 3)
- Local $aemptystatus[26]
- If NOT @error Then
- For $i = 0 To UBound($aemptysplit) - 1
- $aemptystatus[Int($aemptysplit[$i])] = "n"
- Next
- For $i = 1 To 25
- If $aemptystatus[$i] <> "n" Then a6030a03009($i)
- Next
- EndIf
- EndFunc
- Func a0f30900c30($intpos)
- $ohttp.open("GET", "http://" & GUICtrlRead($inpserver) & "/forestry/ajax.php?rid=" & $strrid & "&action=crop¶ms=&z[]=" & $intpos & "&p[]=1")
- $ohttp.setrequestheader("User-Agent", $abrowser)
- $ohttp.send()
- EndFunc
- Func a6030a03009($intpos)
- $intseed = IniRead($strprofilepath, "Forestry", "seed", 1)
- If $intseed = "null" Then Return
- $ohttp.open("GET", "http://" & GUICtrlRead($inpserver) & "/forestry/ajax.php?rid=" & $strrid & "&action=plant¶ms=&z[]=" & $intpos & "&p[]=" & $intseed)
- $ohttp.setrequestheader("User-Agent", $abrowser)
- $ohttp.send()
- EndFunc
- Func a0630b03949()
- $asplitserver = StringRegExp(GUICtrlRead($inpserver), "^s(\d{1,2})\.([\w|\.]{1,})$", 3)
- $ohttp.open("POST", "http://www." & $asplitserver[1] & "/ajax/createtoken.php")
- $ohttp.setrequestheader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8")
- $ohttp.setrequestheader("User-Agent", $abrowser)
- $ohttp.send("server=" & $asplitserver[0] & "&username=" & GUICtrlRead($inpusername) & "&password=" & GUICtrlRead($inppassword) & "&ref=gomffpl&retid=")
- $strreflink = StringReplace(StringTrimRight(StringTrimLeft($ohttp.responsetext, 4), 2), "\/", "/")
- $bstatus = StringRight(StringLeft($ohttp.responsetext, 2), 1)
- $ohttp.open("GET", $strreflink)
- $ohttp.setrequestheader("Content-Type", "text/html")
- $ohttp.setrequestheader("User-Agent", $abrowser)
- $ohttp.send()
- $aresultsrid = a2d00401947($ohttp.responsetext, "var rid = '", "'")
- Global $strrid = $aresultsrid[0]
- EndFunc
- Func a1d30c0094f()
- $ohttp.open("GET", "http://" & GUICtrlRead($inpserver) & "/farm/ajax.php?rid=" & $strrid & "&mode=getuserfarminfos&farm=1")
- $ohttp.setrequestheader("User-Agent", $abrowser)
- $ohttp.send()
- $alevelnumsplit = StringRegExp($ohttp.responsetext, 'levelnum\"\:\"(\d{1,})', 3)
- Return Int($alevelnumsplit[0])
- EndFunc
- Func a5a30d01208()
- Local $arandomserver[5] = ["wolnifarmerzy.pl", "myfreefarm.de", "myfreefarm.co.uk"]
- If $inttab = 1 Then
- If $intiter > 0 Then
- GUICtrlSetData($lblrandomserver, "np. s" & Random(1, 25, 1) & "." & $arandomserver[Random(0, 2, 1)])
- Else
- GUICtrlSetData($lblrandomserver, "np. s" & Random(1, 20, 1) & "." & $arandomserver[0])
- $intiter = 1
- EndIf
- EndIf
- EndFunc
- Func a6230e04854()
- $ohttp.open("GET", "http://www.wf-iris-bot.cba.pl/updater/showVersion.php")
- $ohttp.send()
- $asplitversion = StringRegExp($ohttp.responsetext, "<version>(\d.\d.\d.\d)</version>", 3)
- If NOT @error Then
- If Int(StringReplace($asplitversion[0], ".", "")) > Int(StringReplace($intversion, ".", "")) Then
- Run("updater.exe")
- Exit
- EndIf
- EndIf
- EndFunc
- Func a1230f01e02()
- MsgBox(48, "", "Błąd ogólny")
- EndFunc
- Func a3d40005a52($bstate)
- If $bstate Then
- RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run", "WF Iris Bot", "REG_SZ", '"' & @ScriptFullPath & '"')
- Else
- RegDelete("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run", "WF Iris Bot")
- EndIf
- EndFunc
Advertisement
Add Comment
Please, Sign In to add comment