About Us
Products
Purchase
Downloads
Support
Forums
Contact Us
Site
 Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Oogabooga
Newbie


Joined: 27 Sep 2011
Posts: 5

PostPosted: Thu Sep 29, 2011 6:19 pm   

GMCP Triggers
 
Does anyone know where to find out more information on how to make these crafty little buggers? For the life of me I can't quite figure it out.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Thu Sep 29, 2011 7:51 pm   
 
There's really nothing to figure out:

1)create trigger
2)change trigger type to GMCP
3)in pattern, type in name of package and optionally the name of a particular section within that package (ie, room.info or char.base)
4)write script code you want this trigger to execute

The terms you use in step 3 will be determined by your game's specific implementation. If you are playing Aardwolf, for example, you can go to http://www.aardwolf.com/wiki/index.php/Clients/GMCP for an explanation of the terms and what data they will be containing.
_________________
EDIT: I didn't like my old signature
Reply with quote
Oogabooga
Newbie


Joined: 27 Sep 2011
Posts: 5

PostPosted: Thu Sep 29, 2011 8:18 pm   
 
How do I change trigger type to GMCP?
Reply with quote
Daern
Sorcerer


Joined: 15 Apr 2011
Posts: 809

PostPosted: Thu Sep 29, 2011 10:40 pm   
 
At the bottom of the editor panel in the settings editor, there's a list of types you can choose from (default is pattern). You may need to click more if you have that section of the editor collapsed.
Reply with quote
Anaristos
Sorcerer


Joined: 17 Jul 2007
Posts: 821
Location: California

PostPosted: Fri Sep 30, 2011 1:06 am   
 
Here is an example:
Code:

<trigger name="gmcpctrig" type="GMCP" param="201" priority="4" trigontrig="false" id="5">
  <pattern>char.*</pattern>
  <value>gmcpchand</value>
</trigger>
_________________
Sic itur ad astra.
Reply with quote
Oogabooga
Newbie


Joined: 27 Sep 2011
Posts: 5

PostPosted: Fri Sep 30, 2011 4:09 am   
 
So roughly this is the general idea... Clearly this trigger would backfire and sip all my health before I ever had sipping balance back. But I'm on the right track yes?


<trigger type="GMCP" priority="3430" newline="false" prompt="true" id="343">
<pattern>Char.vitals</pattern>
<value>#IF (%gmcp.Char.vitals.hp &lt; %gmcp.Char.vitals.maxhp) {sip health} {}
</value>
</trigger>
Reply with quote
Oogabooga
Newbie


Joined: 27 Sep 2011
Posts: 5

PostPosted: Fri Sep 30, 2011 6:23 am   
 
Also, that trigger seems to fire more than once even with a failsafe variable of @healthsip.

Basically, I have an hsip alias that is set up with a #IF to check if sipping balance is off or not, and in the GMCP trigger I put hsip instead of sip health. So shouldn't it not sip health if it's off balance? Also, I do believe there is a more efficient way of making an auto sipper I just haven't figured out how to with the prompt that I have now.


3204h, 3258m, 2629e, 10p, 13740en, 14610w elrx-

If it was in percentages I could figure it out but it's not...
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
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

© 2009 Zugg Software. Hosted by Wolfpaw.net