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
}
}

Pengisian Server d Server.txt

notepad server.txt dapat d temukan d :

Openkore 2.0.5.1
|
|- Tables

Ex :
setelah anda mengeluarkan sclientinfo ro kamu dan kamu buka maka akan kluar tampilan seperti berikut



setelah itu buka folder tables dan cari notepad dgn nama server.txt
maka akan kluar seperti berikut

## http://www.xilero.net/
[XiLeRO TE Private Server]
ip 72.29.77.223
port 6901
master_version 1
version 20
serverType 4
serverEncoding Western

untuk Ip anda dapat lihat d bagian "addres" pada sclientinfo
untuk port anda dapat lihat d bagian "port" pada sclientinfo
untuk version anda dapat lihat d bagian "version" d sclientinfo
untuk ServerType anda dapat lihat d bawah seperti berikut.

0 Normal server
1 oRO (Oceania) (obsolete)
2 pRO (Philippines)
3 eAthena SVN
4 Freya
5 eAthena servers using sakexe628
6 New oRO (Oceania) (obsolete)
7 Aegis 10.x with padded packets
8 kRO (Korea), before February 2007 (obsolete)
8_1 kRO (Korea), after February 2007
9 eAthena
10 vRO (Vietnam), before February 2007 (obsolete)
11 euRO (Europe) before December 20 2006 (obsolete)
12 pRO (Philippines) Thor, as of October 22 2006 (obsolete)
13 rRO (Russia) and vRO (Vietnam) As of February 2007
14 pRO (Philippines) Thor, as of December 1 2006 (obsolete)
15 pRO (Philippines) Thor, as of December 20 2006
16 euRO (Europe), as of December 20 2006
17 tRO (Thai) for 2007-05-22bRagexe (obsolete)
17_1 tRO (Thai) after October 19th, 2007
18 iRO (International), as of June 21 2007.
19 pRO (Philippines) Valkyrie , as of October 19th, 2007

untuk serverEncoding anda dapat lihat dari pilihan berikut

1. Western
2. Simplified Chinese
3. Korean
4. Russian
5. Japanese
6. Thai
Mungkin Untuk beberapa server perlu d tambahkan

charBlockSize 108