Correcting for new monk prompt

by Zalandrus

Back to Mechanic's Corner.

Zalandrus2008-10-13 21:58:00
I hear Ethelon's gone "meditating", which means that little old code-illiterate me is stuck with a system that doesn't recognize the new prompt. (Yes, I'm on his paid system). Even if I got wrong information and he's actually still around, it'd be nice to be able to do stuff before the next version comes out.

Does anybody know if there's a quick fix to the system so that everything works? (I actually haven't tried anything yet, but I'm assuming it won't work). Can I stick a wildcard into the trigger that recognizes the prompt to make everything bypass that? (How would I even do that?) Would it also be feasible to stick in momentum information into the system's prompt?
Unknown2008-10-13 22:17:31
Find the trigger named "prompt_catch" and change the pattern from
CODE
^(\\d+)h\\, (\\d+)m\\, (\\d+)e\\, (\\d+)p\\, (\\d+)en\\, (\\d+)w (.*?)\\<?\\>?\\-

to
CODE
^(\\d+)h\\, (\\d+)m\\, (\\d+)e\\, (\\d+)p\\, (\\d+)en\\, (\\d+)w(?:\\, \\d+mo)? (.*?)\\<?\\>?\\-

and that should take care of it for you.
Shaddus2008-10-13 22:23:27
QUOTE(Zarquan @ Oct 13 2008, 05:17 PM) 570553
Find the trigger named "prompt_catch" and change the pattern from
CODE
^(\\d+)h\\, (\\d+)m\\, (\\d+)e\\, (\\d+)p\\, (\\d+)en\\, (\\d+)w (.*?)\\<?\\>?\\-

to
CODE
^(\\d+)h\\, (\\d+)m\\, (\\d+)e\\, (\\d+)p\\, (\\d+)en\\, (\\d+)w(?:\\, \\d+mo)? (.*?)\\<?\\>?\\-

and that should take care of it for you.

Erm, yeah. I tried that, and it just made mine disapear.
Unknown2008-10-13 22:28:44
Ethelon's system apparently gags the prompt. I don't actually use it, so I don't know where it re-displays it or whatever...
Shaddus2008-10-13 23:49:05
QUOTE(Zarquan @ Oct 13 2008, 05:28 PM) 570556
Ethelon's system apparently gags the prompt. I don't actually use it, so I don't know where it re-displays it or whatever...

Ours is

^(\\d+)h\\, (\\d+)m\\, (\\d+)e\\, (\\d+)p\\, (\\d+)en\\, (\\d+)w (.*?)\\?\\-

and the thing under it is
'********** Prompt Instr **********
if instr("%7", "p") then
world.setvariable "script_prone", "1"
world.setvariable "prompt_safe", "Proned!"
else
world.setvariable "script_prone", "0"
world.setvariable "temp_meditate", "0"
world.setvariable "temp_stand", "0"
world.setvariable "prompt_safe", "Safe"
setvariable "aff_fallen", "0"
end if
if instr("%7", "e") then
world.setvariable "script_check_eq", "1"
world.setvariable "need_eq", "0"
world.setvariable "temp_eq", "0"
else
world.setvariable "script_check_eq", "0"
world.setvariable "temp_auto_eq", "0"
end if
if instr("%7", "l") then
world.setvariable "script_check_larm", "1"
else
world.setvariable "script_check_larm", "0"
world.setvariable "temp_auto_larm", "0"
end if
if instr("%7", "r") then
world.setvariable "script_check_rarm", "1"
else
world.setvariable "script_check_rarm", "0"
world.setvariable "temp_auto_rarm", "0"
end if
if instr("%7", "k") then
world.setvariable "script_check_kafe", "1"
setvariable "need_kafe", "0"
else
world.setvariable "script_check_kafe", "0"
setvariable "need_kafe", "1"
end if
if instr("%7", "x") then
world.setvariable "script_check_bal", "1"
else
world.setvariable "script_check_bal", "0"
world.setvariable "temp_auto_bal", "0"
end if
if instr("%7", "s") then
world.setvariable "script_check_sub", "1"
else
world.setvariable "script_check_sub", "0"
end if
if instr("%7", "S") then
world.setvariable "script_check_sup", "1"
else
world.setvariable "script_check_sup", "0"
end if
if instr("%7", "i") then
world.setvariable "script_check_id", "1"
else
world.setvariable "script_check_id", "0"
end if
if instr("%7", "b") then
world.setvariable "script_check_blind", "1"
else
world.setvariable "script_check_blind", "0"
end if
if instr("%7", "d") then
world.setvariable "script_check_deaf", "1"
else
world.setvariable "script_check_deaf", "0"
end if
setvariable "script_power", "%4"
setvariable "prompt_letter", "%7"

'********** Stat Catch **********
setvariable "script_health", "%1"
setvariable "script_mana", "%2"
setvariable "script_ego", "%3"
setvariable "script_endurance", "%5"
setvariable "script_willpower", "%6"

'********** Calls **********
call precheckscript (a, b, c)
If getvariable("temp_rewield") = "both" OR getvariable("temp_rewield") = "rarm" OR getvariable("temp_rewield") = "larm" Then
call rewield (a, b, c)
end if
If getvariable("temp_gomove") = 1 Then
Call automove (a, b, c)
else
enabletrigger "gomove_door", "0"
end if
If getvariable("temp_moveit") = 1 Then
Call moveit (a, b, c)
end if

enabletrigger "wieldit_alert", "1"

enabletrigger "blackout_aff", "1"
enabletrigger "exit_start", "1"
enabletrigger "script_survey", "0"
enabletrigger "lootit_gold", "0"
enabletrigger "lootit_essence", "0"
enabletrigger "lootit_drop", "0"
enabletrigger "lootit_dropped", "0"
setvariable "temp_curingsap", "0"
enabletrigger "diag_others_script2", "0"
enabletrigger "diag_others_script1", "0"
Shaddus2008-10-13 23:50:04
Any of that help?
Zalandrus2008-10-14 03:37:07
QUOTE
Ethelon's system apparently gags the prompt. I don't actually use it, so I don't know where it re-displays it or whatever...
Yes, it gags the Lusternia prompt and puts in one of its own.

QUOTE
Shaddus quoting code


Oh lordy...

So everything under "Prompt Instr" looks like it's just catching the letters at the end and setting stuff correctly (aka stuff we probably shouldn't change)
Under "Stat Catch" there are wildcards (I think) referenced. What are the wildcards in MUSH? The (\\d+)?
"Calls" is more unintelligible to me.

So...if we just stick in a wildcard where momentum is now, that should allow all the letter-catching stuff at the end to work, right? And then we'd just have to find the trigger or whatever that displays the new system prompt, and edit it so that it also displays momentum...?

Bring back, oh bring back, bring back my ethy to me, to me...
Unknown2008-10-14 08:41:16
QUOTE(Shaddus Mes @ Oct 13 2008, 07:50 PM) 570578
Any of that help?


Nope. I have all of that already. I'm a paying customer. I just don't actually use the system.
Valestrix2008-10-15 19:59:14
For all those using Eth's system, apparently all you need to do is delete the space between (\\d+)w and (.*?)\\?\\- near the end. I didn't figure this out myself though, Yukio told me it. So thanks to him.

In any case, it works for me, and is a pretty easy fix.
Unknown2008-10-15 20:07:56
It's pretty easy, but it's technically not the best way to do it. That last wildcard is capturing your prompt flags for equilibrium, balance, etc. You've just tossed your momentum into that capture (which should have no real side effects because none of those characters should be used in checking the flags).

And, if that works, then my suggestion should work, too! dry.gif
Valestrix2008-10-15 20:33:07
No idea, I never tried yours. So I'm not sure why it didn't work for Shaddus, maybe I'll try your suggestion in a bit to see if it works for me. I'm kind of curious.
Shaddus2008-10-15 22:09:09
QUOTE(Valestrix @ Oct 15 2008, 02:59 PM) 571259
For all those using Eth's system, apparently all you need to do is delete the space between (\\d+)w and (.*?)\\?\\- near the end. I didn't figure this out myself though, Yukio told me it. So thanks to him.

In any case, it works for me, and is a pretty easy fix.

I love you.

I mean... erm... guildfavour?
tongue.gif
Shaddus2008-10-15 22:19:30
By the way, it worked beautifully.