Forum Links 

Click to return to main page
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile  Log in to check your private messagesLog in to check your private messages    Log inLog in 
 Current Top Rated Killers 
 Next Event   Voting Links 


The event "The Assault on Taekir" is beginning in 1 day, 13 hours.

Combat emotes for Savanti

 
Post new topic   Reply to topic    Abandoned Realms Forum Index -> Roleplaying
View previous topic :: View next topic  
Author Message
Dalero



Joined: 13 Oct 2004
Posts: 100
Location: Texas

PostPosted: Mon Mar 20, 2023 2:27 pm    Post subject: Combat emotes for Savanti

Since it was asked, Here is how I finally managed to get combat emotes working in cmud.

First we had to get them to trigger at set hp levels, and then reset/ not check constantly. Step one was identifying current hp:
<cmud>
<trigger priority="800" newline="false" prompt="true">
<pattern>(%d)/(%d)Hp</pattern>
<value>hp=%1;maxHealth=%2</value>
</trigger>
</cmud>

I had two different hp levels and two different databases referenced to pull emotes from. Here are my health level checks

<cmud>
<trigger type="Expression" priority="750" newline="false" prompt="true">
<pattern>@hp>600</pattern>
<value>#T+ healthEmote</value>
</trigger>
</cmud>

<cmud>
<trigger type="Expression" priority="750" newline="false" prompt="true">
<pattern>@hp>400</pattern>
<value>#T+ healthEmote1</value>
</trigger>
</cmud>

The problem I found was that these things would fire nonstop, so the person helping me came up with this old style solution to disable triggers as needed

<trigger name="healthEmote" type="Expression" priority="730" newline="false" prompt="true" enabled="false">
<pattern>@hp<500</pattern>
<value>#SEND %item(@emotelist, %random(1, %numitems(@emotelist)));#T- healthEmote</value>
</trigger>
</cmud

<cmud>
<trigger name="healthEmote1" type="Expression" priority="730" newline="false" prompt="true" enabled="false">
<pattern>@hp<250</pattern>
<value>#SEND %item(@emotelist2, %random(1, %numitems(@emotelist2)));#T- healthEmote1</value>
</trigger>
</cmud>

And lastly, here are the database entries I used

<cmud>
<var name="emotelist" type="StringList">
<value>emote wipes the blood from his mouth and glares at his opponent.|emote spits on the ground and grins fiercely through bloodstained teeth!|emote winces and steps back while favoring his left side slightly.|esay 'grits his teeth and sharply barks out' Enough of this!</value>
<json>["emote wipes the blood from his mouth and glares at his opponent.","emote spits on the ground and grins fiercely through bloodstained teeth!","emote winces and steps back while favoring his left side slightly.","esay 'grits his teeth and sharply barks out' Enough of this!"]</json>
</var>
</cmud>

Problems I ran into developing this
1. cmud chhecked every line/nonstop so I spammed myself till I was kicked from the server.
2. having triggers enable/disable based on hp levels.
3. pulling from the emote lists properly
4. Everything stopped working when I tried to create a class folder and moving triggers to the new folders. I ended up putting everything back in the ar client folder location in cmud for them to start working again.
5. I'm paranoid about this stuff turning on and outing any other character I play if I forget to turn them off when I log in. Smile

Have fun, and hopefully someone else can enjoy them now!
Back to top
View user's profile Send private message
 
2 0 0
Display posts from previous:   
Post new topic   Reply to topic    Abandoned Realms Forum Index -> Roleplaying 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


Powered by phpBB © phpBB Group