Showing posts with label macro. Show all posts
Showing posts with label macro. Show all posts

Friday, April 30, 2010

Protec The Priest

in Master
################################
######COMMAND###################
################################

automacro Command {
console /\(From: (.*)\) : xd (.*)/
call {
#####NOTE : edit $town to the map you are using storage and auto buys!####
$town = Geffen #edit this!
$mymap = $.map
$xd = $.lastMatch1
$xd2 = $.lastMatch2
if ($mymap == $town) goto DeadMa
do $xd2
pause 0.5
do pm "$xd" I'll protect you..
stop
:DeadMa
stop

}
}


in Slave
################################
######PROTECT ME################
################################

automacro ProtectMe {

timeout 8
console /Monster (.*) \((\d+)\) attacks you/
call {

$mymap = $.map
$lockmap = @config (lockMap)
$master = @config (followTarget)
$mon = $.lastMatch2

if ($mymap == $lockmap) goto help
:help
do pm "$master" xd a $mon

if ($mymap != $lockmap) goto stop
:stop
stop

}
}

Sunday, October 26, 2008

Buff For Guild

automacro buffAndWarp {
pubm /(ald|alde|sq|pron|prt|HL|pay|asum|heal|santuary|sant|ab|buff|agi|bless)/i
sp >= 70
priority 0
class high priest
exclusive 1
call checkMsg
}
macro checkMsg {
$i = @player ($.lastpub)
$g = @eval (exists $::players{$::playersID[$i]}->{guild} ? $::players{$::playersID[$i]}->{guild}{name} : 'null')
if ($g == Gothic) goto accessGranted
if ($g == V a l k y r i e) goto accessGranted
goto end
:accessGranted
$msg = $.lastpubMsg
$posx = @rand (4, 5, 6, 7)
$posy = @rand (4, 5, 6, 7)
$cellIsFull = 0
do eval $::Macro::Data::varStack{cellIsFull} = 0;foreach (@{$::playersList->getItems()}) { next if (($_->{pos_to}{x} != $posx) || ($_->{pos_to}{y} != $posy));$::Macro::Data::varStack{cellIsFull} = 1; last;}
if ($cellIsFull == 1) goto accessGranted
$x = @arg ("$.pos", 1)
$y = @arg ("$.pos", 2)
$evalx = @eval ($x + $posx)
$evaly = @eval ($y + $posy)
if ($msg == ALD) goto warpAld
if ($msg == ald) goto warpAld
if ($msg == alde) goto warpAld
if ($msg == ALDE) goto warpAld
if ($msg == SQ) goto warpSq
if ($msg == sq) goto warpSq
if ($msg == GEF) goto warpGef
if ($msg == gef) goto warpGef
if ($msg == HL) goto warpHl
if ($msg == hl) goto warpHl
if ($msg == pay) goto warpHl
if ($msg == asum) goto asum
if ($msg == ASUM) goto asum
if ($msg == agi) goto agi
if ($msg == AGI) goto agi
if ($msg == bless) goto bless
if ($msg == BLESS) goto bless
if ($msg == ab) goto agiBless
if ($msg == AB) goto agiBless
if ($msg == buff) goto agiBless
if ($msg == heal) goto heal
if ($msg == HEAL) goto heal
if ($msg == sant) goto santuary
if ($msg == santuary) goto santuary
if ($msg == SANT) goto santuary
if ($msg == SANTUARY) goto santuary
goto end
:warpAld
do sl 27 $evalx $evaley
pause 1
do warp alde_gld
stop
:warpSq
do sl 27 $evalx $evaly
pause 1
do warp prt_gld
stop
:warpGef
do sl 27 $evalx $evaly
pause 1
do warp gef_fild13
stop
:warpHl
do sl 27 $evalx $evaly
pause 1
do warp pay_gld
stop
:asum
do sp 361 $i 5
stop
:agi
do sp 29 $i 10
stop
:bless
do sp 34 $i 10
stop
:agiBless
do sp 34 $i 10
pause 1
do sp 29 $i 10
stop
:heal
do sp 28 $i 10
pause 0.5
do sp 28 $i 10
pause 0.5
do sp 28 $i 10
pause 0.5
do sp 28 $i 10
stop
:santuary
do sp 70 $i 7
stop
:end
log $msg
stop
}


Untuk yang lain harap anda mengedit nya sendiri.

Wednesday, April 2, 2008

PvP MaCrO By MaSaHiRo

Saya Harap Smua mau sedikit berusaha mengedit nya. Karena jika bermain copas saya yakin maka macro pvp ini tdk akan berhasil/jalan. Karena saya telah mengedit d bag tertentu.

###################################################
# PLAYER KILL MACRO Version 1.0.0 Beta #
# JOB: ALL CLASSES #
# Requires Macro Plugin 1.3.x
# By : MaSaHiRo
###################################################

automacro ignorepm {
pm /bot/
timeout 1
call pm
}

automacro ignorepm2 {
pm /botter/
timeout 1
call pm
}

automacro ignorepm3 {
pm /report/
timeout 1
call pm
}

automacro ignorepm4 {
pm /ur name/
timeout 1
call pm
}

macro pm {
$pm = @eval ($pm + 1)
if ($pm >= 2) goto ignore
goto end
:ignore
pause 3
do ignore 1 $.lastpm
$pm = 0
:end
}

automacro subload {
overideAI 1
run-once 1
timeout 1
call onload
}

macro onload {

# Macro Config

do conf macro_debug 0

#Edit This:
#[ 1 = on | 0 = off ]


# Commands @warp, @go, etc
$allowA = 1

$kos = 1
$freewill = 1

# use 2 or 0
#
$randomwalk = 2

$nohide = 0
$fp = 0
$skills = 1
$lock = 1
$homemap = prt_fild09 29 295
$lockedmap = prt_fild08 150 365
$fpbot = "= ur name bot for FP ="
$master = Master Name
$follow = @config(follow)

# character: $atk - attack skill
#
$atk = sp 266

# If your jobclass is champion or hpriest leave none, else set this to 1
#
$job = none


# Dont mess with this:

$hello = Hi $master ! Our Enemies: @config(kos_pk) @config(kos_pk2).

:next0
if ($follow = 1) goto f
goto next1
:f
do follow $master
:next1
if (@arg("$lockedmap", 1) = prt_fild08) goto makelocprt
$location = $.map
goto next2
:makelocprt
$location = prt_fild08

:next2
$lastpos = 0 0 $.map
$damage = 0
$nmes = 0

#

# Say that you are online
do pm "$master" $hello

# Log (you can remove it)

log ===================================================
log PVP (BVP) Macros
log JOB: ALL CLASSES
log ===================================================
log Master: $master
log Skill Usage On Players - Ruwach: $nohide Buffs: $skills
log Random Walk: $randomwalk Free will: $freewill KOS: $kos
log Homeplace: $homemap Locked Place: $lockedmap
log Commands are: follow / stop / prt / gef / pay / br
log home / fp / walk / free / duel / kill / kos / skill / warp / go
log ===================================================
log Kill On Sight players: @config(kos_pk) @config(kos_pk2)
log ===================================================

call move2
}

#### MASTER


automacro mapchange99 {
mapchange any
call {
release newmove
}
}

automacro masterlost {
#var randomwalk = 2
exclusive 1
console "I lost my master"
timeout 1
#location prt_fild08
call {
release move
release newmove
}
}

automacro masterfound {
hook player
exclusive 1
var randomwalk = 2
console "Found my master!"
timeout 1
#location prt_fild08
call {
lock newmove
}
}

#### KOS

automacro kos2 {
status not dead
exclusive 1
overideAI 1
hook player
location not "name for map"
location not "name for map"
location not "name for map"
location not "name for map"

var kos = 1
call kos1
}

macro kos1 {
if (@player(@config (kos_pk)) >= 0) goto kill1
if (@player(@config (kos_pk2)) >= 0) goto kill2
goto end
:kill1
lock move
lock freew
lock newmove
$lastpos = $.pos $.map
$mytarget = @config(kos_pk)
set exclusive 0
do kill @player(@config (kos_pk))
goto end
:kill2
lock move
lock freew
lock newmove
$lastpos = $.pos $.map
$mytarget = @config(kos_pk2)
set exclusive 0
do kill @player(@config (kos_pk2))
:end
}

#### RANDOM WALK SETUP

automacro move {
#overideAI 1
var randomwalk = 1
priority 5
location not "name for map"
location not "name for map"
location not "name for map"
location not "name for map"

timeout 10
call move3
}

automacro newmove {
#overideAI 1
#location gef_fild10, prt_fild08
priority 5
location not "name for map"
location not "name for map"
location not "name for map"
location not "name for map"

var randomwalk = 2
timeout 10
call move2
}

macro move2 {
set exclusive 0
$look = @random ("look 4", "lookp @player($master)", "look 4")
$px = @arg ("$.pos", 1)
$py = @arg ("$.pos", 2)
if ($.map = map name) goto "map name"
if ($.map = map name) goto "map name"
if ($.map = @arg("$homemap", 3)) goto end
goto other
:makenew
$n = @rand(1, 5)
$m = @rand(1, 5)
$posx = @arg ("$.pos", 1)
$posy = @arg ("$.pos", 2)
$eval = @random ("-", "+")
$lastpos = @eval ($px $eval $n) @eval ($py $eval $m) $.map
#if (@player(@config (kos_pk)) >= 0) goto kill1
#if (@player(@config (kos_pk2)) >= 0) goto kill2
do move @eval ($px $eval $n) @eval ($py $eval $m) $.map
goto end

:ss
#if (@player(@config (kos_pk)) >= 0) goto kill1
#if (@player(@config (kos_pk2)) >= 0) goto kill2
$n = @rand (0,1)
$m = @rand(1, 2)
$posx = @arg ("$.pos", 1)
$posy = @arg ("$.pos", 2)
$eval = @random ("-", "-")
#if (@player(@config (kos_pk)) >= 0) goto kill1
#if (@player(@config (kos_pk2)) >= 0) goto kill2
do move @eval ($posx $eval $n) @eval ($posy $eval $m) $.map
#if (@player(@config (kos_pk)) >= 0) goto kill1
#if (@player(@config (kos_pk2)) >= 0) goto kill2
$do = @random ("ss 135", "ss 406", "", "ss 138", "ss 406", "look 4", "ss 135", "ss 406", "ss 406")
do $do
goto end

:cont
#if (@player(@config (kos_pk)) >= 0) goto kill1
#if (@player(@config (kos_pk2)) >= 0) goto kill2
$mrnd = @rand (1, 3)
if ($mrnd = 1) goto move
if ($mrnd = 2) goto ss
if ($mrnd = 3) goto ss
goto end
:move
#if (@player(@config (kos_pk)) >= 0) goto kill1
#if (@player(@config (kos_pk2)) >= 0) goto kill2
if (@arg("$lastpos", 3) != $.map) goto makenew
if (@arg("$lastpos", 1) = 0) goto makenew
$n = @rand(2, 6)
$m = @rand(2, 6)
$posx = @arg ("$.pos", 1)
$posy = @arg ("$.pos", 2)
$eval = @random ("-", "+")
#if (@player(@config (kos_pk)) >= 0) goto kill1
#if (@player(@config (kos_pk2)) >= 0) goto kill2
do @random ("move $lastpos", "move @eval ($posx $eval $n) @eval ($posy $eval $m) $.map")
#if (@player(@config (kos_pk)) >= 0) goto kill1
#if (@player(@config (kos_pk2)) >= 0) goto kill2
$do = @random ("ss 135", "ss 406", "", "ss 138", "ss 138", "look 4", "ss 150", "ss 135", "e ho")
do $do
goto end
:"map name"
$do = @random ("", "ss 406", "", "")
do $do
$xx = @rand (156, 171)
$yy = @rand (354, 360)
$px = @arg ("$.pos", 1)
$py = @arg ("$.pos", 2)
#if (@player(@config (kos_pk)) >= 0) goto kill1
#if (@player(@config (kos_pk2)) >= 0) goto kill2
do move $xx $yy $.map
goto cont
:geffild
$do = @random ("", "ss 406", "", "")
do $do
$xx = @rand (65, 73)
$yy = @rand (308, 327)
#if (@player(@config (kos_pk)) >= 0) goto kill1
#if (@player(@config (kos_pk2)) >= 0) goto kill2
do move $xx $yy $.map2
goto cont
:other
$do = @random ("", "ss 406", "", "")
do $do
$posx = @arg ("$.pos", 1)
$posy = @arg ("$.pos", 2)
$n = @rand(1, 3)
$m = @rand(1, 3)
$eval = @random ("-", "+")
#if (@player(@config (kos_pk)) >= 0) goto kill1
#if (@player(@config (kos_pk2)) >= 0) goto kill2
do move @eval ($posx $eval $n) @eval ($posy $eval $m) $.map
goto cont
:kill1
do kill @player(@config (kos_pk))
$lastpos = $.pos $.map
goto end2
:kill2
do kill @player(@config (kos_pk2))
$lastpos = $.pos $.map
goto end2
:end
if (@player(@config (kos_pk)) >= 0) goto kill1
if (@player(@config (kos_pk2)) >= 0) goto kill2
:end2
}

macro move3 {
set exclusive 0
#if (@player(@config (kos_pk)) >= 0) goto kill1
#if (@player(@config (kos_pk2)) >= 0) goto kill2
$look = @random ("look 4", "lookp @player($master)", "look 4")
$px = @arg ("$.pos", 1)
$py = @arg ("$.pos", 2)
if ($.map = @arg("$homemap", 3)) goto end
goto other
:makenew
$n = @rand(1, 5)
$m = @rand(1, 5)
$posx = @arg ("$.pos", 1)
$posy = @arg ("$.pos", 2)
$eval = @random ("-", "+")
$lastpos = @eval ($px $eval $n) @eval ($py $eval $m) $.map
#if (@player(@config (kos_pk)) >= 0) goto kill1
#if (@player(@config (kos_pk2)) >= 0) goto kill2
do move @eval ($px $eval $n) @eval ($py $eval $m) $.map
goto end

:ss
#if (@player(@config (kos_pk)) >= 0) goto kill1
#if (@player(@config (kos_pk2)) >= 0) goto kill2
$n = @rand (0,1)
$m = @rand(1, 2)
$posx = @arg ("$.pos", 1)
$posy = @arg ("$.pos", 2)
$eval = @random ("-", "+")
#if (@player(@config (kos_pk)) >= 0) goto kill1
#if (@player(@config (kos_pk2)) >= 0) goto kill2
do move @eval ($posx $eval $n) @eval ($posy $eval $m) $.map
if (@player(@config (kos_pk)) >= 0) goto kill1
if (@player(@config (kos_pk2)) >= 0) goto kill2
$do = @random ("ss 135", "ss 406", "", "ss 138", "ss 406", "look 4", "ss 135", "ss 406", "ss 406")
do $do
goto end

:cont
#if (@player(@config (kos_pk)) >= 0) goto kill1
#if (@player(@config (kos_pk2)) >= 0) goto kill2
$mrnd = @rand (1, 3)
if ($mrnd = 1) goto move
if ($mrnd = 2) goto ss
if ($mrnd = 3) goto ss
goto end
:move
#if (@player(@config (kos_pk)) >= 0) goto kill1
#if (@player(@config (kos_pk2)) >= 0) goto kill2
if (@arg("$lastpos", 3) != $.map) goto makenew
if (@arg("$lastpos", 1) = 0) goto makenew
$n = @rand(1, 5)
$m = @rand(1, 5)
$posx = @arg ("$.pos", 1)
$posy = @arg ("$.pos", 2)
$eval = @random ("-", "+")
#if (@player(@config (kos_pk)) >= 0) goto kill1
#if (@player(@config (kos_pk2)) >= 0) goto kill2
do move @eval ($posx $eval $n) @eval ($posy $eval $m) $.map
#if (@player(@config (kos_pk)) >= 0) goto kill1
#if (@player(@config (kos_pk2)) >= 0) goto kill2
$do = @random ("ss 135", "ss 406", "", "ss 138", "ss 138", "look 4", "ss 150", "ss 135", "e ho")
do $do
goto end
:other
$do = @random ("", "ss 406", "", "")
do $do
$posx = @arg ("$.pos", 1)
$posy = @arg ("$.pos", 2)
$n = @rand(1, 3)
$m = @rand(1, 3)
$eval = @random ("-", "+")
#if (@player(@config (kos_pk)) >= 0) goto kill1
#if (@player(@config (kos_pk2)) >= 0) goto kill2
do move @eval ($posx $eval $n) @eval ($posy $eval $m) $.map
goto cont
:kill1
$lastpos = $.pos $.map
do kill @player(@config (kos_pk))

goto end
:kill2
$lastpos = $.pos $.map
do kill @player(@config (kos_pk2))
goto end2
:end
if (@player(@config (kos_pk)) >= 0) goto kill1
if (@player(@config (kos_pk2)) >= 0) goto kill2
:end2
}

##### FREE WILL

automacro freew {
overideAI 1
location not "map name"
location not "map name"
location not "map name"
location not "map name"

var freewill = 1
timeout 45
call freewill
}

macro freewill {
$will = @random ("macro sit", "look", "emo", "macro move2", "look", "emo", "macro move2", "macro attack", "macro san", "macro attack2", "macro san2")
if ($will = macro move2) goto move
if ($will = macro sit) goto sit
if ($will = look) goto look
if ($will = emo) goto emo
if ($will = macro attack) goto atk
if ($will = macro san) goto san
if ($will = macro attack2) goto atk2
if ($will = macro san2) goto san2
goto end
:move
call move2
goto end
:sit
call sit
goto end
:emo
call emo
goto end
:look
call look
:atk
call attack
:atk2
call attack2
:san
call san
:san2
call san2
:end
}

macro look {
if (@player(@config (kos_pk)) >= 0) goto kill1
if (@player(@config (kos_pk2)) >= 0) goto kill2
if (@player($master) >= 0) goto one
goto two
:one
$look = lookp @player($master)
do $look
do $look
do $look
do $look
do $look
goto end
:two
$look = @random ("look 4", "look 3", "look 5", "look 4")
do $look
goto end
:kill1

do kill @player(@config (kos_pk))
$lastpos = $.pos $.map
goto end
:kill2

do kill @player(@config (kos_pk2))
$lastpos = $.pos $.map
goto end
:end
}

macro emo {
if (@player(@config (kos_pk)) >= 0) goto kill1
if (@player(@config (kos_pk2)) >= 0) goto kill2
$look = @random ("e e2", "e e2", "c ....", "e ho", "e e10")
do $look
goto end
:kill1

do kill @player(@config (kos_pk))
$lastpos = $.pos $.map
goto end
:kill2

do kill @player(@config (kos_pk2))
$lastpos = $.pos $.map
goto end
:end
}

macro sit {
if (@player($master) >= 0) goto one
goto two
:one
$look = lookp @player($master)
do $look
goto sit
:two
$look = @random ("look 4", "look 3", "look 5", "look 4", "look 4")
do $look
:sit
$times = @rand (8, 12)
$i = 0
while ($i < $times) as sitloop
pause 3
do sit
do $look
if (@player(@config (kos_pk)) >= 0) goto kill1
if (@player(@config (kos_pk2)) >= 0) goto kill2
$i++
end sitloop
if (@player($master) >= 0) goto emo
goto end
:emo
pause 1
do @random ( "", "e e2", "", "", "e e8", "", "", "", "e ho", "e e10")
goto end
:kill1

do kill @player(@config (kos_pk))
$lastpos = $.pos $.map
goto end
:kill2

do kill @player(@config (kos_pk2))
$lastpos = $.pos $.map
goto end
:end
}




macro san1 {
if (@player($master) >= 0) goto one
goto end
:one
do @random ( "sp 70 $master", "sp 70 $master")
do @random ( "sp 70 $master", "sp 70 $master")
pause 1
do @random ( "", "e e2", "", "", "e e8", "", "", "", "e ho")
:end
}

macro san2 {
# if (@player($master) >= 0) goto one
goto end
:one
do @random ( "ss 70", "ss 70")
do @random ( "ss 70", "ss 70")
pause 1
:end
}

macro attack {

if (@player($master) >= 0) goto one
goto end
:one
do sp 156 $master
do @random ("sp 156 $master", "sp 28 $master", "","sp 156 $master")
do sp 28 $master
pause 2
do @random ( "e heh", "e e2", "", "", "e gg", "c P", "", "c ^^", "c =)", "")
:end
}


macro attack2 {

$randplayer = @rand (0, 1)
if (@player($master) >= 0) goto one
:one
do sp 156 $randplayer
do @random ("sp 156 $randplayer ", "sp 28 $randplayer ")
do @random ("sp 156 $randplayer ", "sp 28 $randplayer ")
pause 2
do @random ( "e heh", "e e2", "", "", "e gg", "e ho", "", "c xD", "", "")
:end

}


###################
##### SKILLS ######

# PUBLIC

automacro Healer {
var job != 1
pubm /heal|Heal|hp|HP/,6
sp >= 80%
timeout 20
call doheal
}

automacro Buffer {
var job != 1
class high priest
pubm /buff|bufs|Buffs|BUFF|baps|Buf|buffs|agi|bless/,6
sp >= 80%
timeout 20
call dobuff
}

automacro ruwach1 {
var job != 1
pubm /ruwach/,6
timeout 46
call dorwch
}

automacro res99 {
timeout 15
var job != 1
class high priest
pubm /res|resu|ressu|ress/
call Ressurection
}


automacro killme {
timeout 15
pubm /kill me|kill me pls/
call killme2
}

macro killme2 {
pause 2
do kill @player($.lastpub)
}
}

macro Ressurection {
if ($.lastpub = $master) goto one
if ($skills = 1) goto one
goto end
:one
do ip @inventory (yggdrasil leaf) @player ($.lastpub)
goto over
:end
pause 2
do @random ("c nop", "c nope", "e ??", "e lv2", "e e2", "e ??", "c =/", "c no", "e ??", "", "", "")
:over
pause 2
do @random ("c P", "c ^^", "e heh", "", "", "e e2", "", "e ok", "e e2", "", "")
}

automacro SW3 {
var job != 1
pubm /safety|safe|wall/
timeout 1
call SW4
}


macro SW4 {
if ($.lastpub = Hakuro) goto one
if ($skills = 1) goto one
goto end
:one
do sp 12 "$.lastpub"
#do sp 24 "$.lastpub"
goto over
:end
pause 2
do @random ("c nop", "c nope", "e ??", "e lv2", "e e2", "e e8", "c =/", "c no", "e ?", "", "", "")
:over
pause 2
do @random ("c P", "c ^^", "e heh", "", "", "e e2", "", "e ho", "e e2", "", "")
}

automacro Buffer2 {
timeout 15
var job != 1
class high priest
pubm /assump|asump|asp/,6
call assump
}

macro assump {
$name = $.lastpub
#if ($.lastpub = Hakuro) goto one
if ($skills = 1) goto one
goto end
:one
do sp 361 "$.lastpub" 10
#do sp 24 "$.lastpub"
goto over
:end
pause 2
do @random ("c nop", "c nope", "e ??", "e lv2", "e e2", "e e8", "c no", "e gg", "")
:over
pause 2
do @random ("c P", "c ^^", "e heh", "", "", "e e2", "", "e e10", "e e2", "c D", "", "")
}

# PRIVATE

automacro healz {
timeout 15
var job != 1
pm "heal"
pm "hp"
call healz2
}

automacro buffz {
timeout 15
var job != 1
pm /buff/i
call buffz2
}

macro doheal {
if ($.lastpub = $master) goto one
if ($skills = 1) goto one
goto end
:one
$times = @rand (2, 7)
$i = 0
while ($i < $times ) as healloop
do sp 28 "$.lastpub" 10
$i++
end healloop
goto over
:end
pause 2
do @random ("c nop", "c nope", "e ??", "e lv2", "e e2", "e ??", "c =/", "c no", "e ??", "", "", "")
:over
pause 3
do @random ("c P", "c ^^", "e heh", "", "", "e e2", "", "e gg", "e e2", "", "")
}

macro buffz2 {
if ($.lastpm = $master)goto one
goto end
:one
do sp 34 "$.lastpm" 10
do sp 29 "$.lastpm" 10
do sp 361 "$.lastpm" 10
goto over
:end
pause 2
do @random ("c nop", "c nope", "e ??", "e lv2", "e e2", "e e8", "c =/", "c no", "e ??", "", "", "")
:over
pause 2
do @random ("c P", "c ^^", "e heh", "", "", "e e2", "", "e gg", "e e2", "", "")
}

macro healz2 {
if ($.lastpm = $master) goto one
goto end
:one
$times = @rand (6, 12)
$i = 0
while ($i < $times ) as healloop
log loop $i
do sp 28 "$.lastpm" 10
$i++
end healloop
goto end
:end
}

macro dorwch {
do sp 24 "$.lastpub"
}

macro dobuff {
if ($.lastpub = $master) goto one
if ($skills = 1) goto one
goto end
:one
do sp 34 "$.lastpub" 10
do sp 29 "$.lastpub" 10
goto over
:end
pause 2
do @random ("c nop", "c nope", "e ??", "e lv2", "e e2", "e e8", "c =/", "c no", "e ?", "", "", "")
:over
pause 2
do @random ("c P", "c ^^", "e heh", "", "", "e e2", "", "e gg", "e e2", "", "")

}

automacro SW1 {
var job != 1
pm /^(sw)$/
call SW2
}

macro SW2 {
if ($.lastpm = $master) goto one
goto end
:one
do sp 12 "$.lastpm"
#do sp 24 "$.lastpm"
goto end
:end
}

automacro Ruwach999 {
var job != 1
console /Player .* .* uses Ruwach on himself/i
var nohide = 1
timeout 65
call {
pause 2
do ss 24
}
}


# FIND CLOACKERS


automacro nohide {
var job != 1
var nohide = 1
console /Player (.*) \((\d+)\) uses Cloaking on himself/i
timeout 25
call {
do sp 24 $.lastMatch2
}
}

automacro nohide2 {
var job != 1
var nohide = 1
console /player (.*) \((\d+)\) uses Hiding on himself/i
timeout 25
call {

do sp 24 $.lastMatch2
}
}

automacro nohide3 {
var job != 1
timeout 12
var nohide = 1
console /player (.*) \((\d+)\) uses Chase Walk on himself/i
call {
do sp 24 $.lastMatch2
}
}


######## COMMANDS / CHAT #########

automacro fs1 {
var job != 1
exclusive 1
pm "duel conf"
class champion
call {
do switchconf ChampDuel.txt
do pm "$.lastpm" switched duel
}

automacro fs2 {
var job != 1
exclusive 1
class champion
pm "main conf"
call {
do switchconf ChampMain.txt
do pm "$.lastpm" switched to main
}
}

automacro fs3 {
var job != 1
class high priest
exclusive 1
pm "party"
call {
do switchconf ChampParty.txt
do pm "$.lastpm" ok party
}
}

automacro fs4 {
class high priest
var job != 1
pm "party"
call {
do switchconf FSparty.txt
do pm "$.lastpm" ok party
}
}

automacro fs5 {
class high priest
var job != 1
pm "main"
call {
do switchconf FSmain.txt
do pm "$.lastpm" switched to main
}
}

automacro walk {
exclusive 1
pm /^(walk)$/
call {
if ($randomwalk = 2) goto off
if ($randomwalk = 1) goto on2
if ($randomwalk = 0) goto on
goto end
:on
release move

$randomwalk = 1
do pm "$.lastpm" Randomwalk v 1 Enabled
goto end
:on2

$randomwalk = 2
do pm "$.lastpm" Randomwalk v 2 Enabled
goto end
:off

$randomwalk = 0
do pm "$.lastpm" Randomwalk Disabled
goto end
:end
}
}

automacro usefp {
exclusive 1
pm "fp"
call {
if ($fp = 1) goto off
if ($fp = 0) goto on
goto end
:on

$fp = 1
do pm "$.lastpm" Using FP Enabled
goto end
:off

$fp = 0
do pm "$.lastpm" Using FP Disabled
goto end
:end
}
}

automacro Follow {
overrideAI 1
exclusive 1
pm /^(follow|fm|go)$/,
call follow2
}

macro follow2 {
do follow $.lastpm
do pm "$.lastpm" Following "$.lastpm" !!
$randomwalk = 1
}

automacro FollowP {
exclusive 1
overrideAI 1
party /^(follow|fm|go)$/
call follow3
}



macro follow3 {
do follow $.lastparty
do p " Following "$.lastparty" !!
$randomwalk = 1
}

automacro kos_no {
exclusive 1
overrideAI 1
pm "stop"
call {
#do pm "$.lastpm" Players: [ @config(kos_pk) | @config(kos_pk2) ] - are no longer my enemies.
do conf kos_pk none
do conf kos_pk2 none
$damage = 0
$pla = none
$kospla = none
do pm "$.lastpm" I stopped.
}
}

automacro kos_duel {
exclusive 1
overrideAI 1
pm "duel"
call {
do conf kos_pk $.lastpm
$freewill = 0
$damage = 10
pause 1
do pm "$.lastpm" @random ( "Lets Have Fun", "Game", "Sure")
pause 1
do @random ("e gg", "c XD", "e e9")
pause 1
do c 3
pause 1
do c 2
pause 1
do c 1
pause 1
do e go
do kill @player(@config(kos_pk))
}
}

automacro kos001 {
exclusive 1
overrideAI 1
pm /^(kos )/i
call {
$kospla = @arg ("$.lastpmMsg", 2)
if (@player($kospla) >= 0) goto kill
goto nopla
:kill
do conf kos_pk2 @config(kos_pk)
do conf kos_pk $kospla
do pm "$.lastpm" kos_pk set to: @config(kos_pk) | kos_pk2 set to: @config(kos_pk2)
do kill @player($kospla)
goto end
:nopla2
$pla = @arg ("$.lastpmMsg", 2)
do pm "$.lastpm" Can't recognize $kospla. Spell his name accurately.
goto end
:nopla
do pm "$.lastpm" Player $kospla doesn't exists.
do pm "$.lastpm" Searching again....
$kospla = @arg ("$.lastpmMsg", 2) @arg ("$.lastpmMsg", 3) @arg ("$.lastpmMsg", 4) @arg ("$.lastpmMsg", 5) @arg("$.lastpmMsg", 6)
if (@player($kospla) >= 0) goto kill
goto nopla2
:end
}
}
}

automacro killpla {
exclusive 1
overrideAI 1
pm /^(kill )/i
call {
$pla = @arg ("$.lastpmMsg", 2)
if (@arg ("$.lastpmMsg", 2) = me) goto killme
if (@player($pla) >= 0) goto kill
goto nopla
:killme
do pm "$.lastpm" I am gonna kill you !!!
do kill @player($.lastpm)
goto end
:kill

do pm "$.lastpm" I am gonna kill $pla
do kill @player($pla)
goto end
:nopla2
$pla = @arg ("$.lastpmMsg", 2)
do pm "$.lastpm" Can't recognize $pla. Spell his name accurately.
goto end
:nopla
do pm "$.lastpm" Player $pla doesn't exists.
do pm "$.lastpm" Searching again....
$pla = @arg ("$.lastpmMsg", 2) @arg ("$.lastpmMsg", 3) @arg ("$.lastpmMsg", 4) @arg ("$.lastpmMsg", 5) @arg("$.lastpmMsg", 6)
if (@player($pla) >= 0) goto kill
goto nopla2
:end
}
}

automacro wait {
exclusive 1
overrideAI 1
pm /^(wait|w)$/,
call wait2
}


macro wait2 {
do conf follow 0
do sit
do pm "$.lastpm" Waiting you at $.map !!
}

automacro skills {
exclusive 1
pm "skill"
call {
if ($skills = 1) goto off
if ($skills = 0) goto on
goto end
:on

$skills = 1
do pm "$.lastpm" Autoskills Enabled
goto end
:off

$skills = 0
do pm "$.lastpm" Autoskills Disabled
goto end
:end
}
}

automacro setfw {
exclusive 1
pm "free"
call {
if ($freewill = 1) goto off
if ($freewill = 0) goto on
goto end
:on

$freewil = 1
do pm "$.lastpm" Free Will Enabled
goto end
:off

$freewill = 0
do pm "$.lastpm" Free Will Disabled
goto end
:end
}
}

automacro status {
exclusive 1
pm "st"
call {
do pm $.lastpm My positon: $.pos $.map. Locked map: $lockedmap Enemies: @config(kos_pk) @config(kos_pk2).
}
}

# 0 - 26

automacro gowarp {
exclusive 1
pm /^(go )/i
call Lockmap77
}

macro Lockmap77 {
$go = @arg ("$.lastpmMsg", 2)
do c @go $go
pause 1
do pm "$.lastpm" Warped to $.map
$location = $.map
$lock = 0
call move2
}

automacro dowarp {
exclusive 1
pm /^(warp )/i
call Lockmap78
}

macro Lockmap78 {
$warp = @arg("$.lastpmMsg", 2) @arg("$.lastpmMsg", 3) @arg("$.lastpmMsg", 4)
do c @warp $warp
pause 1
do pm "$.lastpm" Warped to $.map $.pos
$location = $.map
$lock = 0
call move2
}

automacro dowarpP {
exclusive 1
party /^(warp )/i
call Lockmap79
}

macro Lockmap79 {
$warp = @arg ("$.lastpartyMsg", 2) @arg ("$.lastpartyMsg", 3) @arg ("$.lastpartyMsg", 4)
do c @warp $warp
pause 1
do p Warped to $.map $.pos
$location = $.map
$lock = 0
call move2
}

#### SET LOCKED MAP

automacro lockedmap3go19 {
exclusive 1
overrideAI 1
pm /^(pay)$/,
call {
$lock = 1
$lockedmap = Map_Name
$location = Map_name

if ($follow = 1) goto f
goto next
:f
do follow $master
:next
do pm "$.lastpm" Locked Map: $lockedmap
call Lockmap99
}
}

automacro lockedmap4go15 {
exclusive 1
overrideAI 1
pm /^(br)$/,
call {
$lock = 1
$lockedmap = new_1-1 52 111
$location = new_1-1

if ($follow = 1) goto f
goto next
:f
do follow $master
:next
do pm "$.lastpm" Locked Map: $lockedmap
call Lockmap99
}
}

automacro lockedmap1prt {
exclusive 1
overrideAI 1
pm /^(prt)$/,
call {
$lock = 1
$xxx = @rand (100, 200)
$yyy = @rand (335, 369)
$lockedmap = prt_fild08 $xxx $yyy

$location = map_name
if ($follow = 1) goto f
goto next
:f
do follow $master
:next
do pm "$.lastpm" Locked Map: $lockedmap
call Lockmap99
}
}

automacro lockedmap0home {
exclusive 1
overrideAI 1
pm /^(home)$/,
call {
$lock = 1
do conf follow 0
$lockedmap = $homemap

$location = Map_name
do pm "$.lastpm" Locked Map: $lockedmap
call Lockmap99
}
}

automacro lockedmap2gef {
exclusive 1
overrideAI 1
pm /^(gef)$/,
call {
$lock = 1
$lockedmap = Map_name x, y
$location = Map_name

if ($follow = 1) goto f
goto next
:f
do follow $master
:next
do pm "$.lastpm" Locked Map: $lockedmap
call Lockmap99
}
}


##########################
# Do something when buffed
##########################

macro bemad {
$buffs = 10
:start
$i = 0
while ($i < $buffs ) as buffloop
$nmes = $mes
$mes = @random ("e e5", "c Oo", "sp 156 $.lastMatch2", "sp 78 $.lastMatch2", "", "e gg", "c lol", "e e2", "sp 78 $.lastMatch2")
if ($nmes = $mes) goto start
if ($nmes != $mes) goto end
$i++
end buffloop
:end
pause 2
do $mes
$.lastMatch2 = none
}

macro begood {
$buffs = 10
:start
$i = 0
while ($i < $buffs ) as buffloop
$nmes = $mes
$mes = @random ("c ty", "c thanx", "c thanks", "e lv2", "c ty^^", "c ^^", "c xD", "e thx", "e ho", "c thx")
if ($nmes = $mes) goto start
if ($nmes != $mes) goto end
$i++
end buffloop
:end
pause 2
do $mes
}

macro begood2 {
$buffs = 10
:start
$i = 0
while ($i < $buffs ) as buffloop
$nmes = $mes
$mes = @random ("c ty", "c thanx", "c thanks", "e lv2", "c ty^^", "c ^^", "c xD", "e thx", "buff", "buff", "buff")
if ($nmes = $mes) goto start
if ($nmes != $mes) goto end
if ($mes = buff) goto buff
$i++
end buffloop
:buff
pause 1
do sp 34 $.lastMatch2 10
do sp 29 $.lastMatch2 10
goto end2
:end
pause 2
do $mes
:end2
}

macro buffed02 {
$buffs = 10
:start
$i = 0
while ($i < $buffs ) as buffloop
$nmes = $mes
$mes = @random ("", "", "sp 34 $.lastMatch2 1", "c <.<", "e thx", "e e8", "e e2")
if ($nmes = $mes) goto start
if ($nmes != $mes) goto end
if ($mes = unset) goto end
$i++
end buffloop
:end
pause 2
do $mes
#$.lastMatch1 = none
}

macro buffed01 {
$buffs = 10
:start
$i = 0
while ($i < $buffs ) as buffloop
$nmes = $mes
$mes = @random ("", "", "sp 29 $.lastMatch2 1", "", "c >.>", "e ho", "", "c xD", "e e2")
if ($nmes = $mes) goto start
if ($nmes != $mes) goto end
if ($mes = unset) goto end
$i++
end buffloop
:end
pause 2
do $mes
#$.lastMatch1 = none
}

automacro fped101 {
console /player (.*) \((\d+)\) uses full chemical protection on you.*/i
call begood2
timeout 30
}

automacro buffed11 {
console /player (.*) \((\d+)\) uses blessing on you.*/i
call buffed02
timeout 50
}

automacro buffed12 {
console /player (.*) \((\d+)\) uses increase agi on you.*/i
call buffed01
timeout 50
}


automacro buffed13 {
spell assumptio
timeout 45
call begood
}

automacro buffed14 {
console /player (.*) \((\d+)\) uses provoke on you.*/i
call bemad
timeout 50
}

automacro buffed15 {
console /player (.*) \((\d+)\) uses heal on you.*/i
call begood
timeout 50
}


#####################################
# PLAYER KILL #
#####################################

macro pk_STAY_CALM {
set exclusive 1
do pm "$master" $.lastMatch1 is playing with fire.
$damage++
if ($damage > 2) goto one
goto over
:one
$damage++
pause 1
do @random ("e ?", "e e2", "e gg", "c lol", "", "c aw", "e e2")
call pk_ATTACK_ONCE
:over
}



macro pk_WARN {
set exclusive 1
do pm "$master" $.lastMatch1 is playing with fire.
$damage = @eval($damage + 0.75)
#if ($damage > 5) goto one
if ($damage > 10) goto one
goto over
:one
call KILL_PK
:over
pause 2
do @random ( "", "", "e lv2", "e e2", "", "e gg", "", "e lv", "", "", "e heh", "", "", "c aw", "", "e e2")
}

macro pk_WARN2 {
set exclusive 1
do pm "$master" $.lastMatch1 is playing with fire.
$damage = @eval ($damage + 0.75)
if ($damage > 10) goto one
goto over
:one
call KILL_PK
:over
pause 2
do @random ( "", "c aw", "e lv2", "e e2", "", "e gg", "", "e ?", "e lv", "c lol", "e heh", "e ??", "e ??")

}

macro pk_ATTACK_ONCE {
set exclusive 1
do pm "$master" $.lastMatch1 attacked me.
$damage = @eval ($damage + 2.5)
#if ($damage > 3) goto two
if ($damage > 10) goto two
goto one
:one
do $atk $.lastMatch2
goto over
:two
#pause 2
#do @random ("e gg", "", "e gg", "", "e e2", "", "", "e heh", "", "c aw", "", "c lol", "sp 156 $.lastMatch2", "sp 156 $.lastMatch2")
call KILL_PK
:over
}

macro KILL_DEAD {
set exclusive 1
if ($.lastMatch1 = @config(kos_pk)) goto justkill
if ($.lastMatch1 = @config(kos_pk2)) goto justkill
if ($.lastMatch1 = $master) goto nvm

do conf kos_pk2 @config(kos_pk)
do conf kos_pk $.lastMatch1
do kill $.lastMatch2
do pm "$master" $.lastMatch1 is my enemy !!
goto end
:justkill
do pm "$master" I guess i am dead... $.lastMatch1 killed me @_@
do kill $.lastMatch2
$lastpos = $.pos $.map
goto end
:nvm
do pm "$master" I wont kill my master.
:end
}
}

macro KILL_PK {
set exclusive 1
if ($.lastMatch1 = @config(kos_pk)) goto justkill
if ($.lastMatch1 = @config(kos_pk2)) goto justkill
if ($.lastMatch1 = $master) goto nvm
set exclusive 0
do kill $.lastMatch2
do conf kos_pk2 @config(kos_pk)
do conf kos_pk $.lastMatch1
do pm "$master" $.lastMatch1 is my enemy !!
goto end
:justkill
set exclusive 0
do kill $.lastMatch2
do pm "$master" $.lastMatch1 attacked me @_@
$lastpos = $.pos $.map
goto end
:nvm
do pm "$master" I wont kill my master.
goto end2
:end
#$mes = @random ("e gg", "e e4", "c PWNT")
#if ($nmes = $mes) goto end2
#do $mes
#$nmes = $mes
:end2
}

automacro TargetDied {
exclusive 1
overrideAI 1
priority 0
console /player died: (.*) \((\d+)\).*/i
#console /target lost/i
call {
#do say lol
if (@player($.lastMatch1) = @player($mytarget)) goto taunt
goto end
:taunt
#do say lol
#do c newb
release move
release freew
release newmove
$td = 1
$do = @random ("ss 138", "e gg", "e swt", "ss 138", "look 4", "look 4", "ss 150", "ss 150", "ss 406", "e e2", "e ho", "e swt")
do $do
:end
}
}

automacro TargetResu {
exclusive 1
overrideAI 1
priority 0
console /player (.*) \((\d+)\) has been resurrected/i
#console /target lost/i
call {
#do say lol
if (@player($.lastMatch1) = @player($mytarget)) goto taunt
goto end
:taunt
#do say lol
#do c newb
call kos1
#$td = 1
#$do = @random ("ss 138", "e gg", "e swt", "ss 138", "look 4", "look 4", "ss 150", "ss 150", "ss 406", "e e2", "e ho", "e swt")
#do $do
:end
}
}

automacro TargetLost {
exclusive 1
overrideAI 1
priority 0
console /target lost/i
#console /target lost/i
call {
#do say lol
if (@player($.lastMatch1) = @player($mytarget)) goto taunt
goto end
:taunt
#do say lol
#do c newb
release move
release freew
release newmove
$do = @random ("ss 138", "e gg", "e swt", "ss 138", "look 4", "look 4", "ss 150", "ss 150", "ss 406", "e e2", "e ho", "e swt")
do $do
:end
}
}

#################################
#####SELF DEFEND - ON SKILL#####
#################################

automacro pked378 {
overrideAI 1
timeout 3
####DAMAGE RANGE 100 - 999#########################
console /player (.*) \((\d+)\) uses .* on you - dmg: \b[1-9][0-9]{2}\b/i
call pk_WARN
}

automacro pked554 {
overrideAI 1
####DAMAGE RANGE 2000 - 5999#######################
timeout 1
console /player (.*) \((\d+)\) uses .* on you - dmg: \b[2-5][0-9]{3}\b/i
call pk_STAY_CALM
}



automacro pked959 {
overrideAI 1
priority 1
####DAMAGE RANGE 6000 - 9999#######################
console /player (.*) \((\d+)\) uses .* on you - dmg: \b[6-9][0-9]{3}\b/i
call KILL_PK
}

automacro pked645 {
overrideAI 1
####DAMAGE RANGE 10000 - 99999#####################
console /player (.*) \((\d+)\) uses .* on you - dmg: \b[1-9][0-9]{4}\b/i
call KILL_PK
}

automacro pked764 {
overrideAI 1
exclusive 1
# Asura? =)
####DAMAGE RANGE 100000 - 999999#####################
console /player (.*) \((\d+)\) uses .* on you - dmg: \b[1-9][0-9]{5}\b/i
call {
do kill $.lastMatch2
KILL_DEAD
}

#################################
#####SELF DEFEND - ON MELEE####
#################################


automacro pked356 {
overrideAI 1
####DAMAGE RANGE 10 - 90########################
console /player (.*) \((\d+)\) attacks you - dmg: \b[1-9][0-9]{1}\b/i
timeout 3
call pk_WARN
}


automacro pked303 {
overrideAI 1
timeout 2
####DAMAGE RANGE 100 - 900########################
console /player (.*) \((\d+)\) attacks you - dmg: \b[1-9][0-9]{2}\b/i
call pk_WARN
}

automacro pked101 {
overrideAI 1
timeout 1
####DAMAGE RANGE 1000 - 4000#######################
console /player (.*) \((\d+)\) attacks you - dmg: \b[1-4][0-9]{3}\b/i
call pk_STAY_CALM
}

automacro pked102 {
overrideAI 1
#timeout 1
####DAMAGE RANGE 5000 - 9999#######################
console /player (.*) \((\d+)\) attacks you - dmg: \b[5-9][0-9]{3}\b/i
call KILL_PK
}

automacro pked485 {
overrideAI 1
####DAMAGE RANGE 10000 - 99999#####################
console /player (.*) \((\d+)\) attacks you - dmg: \b[1-9][0-9]{4}\b/i
call KILL_PK
}

##############################
## SELF DEFEND - ON OTHER ##
##############################


automacro pked184 {
overrideAI 1
####DAMAGE RANGE BOMB##########
console /player (.*) \((\d+)\) uses Demonstration (lvl 5) on you .*/i
call {
call KILL_PK
}
}

# Todo make bot recognize if enemy is ranged or not and use pneuma on self
automacro pked18554 {
####DAMAGE RANGE Ranged ##########
overrideAI 1
var job != 1
#timeout 1
exclusive 1
#priority 1
spell Double Strafe, Arrow Repel, Arrow Vulcan, Spear Boomerang, Blitz Beat, Finger Offensive
call {
do move 0 0
do ss 25
call pk_ATTACK_ONCE
}
}



automacro pked5005 {
overrideAI 1
#priority 5
exclusive 1
timeout 1
####DAMAGE RANGE 2000 - 5999#######################
console /player (.*) \((\d+)\) uses Blitz Beat on you .*/i
call {
#$damage = @eval ($damage + 2.5)
do move 0 0
do ss 25
#call pk_WARN2
}
}


automacro pked354597 {
console /player (.*) \((\d+)\) is casting Extremly Fist on you *./i
call {
lock move
lock newmove
lock freew
call KILL_PK
}
}

automacro STRIP {
####FULL STRIP SKILL##############################
console /Player (.*) \((\d+)\) uses full strip on you.*/i
call KILL_PK
}

##################################
###ATTACK SUPPORT - ON SKILL ####
##################################

########### Hakuro ############
automacro PK_Hakuro4373 {
overrideAI 1
console /player Hakuro .* uses Vigor Absorption on player (.*) \((\d+)\)/i
call KILL_PK
}

########### Hakuro ############
automacro PK_Hakuro43788 {
overrideAI 1
console /player Hakuro .* uses Lex Aeterna on player (.*) \((\d+)\)/i
call KILL_PK
}

##########DAMAGE RANGE 1000 - 4999#################
automacro PK_Hakuro313 {
overrideAI 1
console /player Hakuro .* uses .* on player (.*) \((\d+)\) - dmg: \b[1-4][0-9]{3}\b/i
call pk_ATTACK_ONCE
}


##########DAMAGE RANGE 5000 - 9999#################
automacro PK_Hakuro323 {
overrideAI 1
console /player Hakuro .* uses .* on player (.*) \((\d+)\) - dmg: \b[5-9][0-9]{3}\b/i
call {
do kill $.lastMatch2
}
}

###########DAMAGE RANGE 10000 - 999999##############
automacro PK_Hakuro333 {
overrideAI 1
console /player Hakuro .* uses .* on player (.*) \((\d+)\) - dmg: \b[1-9][0-9]{4,5}\b/i
call {
do kill $.lastMatch2
}
}
########### Hakuro^^ ############

##########DAMAGE RANGE 1000 - 4999#################
automacro PK_Hakuro3 {
overrideAI 1
#player Hakuro^^
console /player - Hakuro - .* uses .* on player (.*) \((\d+)\) - dmg: \b[1-4][0-9]{3}\b/i
#console /Hakuro/i
call pk_ATTACK_ONCE
}


##########DAMAGE RANGE 5000 - 9999#################
automacro PK_Hakuro3213 {
overrideAI 1
console /player - Hakuro - .* uses .* on player (.*) \((\d+)\) - dmg: \b[5-9][0-9]{3}\b/i
call {
do kill $.lastMatch2
}
}

###########DAMAGE RANGE 10000 - 999999##############
automacro PK_Hakuro3313 {
overrideAI 1
console /player - Hakuro - .* uses .* on player (.*) \((\d+)\) - dmg: \b[1-9][0-9]{4,5}\b/i
call {
do kill $.lastMatch2
}
}

##################################
##DEFEND SUPPORT - ON MELEE ###
#################################

############ Hakuro ###############

############DAMAGE RANGE 1000 - 3999###########
automacro pked_Hakuro991 {
overrideAI 1
console /player (.*) \((\d+)\) attacks player Hakuro .* - dmg: \b[1-3][0-9]{3}\b/i
call pk_ATTACK_ONCE
}

###########DAMAGE RANGE 4000 - 9999############
automacro pked_Hakuro992 {
overrideAI 1
console /player (.*) \((\d+)\) attacks player Hakuro .* - dmg: \b[4-9][0-9]{3}\b/i
call KILL_PK
}

###########DAMAGE RANGE 10000 - 99999##########
automacro pked_Hakuro993 {
overrideAI 1
console /player (.*) \((\d+)\) attacks player Hakuro .* - dmg: \b[1-9][0-9]{4}\b/i
call {
do kill $.lastMatch2
}
}

############ - Hakuro - ###############

############DAMAGE RANGE 1000 - 3999###########
automacro pked_Hakuro9291 {
overrideAI 1
console /player (.*) \((\d+)\) attacks player - Hakuro - .* - dmg: \b[1-3][0-9]{3}\b/i
call pk_ATTACK_ONCE
}

###########DAMAGE RANGE 4000 - 9999############
automacro pked_Hakuro9922 {
overrideAI 1
console /player (.*) \((\d+)\) attacks player - Hakuro - .* - dmg: \b[4-9][0-9]{3}\b/i
call KILL_PK
}

###########DAMAGE RANGE 10000 - 99999##########
automacro pked_Hakuro9923 {
overrideAI 1
console /player (.*) \((\d+)\) attacks player - Hakuro - .* - dmg: \b[1-9][0-9]{4}\b/i
call {
do kill $.lastMatch2
}
}



##################################
##DEFEND SUPPORT - ON SKILL ###
#################################

################# Hakuro #####################

#######DAMAGE RANGE 1000 - 4999###############
automacro pk_Hakuro771 {
overrideAI 1
console /player (.*) \((\d+)\) uses .* on player Hakuro .* - dmg: \b[1-4][0-9]{3}\b/i
call pk_STAY_CALM
}

#######DAMAGE RANGE 5000 - 9999###############
automacro pk_Hakuro772 {
overrideAI 1
console /player (.*) \((\d+)\) uses .* on player Hakuro .* - dmg: \b[5-9][0-9]{3}\b/i
call KILL_PK
}

######DAMAGE RANGE 10000 - 99999############
automacro pked_Hakuro773 {
overrideAI 1
console /player (.*) \((\d+)\) uses .* on player Hakuro .* - dmg: \b[1-9][0-9]{4}\b/i
call {
do kill $.lastMatch2
}
}

######DAMAGE RANGE 100000 - 999999############
automacro pked_Hakuro153 {
overrideAI 1
console /player (.*) \((\d+)\) uses .* on player Hakuro .* - dmg: \b[1-9][0-9]{5}\b/i
call {
do kill $.lastMatch2
}
}

################# - Hakuro - #####################

#######DAMAGE RANGE 1000 - 4999###############
automacro pk_Hakuro7721 {
overrideAI 1
console /player (.*) \((\d+)\) uses .* on player - Hakuro - .* - dmg: \b[1-4][0-9]{3}\b/i
call pk_STAY_CALM
}

#######DAMAGE RANGE 5000 - 9999###############
automacro pk_Hakuro7722 {
overrideAI 1
console /player (.*) \((\d+)\) uses .* on player - Hakuro - .* - dmg: \b[5-9][0-9]{3}\b/i
call KILL_PK
}

######DAMAGE RANGE 10000 - 99999############
automacro pked_Hakuro7723 {
overrideAI 1
console /player (.*) \((\d+)\) uses .* on player - Hakuro - .* - dmg: \b[1-9][0-9]{4}\b/i
call KILL_PK
}

######DAMAGE RANGE 100000 - 999999############
automacro pked_Hakuro1523 {
overrideAI 1
console /player (.*) \((\d+)\) uses .* on player - Hakuro - .* - dmg: \b[1-9][0-9]{5}\b/i
call KILL_PK
}


############### FP ###############


automacro fptimer {
var allowA = 1
overideAI 1
var fp = 1
status not cp weapon
hp > 25%
call fptrigger
timeout 12
}

macro fptrigger {
do c @warp $homemap
pause 2
do pm $fpbot fp
pause 3
call Lockmap99
}


#######HP SP############
automacro kittyhp {
var allowA = 1
status not dead
exclusive 1
hp > 0%
hp < 35%
timeout 10
call kittyhpsp
}

automacro kittynohp {
var allowA = 1
hp = 0%
exclusive 1
location payon
timeout 10
call kittynohp2
}


automacro kittysp {
var allowA = 1
hp > 0%
sp <= 15%
exclusive 1
timeout 10
call kittyhpsp
}

automacro kittynosp {
var allowA = 1
exclusive 1
overideAI 1
hp != 0%
sp = 0%
call afterAsurahpsp
}


macro kittynohp2 {
pause 1
do move x y "map_name"
}

macro kittyhpsp {
pause 1
do c @warp Map_name
pause 1
do talk @npc (x y)
pause 1
}


macro afterAsurahpsp {
pause 1
do c @warp Map_name
pause 1
do talk @npc (x y)
pause 1
}
#########LOCK MAP#################


automacro Go_To_Lockmap {
exclusive 1
var fp = 1
var lock = 1
overideAI 1
var allowA = 1
location not "map name"
location not "map name"
location not "map name"
location not "map name"
location not "map name"

hp > 40%
status cp weapon
timeout 5
call Lockmap99
}

automacro Go_To_Lockmap2 {
exclusive 1
overideAI 1
var fp = 0
var lock = 1
var allowA = 1
location not "map name"
location not "map name"
location not "map name"
location not "map name"
location not "map name"

hp > 40%
timeout 5
call Lockmap99
}

macro Lockmap99 {
release move
release freew
release newmove
#$damage = 0
if ($location = Map_name) goto prtfild
goto other
:prtfild


# $xxx = @random ("120", "200")
# $yyy = @rand (325, 345)
$xxx = @random("100", "200")
$yyy = @rand (365, 366)
do c @warp prt_fild08 $xxx $yyy
goto end
:other
do c @warp $lockedmap
:end
set exclusive 0
call move2
}

############ STORAGE ##############

automacro oweight {
exclusive 1
weight >= 70%
timeout 30
call storauto
}

macro storauto {
do autostorage
}

automacro gems {
class high priest
exclusive 1
inventory "Blue Gemstone" = 0
timeout 20
call storauto
}


automacro nogems {
class high priest
var job != 1
exclusive 1
storage "Blue Gemstone" = 0
timeout 10
call {
lock gems
lock nogems
}
}

Tuesday, April 1, 2008

Tanda kalo Macro tak cocok/tak berfungsi


Ini tanda kalo macro yang anda gunakan tak berfungsi.

Yang perlu d tambahkan d config

macro_nowarn 1
macro_orphans terminate
macro_debug none
macro_file macros.txt
macro_allowDebug 0
macro_readmanual red/chilli

Wednesday, March 19, 2008

Ashura Macros

Skills:

Public Messages:

heal
buff/agi/bless
asp/assump
res
ruwach - Uses ruwach on player (!)

Private Messages:

heal
buff

* - Bots use ruwach on cloakers.


Commands and Chat:

Private Messages ONLY:

follow/fm/go - Follows you
stop/w - Stop following and sit
kos - Stop killing on sight someone or stop attacking player
fp - Enables / Disable asking for coating
free - Enables / Disables free will
walk - Enables / Disables random walk.
skill - Enables / Disables buff and heal other players except you
prt - Set Locked Map prt_fild08
gef - Set Locked Map gef_fild10
pay - Set Locked Map pay_fild00
br - Set Locked Map new_1-1
home/h - Set Locked Map $homemap. Warp to your homeplace

Settings:
$freewill = 1|0 Do something sometimes
$skills = 1|0 - Autoskills
$homemap = Homeplace map X Y
$lockedmap = Locked map X Y
$fpbot = "NAME" - Creator's name. Casts coating on you
$master = NAME- Your name
$fp =1|0 Ask for Coating (1) Dont ask (0)
$nohide = Use ruwach on cloakers, etc (1) Dont use (0)


###################################################
# PLAYER KILL MACRO (BOT VS PLAYER) v 1.0
# JOB: CHAMPION
###################################################
# To make all these macros work u have to:
#
# Make new config key kos_pk
# Make new config key kos_pk2
#
# Edit > Replace:
# Hakuro to your name.
# map01 to ur homemap (w/o coordinates)
# map02 to ur lockedmap (w/o coordinates)
#
# Put:
# $homemap = map01 x y
# $lockedmap = map02 x y
# fp (coating) bot name here: (or set $fp = 0)
# $fpbot = "name"
# Edit macro config
###################################################

automacro subload {
overideAI 1
run-once 1
call onload
}

macro onload {

# Macro Config

# Edit This:
# [ 1 = on | 0 = off ]

do conf macro_debug 0
$kos = 1
$freewill = 0
$randomwalk = 1
$nohide = 0
$fp = 0
$skills = 1
$homemap = map01
$lockedmap = map02
$fpbot = "name"
$master = Hakuro
$follow = 0
$hello = Hi $master ! My positon: $.pos $.map. Locked map: $lockedmap Enemies: @config(kos_pk) @config(kos_pk2).

# Dont mess with this:

if ($follow = 1) goto f
goto next
:f
do follow $master
:next
if (@arg("$lockedmap", 1) = prt_fild08) goto makelocprt
$location = $.map
goto next2
:makelocprt
$location = prt_fild08
:next2
$lastpos = 0 0 $.map
$damage = 0
$nmes = 0
$frag = 0

# Say that you are online
do pm "$master" $hello

# Log (you can remove it)

log ===================================================
log PVP (BVP) Macros v 1.0
log JOB: CHAMPION
log ===================================================
log Master: $master
log Skill Usage On Players - Ruwach: $nohide Buffs: $skills
log Random Walk: $randomwalk Free will: $freewill KOS: $kos
log Homeplace: $homemap Locked Place: $lockedmap
log Commands are: follow / stop / prt / gef / pay / br
log home / fp / walk / free / duel / kill / kos / skill
log ===================================================
log Kill On Sight players: @config(kos_pk) @config(kos_pk2)
log ===================================================
pause 1
}

########### Master ###########

automacro mapchange99 {
mapchange prt_fild08, gef_fild10
call {
release move
}
}

automacro masterlost {
var randomwalk = 1
console "I lost my master"
timeout 1
location prt_fild08
call {
release move
}
}

automacro masterfound {
hook player
var randomwalk = 1
console "Found my master!"
timeout 1
location prt_fild08
call {
lock move
}
}

#### KOS

automacro kos0 {
status not dead
overideAI 1
hook player
location gef_fild10, prt_fild08, new_1-1, pay_dun00
var kos = 1
call kos1
}


macro kos1 {
if (@player(@config (kos_pk)) >= 0) goto kill1
if (@player(@config (kos_pk2)) >= 0) goto kill2
goto end
:kill1
do kill @player(@config (kos_pk))
$lastpos = $.pos $.map
goto end
:kill2
do kill @player(@config (kos_pk2))
$lastpos = $.pos $.map
:end
}

#### RANDOM WALK SETUP

automacro move {
overideAI 1
location gef_fild10, prt_fild08
var randomwalk = 1
timeout 20
call move2
}

macro move2 {
if (@player(@config (kos_pk)) >= 0) goto kill1
if (@player(@config (kos_pk2)) >= 0) goto kill2
if ($.map = prt_fild08) goto prtfild
if ($.map = gef_fild10) goto geffild
goto end
:ss
do $do
goto end

:cont
if (@player(@config (kos_pk)) >= 0) goto kill1
if (@player(@config (kos_pk2)) >= 0) goto kill2
$mrnd = @rand (1, 3)
if ($mrnd = 1) goto move
if ($mrnd = 2) goto ss
if ($mrnd = 3) goto ss
goto end
:move
if (@player(@config (kos_pk)) >= 0) goto kill1
if (@player(@config (kos_pk2)) >= 0) goto kill2
if (@arg("$lastpos", 3) != $.map) goto stop
$n = @rand(0, 6)
$m = @rand(0, 6)
$posx = @arg ("$.pos", 1)
$posy = @arg ("$.pos", 2)
$eval = @random ("+", "-")
if (@player(@config (kos_pk)) >= 0) goto kill1
if (@player(@config (kos_pk2)) >= 0) goto kill2
do @random ("move $lastpos", "move @eval ($posx $eval $n) @eval ($posy $eval $m) $.map")
goto end
:prtfild
$do = @random ("ss 270", "ss 270", "ss 24", "ss 270")
$xx = @rand (156, 171)
$yy = @rand (345, 365)
do move $xx $yy $.map
if (@player(@config (kos_pk)) >= 0) goto kill1
if (@player(@config (kos_pk2)) >= 0) goto kill2
goto cont
:geffild
$do = @random ("ss 270", "ss 270", "ss 24", "ss 270")
$xx = @rand (65, 73)
$yy = @rand (308, 327)
do move $xx $yy $.map
if (@player(@config (kos_pk)) >= 0) goto kill1
if (@player(@config (kos_pk2)) >= 0) goto kill2
goto cont
:kill1
do kill @player(@config (kos_pk))
$lastpos = $.pos $.map
goto end
:kill2
do kill @player(@config (kos_pk2))
$lastpos = $.pos $.map
:end
}

##### FREE WILL

automacro freew {
overideAI 1
location gef_fild10, prt_fild08, new_1-1, pay_dun00
var freewill = 1
timeout 75
call freewill
}

macro freewill {
do conf followFaceDirection 0
$will = @random ("macro sit", "")
if ($will = macro move2) goto q
if ($will = macro sit) goto w
goto end
:q
call move2
goto end
:w
call sit
goto end
:end
}

macro sit {
$look = @random ("3", "4", "5")
do look $look
:sit
$times = @rand (10, 15)
$i = 0
while ($i < $times) as sitloop
pause 4
do sit
do look $look
if (@player(@config (kos_pk)) >= 0) goto kill1
if (@player(@config (kos_pk2)) >= 0) goto kill2
$i++
end sitloop
if (@player($master) >= 0) goto one
goto end
:one
do @random ( "", "e e2", "", "", "e e8", "", "", "", "e ho", "e e10")
goto end
:kill1

do kill @player(@config (kos_pk))
$lastpos = $.pos $.map
goto end
:kill2

do kill @player(@config (kos_pk2))
$lastpos = $.pos $.map
goto end
:end
}


###################
##### SKILLS ######

# PUBLIC

automacro Healer {
pubm /heal|Heal|hp|HP/,6
sp >= 80%
timeout 20
call doheal
}

automacro Buffer {
pubm /buff|bufs|Buffs|BUFF|baps|Buf|buffs|agi|bless/,6
sp >= 80%
timeout 20
call dobuff
}

automacro ruwach1 {
pubm /ruwach/,6
timeout 46
call dorwch
}

automacro res99 {
timeout 15
pubm /res|resu|ressu|ress/
inventory "yggdrasil leaf" > 0
call Ressurection
}

macro Ressurection {
if ($.lastpub = $master) goto one
if ($skills = 1) goto one
goto end
:one
do ip @inventory (yggdrasil leaf) @player ($.lastpub)
goto over
:end
pause 2
do @random ("c nop", "c nope", "e ??", "e lv2", "e e2", "e ??", "c =/", "c no", "e ??", "", "", "")
:over
pause 2
do @random ("c P", "c ^^", "e heh", "", "", "e e2", "", "e ok", "e e2", "", "")
}



# PRIVATE

automacro healz {
timeout 15
pm "heal"
pm "hp"
call healz2
}

automacro buffz {
timeout 15
pm /buff/i
call buffz2
}

macro doheal {
if ($.lastpub = $master) goto one
if ($skills = 1) goto one
goto end
:one
$times = @rand (2, 7)
$i = 0
while ($i < $times ) as healloop
do sp 28 "$.lastpub" 10
$i++
end healloop
goto over
:end
pause 2
do @random ("c nop", "c nope", "e ??", "e lv2", "e e2", "e ??", "c =/", "c no", "e ??", "", "", "")
:over
pause 3
do @random ("c P", "c ^^", "e heh", "", "", "e e2", "", "e gg", "e e2", "", "")
}

macro buffz2 {
if ($.lastpm = $master)goto one
goto end
:one
do sp 34 "$.lastpm" 10
do sp 29 "$.lastpm" 10
do sp 361 "$.lastpm" 10
goto over
:end
pause 2
do @random ("c nop", "c nope", "e ??", "e lv2", "e e2", "e e8", "c =/", "c no", "e ??", "", "", "")
:over
pause 2
do @random ("c P", "c ^^", "e heh", "", "", "e e2", "", "e gg", "e e2", "", "")
}

macro healz2 {
if ($.lastpm = $master) goto one
goto end
:one
$times = @rand (6, 12)
$i = 0
while ($i < $times ) as healloop
log loop $i
do sp 28 "$.lastpm" 10
$i++
end healloop
goto end
:end
}

macro dorwch {
do sp 24 "$.lastpub"
}

macro dobuff {
if ($.lastpub = $master) goto one
if ($skills = 1) goto one
goto end
:one
do sp 34 "$.lastpub" 10
do sp 29 "$.lastpub" 10
goto over
:end
pause 2
do @random ("c nop", "c nope", "e ??", "e lv2", "e e2", "e e8", "c =/", "c no", "e ?", "", "", "")
:over
pause 2
do @random ("c P", "c ^^", "e heh", "", "", "e e2", "", "e gg", "e e2", "", "")

}

automacro SW1 {
pm /^(sw)$/
call SW2
}

macro SW2 {
if ($.lastpm = $master) goto one
goto end
:one
do sp 12 "$.lastpm"
#do sp 24 "$.lastpm"
goto end
:end
}

automacro Ruwach999 {
console /Player .* .* uses Ruwach on himself/i
var nohide = 1
timeout 65
call {
pause 2
do ss 24
}
}


# FIND CLOACKERS


automacro nohide {
var nohide = 1
console /Player (.*) \((\d+)\) uses Cloaking on himself/i
timeout 25
call {
do sp 24 $.lastMatch2
}
}

automacro nohide2 {
var nohide = 1
console /player (.*) \((\d+)\) uses Hiding on himself/i
timeout 25
call {

do sp 24 $.lastMatch2
}
}

automacro nohide3 {
timeout 12
var nohide = 1
console /player (.*) \((\d+)\) uses Chase Walk on himself/i
call {
do sp 24 $.lastMatch2
}
}


######## COMMANDS / CHAT #########


automacro fs1 {
pm "duel conf"
call {
do switchconf ChampDuel.txt
do pm "$.lastpm" switched duel
}

automacro fs2 {
pm "main conf"
call {
do switchconf ChampMain.txt
do pm "$.lastpm" switched to main
}
}

automacro fs3 {
pm "party"
call {
do switchconf ChampParty.txt
do pm "$.lastpm" ok party
}
}

automacro walk {
pm /^(walk)$/
call {
if ($randomwalk = 1) goto off
if ($randomwalk = 0) goto on
goto end
:on
release move
$randomwalk = 1
do pm "$.lastpm" Randomwalk Enabled
goto end
:off
$randomwalk = 0
do pm "$.lastpm" Randomwalk Disabled
goto end
:end
}
}

automacro usefp {
pm "fp"
call {
if ($fp = 1) goto off
if ($fp = 0) goto on
goto end
:on
$fp = 1
do pm "$.lastpm" Using FP Enabled
goto end
:off
$fp = 0
do pm "$.lastpm" Using FP Disabled
goto end
:end
}
}

automacro Follow {
overrideAI 1
pm /^(follow|fm|go)$/,
call follow2
}

macro follow2 {
do follow $.lastpm
do pm "$.lastpm" Following "$.lastpm" !!
}


automacro kos_no {
overrideAI 1
pm "stop"
call {
do pm "$.lastpm" Players: [ @config(kos_pk) | @config(kos_pk2) ] - are no longer my enemies.
do conf kos_pk none
do conf kos_pk2 none
$damage = none
$pla = none
$kospla = none
do pm "$.lastpm" I stopped.
}
}

automacro kos_duel {
overrideAI 1
pm "duel"
call {
do conf kos_pk $.lastpm
$freewill = 0
$damage = 10
pause 1
do pm "$.lastpm" @random ( "Lets Have Fun", "Game", "Sure")
pause 1
do @random ("e gg", "c XD", "e e9")
pause 1
do c 3
pause 1
do c 2
pause 1
do c 1
pause 1
do e go
do kill @player(@config(kos_pk))
}
}

automacro kos001 {
overrideAI 1
pm /^(kos )/i
call {
$kospla = @arg ("$.lastpmMsg", 2)
if (@player($kospla) >= 0) goto kill
goto nopla
:kill

do conf kos_pk2 $kospla
do pm "$.lastpm" KOS: $kospla
do kill @player($kospla)
goto end
:nopla2
$pla = @arg ("$.lastpmMsg", 2)
do pm "$.lastpm" Can't recognize $kospla. Spell his name accurately.
goto end
:nopla
do pm "$.lastpm" Player $kospla doesn't exists.
do pm "$.lastpm" Searching again....
$kospla = @arg ("$.lastpmMsg", 2) @arg ("$.lastpmMsg", 3) @arg ("$.lastpmMsg", 4) @arg ("$.lastpmMsg", 5) @arg("$.lastpmMsg", 6)
if (@player($kospla) >= 0) goto kill
goto nopla2
:end
}
}

automacro killpla {
overrideAI 1
pm /^(kill )/i
call {
$pla = @arg ("$.lastpmMsg", 2)
if (@arg ("$.lastpmMsg", 2) = me) goto killme
if (@player($pla) >= 0) goto kill
goto nopla
:killme
do pm "$.lastpm" I am gonna kill you !!!
do kill @player($.lastpm)
goto end
:kill

do pm "$.lastpm" I am gonna kill $pla
do kill @player($pla)
goto end
:nopla2
$pla = @arg ("$.lastpmMsg", 2)
do pm "$.lastpm" Can't recognize $pla. Spell his name accurately.
goto end
:nopla
do pm "$.lastpm" Player $pla doesn't exists.
do pm "$.lastpm" Searching again....
$pla = @arg ("$.lastpmMsg", 2) @arg ("$.lastpmMsg", 3) @arg ("$.lastpmMsg", 4) @arg ("$.lastpmMsg", 5) @arg("$.lastpmMsg", 6)
if (@player($pla) >= 0) goto kill
goto nopla2
:end
}
}

automacro wait {
overrideAI 1
pm /^(wait|w)$/,
call wait2
}


macro wait2 {
do conf follow 0
do sit
do pm "$.lastpm" Waiting you at $.map !!
}

automacro skills {
pm "skill"
call {
if ($skills = 1) goto off
if ($skills = 0) goto on
goto end
:on
$skills = 1
do pm "$.lastpm" Autoskills Enabled
goto end
:off
$skills = 0
do pm "$.lastpm" Autoskills Disabled
goto end
:end
}
}

automacro setfw {
pm "free"
call {
if ($freewill = 1) goto off
if ($freewill = 0) goto on
goto end
:on
$freewil = 1
do pm "$.lastpm" Free Will Enabled
goto end
:off
$freewill = 0
do pm "$.lastpm" Free Will Disabled
goto end
:end
}
}

automacro status {
pm "st"
call {
do pm $.lastpm My positon: $.pos $.map. Locked map: $lockedmap Enemies: @config(kos_pk) @config(kos_pk2).
}
}

# 0 - 26

automacro gowarp {
pm /^(go )/i
call Lockmap77
}

macro Lockmap77 {
$go = @arg ("$.lastpmMsg", 2)
do c @go $go
do pm "$.lastpm" $.map
}



#### SET LOCKED MAP

automacro lockedmap3go19 {
overrideAI 1
pm /^(pay)$/,
call {
$lockedmap = pay_dun00 35 104
$location = pay_dun00
if ($follow = 1) goto f
goto next
:f
do follow $master
:next
do pm "$.lastpm" Locked Map: $lockedmap
call Lockmap99
}
}

automacro lockedmap4go15 {
overrideAI 1
pm /^(br)$/,
call {
$lockedmap = new_1-1 52 111
$location = new_1-1
if ($follow = 1) goto f
goto next
:f
do follow $master
:next
do pm "$.lastpm" Locked Map: $lockedmap
call Lockmap99
}
}

automacro lockedmap1prt {
overrideAI 1
pm /^(prt)$/,
call {
$xxx = @rand (100, 200)
$yyy = @rand (335, 369)
$lockedmap = prt_fild08 $xxx $yyy
$location = prt_fild08
if ($follow = 1) goto f
goto next
:f
do follow $master
:next
do pm "$.lastpm" Locked Map: $lockedmap
call Lockmap99
}
}

automacro lockedmap0home {
overrideAI 1
pm /^(home)$/,
call {
do conf follow 0
$lockedmap = $homemap
$location = prt_fild09
do pm "$.lastpm" Locked Map: $lockedmap
call Lockmap99
}
}

automacro lockedmap2gef {
overrideAI 1
pm /^(gef)$/,
call {
$lockedmap = gef_fild10 75 300
$location = gef_fild10
#$lockedmap = gef_fild10 75 300
if ($follow = 1) goto f
goto next
:f
do follow $master
:next
do pm "$.lastpm" Locked Map: $lockedmap
call Lockmap99
}
}


##########################
# Do something when buffed
##########################

macro bemad {
$buffs = 10
:start
$i = 0
while ($i < $buffs ) as buffloop
$nmes = $mes
$mes = @random ("e e5", "c Oo", "sp 156 $.lastMatch2", "sp 78 $.lastMatch2", "", "e gg", "c lol", "e e2", "sp 78 $.lastMatch2")
if ($nmes = $mes) goto start
if ($nmes != $mes) goto end
$i++
end buffloop
:end
pause 2
do $mes
$.lastMatch2 = none
}

macro begood {
$buffs = 10
:start
$i = 0
while ($i < $buffs ) as buffloop
$nmes = $mes
$mes = @random ("c ty", "c thanx", "c thanks", "e lv2", "c ty^^", "c ^^", "c xD", "e thx", "e ho", "c thx")
if ($nmes = $mes) goto start
if ($nmes != $mes) goto end
$i++
end buffloop
:end
pause 2
do $mes
}

macro begood2 {
$buffs = 10
:start
$i = 0
while ($i < $buffs ) as buffloop
$nmes = $mes
$mes = @random ("c ty", "c thanx", "c thanks", "e lv2", "c ty^^", "c ^^", "c xD", "e thx", "buff", "buff", "buff")
if ($nmes = $mes) goto start
if ($nmes != $mes) goto end
if ($mes = buff) goto buff
$i++
end buffloop
:buff
pause 1
do sp 34 $.lastMatch2 10
do sp 29 $.lastMatch2 10
goto end2
:end
pause 2
do $mes
:end2
}

macro buffed02 {
$buffs = 10
:start
$i = 0
while ($i < $buffs ) as buffloop
$nmes = $mes
$mes = @random ("", "", "sp 34 $.lastMatch2 1", "c <.<", "e thx", "e e8", "e e2")
if ($nmes = $mes) goto start
if ($nmes != $mes) goto end
if ($mes = unset) goto end
$i++
end buffloop
:end
pause 2
do $mes
$.lastMatch1 = none
}

macro buffed01 {
$buffs = 10
:start
$i = 0
while ($i < $buffs ) as buffloop
$nmes = $mes
$mes = @random ("", "", "sp 29 $.lastMatch2 1", "", "c >.>", "e ho", "", "c xD", "e e2")
if ($nmes = $mes) goto start
if ($nmes != $mes) goto end
if ($mes = unset) goto end
$i++
end buffloop
:end
pause 2
do $mes
$.lastMatch1 = none
}

automacro fped101 {
console /player (.*) \((\d+)\) uses full chemical protection on you.*/i
call begood2
timeout 30
}

automacro buffed11 {
console /player (.*) \((\d+)\) uses blessing on you.*/i
call buffed02
timeout 50
}

automacro buffed12 {
console /player (.*) \((\d+)\) uses increase agi on you.*/i
call buffed01
timeout 50
}


automacro buffed13 {
spell assumptio
timeout 45
call begood
}

automacro buffed14 {
console /player (.*) \((\d+)\) uses provoke on you.*/i
call bemad
timeout 50
}

automacro buffed15 {
console /player (.*) \((\d+)\) uses heal on you.*/i
call begood
timeout 50
}


#####################################
# PLAYER KILL #
#####################################

macro pk_STAY_CALM {
do pm "$master" $.lastMatch1 is playing with fire.
$damage = @eval ($damage + 1)
if ($damage > 1) goto one
goto over
:one
#$damage = @eval ($damage + 1.25)
pause 1
do @random ( "", "e ?", "", "e e2", "", "", "e gg", "", "c lol", "", "c aw", "e e2", "")
call pk_ATTACK_ONCE
:over
}



macro pk_WARN {
do pm "$master" $.lastMatch1 is playing with fire.
$damage = @eval ($damage + 0.75)
#if ($damage > 5) goto one
if ($damage > 10) goto one
goto over
:one
call KILL_PK
:over
pause 2
do @random ( "", "", "e lv2", "e e2", "", "e gg", "", "e lv", "", "", "e heh", "", "", "c aw", "", "e e2")
}

macro pk_WARN2 {
do pm "$master" $.lastMatch1 is playing with fire.
$damage = @eval ($damage + 0.75)
if ($damage > 10) goto one
goto over
:one
call KILL_PK
:over
pause 2
do @random ( "", "c aw", "e lv2", "e e2", "", "e gg", "", "e ?", "e lv", "c lol", "e heh", "e ??", "e ??")

}

macro pk_ATTACK_ONCE {
do pm "$master" $.lastMatch1 attacked me.
$damage = @eval ($damage + 2.5)
#if ($damage > 3) goto two
if ($damage > 10) goto two
goto one
:one
do sp 266 $.lastMatch2
goto over
:two
pause 2
do @random ("e gg", "", "e gg", "", "e e2", "", "", "e heh", "", "c aw", "", "c lol", "sp 156 $.lastMatch2", "sp 156 $.lastMatch2")
call KILL_PK
:over
}

macro KILL_DEAD {
if ($.lastMatch1 = @config(kos_pk)) goto justkill
if ($.lastMatch1 = @config(kos_pk2)) goto justkill
if ($.lastMatch1 = $master) goto nvm
do kill $.lastMatch2
do conf kos_pk2 @config(kos_pk)
do conf kos_pk $.lastMatch1
do pm "$master" $.lastMatch1 is my foe !!
goto end
:justkill
do pm "$master" I guess i am dead... $.lastMatch1 killed me @_@
do c @warp $.map $.pos
do kill $.lastMatch2
goto end
:nvm
do pm "$master" I wont kill my master.
:end
}
}

macro KILL_PK {
if ($.lastMatch1 = @config(kos_pk)) goto justkill
if ($.lastMatch1 = @config(kos_pk2)) goto justkill
if ($.lastMatch1 = $master) goto nvm
do kill $.lastMatch2
do conf kos_pk2 @config(kos_pk)
do conf kos_pk $.lastMatch1
do pm "$master" $.lastMatch1 is my foe !!
goto end
:justkill
do kill $.lastMatch2
do pm "$master" $.lastMatch1 attacked me @_@
goto end
:nvm
do pm "$master" I wont kill my master.
:end
}


#################################
#####SELF DEFEND - ON SKILL#####
#################################

automacro pked378 {
overrideAI 1
timeout 3
####DAMAGE RANGE 100 - 999#########################
console /player (.*) \((\d+)\) uses .* on you - dmg: \b[1-9][0-9]{2}\b/i
call pk_WARN
}

automacro pked554 {
overrideAI 1
####DAMAGE RANGE 2000 - 5999#######################
timeout 1
console /player (.*) \((\d+)\) uses .* on you - dmg: \b[2-5][0-9]{3}\b/i
call pk_STAY_CALM
}



automacro pked959 {
overrideAI 1
####DAMAGE RANGE 6000 - 9999#######################
console /player (.*) \((\d+)\) uses .* on you - dmg: \b[6-9][0-9]{3}\b/i
call KILL_PK
}

automacro pked645 {
overrideAI 1
####DAMAGE RANGE 10000 - 99999#####################
console /player (.*) \((\d+)\) uses .* on you - dmg: \b[1-9][0-9]{4}\b/i
call KILL_PK
}

automacro pked649 {
overrideAI 1
####DAMAGE RANGE 100000 - 150000#####################
console /player (.*) \((\d+)\) uses .* on you - dmg: \b[1][0-5]{5}\b/i
call KILL_PK
}

automacro pked640 {
overrideAI 1
####DAMAGE RANGE 150000 - 199999#####################
console /player (.*) \((\d+)\) uses .* on you - dmg: \b[1][5-9]{5}\b/i
call KILL_PK
}

automacro pked641 {
overrideAI 1
####DAMAGE RANGE 200000 - 499999#####################
console /player (.*) \((\d+)\) uses .* on you - dmg: \b[2-5][0-9]{5}\b/i
call KILL_DEAD
}

#################################
#####SELF DEFEND - ON MELEE####
#################################


automacro pked356 {
overrideAI 1
####DAMAGE RANGE 10 - 90########################
console /player (.*) \((\d+)\) attacks you - dmg: \b[1-9][0-9]{1}\b/i
timeout 3
call pk_WARN
}


automacro pked303 {
overrideAI 1
timeout 3
####DAMAGE RANGE 100 - 900########################
console /player (.*) \((\d+)\) attacks you - dmg: \b[1-9][0-9]{2}\b/i
call pk_WARN
}

automacro pked101 {
overrideAI 1
timeout 1
####DAMAGE RANGE 1000 - 4000#######################
console /player (.*) \((\d+)\) attacks you - dmg: \b[1-4][0-9]{3}\b/i
call pk_STAY_CALM
}

automacro pked102 {
overrideAI 1
timeout 1
####DAMAGE RANGE 5000 - 9999#######################
console /player (.*) \((\d+)\) attacks you - dmg: \b[5-9][0-9]{3}\b/i
call KILL_PK
}

automacro pked485 {
overrideAI 1
####DAMAGE RANGE 10000 - 99999#####################
console /player (.*) \((\d+)\) attacks you - dmg: \b[1-9][0-9]{4}\b/i
call KILL_PK
}

##############################
## SELF DEFEND - ON OTHER ##
##############################


automacro pked184 {
overrideAI 1
####DAMAGE RANGE BOMB##########
console /player (.*) \((\d+)\) uses Demonstration (lvl 5) on you .*/i
call {
call KILL_PK
}
}

# Todo make bot recognize if enemy is ranged or not and use pneuma on self
automacro pked18554 {
####DAMAGE RANGE Ranged ##########
overrideAI 1
timeout 3
spell Double Strafe, Arrow Repel, Arrow Vulcan, Spear Boomerang
call {
do ss 25
pk_ATTACK_ONCE
}
}



automacro pked5005 {
overrideAI 1
####DAMAGE RANGE 2000 - 5999#######################
console /player (.*) \((\d+)\) uses Blitz Beat on you .*/i
call {
$damage = @eval ($damage + 2.5)
do ss 25
call pk_WARN2
}
}


automacro pked354597 {
console /player (.*) \((\d+)\) is casting Extremly Fist on you *./i
call {
lock move
lock freew
call KILL_PK
}
}

automacro STRIP {
####FULL STRIP SKILL##############################
console /Player (.*) \((\d+)\) uses full strip on you.*/i
call KILL_PK
}

##################################
###ATTACK SUPPORT - ON SKILL ####
##################################

########### Hakuro ############
automacro PK_pla4373 {
overrideAI 1
console /player Hakuro .* uses Vigor Absorption on player (.*) \((\d+)\)/i
call KILL_PK
}

##########DAMAGE RANGE 1000 - 4999#################
automacro PK_pla313 {
overrideAI 1
console /player Hakuro .* uses .* on player (.*) \((\d+)\) - dmg: \b[1-4][0-9]{3}\b/i
call pk_ATTACK_ONCE
}


##########DAMAGE RANGE 5000 - 9999#################
automacro PK_pla323 {
overrideAI 1
console /player Hakuro .* uses .* on player (.*) \((\d+)\) - dmg: \b[5-9][0-9]{3}\b/i
call {
call KILL_PK
}
}

###########DAMAGE RANGE 10000 - 999999##############
automacro PK_pla333 {
overrideAI 1
console /player Hakuro .* uses .* on player (.*) \((\d+)\) - dmg: \b[1-9][0-9]{4,5}\b/i
call {
call KILL_PK
}
}

##################################
##DEFEND SUPPORT - ON MELEE ###
#################################

############ Hakuro ###############

############DAMAGE RANGE 1000 - 3999###########
automacro pked_pla991 {
overrideAI 1
console /player (.*) \((\d+)\) attacks player Hakuro .* - dmg: \b[1-3][0-9]{3}\b/i
call pk_ATTACK_ONCE
}

###########DAMAGE RANGE 4000 - 9999############
automacro pked_pla992 {
overrideAI 1
console /player (.*) \((\d+)\) attacks player Hakuro .* - dmg: \b[4-9][0-9]{3}\b/i
call KILL_PK
}

###########DAMAGE RANGE 10000 - 99999##########
automacro pked_pla993 {
overrideAI 1
console /player (.*) \((\d+)\) attacks player Hakuro .* - dmg: \b[1-9][0-9]{4}\b/i
call {
call KILL_PK
}
}


##################################
##DEFEND SUPPORT - ON SKILL ###
#################################

################# Hakuro #####################

#######DAMAGE RANGE 1000 - 4999###############
automacro PK_pla771 {
overrideAI 1
console /player (.*) \((\d+)\) uses .* on player Hakuro .* - dmg: \b[1-4][0-9]{3}\b/i
call pk_STAY_CALM
}

#######DAMAGE RANGE 5000 - 9999###############
automacro PK_pla772 {
overrideAI 1
console /player (.*) \((\d+)\) uses .* on player Hakuro .* - dmg: \b[5-9][0-9]{3}\b/i
call KILL_PK
}

######DAMAGE RANGE 10000 - 99999############
automacro pked_pla773 {
overrideAI 1
console /player (.*) \((\d+)\) uses .* on player Hakuro .* - dmg: \b[1-9][0-9]{4}\b/i
call {
do kill $.lastMatch2
}
}

######DAMAGE RANGE 100000 - 999999############
automacro pked_pla153 {
overrideAI 1
console /player (.*) \((\d+)\) uses .* on player Hakuro .* - dmg: \b[1-9][0-9]{5}\b/i
call {
do kill $.lastMatch2
}
}

############### FP ###############


automacro fptimer {
overideAI 1
var fp = 1
status not cp weapon
hp > 25%
call fptrigger
timeout 12
}

macro fptrigger {
do c @warp $homemap
pause 2
do pm $fpbot fp
pause 3
call Lockmap99
}


####### HP & SP ##########


automacro kittyhp {
overideAI 1
hp <= 30%
timeout 5
call kittyhpsp
}

automacro kittysp {
overideAI 1
sp < 20%
timeout 3
call kittyhpsp
}

macro kittyhpsp {
do c @warp payon 139 242
pause 2
do talk @npc (149 231)
pause 1
}

macro kittyhpsp2 {
do c @warp payon 139 242
pause 2
do talk @npc (149 231)
pause 1
}

#########LOCK MAP#################


automacro Go_To_Lockmap {
var fp = 1
overideAI 1
location not gef_fild10
location not prt_fild08
location not prt_fild09
location not pay_dun00
location not new_1-1
location not map02
hp > 40%
status cp weapon
timeout 5
call Lockmap99
}

automacro Go_To_Lockmap2 {
overideAI 1
var fp = 0
location not gef_fild10
location not prt_fild09
location not pay_dun00
location not new_1-1
location not prt_fild08
location not map02
hp > 40%
timeout 5
call Lockmap99
}

macro Lockmap99 {
release move
release freew
#$damage = 0
if ($location = prt_fild08) goto prtfild
goto other
:prtfild


$xxx = @rand (100, 180)
$yyy = @rand (340, 365)
# $xxx = @rand (150, 150)
# $yyy = @rand (365, 365)
do c @warp prt_fild08 $xxx $yyy
goto end
:other
do c @warp $lockedmap
:end
call move2
}

############ STORAGE ##############

automacro oweight {
weight >= 70%
timeout 30
call storauto
}

macro storauto {
do autostorage
}


Ini saya share macro ashura buat monk. saya dapat dari teman saya. dan sudah d coba d Iro.

Restock Macros

#when hunter doing autostorage, this macro may trigger
automacro initiater {
class Hunter
storage "Silver Arrow" < 5000
call initiate
}

macro initiate {
do conf char 2
do reload config
pause 2
do relog
}

#Check Blacksmith location
automacro checkLocation {
class Blacksmith
storage "Silver Arrow" < 5000
location not morocc_in 137 65
call moveLoc
}

macro moveLoc {
do move 137 65 morocc_in
}

#Buy silver arrow and put in storage
automacro silver {
class Blacksmith
inventory "Silver Arrow" < 5000
location morocc_in 137 65
call buy_silver
}

macro buy_silver {
do talk @npc (141 67)
pause 2
do store
pause 2
while (@cartamount (Silver Arrow) < 20000) as buyLoop
do buy @store (Silver Arrow) @eval (10000 - @invamount (Silver Arrow))
pause 2
do cart add @inventory (Silver Arrow) @eval (20000 - @invamount (Silver Arrow))
end buyLoop
do buy @store (Silver Arrow) 5000
pause 2
}

automacro putStorage {
class Blacksmith
inventory "Silver Arrow" > 0
cart "Silver Arrow" > 0
call storage
}

macro storage {
do move 153 95 morocc
do talk @npc (156 97)
pause 3
do talk resp 1
pause 2
do storage add @inventory (Silver Arrow)
pause 2
while (@cartamount (Silver Arrow) > 0) as storageLoop
do cart get @cart (Silver Arrow) 10000
pause 2
do storage add @inventory (Silver Arrow)
pause 2
end storageLoop
do storage close
}

#change to hunter
automacro changeHunter {
class Blacksmith
cart "Silver Arrow" = 0
inventory "Silver Arrow" = 0
call hunter
}

macro hunter {
do conf char 0
do reload config
pause 2
do relog
}

auto Warp

automacro Warper {
pm "Warp GH","Name" #Change This to your char's name
delay 5
run-once 1
call Warp1
}

macro Warp1 {
@set (loc) @var (.pos)
@pause 2
northeast
@pause 2
sl 27 @var (loc) 4
@pause 5
warp 1 #Assumming GH is in Memo 1
@pause 2
move @var (loc)
conf follow 1
@pause 2
@release Warper
}

macro Auto Buy

automacro Auto_Buy {
storage "Arrow" < 5000
class hunter
call Auto_Buy_Arrows
run-once 1
}

macro Auto_Buy_Arrows {
storage close
conf char 0 # if BlackSmith is in slot 0
conf saveMap
conf autoTalkCont 1
conf lockMap prt_fild05
conf route_randomWalk 0
conf storageAuto 0
conf storageAuto_npc 52392
relog
}

automacro BuyArrows {
map prt_fild05
class blacksmith
run-once 1
call Arrows
}

macro Arrows {

move 290 221 prt_fild05

talk @npc (290 221)
@pause 5
store
@pause 5
store
@pause 5
buy @store (Arrow) @eval (30000 - @invamount (Arrow))

@pause 20

move 290 221 prt_fild05

talk @npc (290 224)
@pause 5
talk resp 1
@pause 5
storage add @inventory (Arrow) @eval (30000 - @storamount (Arrow))

@pause 5
storage close

conf char 1 #if Hunter is in Slot 1
conf saveMap alberta
conf autoTalkCont 0
conf lockMap tur_dun01
conf route_randomWalk 1
conf storageAuto 1
conf storageAuto_npc 52401
@release BuyArrows
relog
@release Auto_Buy
}

Monday, March 17, 2008

Novice Ground

##############NOVICE TRAINING GROUND MACRO FOR indoRO BY MaSaHiRo########################



automacro lola {
base == 1
call lol
run-once 1
}


macro lol {
#SETTING CONFIG VARIABLES
do conf attackAuto 0
do conf route_randomWalk 0
do conf autoTalkCont 1
#DROPPING UNWANTED EQUIPS Razz
do uneq @inventory (Knife [3])
do uneq @inventory (Cotton Shirt)
do drop @inventory (Knife [3])
do drop @inventory (Cotton Shirt)
pause 3
#TALKING TO SHION
do talk @npc (53 114)
pause 3
do talk resp 0
pause 3
do talk @npc (53 114)
pause 3
do move 146 112
pause 3
do move 99 23
#TALKING TO RECIEPTIONIST
do talk @npc (100 29)
pause 3
do talk resp 0
pause 3
do move 99 99
pause 1
#TALKING TO BASIC INSTRUCTOR
do talk @npc (99 105)
pause 3
do talk resp 0
pause 10
do talk @npc (99 105)
pause 2
do talk resp 0
pause 2
#TALKING TO SKILL INSTRUCTOR
do talk @npc (83 111)
pause 2
do talk resp 0
pause 5
do talk resp 0
pause 3
do move 113 107
pause 5
release potion
}

automacro potion {
base == 4
call hehe
run-once 1
}

macro hehe {
pause 1
do move 114 107
pause 5
do conf autoTalkCont 0
pause 1
#TALKING TO ITEM INSTRUCTOR
do talk @npc (115 111)
do talk cont
do talk resp 0
do talk cont
do talk cont
pause 1
do is @inventory (Novice Potion)
pause 1
do talk cont
do talk cont
do talk cont
do talk cont
pause 1
do eq @inventory (Novice Slippers)
pause 1
do talk cont
do talk cont
do talk cont
do talk cont
do talk cont
do talk cont
do talk cont
do talk cont
do talk cont
do talk cont
do talk resp 0
do talk cont
do talk cont
pause 5
do conf autoTalkCont 1
#TALKING TO KAFRA INSTRUCTOR
do talk @npc (118 108)
pause 2
do talk resp 1
pause 1
do talk resp 0
pause 4
do talk resp 1
pause 5
do talk resp 4
#TELEPORTING TO FIELD coURSE
do talk @npc (118 108)
pause 2
do talk resp 0
pause 1
do talk resp 0
pause 3
#TALKING TO HELPER
do talk @npc (17 182)
pause 2
do talk resp 0
pause 10
do talk resp 3
pause 2
#TALKING TO ENTERANCE GUARD
do conf autoTalkCont 0
pause 1
do talk @npc (38 182)
pause 1
do talk cont
do talk cont
do talk cont
do talk cont
do talk resp 0
do talk cont
pause 2
do relog 1
pause 5
#RE-TALKING TO ENTERANCE GUARD TO GET BONUS LVL UP & NOVICE POTIONS
do talk @npc (38 182)
pause 1
do talk cont
do talk cont
do talk resp 0
do talk cont
pause 5
do eq @inventory (Tattered Novice Ninja Suit)
do eq @inventory (Somber Novice Hood)
do eq @inventory (Novice False Eggshell)
do eq @inventory (Novice Main-Gauche)
do eq @inventory (Novice Guard)
do conf useSelf_item_0 Meat,Apple,Banana,Sweet Potato,Carror,Red Potion,Novice Potion
do conf route_randomWalk 1
do conf attackAuto 2
do conf dcOnDeath 0
do conf attackAuto_inLockOnly 0
}

automacro fvkface {
job == 10
call convert
run-once 1
}

macro convert {
do conf attackAuto 0
do conf route_randomWalk 0
do conf autoTalkCont 0
pause 5
do move 99 22
pause 1
do talk @npc (91 22)
pause 2
do talk cont
do talk cont
pause 3
do conf autoTalkCont 1
pause 1
do move 100 25
do talk @npc (100 29)
pause 5
do talk resp 0
pause 2
do talk resp 0
do talk resp 0
do talk resp 0
do talk resp 0
pause 3
do talk resp 0
pause 1
do talk resp 0
pause 1
do talk resp 0
pause 1
do talk resp 0
pause 1
do talk resp 0
pause 1
do talk resp 0
pause 1
do talk resp 0
pause 1
do talk resp 0
pause 1
do talk resp 0
pause 1
do talk resp 0
pause 1
do talk resp 0
pause 1
do talk resp 0
pause 1
do talk resp 0
pause 1
do talk resp 0
pause 1
do talk resp 0
pause 1
do talk resp 0
pause 1
do talk resp 0
pause 1
do talk resp 0
pause 1
do talk resp 0 # 0 = swordy, 1 = other
pause 1
do talk resp * #i think it goes like 0 = mage, 1= merch, 2 = thief, 3 = archer, 4 = aco
pause 1}