GMCP in Cmud

EdricEdric Member Posts: 11
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?


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

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


  • IstoIsto Member Posts: 47 ✭✭✭
    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" ?>
      <trigger type="GMCP" priority="20" regex="true" newline="false" prompt="true" copy="yes">
        <value>#loopdb %gmcp.char.vitals {#addkey vitals %key %val}

Sign In or Register to comment.