CMUD 2.03 ATCP capturing character vitals

by Neuf

Back to Mechanic's Corner.

Neuf2007-09-08 18:43:42
For anyone using CMUD 2.03, and interested in using the ATCP support there to capture the character vitals of health, mana, etc

CODE

  Char.Vitals\\12NL:(\\d+)/100 H:(\\d+)/(\\d+) M:(\\d+)/(\\d+) E:(\\d+)/(\\d+) P:(\\d+)/10 N:(\\d+)/(\\d+) W:(\\d+)/(\\d+)
  #var current_exp {%1}
#var current_health {%2}
#var max_health {%3}
#var current_mana {%4}
#var max_mana {%5}
#var current_ego {%6}
#var max_ego {%7}
#var current_power {%8}
#var current_endurance {%9}
#var max_endurance {%10}
#var current_willpower {%11}
#var max_willpower {%12}

Xinael2007-09-08 19:23:48
Just remember that it's a beta and likely to explode in your face every 10 seconds. If you do use 2.03, report any bugs you encounter.
Neuf2007-09-08 22:26:22
It has been pointed out to me that although the trigger worked(for me), it did not compiled correctly, so here is the corrected version. I have also changed the one in the original post.

CODE

  Char.Vitals12NL:(\\d+)/100 H:(\\d+)/(\\d+) M:(\\d+)/(\\d+) E:(\\d+)/(\\d+) P:(\\d+)/10 N:(\\d+)/(\\d+) W:(\\d+)/(\\d+)
  #var current_exp {%1}
#var current_health {%2}
#var max_health {%3}
#var current_mana {%4}
#var max_mana {%5}
#var current_ego {%6}
#var max_ego {%7}
#var current_power {%8}
#var current_endurance {%9}
#var max_endurance {%10}
#var current_willpower {%11}
#var max_willpower {%12}

Hazar2007-09-08 22:39:45
QUOTE(Xinael @ Sep 8 2007, 02:23 PM) 439770
Just remember that it's a beta and likely to explode in your face every 10 seconds. If you do use 2.03, report any bugs you encounter.


Eh. It's not that bad. It's certainly not as stable as a completed client, but it's stable enough to work with if you know how to code.
Forren2007-09-08 23:24:46
QUOTE(Hazar @ Sep 8 2007, 06:39 PM) 439800
Eh. It's not that bad. It's certainly not as stable as a completed client, but it's stable enough to work with if you know how to code.


I'm still on 1.34, waiting for 2 to get a stable version.
Vesar2007-09-09 00:31:31
Does 2.03 have that Threading capability?
Unknown2007-09-09 01:34:04
Yes, 2.x also has threading capabilities. It has Lua scripting, too.
Vesar2007-09-09 01:50:37
That's awesome. Is it stable?

I would love the Threading, but it would probably mean re-doing my whole system.
Unknown2007-09-09 01:54:05
No, it's not very stable from what I've heard.

The threading can be controlled by the user, but it's also an automatic background thing. If you run multiple lengthy trigger scripts, lots of alarms, or just like to use #WAIT (and the new #WAITFOR), then you'll notice a marked increase in speed from the thread pool execution. However, this can cause unexpected side effects from existing (non-threaded) scripts, mostly because of race conditions.
Drathys2007-09-09 02:01:25
I foresee lots of headaches and confusion, especially from people who know nothing about threading. The average user is not going to have a clue why their triggers are messing up intermittently.
Unknown2007-09-09 02:05:12
Agree on that. biggrin.gif
Unknown2007-09-19 03:57:47
hey this is probably a stupid question but i add what you have but im not sure what the command is to trigger it. or make it work. I go through and create it all but nothing really happens.

Any clue one what I might be missing?

Thanks in advance
Draktus
Xinael2007-09-19 12:02:20
1) Create a new trigger in the package editor.
2) Move to the XML tab.
3) Paste that stuff above (might want to change the id to 0) and save.
4) Wait.
5) Do a little dance.

Also, make sure the ATCP emulation is turned on - it's on the Session-emulation page of the prefs.
Unknown2007-09-19 13:45:13
I have done what you said but it still seems to be not working. nothing that I can see is happening. also it says the trigger code doesnt match is there something im supposed to put there?
Neuf2007-09-21 16:05:32
Apparently someone else had that problem as well with the pattern not matching. He solved it by creating a multilined trigger. See if that works for you.
Unknown2007-09-22 13:46:17
ill see what i can do though this is my first attempt at any type of scripting smile.gif Thanks again for the suggestions
Neuf2007-09-26 02:47:28
I found the problem, and it's my fault. There is a \\ missing in the pattern line before the 12. I've corrected it now.