|
wolfpad Newbie
Joined: 02 May 2012 Posts: 4
|
Posted: Wed May 09, 2012 2:43 pm
Removing parenthesis from triggers (from data sent by client) |
Hi all,
Firstly, thanks for the answer to my first question, really appreciated the help.
I'm looking to set up so when a player in our game types "inform" if they are hurt, i can heal them.
The problem i'm facing at the moment is the players name is encapsulated by parenthesis
E.g : (Wolfpad) HP: 1792 / 1812 SP: 801 / 801 Poison: 0 Bleeding: 0
The pattern i have currently is
(*) HP: (*) / (*) SP: 861 / 861 Poison: 0 Bleeding: 0
Which returns (Wolfpad) as %1, 1792 as %2 and 1812 as %3
How can i remove the parenthesis around the name?
Regards,
W |
|
|
|
wolfpad Newbie
Joined: 02 May 2012 Posts: 4
|
Posted: Wed May 09, 2012 3:00 pm |
Aha, solved it by doing this
~(*~) HP: (*) / (*) SP: 861 / 861 Poison: 0 Bleeding: 0
Found by using the search function <blush> |
|
|
|
charneus Wizard
Joined: 19 Jun 2005 Posts: 1876 Location: California
|
Posted: Wed May 09, 2012 4:59 pm |
Though it won't hurt too much here, you should try to avoid using * as a pattern match when you can use a more accurate one instead.
For instance,
Code: |
~((%w)~) HP: (%d) / (%d) SP: %d / %d Poison: %d Bleeding: %d |
is loads better than having a * everywhere. In the above instance, only the name, current hp and max hp will be captured. |
|
|
|
|
|
|
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 You cannot vote in polls in this forum
|
|