Timers for CMUD users
Posted: 21 July 2010 09:38 PM   [ Ignore ]
Candidate
RankRankRank
Total Posts:  58
Joined  2008-06-15

This will create a spell timer right above where you type in text. I used to use a single one with zMUD but when I enabled a second one, it would screw up the first one. Just recently, I tried the same thing with CMUD and surprisingly it worked, and I wouldn’t want to play my mage any other way. I might add more in at some point, but right now I’m just tracking 7 spells that I care about. I did not come up with this code either, so there might be an easier way to set this up, but it works.

Now, on the the fun stuff. All of the code will be what I use for my brains spell. You can interchange the names and times easily. Each timer will need a name from step 1, a variable from step 2 and a trigger from step 3.

Step 1:
Click on Aliases
Click on New
Name it whatever you want, but make it something that you wouldn’t normally type into the game because this is also what you start it with. Once you start it, it’ll remain at the bottom of that session forever. This way you can also make different game sessions for different characters so you don’t have to futz around with the annoying fixes. Remember to click on save whenever you’re ready to move on. Here’s the code:

Name: StartBrains
#ST { Brains: @BRAINS}

Now, towards the bottom of the same screen, you should see “script text” (what you’re in) “XML” and “Compiled Code.” Click on XML and make sure autoappend is being set in the code because I don’t believe it is by default. Here is what it should look like (the id can and probably will be different, don’t worry about it and just keep whatever value yours has):

<alias name="StartBrains" autoappend="true" id="24">
<value>#ST { Brains: @BRAINS}</value>
</alias>

Step 2:
Click on Variables
Click on New
Just to be safe, name it exactly the same as your previous all-caps variable, in this case, BRAINS. Don’t worry about the value, that gets set automatically.

Name: BRAINS
Value: 0

Just like last time, click on the XML and you’ll need to edit a little. Usedef isn’t in by default, nor is value or default. Here is what mine looks like:

<var name="BRAINS" usedef="true" id="29">
<value>0</value>
<default>0</default>
</var>

Step 3:
Click on Triggers
Click on New
You’ll need to match text that the game sends you to begin your triggers. For my brains spell I match “You feel mentally rejuvenated, and in command of your intellectual potential!” once the brains spell is cast. For triggers, what I matched is in the Pattern field at the top of the trigger. The duration of the spell is the “Brains=314” part, which is in seconds. Here is what the code looks like:

Pattern: You feel mentally rejuvenated, and in command of your intellectual potential!
Brains=314
#WHILE (@Brains <> 0) {
#MATH Brains @Brains-1
#WAIT 1000
}

That’s it. Now, go back to the game and type in “StartBrains” or whatever you named it and you should see a “Brains: 0” right above where you type in text. Cast the spell and enjoy knowing how long your stuff is going to last.

Anon

P.S.

Step “I screwed up!”:
Just say you typed in StartBrains twice and got two timers, or you don’t like the order they’re listed in. Click on any of the previous buttons like Aliases. On the left side of the screen, you should see shortcuts to the same buttons you used to open this window. The button option is called “Show Status lines” so click on that. You should see “StatBar1” (or at least mine does) and an unnamed timer for each spell timer you’ve setup stacked above it. Here you can just delete them via a right-click if you no longer them want to pop up on that game session. Just click on them first to make sure it’s the timer you want to delete. Keep in mind that this does no delete all of the previous steps, it only removes the visible timer.

Profile
 
 
   
 
 
‹‹ Is MD down?      Quest 8! ››