Mushroom plant macros. From (x,y) to (x1,y1).

Moderator: Moderators

Message
Author
Mortimal
Developers
Developers
Posts: 389
Joined: 01 Nov 2008, 15:31
Noob?: No

Mushroom plant macros. From (x,y) to (x1,y1).

#1 Post by Mortimal »

It is macro for plant a area from (x,y) to (x1,y1) with mushrooms.

Code: Select all

macro plant {
[
   do conf PlantX <Ñ… coords of begin>
   do conf PlantXd <the same as upper>
   do conf PlantY <у coords of begin>
   do conf PlantXf <Ñ… coords of end>
   do conf PlantYf <у coords of end>
   do conf PlantActivation 1
]
}
automacro Cast {
   eval $::config{PlantActivation} eq "1"
   run-once 1
   priority 2
   call CastSpell
}

automacro SkillFail {
console /Skill Cultivation failed/
eval $::config{PlantActivation} eq "1"
priority 1
call CastSpell
}

macro CastSpell {
      log ||||| @invamount(Mushroom Spore) Spores left! |||||
      if (@invamount(Mushroom Spore) > 0) goto next
         pause 2
         log ||||| Spores Ended :( |||||
         do conf PlantActivation 0
         goto end
:next
      $x = @eval($::config{PlantX})
      $y = @eval($::config{PlantY})
      $xf = @eval($::config{PlantXf})
      $yf = @eval($::config{PlantYf})
      if ($y > $yf) goto two
         do move @eval($x + 1) @eval($y + 1)
         do sl 491 $x $y 1
         pause 1
[
         if ($y > $yf) goto two
            if ($x >= $xf) goto one
               do conf PlantX @eval($x + 1)
               goto end
:one
            do conf PlantY @eval($y + 1)
            do conf PlantX @eval($::config{PlantXd})
            goto end
:two
         do conf PlantActivation 0
:end
]
      release Cast
}
Guide:
1)
In config.txt must be such lines:

Code: Select all

PlantX
PlantXd
PlantY
PlantXf
PlantYf
PlantActivation
2)
Fill macros plant with required information.

3)
Use console command macro plant to plant area with mushrooms. After you destroy them you can use command again.

From rofan.ru with love ^^
Please use pin function for uploading your file contents!

Xanta
Noob
Noob
Posts: 19
Joined: 06 Apr 2008, 10:59

Re: Mushroom plant macros. From (x,y) to (x1,y1).

#2 Post by Xanta »

hi on my server plants stack is there a way to just make it keep planting in 1 spot?

Post Reply