[HELP] Macro that changes config.txt lines

All about the macro plugin can be found in this forum. This forum is intended for the macro plugin only.

Moderator: Moderators

loginamex
Noob
Noob
Posts: 3
Joined: 02 Jan 2012, 11:29
Noob?: No

[HELP] Macro that changes config.txt lines

#1 Post by loginamex »

Hello,

Here's the macro I'm using (without specifying anything that doesn't matter funcionally).

Code: Select all

automacro Creating X Potion {
   sp > 10%
   status Blessing
   status Gloria
   location anywhere 100 100
   inventory "X Potion Ingredient 1" > 0
   inventory "X Potion Ingredient 2" > 0
   inventory "X Potion Ingredient 3" > 0
   inventory "X Potion Ingredient 4" > 0
   timeout 1.5
   run-once 1
   call {
          do ss 228 10
          do send xx xx xx xx xx xx xx xx xx xx
          pause 0.5
          release PotionPlanta
   }
}
The thing is, when "X Potion Ingredient 1" runs out, I want another macro to change the lines in config.txt that serve for getting the ingredients in storage when the inventory has none of them.

These are the original lines:

Code: Select all

getAuto X Potion Ingredient 1 {
	minAmount 0
	maxAmount Any Number
	passive 0
}

getAuto X Potion Ingredient 2 {
	minAmount 0
	maxAmount Any Number
	passive 0
}

getAuto X Potion Ingredient 3 {
	minAmount 0
	maxAmount Any Number
	passive 0
}

getAuto X Potion Ingredient 4 {
	minAmount 0
	maxAmount Any Number
	passive 0
}
My intention is to replace these above by these below:

Code: Select all

getAuto Y Potion Ingredient 1 {
	minAmount 0
	maxAmount Any Number
	passive 0
}

getAuto Y Potion Ingredient 2 {
	minAmount 0
	maxAmount Any Number
	passive 0
}

getAuto Y Potion Ingredient 3 {
	minAmount 0
	maxAmount Any Number
	passive 0
}
These are the only lines I got for the second macro:

Code: Select all

automacro I can't make "X Potions" anymore, now I'll make "Y Potions"! {
	storage "X Potion Ingredient 1" = 0
	inventory "X Potion Ingredient 1" = 0
        [...]
	
	}
}
Please, help me with this.
Thankyou in advance.
EternalHarvest
Developers
Developers
Posts: 1798
Joined: 05 Dec 2008, 05:42
Noob?: Yes

Re: [HELP] Macro that changes config.txt lines

#2 Post by EternalHarvest »

Use "conf" command with "label" and "disabled" block options.
loginamex
Noob
Noob
Posts: 3
Joined: 02 Jan 2012, 11:29
Noob?: No

Re: [HELP] Macro that changes config.txt lines

#3 Post by loginamex »

EternalHarvest wrote:Use "conf" command with "label" and "disabled" block options.
I did it and it's working now, thanks.