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.

No comments: