Hello, I started writing my first macro's. I just have a question about a specific thing.
When the macro is triggered I would like to have the macro to save the $.map and $.pos my char is on.
Then my character spawns to a city, from that point the macro needs to use the map and position we saved earlier to teleport back to the first location again.
[Macro-Plugin] Save $.map and $.pos ?
Moderators: Moderators, Documentation Writers
-
- The Kore Devil
- Posts: 672
- Joined: 22 Feb 2013, 03:40
- Noob?: No
- Location: The Netherlands
-
- The Way Of Human
- Posts: 192
- Joined: 16 Aug 2009, 03:47
- Noob?: Yes
- Location: Gonryun
Re: Macro help
can you elaborate more, and post a pseudo code of your desired macro.
Just like old times.
-
- The Kore Devil
- Posts: 672
- Joined: 22 Feb 2013, 03:40
- Noob?: No
- Location: The Netherlands
Re: Macro help
Code: Select all
automacro rewarp {
hp < 8%
hp > 4%
status not Dead
location not amatsu
call {
my $.map
my $.pos
do c @warp amatsu
do c @warp $.map $.pos
}
}
-
- The Kore Devil
- Posts: 672
- Joined: 22 Feb 2013, 03:40
- Noob?: No
- Location: The Netherlands
Re: Macro help
With the awesome help of the user twist3d it now works!
He advised me to make a config variable in the config.txt.
You can store a value in this variable by assigning it with do conf and use it by calling him with the command @config(configname).
He advised me to make a config variable in the config.txt.
You can store a value in this variable by assigning it with do conf and use it by calling him with the command @config(configname).
Code: Select all
automacro rewarp {
hp < 8%
hp > 4%
status not Dead
location not amatsu
run-once 1
call {
do conf mymap $.map
do conf mypos $.pos
pause 1
do c @warp amatsu
pause 14
do c @warp @config(mymap) @config(mypos)
pause 1
release rewarp
}
}