Go Back   Angband Forums > Angband > Variants

Thread Tools Display Modes
Old January 12, 2015, 07:21   #1
Join Date: Jan 2014
Posts: 13
Sose is on a distinguished road
PosChengband macro question

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'

Last edited by Sose; January 12, 2015 at 07:29.
Sose is offline   Reply With Quote
Old January 12, 2015, 13:12   #2
PosChengband Maintainer
Join Date: Jan 2008
Posts: 702
chris is on a distinguished road
Also, make sure the flush_failure option is turned on (=5). If the macro includes a spell or whatever that fails, the rest of the macro sequence should then be flushed from the queue.

As you mention, starting macros with \e is good practice too as this flushes the message queue -more- prompts before starting the real macro sequence.
chris is offline   Reply With Quote

poschengband macro

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro help Raggy Vanilla 11 June 19, 2011 08:05
macro issue Gockel Vanilla 1 May 3, 2011 23:23
Quick macro question Zikke Vanilla 16 June 23, 2010 17:53
Macro problem Zero Vanilla 2 June 20, 2008 15:52
Macro question g. rodrigues Vanilla 1 March 5, 2008 12:23

All times are GMT +1. The time now is 18:05.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.