BattleGround Philippines Revision-09 By Me

This is my Final for now, BattleGround Tierra of Ragnarok Online Philippines
 
 
###########################################
# Created By: Daison For Renewal BG Rev:09#
###########################################


automacro ImInGeffen {
 location geffen
 timeout 10
call {
 do move geffen 110 65
 pause 3
 do talknpc 109 66 c c r0 n
}
}

automacro ImInPayon {
 location payon
 timeout 10
call {
 do move payon 186 102
 pause 3
 do talknpc 189 105 c c r0 n
}
}


automacro BattleRoom {
 location bat_room 150 153 154 149
 location not bat_room 118 181 121 173
 location not bat_room 118 128 121 118
 location not bat_room 57 223
 location not bat_room 57 207
 timeout 300
call {
 do conf route_randomWalk 0
 do conf bg_Location @random("1","2")
 do stand
 do chat leave
 do conf route_randomWalk 0
 $bgLoc = @eval($::config{bg_Location})
 if ($bgLoc == 1) goto Guillaume
 if ($bgLoc == 2) goto Croix

:Guillaume
 $xG = @random("118","119","120","121")
 $yG = @random("173","174","175","176","177","178","179","180","181")
 do move $xG $yG
 stop

:Croix
 $xC = @random("118","119","120","121")
 $yC = @random("118","119","120","121","122","123","124","125","126","127","128")
 do move $xC $yC
 stop
}
}

automacro AutoPub {
 location bat_room
 areaSpell Warp Portal, Warp Portal Opening
 timeout 10
call {
 do chat create @eval($::config{bg_Chat}) 2 0 @eval($::config{bg_pass})
}
}

automacro TalkToGuillNPC {
 location bat_room 118 181 121 173
 timeout 5
call {
 do talknpc 124 178 c r0 n
}
}


automacro TalkToCroixNPC {
 location bat_room 118 128 121 118
 timeout 5
call {
 do talknpc 125 121 c r0 n
}
}

#############################
############################
#Starting TO Join Chat Rooms
############################
#############################

automacro ChatTalkRoomNPCG {
 location bat_room 57 223
 timeout 3
 call JoinChat
}

automacro ChatTalkRoomNPCC {
 location bat_room 57 207
 timeout 3
 call JoinChat
}


###############
##############
#Badge COllect
##############
###############

automacro BadgeCollectG {
 location bat_a01 50 374
 exclusive 1
 run-once 0
 timeout 5
 call GetBadges
}

automacro BadgeCollectC {
 location bat_a01 43 17
 exclusive 1
 run-once 0
 timeout 5
 call GetBadges
}

#########
########
#CLASSES
########
#########

automacro HPMedicG {
 location bat_a01 342 352 362 332
 console /\[dist=(.*)\] (.*) \((\d+)\): \*Flag (1|2|3)\*$/i
 class Priest
 class High Priest
 class Monk
 class Champion
 class Sura
 class Arch Bishop
 timeout 5
 call AgiBuff
}

automacro HPMedicC {
 location bat_a01 350 60 360 50
 console /\[dist=(.*)\] (.*) \((\d+)\): \*Flag (1|2|3)\*$/i
 class Priest
 class High Priest
 class Monk
 class Champion
 class Sura
 class Arch Bishop
 timeout 5
 call AgiBuff
}

automacro MountedPlayers {
 location bat_a01
 status not Increase AGI
 class Royal Guard
 class Rune Knight
 class Ranger
 class Knight
 class Lord Knight
 class Paladin
 class Crusader
 timeout 30
call {
 do e flg3
}
}

automacro GeneticFastWalkG {
 location bat_a01 342 352 362 332
 class Genetic
 sp > 5%
 status not Cart Boost
 timeout 5
 call CartBoost
}

automacro GeneticFastWalkC {
 location bat_a01 350 60 360 50
 class Genetic
 sp > 5%
 status not Cart Boost
 timeout 5
 call CartBoost
}

automacro GXCloakExceedG {
 location bat_a01 342 352 362 332
 class Glt. Cross
 sp > 10%
 status not Cloaking Exceed
 timeout 20
 call GXCloacking
}

automacro GXCloakExceedC {
 location bat_a01 350 60 360 50
 class Glt. Cross
 sp > 10%
 status not Cloaking Exceed
 timeout 20
 call GXCloacking
}

automacro SCDefenderG {
 location bat_a01 342 352 362 332
 class Shadow Chaser
call {
 $y = 161 48","161 49","161 50","162 48","162 49","162 50","163 48","163 49","163 50"
 while ($y != $.loc) as loop
  do move 162 49
  pause 5
 end loop
 $i = 0
 while ($i < 50) as loop
  do sl 2299 161 49 10
  $i = $i + 1
 end loop
}
}

automacro SCDefenderC {
 location bat_a01 350 60 360 50
 class Shadow Chaser
call {
 $y = 170 344","170 345","170 346","171 344","171 345","171 346","172 344","172 345","172 346"
 while ($y != $.loc) as loop
  do move 171 345
  pause 5
 end loop
 $i = 0
 while ($i < 50) as loop
  do sl 2299 169 345 10
  $i = $i + 1
 end loop
}
}

#################
################
#Starting Battle
################
#################

automacro AntiBarricadeG {
 location bat_a01 342 352 362 332
 timeout 5
 call MiddleMapOfBG
}

automacro AntiBarricadeC {
 location bat_a01 350 60 360 50
 timeout 5
 call MiddleMapOfBG
}


automacro GoStone {
 location bat_a01 271 205 275 201
 timeout 10
 priority 1
call {
 $K = "Knight"
 $GC = "Glt. Cross"
 $LK = "Lord Knight"
 $P = "Paladin"
 $RK = "Rune Knight"
 $RG = "Royal Guard"
 $R = "Ranger"
 $G = "Genetic"
 
 if (@eval(checkClasss($K)) == 0) goto GC
:GC
 if (@eval(checkClasss($GC)) == 0) goto LK
:LK
 if (@eval(checkClasss($LK)) == 0) goto P
:P
 if (@eval(checkClasss($P)) == 0) goto RK
:RK
 if (@eval(checkClasss($RK)) == 0) goto RG
:RG
 if (@eval(checkClasss($RG)) == 0) goto R
:R
 if (@eval(checkClasss($R)) == 0) goto G
:G
 if (@eval(checkClasss($R)) == 0) goto OneFinal
:OneFinal
 if (@eval(checkClasss($K)) == 1) goto NotatkFlag
 if (@eval(checkClasss($GC)) == 1) goto NotatkFlag
 if (@eval(checkClasss($LK)) == 1) goto NotatkFlag
 if (@eval(checkClasss($P)) == 1) goto NotatkFlag
 if (@eval(checkClasss($RK)) == 1) goto NotatkFlag
 if (@eval(checkClasss($RG)) == 1) goto NotatkFlag
 if (@eval(checkClasss($R)) == 1) goto NotatkFlag
:atkFlag
 do a 0
 stop
:NotatkFlag
 if ($bgLoc == 1) goto Guillaume
 if ($bgLoc == 2) goto Croix

 :Guillaume
  do move 162 49
  stop
 :Croix
  do move 171 345
  stop
 stop

}
}
 

automacro tierraAtkStone1 {
 location bat_a01 170 349 175 343
 exclusive 1
 run-once 0
 call AttackStone
}

automacro tierraAtkStone2 {
 location bat_a01 161 55 166 44
 exclusive 1
 run-once 0
 call AttackStone
}













########
#######
#MACROS
#######
########

macro CartBoost {
 do ss 2478 5
}

macro GXCloacking {
 do ss 2033 5
}

macro AttackStone {
 do a 0
 stop
}

sub checkClasss {
 return 0 unless defined $char->{jobID};
 my $class = $_[0];
 if ($class =~ /^\s*\$/) {
  my ($var) = $class =~ /^\$([a-zA-Z][a-zA-Z\d]*)\s*$/;
  return 0 unless defined $var;
  if (exists $varStack{$var}) {$class = $varStack{$var}}
  else {return 0}
 }
 return lc($class) eq lc($::jobs_lut{$char->{jobID}})?1:0
}

macro MiddleMapOfBG {
 do move 273 203
 stop
}

macro GetBadges {
 do talk 2
 stop
}

macro AgiBuff {
 do sp 29 @player($.lastMatch2) 10
}

macro JoinChat {
 do chat join 0
 pause 1
 do chat join 0
}

1 comments:

  1. is this working still after the dewata patch?..:D

    ReplyDelete