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
makena
Apprentice


Joined: 11 Aug 2006
Posts: 100

PostPosted: Fri Dec 15, 2006 12:22 pm   

Design question, tracking spells
 
I imagine alot of people use a client to track spells (status, duration etc).
I was wonder what method people use.

I am currently keeping track on which spells are active on each char with one variable (BobActiveSpells). In a list form (armor|poison|curse).

AND another spell to track duration (Bobpoison) the value of course is the duration (42)

Is this the best way? I'm having a brainfart.
Reply with quote
Larkin
Wizard


Joined: 25 Mar 2003
Posts: 1113
Location: USA

PostPosted: Fri Dec 15, 2006 3:05 pm   
 
You could use a data record variable, where the keys are the spells and the values are their durations.
Reply with quote
Arminas
Wizard


Joined: 11 Jul 2002
Posts: 1265
Location: USA

PostPosted: Fri Dec 15, 2006 3:34 pm   
 
What Larkin suggested is the easiest way to keep track of everything. If a spells duration is totally random and I just want to keep track of weather it is active on my char or not I use a 1 or a 0 for the value of the key for that spell, If I do know the duration of the spell I might have an alarm trigger for that spell and use %alarm(alarmId) for the value of that spell in the variable. Then use triggers to reset the alarm to its full state, (clear it to zero if I cure it whatever) when I get hit by the accursed poison for example.
_________________
Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram
Reply with quote
crycry
Apprentice


Joined: 24 Jun 2006
Posts: 169
Location: UK - South Coast

PostPosted: Fri Dec 15, 2006 4:32 pm   
 
since i only use about 6 main spells, i have a button for each, that toggles on/off with each one.. they also have an alarm timer on each one to track time remaining.
_________________
'Life is what happens, when your too busy doing something else'

_________________

XP Pro SP2
cMud 1.24
_________________
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