Shattered Kingdoms
https://www.shatteredkingdoms.org/forums/

Default Prompt with Stance Information
https://www.shatteredkingdoms.org/forums/viewtopic.php?f=42&t=24262
Page 1 of 2

Author:  FinneyOwnzU [ Mon Oct 07, 2013 12:04 pm ]
Post subject:  Default Prompt with Stance Information

only posting in gd from now - thx and have a nice day

Author:  grep [ Mon Oct 07, 2013 5:05 pm ]
Post subject:  Re: Default Prompt with Stance Information

I would add a trigger to capture stance information from the status command output. Otherwise, this will only be accurate if you 'toggle' it?

For security, it may be good to add start-of-line and end-of-line characters to the trigger. It's usually just {^Your stance is now (*).$}, but it might be different in your client. Right now ">'lol. Your stance is now sexy." would screw you up.

Otherwise, nice functionality. It's good to see active development!

Author:  FinneyOwnzU [ Mon Oct 07, 2013 5:15 pm ]
Post subject:  Re: Default Prompt with Stance Information

only posting in gd from now - thx and have a nice day

Author:  grep [ Mon Oct 07, 2013 5:43 pm ]
Post subject:  Re: Default Prompt with Stance Information

Sorry, wrong terms. I meant adding a trigger for the line:

Quote:
o Attribute points: 13 Wimpy: 0 percent Mode: Kill/defensive o

Author:  FinneyOwnzU [ Mon Oct 07, 2013 6:05 pm ]
Post subject:  Re: Default Prompt with Stance Information

only posting in gd from now - thx and have a nice day

Author:  grep [ Mon Oct 07, 2013 6:23 pm ]
Post subject:  Re: Default Prompt with Stance Information

FinneyOwnzU wrote:
grep wrote:
Sorry, wrong terms. I meant adding a trigger for the line:

Quote:
o Attribute points: 13 Wimpy: 0 percent Mode: Kill/defensive o


Oh, right. Easy enough:

#TRIGGER {Mode: {Kill|Stun}~/(*)} {#VARIABLE stance %1}


grep wrote:
Otherwise, this will only be accurate if you 'toggle' it?


Until the variable can be populated (via score or stance input - with or without an argument), the stance on the prompt will be blank. It will look like this:

[HP:100%] [ME: 98%] [PE:100%] ()


Hmm.. does your language allow full regex?

Seems to me we'd get a big benefit out of something like:
#TRIGGER {^{o|O|0}.+Mode: {Kill|Stun}~/({defensive|neutral|aggressive}).+{o|O|0}$} {#VARIABLE stance %1}

or whatever. You get the point: making it so that players can't trigger the script with the say command.

Author:  FinneyOwnzU [ Mon Oct 07, 2013 6:44 pm ]
Post subject:  Re: Default Prompt with Stance Information

only posting in gd from now - thx and have a nice day

Author:  grep [ Mon Oct 07, 2013 10:29 pm ]
Post subject:  Re: Default Prompt with Stance Information

I might be mistaken, but I think the triggers use the basic \1 sort of parameter in regex which just requires parentheses. Something like s/.+({foo|bar}).+/\1/' would give you "foo" or "bar," more or less.

TIMTOWTDI and all, though. It's more of an academic thing at that point. You're right about the staff, they're good at being police in the game. I never would've thought of ANSI matching, believe it or not...


Doing an ANSI match on tells and such for god-speak would be very useful. That's something I'll have to remember!

Author:  FinneyOwnzU [ Mon Oct 07, 2013 11:37 pm ]
Post subject:  Re: Default Prompt with Stance Information

only posting in gd from now - thx and have a nice day

Author:  MsPooperTrooper [ Tue Oct 08, 2013 6:57 am ]
Post subject:  Re: Default Prompt with Stance Information

FinneyOwnzU wrote:
If you use a custom prompt, you will need to post the format and when I get time I will modify the trigger to work with it.


My prompt is pretty basic, the only addition I have to it is the time. This trigger is fantastic, thank you for working on it! If you do have time to spare for it, though, could you post how to add the time between PE and stance?

This is how my prompt appears:
[HP:100][ME:100][PE:100][9pm]

I'll be trying to figure it out myself, so if I do, I'll post it.

Page 1 of 2 All times are UTC - 8 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/