Shattered Kingdoms

Where Roleplay and Tactics Collide
VOTE NOW!
It is currently Thu Mar 28, 2024 10:48 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 84 posts ]  Go to page Previous  1 ... 5, 6, 7, 8, 9  Next
Author Message
 Post subject: Re: Prompts
PostPosted: Sun Nov 11, 2012 9:25 am 
Offline
Mortal

Joined: Tue Nov 06, 2012 1:41 pm
Posts: 136
Dragonite, your plugin gives this error for me:

Code:
Line   32: Error "Failed: missing ) at offset 203" processing regular expression "^\*\s?\d+\%\*\s?\d+\%\*\s?\d+\%\*\s?\d+(am|pm)\*\#((?P<obs>\d+) obsidian(\, ?)?((?P<plat>\d+) platinum(\, )?)?((?P<gold>\d+) gold(\, )?)?((?P<silv>\d+) silver(\, )?)?((?P<copp>\d+) copper(\, )?)?(zero)?$" (trigger not loaded)


Any chance you can track down the problem and fix it? The previous one (two-line prompt) works for me.


Top
 Profile  
Reply with quote  
 Post subject: Re: Prompts
PostPosted: Sun Nov 11, 2012 9:39 am 
Offline
Mortal

Joined: Wed Sep 24, 2008 12:21 pm
Posts: 4452
...The problem is right there.


Top
 Profile  
Reply with quote  
 Post subject: Re: Prompts
PostPosted: Sun Nov 11, 2012 9:49 am 
Offline
Mortal

Joined: Tue Nov 06, 2012 1:41 pm
Posts: 136
ninja_ardith wrote:
...The problem is right there.


You're either being sarcastic or deliberately unhelpful. I figured I would ask the original author to check the regex before looking into it myself. Supplying the missing ) I got:

Code:
match="^\*\s?\d+\%\*\s?\d+\%\*\s?\d+\%\*\s?\d+(am|pm)\*\#((?P<obs>\d+) obsidian(\, ?)?((?P<plat>\d+) platinum(\, )?)?((?P<gold>\d+) gold(\, )?)?((?P<silv>\d+) silver(\, )?)?((?P<copp>\d+) copper(\, )?)?(zero))?$"


Which loads without errors but does not do what it is supposed to do (coins are left in their full form).


Top
 Profile  
Reply with quote  
 Post subject: Re: Prompts
PostPosted: Sun Nov 11, 2012 9:57 am 
Offline
Mortal

Joined: Tue Nov 06, 2012 1:41 pm
Posts: 136
OK, the ) was missing from obsidian. Here's the correct line:

Code:
match="^\*\s?\d+\%\*\s?\d+\%\*\s?\d+\%\*\s?\d+(am|pm)\*\#((?P<obs>\d+) obsidian(\, ?))?((?P<plat>\d+) platinum(\, )?)?((?P<gold>\d+) gold(\, )?)?((?P<silv>\d+) silver(\, )?)?((?P<copp>\d+) copper(\, )?)?(zero)?$"


Top
 Profile  
Reply with quote  
 Post subject: Re: Prompts
PostPosted: Sun Nov 11, 2012 9:57 am 
Offline
Mortal

Joined: Wed Sep 24, 2008 12:21 pm
Posts: 4452
cheesekk wrote:
ninja_ardith wrote:
...The problem is right there.


You're either being sarcastic or deliberately unhelpful. I figured I would ask the original author to check the regex before looking into it myself. Supplying the missing ) I got:

Code:
match="^\*\s?\d+\%\*\s?\d+\%\*\s?\d+\%\*\s?\d+(am|pm)\*\#((?P<obs>\d+) obsidian(\, ?)?((?P<plat>\d+) platinum(\, )?)?((?P<gold>\d+) gold(\, )?)?((?P<silv>\d+) silver(\, )?)?((?P<copp>\d+) copper(\, )?)?(zero))?$"


Which loads without errors but does not do what it is supposed to do (coins are left in their full form).


I got the impression from reading over his previous post that he didn't test this at all and that it was filled with errors. It's the post right before you posted.


Top
 Profile  
Reply with quote  
 Post subject: Re: Prompts
PostPosted: Sun Nov 11, 2012 10:16 am 
Offline
Mortal

Joined: Tue Nov 06, 2012 1:41 pm
Posts: 136
Yes, I read that as well. I figured that if someone wrote something they would at least test it once though.... or update if it didn't work.

Regardless, with that change, it works. ;)


Top
 Profile  
Reply with quote  
 Post subject: Re: Prompts
PostPosted: Sun Oct 06, 2013 5:46 pm 
Offline
Mortal

Joined: Tue May 24, 2011 5:07 pm
Posts: 499
Location: Alera
It would be super awesome if stance were added to the prompt options. Pretty please?


Top
 Profile  
Reply with quote  
 Post subject: Re: Prompts
PostPosted: Sun Oct 06, 2013 6:03 pm 
Offline
Mortal

Joined: Fri Aug 24, 2012 3:21 pm
Posts: 906
MsPooperTrooper wrote:
It would be super awesome if stance were added to the prompt options. Pretty please?

Like +1million times!


Top
 Profile  
Reply with quote  
 Post subject: Re: Prompts
PostPosted: Sun Oct 06, 2013 8:20 pm 
Offline
Mortal

Joined: Fri Apr 17, 2009 9:50 pm
Posts: 5522
There are a few things that could improve the aforementioned coin calculator. Instead of writing one monster expression that might not work if you don't have one of every coin type, it might be easier to put the coin line in a variable and then run a match to define each coin type on a separate line with an easy (\d+) copper syntax. I don't know who thought of putting asterisks in output you wanted a machine to parse, but you should probably not get in the habit of doing that.

For testing and fixing regular expressions, http://regexpal.com/" target="_BLANK is always a nice and easy tool to use.

As for stance and such, all you need to do is set triggers to pay attention to the output of the status command and any text indicating that the stance changes. Then have a prompt catcher that coughs out that stance variable along with whatever else you have going on. Think of your character as a state machine, and you're on your way to a host of conveniences.

Be careful, however, because you never really know for absolute certain what's going to be punished.


Top
 Profile  
Reply with quote  
 Post subject: Re: Prompts
PostPosted: Mon Oct 07, 2013 6:30 am 
Offline
Mortal

Joined: Tue May 24, 2011 5:07 pm
Posts: 499
Location: Alera
grep wrote:
As for stance and such, all you need to do is set triggers to pay attention to the output of the status command and any text indicating that the stance changes. Then have a prompt catcher that coughs out that stance variable along with whatever else you have going on.


I'm sort of on my way to doing that, but I think if D had it in his heart to add it as a feature of prompt in the game, it would be way easier and mucho appreciated.

Problem is, though, I'm operating with minimal knowledge of how this stuff works. I've got zmud and I've pretty much had to muddle my way through advanced triggers all on my own, although one of the threads in Clients helped a lot (thanks Finney). So far, I have a trigger that reacts when I change my stance by setting/resetting a variable to record what my stance is. Now I'm just trying to figure out how the whole client prompt thing works, or to at least make a trigger work that reacts to the ingame prompt by displaying my variable on the screen. So far, it hasn't worked. With any luck, I'll figure it out before work today, but if not.. maybe someone can halp?


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 84 posts ]  Go to page Previous  1 ... 5, 6, 7, 8, 9  Next

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 21 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group