Looking for more active discussion? Join our Discord at https://discord.gg/x2s7fY6

GMCP in Cmud

edited January 2013 in Tech Talk
I've been messing with this for a long time now and I use things like, #if (%gmcp.char.vitals.equilibrium = 1 and %gmcp.char.vitals.balance = 1) {Do something here}


I have that in my  "You have recovered equilibrium." and  "You have recovered balance on all limbs." to do this

#if (%gmcp.char.vitals.equilibrium = 1 and %gmcp.char.vitals.balance = 1) {#ECHO ****ATTACK**ATTACK****}

So my question is, Has anyone notice gmcp not working, or only working sometimes works?

example:

You have recovered balance on all limbs.
****ATTACK**ATTACK****
frenzy Exayne
effuse Exayne of yellow bile
H:5120 M:5400 E:100% W:100% B:100% XP:77.72%
You have recovered equilibrium.
****ATTACK**ATTACK****
frenzy Exayne
effuse Exayne of yellow bile

Any help on the matter will be greatly appreciated.. besides telling me to switch to mudlet <.<

Comments

  • If it's not working it's to do with the timing, when your system actually receives the information. GMCP gets updated with each prompt, for the most part. If the line comes with the prompt then Cmud seems to be sketchy with how it processes it and processes the trigger before updating GMCP.

    I, personally, use gmcp to update a variable named vitals with balances. Then you could so something like this.


    #trigger {You have recovered balance on all limbs.} {
    #var vitals.balance 1
    #if (@vitals.balance=1 and @vitals.equilibrium=1) {#echo ****ATTACK**ATTACK****}
    }

    Using the vitals variable like that just lets you update the variable manually in cases such as this. It -should- be more consistent, as well.

    If you paste this in your editor in cmud it should create a gmcp trigger that updates a vitals variable every time the char.vitals gmcp info is received.


    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <cmud>
      <trigger type="GMCP" priority="20" regex="true" newline="false" prompt="true" copy="yes">
        <pattern>Char\.Vitals</pattern>
        <value>#loopdb %gmcp.char.vitals {#addkey vitals %key %val}
    </value>
      </trigger>
    </cmud>

    image
    image
Sign In or Register to comment.