Hey, does anyone know if it's possible to make a "fail-safe" macro in PosChengband, so that if an action fails, the macro won't finish?
Situation: I'm playing a possessor with a caster form who has the Eat Magic ability. The ability has 11% chance to fail. I'm trying to make a macro that automatically drains one of my more or less useless rods.
'\eUc' is the first part. And if I want to play it safe, I can macro that and then press '1' (rod inscribed with @U1) manually if the ability doesn't fail. However, to reduce keypresses, it'd be really cool to have a macro that does '\eUc1' automatically, but this one will move my character 11% of the time, when the Eat Magic ability fails.
I hope that makes some sense! Thanks
Edit: I found out a solution. This always happens, when you go ahead and post a question, the answer just comes to you 5 minutes later. I'm using "@Uj" inscription as 'j' is the command to "spike" something and apparently doesn't use a turn if used on nothing so it's pretty failsafe. And if you're pressing the key multiple times, the \e clears the menu that asks which direction to spike. So the macro is '\eUcj' and inscription on rod is for example '@zd@Uj'
Situation: I'm playing a possessor with a caster form who has the Eat Magic ability. The ability has 11% chance to fail. I'm trying to make a macro that automatically drains one of my more or less useless rods.
'\eUc' is the first part. And if I want to play it safe, I can macro that and then press '1' (rod inscribed with @U1) manually if the ability doesn't fail. However, to reduce keypresses, it'd be really cool to have a macro that does '\eUc1' automatically, but this one will move my character 11% of the time, when the Eat Magic ability fails.
I hope that makes some sense! Thanks
Edit: I found out a solution. This always happens, when you go ahead and post a question, the answer just comes to you 5 minutes later. I'm using "@Uj" inscription as 'j' is the command to "spike" something and apparently doesn't use a turn if used on nothing so it's pretty failsafe. And if you're pressing the key multiple times, the \e clears the menu that asks which direction to spike. So the macro is '\eUcj' and inscription on rod is for example '@zd@Uj'
Comment