# Macro Event Kartu

Sumber: https://nyit-nyit.net/threads/macro-event-kartu.128091/
Forum: RO 2 International
Dibuat: 2013-04-30 oleh -SAPI-
Balasan: 5, dilihat: 4434

## Post pertama

macro biasa doang. cuma share compile an dari autoit. cek readmenya buat jalanin programnya

[http://files.indowebster.com/macro_event_kartu.html](http://files.indowebster.com/macro_event_kartu.html)

password IDWS : "MACROEVENTKARTU"

happy macro!

## Balasan

### -SAPI-, 2013-05-02

sorry dopost. udah ga isa diedit lg. ini buat blajar2 autoIT.

```

Opt('MouseCoordMode', 1)
Opt('PixelCoordMode', 1)
Global $Paused
Global $Pixel
Global $Chat
HotKeySet("{PAUSE}", "TogglePause")
HotKeySet("{PGDN}", "Chat")
HotKeySet("{END}", "Terminate")
HotKeySet("{INSERT}", "CheckPixel")

Local $mobs, $HP, $MP, $face, $s, $t, $i, $q, $w1, $h1, $w2, $h2, $size = WinGetClientSize("Ragnarok Online2 - Legend of The Second")
If $size = 0 Then
MsgBox(16, "Error", "RO2 is not running, cannot grab resolution!" & @CRLF & "Exiting...")
Exit
EndIf

MsgBox(0,"Created by MilleFeuilles", "Screen Resolution : " & $size & " x " & $size & @LF & "Esc buat exit, Pause buat pause, Page Down buat chat" & @LF & "Special thanks to Lyonnesse and Deathvadder")
WinWaitActive("Ragnarok Online2 - Legend of The Second","")

$s = 5 ; kecepatan pointer mouse pindah
$t = 1000 ; ganti frame dalam ms
$q = 10 ; jeda antar action klik dalam sec
If $size = 1920 Then
If $size = 1080 Then
$w1 = 1740
$h1 = 170
$w2 = 885
$h2 = 475
EndIf

ElseIf $size = 1768 Then
If $size = 992 Then
$w1 = 1590
$h1 = 170
$w2 = 815
$h2 = 445
EndIf

ElseIf $size = 1680 Then
If $size = 1055 Then
$w1 = 1500
$h1 = 170
$w2 = 770
$h2 = 465
EndIf

ElseIf $size = 1600 Then
If $size = 1024 Then
$w1 = 1420
$h1 = 170
$w2 = 730
$h2 = 455
ElseIf $size = 900 Then
$w1 = 1420
$h1 = 170
$w2 = 730
$h2 = 415
EndIf

ElseIf $size = 1440 Then
If $size = 900 Then
$w1 = 1265
$h1 = 170
$w2 = 650
$h2 = 415
EndIf

ElseIf $size = 1366 Then
If $size = 768 Then
$w1 = 1195
$h1 = 170
$w2 = 620
$h2 = 365
EndIf

ElseIf $size = 1360 Then
If $size = 768 Then
$w1 = 1185
$h1 = 170
$w2 = 615
$h2 = 365
EndIf
ElseIf $size = 1280 Then
If $size = 800 Then
$w1 = 1105
$h1 = 170
$w2 = 575
$h2 = 375
ElseIf $size = 768 Then
$w1 = 1100
$h1 = 170
$w2 = 575
$h2 = 365
ElseIf $size = 960 Then
$w1 = 1100
$h1 = 170
$w2 = 575
$h2 = 430
ElseIf $size = 1024 Then
$w1 = 1100
$h1 = 170
$w2 = 570
$h2 = 455
EndIf
ElseIf $size = 1152 Then
If $size = 864 Then
$w1 = 975
$h1 = 170
$w2 = 510
$h2 = 400
EndIf

ElseIf $size = 1024 Then
If $size = 768 Then
$w1 = 850
$h1 = 170
$w2 = 445
$h2 = 365
EndIf
Else
MsgBox(16, "Error", "Screen Resolution RO2 Salah" & @CRLF & "Exiting...")
Exit
EndIf
Do
$i = $q
while ($i > 0)
Tooltip('Condition : Begin Click In ' & $i & ' sec', 0, 0)
Sleep($t)
$i = $i-1
WEnd

ToolTip('Condition : Run Click Script', 0, 0)
MouseClick ( "left", $w1, $h1, 1, $s)
MouseClick ( "left", $w2, $h2, 1, $s)

until 1=2
Func TogglePause()
$Paused = Not $Paused
While $Paused
Sleep(100)
ToolTip('Condition : Paused', 0, 0)
WEnd
ToolTip("")
EndFunc
Func Chat()
$Chat = Not $Chat
Send("{ENTER DOWN}")
Sleep(100)
Send("{ENTER UP}")
While $Chat
Sleep(100)
ToolTip('Condition : Chat', 0, 0)
WEnd
ToolTip("")
EndFunc
Func CheckPixel()
$Pixel = Not $Pixel
While $Pixel
Local $pos = MouseGetPos()
Local $col = PixelGetColor(($pos), $pos)
Sleep(100)
Tooltip('Mouse x,y ; col,hexcol: ' & $pos & ',' & $pos & ' ; ' & $col & ',' & hex($col, 6) & @LF & $size & "X" & $size & " | " & $w1 & "X" & $h1 & " | " & $w2 & "X" & $h2, 0, 0)
WEnd
ToolTip("")
EndFunc

Func Terminate()
Exit 0
EndFunc

```

### reyes, 2013-05-03

bagus juga macronya kalo AFK mayan buat auto ambil Present Box

### -SAPI-, 2013-05-03

@^
thanks! tar kapan2 gue share macro serang otomatis + pake pot otomatis. >.<

### Terva, 2013-08-28

@^ udah ada macro serang otomatis + pake pot otomatis nya gan?

### ferdy81, 2013-11-18

makro buat ngambill tanaman gimana gangg
ada gakkk????

