Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
tomcat025
Wanderer


Joined: 30 Dec 2001
Posts: 66
Location: USA

PostPosted: Thu Mar 20, 2008 12:55 pm   

%alarm question
 
Is it possible to use %alarm to add the value of a variable to an existing one? Better yet is it possible to add the value of a variable to an existing temp alarm?

For example I have a trigger
#trigger {^Roundtime~:%s&temprt%s{sec.|seconds}} {rt = @temprt + 1}

This trigger takes the roundtime for whatever action is being performed and adds one second to it.

I then use the @rt in an alarm.

#Trigger {manage to find} {#alarm {+@rt} {do whatever}}

The problem lies in the fact that the the "Roundtime" text that is used to gather the @rt is after the action. Example below.

You concentrate on braiding your grass, fairly sure you are making progress.
You think it is likely that the braided grass isn't usable for anything yet.
Roundtime: 11 seconds.


What I am trying to do is make a class for braiding grass (working mechanical lore) in Dragonrealms.

In the above example I wrote a trigger that used "isn't usable for anything yet." but the value for @rt is not obtained until the next line. By this time the alarm has already been set.
_________________
You can pick your nose. You can pick your friends... but you can't pick your friends nose.

~Arwin Hochhauser
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4715
Location: Pensacola, FL, USA

PostPosted: Thu Mar 20, 2008 1:47 pm   
 
dont use the {} around the time +@rt of an alarm

What i did was make a variable @dostuff, then the the alarm can contain a

#FORALL @dostuff {#EXEC {%i}}

You can change the value of @dostuff at any point, and so long as the alarm hasnt fired yet, it will do the new value(s)
_________________
Discord: Shalimarwildcat
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion 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

© 2009 Zugg Software. Hosted by Wolfpaw.net