Battle Ground Macros

Moderator: Moderators

Message
Author
muszyka
Human
Human
Posts: 38
Joined: 05 Sep 2008, 08:45
Noob?: No
Location: Philippines

Battle Ground Macros

#1 Post by muszyka »

I post this macro here so other player form valkyrie (Philippines Server) will not buy their macro from other player...

Macros.txt

Code: Select all

# v1.0: Tierra Maps Only
       # Features: AI choice
       #       PK Behavior
       #       Random Map

       # Notes:
       # The error in SpawnPub automacro is normal.
       # This is to spam the chat room incase the room is full.

       # Save and setup your Bot in Aldebaran Town

        automacro Maroll {
           location aldebaran
           exclusive 1
           run-once 1
           call {
              do move 151 110
              do talknpc 146 109 c c r0 n
         release Maroll
           }
        }

        automacro GoHome {
           location not aldebaran
           location not bat_room
           location not bat_a01
           location not bat_a02
           exclusive 1
           run-once 1
           call {
          do move aldebaran
          release GoHome
           }
        }

        automacro BGroomEntry {
           location bat_room
           exclusive 1
      priority 1
           run-once 0
           call {
       
          $randomMap = @eval($::config{Battle_Random})

          if ($randomMap == 0) goto ContBGRoom
          if ($randomMap == 1) goto RandomMapTierra

          :RandomMapTierra
          
          $RandomMapChoice = @random ("tierra1","tierra2","tierra3","tierra4")

          do conf Battle_Map $RandomMapChoice
          goto ContBGRoom
          
           :ContBGRoom
           call CharPos
          }
        }

       automacro TalkNPC1 {
          location bat_room 132 175 135 169
          exclusive 1
          run-once 0
          call TalkBGnpc
          }

       automacro TalkNPC2 {
          location bat_room 148 175 151 170
          exclusive 1
          run-once 0
          call TalkBGnpc
          }

       automacro TalkNPC3 {
          location bat_room 132 131 135 125
          exclusive 1
          run-once 0
          call TalkBGnpc
          }

       automacro TalkNPC4 {
          location bat_room 148 132 151 125
          exclusive 1
          run-once 0
          call TalkBGnpc
          }

          automacro SpawnPubT1 {
             location bat_room 57 223
             exclusive 1
             run-once 0
             call EnterPub
          }

          automacro SpawnPubT2 {
             location bat_room 114 223
             exclusive 1
             run-once 0
             call EnterPub
          }

          automacro SpawnPubT3 {
             location bat_room 57 207
             exclusive 1
             run-once 0
             call EnterPub
          }

          automacro SpawnPubT4 {
             location bat_room 114 207
             exclusive 1
             run-once 0
             call EnterPub
          }

          automacro SpawnPubF1 {
             location bat_room 85 223
             exclusive 1
             run-once 0
             call EnterPub
          }

          automacro SpawnPubF2 {
             location bat_room 141 224
             exclusive 1
             run-once 0
             call EnterPub
          }

          automacro SpawnPubF3 {
             location bat_room 85 207
             exclusive 1
             run-once 0
             call EnterPub
          }

          automacro SpawnPubF4 {
             location bat_room 141 207
             exclusive 1
             run-once 0
             call EnterPub
          }

       automacro tierraEntry1 {
           location bat_a01
           exclusive 1
           run-once 0
      priority 1
           call TierraAI
           }

       automacro tierraEntry2 {
           location bat_a02
           exclusive 1
           run-once 0
      priority 1
           call TierraAI
           }

       automacro PKAtk {
          console /Player (.*) \((\d+)\) attacks You.*/i
     exclusive 1
          run-once 1
          call RespondPK
          }
       
       automacro PKSkill {
          console /Player (.*) \((\d+)\) uses (.*) on you.*/i
          exclusive 1
          run-once 1
          call RespondPK
          }

       automacro TierraExit1 {
          location bat_a01 50 374
          exclusive 1
          run-once 0
          call GetBadge
       }
       
       automacro TierraExit2 {
          location bat_a01 43 17
          exclusive 1
          run-once 0
          call GetBadge
       }

       automacro TierraExit3 {
          location bat_a02 50 374
          exclusive 1
          run-once 0
          call GetBadge
       }

       automacro TierraExit4 {
          location bat_a02 43 17
          exclusive 1
          run-once 0
          call GetBadge
       }

    macro CharPos {

       $Map = @eval($::config{Battle_Map})

       if ($Map == tierra1) goto Pos1
       if ($Map == tierra2) goto Pos2
       if ($Map == tierra3) goto Pos3
       if ($Map == tierra4) goto Pos4
       if ($Map == flavius1) goto Pos1
       if ($Map == flavius2) goto Pos2
       if ($Map == flavius3) goto Pos3
       if ($Map == flavius4) goto Pos4

          :Pos1
          $randomX1 = @random ("132","133")
          $randomY1 = @random ("171","172","173","174")
          do move $randomX1 $randomY1
          goto endCharPos

          :Pos2
          $randomX2 = @random ("148","149")
          $randomY2 = @random ("171","172","173","174")
          do move $randomX2 $randomY2
          goto endCharPos

          :Pos3
          $randomX3 = @random ("132","133")
          $randomY3 = @random ("125","126","127","128")
          do move $randomX3 $randomY3
          goto endCharPos

          :Pos4
          $randomX4 = @random ("148","149")
          $randomY4 = @random ("125","126","127","128")
          do move $randomX4 $randomY4
          goto endCharPos

          :endCharPos
          stop
       }

    macro TalkBGnpc {

       $Map = @eval($::config{Battle_Map})

       if ($Map == tierra1) goto NPC1
       if ($Map == tierra2) goto NPC2
       if ($Map == tierra3) goto NPC3
       if ($Map == tierra4) goto NPC4
       if ($Map == flavius1) goto NPC5
       if ($Map == flavius2) goto NPC6
       if ($Map == flavius3) goto NPC7
       if ($Map == flavius4) goto NPC8

          :NPC1
          do talknpc 124 178 c r0 n
          stop

          :NPC2
          do talknpc 140 178 c r0 n
          stop

          :NPC3
          do talknpc 125 121 c r0 n
          stop

          :NPC4
          do talknpc 140 121 c r0 n
          stop

          :NPC5
          do talknpc 133 178 c r0 n
          stop

          :NPC6
          do talknpc 148 178 c r0 n
          stop

          :NPC7
          do talknpc 133 121 c r0 n
          stop

          :NPC8
          do talknpc 148 121 c r0 n
          stop
       }

    macro TierraAI   {

       $AI = @eval($::config{Battle_AI})
       
       if ($AI == 0) goto AI1
       if ($AI == 1) goto AI2

       :AI1
       call IdleAI
       stop

       :AI2
       $Map = @eval($::config{Battle_Map})
       
          if ($Map == tierra1) goto AI11
          if ($Map == tierra2) goto AI11
          if ($Map == tierra3) goto AI22
          if ($Map == tierra4) goto AI22

          :AI11
          do move 162 49
          do a 0
          goto EndAI2

          :AI22
          do move 171 345
          do a 0
          goto EndAI2

          :EndAI2
          stop
          }

       macro IdleAI {

          $Map = @eval($::config{Battle_Map})
       
          if ($Map == tierra1) goto Pub1
          if ($Map == tierra2) goto Pub1
          if ($Map == tierra3) goto Pub2
          if ($Map == tierra4) goto Pub2

   :Pub1
   $PubX1 = @random ("351","352","353","354","355")
   $PubY1 = @random ("350","351")
        do move $PubX1 $PubY1
   goto EndPub

   :Pub2
   $PubX2 = @random ("352","353","354","355","356")
   $PubY2 = @random ("47","48")
        do move $PubX2 $PubY2
   goto EndPub

   :EndPub
        $randomPub = @random ("Be Right Back","Away From Keyboard","Eating","Taking a Bath","Sleeping")
        do chat create "$randomPub"
        stop
        }

       macro RespondPK {
       
       $PKPlayer = $.lastmatch2
       $PK = @eval($::config{Battle_PK})

          if ($PK == 0) goto PK1
          if ($PK == 1) goto PK2

          :PK1
          do e wah
          goto EndRespondPK

          :PK2
          do e gg
          do kill $PKPlayer
          goto EndRespondPK

             :EndRespondPK
             call TierraAI
             stop
             release PKAtk
             release PKSkill
             }

       macro EnterPub {
          do chat join 0
          pause 1
          stop
          }

       macro GetBadge {
          do talk 2
               stop
          }
Config.txt

Code: Select all

##### Battle Grounds Config #####

Battle_Map tierra1
Battle_AI 1
Battle_PK 0
Battle_Random 0

#################################
This will help you:

Code: Select all

NPC locations:
tierra1 | flavius1 | tierra2 | flavius2

tierra3 | flavius3 | tierra4 | flavius4

Battle_AI 
0 = Going AFK. Doing a random Pub with an excuse as a title , 
1 = Going to Attack. Tierra: Going to the enemy food and attack it.

Battle_PK 
0 = If someone attacks you or use a skill on you. will not respond and will continue what you're doin (Battle_AI), 
1 = If someone attacks you or use a skill on you. will respond by attacking the player with the weapon equipped.

Battle_Random 
0 = will use the map specified in Battle_Map over and over again, 
1 = will go to a random Map every round.
Note:spam error is normal

Credit goes to nooboter
Image

Never interrupt your enemy when he's making a mistake.
Always go on PVP. /gg

noobotter
Moderators
Moderators
Posts: 139
Joined: 31 Jul 2008, 22:12
Noob?: No
Contact:

Re: Battle Ground Macros

#2 Post by noobotter »

That macro had some bugs that is not yet fixed (Fixed already but it'll be included in the next update). Though I need some suggestions/new ideas for the AI in Flavius. Just post if there are any comments and suggestions. Thanks.

Edit: had some update.
check >>> http://darkmoon.ath.cx/viewtopic.php?f=25&t=1884
A storm is coming.

markiinhh
Noob
Noob
Posts: 1
Joined: 30 Jun 2009, 14:51
Noob?: No

Re: Battle Ground Macros

#3 Post by markiinhh »

please make a macro for FlaviusExit

muszyka
Human
Human
Posts: 38
Joined: 05 Sep 2008, 08:45
Noob?: No
Location: Philippines

Re: Battle Ground Macros

#4 Post by muszyka »

better to add post your comment here: http://darkmoon.ath.cx/viewtopic.php?f=25&t=1884
Image

Never interrupt your enemy when he's making a mistake.
Always go on PVP. /gg

voter_me
Human
Human
Posts: 22
Joined: 07 Jan 2009, 06:38
Noob?: Yes

Re: Battle Ground Macros

#5 Post by voter_me »

I hope there is an update for this macro for Flavius Map.

muszyka
Human
Human
Posts: 38
Joined: 05 Sep 2008, 08:45
Noob?: No
Location: Philippines

Re: Battle Ground Macros

#6 Post by muszyka »

Nooboter was working on KVM battle ground so I dont think that he can make an update.
Image

Never interrupt your enemy when he's making a mistake.
Always go on PVP. /gg

978972222
Human
Human
Posts: 22
Joined: 26 May 2008, 01:42
Noob?: No

Re: Battle Ground Macros

#7 Post by 978972222 »

Code: Select all

           #-----------------------------------------------------------------
           #----------- Battle Grounds Macro (v1.1) by noobotter ------------
           #-----------------------------------------------------------------
           
           # v1.1: Tierra Maps
           #
           # Features: AI choice
           #           Custom AFK *NEW*
           #           Random Map
           #           Battle PK *REMOVED*

           # Notes:
           # The error in SpawnPub automacro is normal.
           # This is to spam the chat room incase the room is full.

           # Save and setup your Bot in Aldebaran Town

    macro CustomIdleAI {

       # Modify the following to personalize your custom AFK AI.

       $useCustomIdleAI = No
       $customX = x
       $customY = y
       $customPub = @random ("Custom1","Custom2","Custom3","Custom4","Custom5")

    ##################################################################################

       if ($useCustomIdleAI == Yes) goto CustomTrigger
       if ($useCustomIdleAI == No) goto DefaultTrigger

       :CustomTrigger
       do move $customX $customY
       do chat create "$customPub"
       stop

       :DefaultTrigger
       call DefaultIdleAI
       stop
       }

            automacro Maroll {
               location aldebaran
               exclusive 1
               run-once 1
               call {
                  do move 151 110
                  do talknpc 146 109 c c r0 n
             release Maroll
               }
            }

            automacro GoHome {
               location not aldebaran
               location not bat_room
               location not bat_a01
               location not bat_a02
          location not bat_b01
          location not bat_b02
               exclusive 1
               run-once 1
               call {
              do move aldebaran
              release GoHome
               }
            }

            automacro BGroomEntry {
               location bat_room
               exclusive 1
          priority 1
               run-once 0
               call {
           
              $randomMap = @eval($::config{Battle_Random})

              if ($randomMap == 0) goto ContBGRoom
              if ($randomMap == 1) goto RandomMapTierra
              if ($randomMap == F) goto RandomMapFlavius

              :RandomMapTierra
              $RandomMapChoice = @random ("tierra1","tierra2","tierra3","tierra4")

              do conf Battle_Map $RandomMapChoice
              goto ContBGRoom
             
         :RandomMapFlavius
              $RandomMapChoice = @random ("flavius1","flavius2","flavius3","flavius4")

              do conf Battle_Map $RandomMapChoice
              goto ContBGRoom

               :ContBGRoom
               call CharPos
              }
            }

           automacro TalkNPC1 {
              location bat_room 124 175 135 168
              exclusive 1
              run-once 0
              call TalkBGnpc
              }

           automacro TalkNPC2 {
              location bat_room 140 175 151 167
              exclusive 1
              run-once 0
              call TalkBGnpc
              }

           automacro TalkNPC3 {
              location bat_room 124 131 135 124
              exclusive 1
              run-once 0
              call TalkBGnpc
              }

           automacro TalkNPC4 {
              location bat_room 148 132 151 125
              exclusive 1
              run-once 0
              call TalkBGnpc
              }

              automacro SpawnPubT1 {
                 location bat_room 57 223
                 exclusive 1
                 run-once 0
                 call EnterPub
              }

              automacro SpawnPubT2 {
                 location bat_room 114 223
                 exclusive 1
                 run-once 0
                 call EnterPub
              }

              automacro SpawnPubT3 {
                 location bat_room 57 207
                 exclusive 1
                 run-once 0
                 call EnterPub
              }

              automacro SpawnPubT4 {
                 location bat_room 114 207
                 exclusive 1
                 run-once 0
                 call EnterPub
              }

              automacro SpawnPubF1 {
                 location bat_room 85 223
                 exclusive 1
                 run-once 0
                 call EnterPub
              }

              automacro SpawnPubF2 {
                 location bat_room 141 224
                 exclusive 1
                 run-once 0
                 call EnterPub
              }

              automacro SpawnPubF3 {
                 location bat_room 85 207
                 exclusive 1
                 run-once 0
                 call EnterPub
              }

              automacro SpawnPubF4 {
                 location bat_room 141 207
                 exclusive 1
                 run-once 0
                 call EnterPub
              }

           automacro tierraEntry1 {
               location bat_a01
               exclusive 1
               run-once 0
          priority 1
               call TierraAI
               }

           automacro tierraEntry2 {
               location bat_a02
               exclusive 1
               run-once 0
          priority 1
               call TierraAI
               }

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

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

           automacro tierraAtkStone3 {
               location bat_a02 170 349 175 343
               exclusive 1
               run-once 0
               call {
          do a 0
          stop
          }
               }

           automacro tierraAtkStone4 {
               location bat_a02 161 55 166 44
               exclusive 1
               run-once 0
               call {
          do a 0
          stop
          }
               }

           automacro TierraExit1 {
              location bat_a01 50 374
              exclusive 1
              run-once 0
              call GetBadge
           }
           
           automacro TierraExit2 {
              location bat_a01 43 17
              exclusive 1
              run-once 0
              call GetBadge
           }

           automacro TierraExit3 {
              location bat_a02 50 374
              exclusive 1
              run-once 0
              call GetBadge
           }

           automacro TierraExit4 {
              location bat_a02 43 17
              exclusive 1
              run-once 0
              call GetBadge
           }
    #noobotter@yahoo.com
        macro CharPos {

           $Map = @eval($::config{Battle_Map})

           if ($Map == tierra1) goto Pos1
           if ($Map == tierra2) goto Pos2
           if ($Map == tierra3) goto Pos3
           if ($Map == tierra4) goto Pos4
           if ($Map == flavius1) goto Pos1
           if ($Map == flavius2) goto Pos2
           if ($Map == flavius3) goto Pos3
           if ($Map == flavius4) goto Pos4

              :Pos1
              $randomX1 = @random ("124","125","132","133")
              $randomY1 = @random ("171","172","173","174")
              do move $randomX1 $randomY1
              goto endCharPos

              :Pos2
              $randomX2 = @random ("140","141","148","149")
              $randomY2 = @random ("171","172","173","174")
              do move $randomX2 $randomY2
              goto endCharPos

              :Pos3
              $randomX3 = @random ("124","125","132","133")
              $randomY3 = @random ("125","126","127","128")
              do move $randomX3 $randomY3
              goto endCharPos

              :Pos4
              $randomX4 = @random ("140","141","148","149")
              $randomY4 = @random ("125","126","127","128")
              do move $randomX4 $randomY4
              goto endCharPos

              :endCharPos
              stop
           }

        macro TalkBGnpc {

           $Map = @eval($::config{Battle_Map})

           if ($Map == tierra1) goto NPC1
           if ($Map == tierra2) goto NPC2
           if ($Map == tierra3) goto NPC3
           if ($Map == tierra4) goto NPC4
           if ($Map == flavius1) goto NPC5
           if ($Map == flavius2) goto NPC6
           if ($Map == flavius3) goto NPC7
           if ($Map == flavius4) goto NPC8

              :NPC1
              do talknpc 124 178 c r0 n
              stop

              :NPC2
              do talknpc 140 178 c r0 n
              stop

              :NPC3
              do talknpc 125 121 c r0 n
              stop

              :NPC4
              do talknpc 140 121 c r0 n
              stop

              :NPC5
              do talknpc 133 178 c r0 n
              stop

              :NPC6
              do talknpc 148 178 c r0 n
              stop

              :NPC7
              do talknpc 133 121 c r0 n
              stop

              :NPC8
              do talknpc 148 121 c r0 n
              stop
           }

        macro TierraAI   {

           $AI = @eval($::config{Battle_AI})
           
           if ($AI == 0) goto AI1
           if ($AI == 1) goto AI2

           :AI1
           call CustomIdleAI
           stop

           :AI2
           $Map = @eval($::config{Battle_Map})
           
              if ($Map == tierra1) goto AI11
              if ($Map == tierra2) goto AI11
              if ($Map == tierra3) goto AI22
              if ($Map == tierra4) goto AI22

              :AI11
              do move 162 49
              goto EndAI2

              :AI22
              do move 171 345
              goto EndAI2

              :EndAI2
              stop
              }

           macro DefaultIdleAI {

              $Map = @eval($::config{Battle_Map})
           
              if ($Map == tierra1) goto Pub1
              if ($Map == tierra2) goto Pub1
              if ($Map == tierra3) goto Pub2
              if ($Map == tierra4) goto Pub2

       :Pub1
       $PubX1 = @random ("351","352","353","354","355")
       $PubY1 = @random ("350","351")
            do move $PubX1 $PubY1
       goto EndPub

       :Pub2
       $PubX2 = @random ("352","353","354","355","356")
       $PubY2 = @random ("47","48")
            do move $PubX2 $PubY2
       goto EndPub

       :EndPub
            $randomPub = @random ("Be Right Back","Away From Keyboard","Eating","Taking a

    Bath","Sleeping")
            do chat create "$randomPub"
            stop
            }
    #noobotter@yahoo.com
           macro EnterPub {
              do chat join 0
              pause 1
              stop
              }

           macro GetBadge {
              do talk 2
                   stop
              }
Source http://darkmoon.ath.cx/viewtopic.php?f=25&t=1884

This is V1.1

Original code support Flavius map.

To Prontera Server Malaysia Ragnarok

u need Change at bottom of code

Code: Select all

           macro GetBadge {
              do talk 2
              pause 10
                   stop
              }
This fix code will not make your bot disconnect after attack Food Deploy

I can see many of them rather not atk Food Deploy and to wait room timeout which is 20 minute, and make other wait too long :evil:

Regard WizardSusuk :geek:

pjlad24
Noob
Noob
Posts: 2
Joined: 21 Feb 2010, 20:58
Noob?: No

Re: Battle Ground Macros

#8 Post by pjlad24 »

both macro codes arent working for me anymore

I got this error message:
This plugin cannot be loaded because of a problem in the plugin. Please notify the plugin's author about this problem, or remove the plugin so that OpenKore can start.

The error message is:
Plugin contains syntax errors:
syntax error at E:/Documents and Settings/pj/Desktop/home/openkore/svnsnapshots/openkore_ready/plugins/macro.pl line 14, near "exclusive 1"

I'm using the latest openkore from this site:http://openkore.collectskin.com/

pjlad24
Noob
Noob
Posts: 2
Joined: 21 Feb 2010, 20:58
Noob?: No

Re: Battle Ground Macros

#9 Post by pjlad24 »

i fixed the syntax error problem now this is the error message I get

The error message is:
Cannot load control file macros.txt

muszyka
Human
Human
Posts: 38
Joined: 05 Sep 2008, 08:45
Noob?: No
Location: Philippines

Re: Battle Ground Macros

#10 Post by muszyka »

do you already have plugins folder in you bot? and you don't have macros.txt on your config folder.
Image

Never interrupt your enemy when he's making a mistake.
Always go on PVP. /gg

Post Reply