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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Iceclaw
Apprentice


Joined: 11 Sep 2005
Posts: 124

PostPosted: Fri Nov 11, 2005 5:39 am   

Joined Elements
 
Working on a status monitor so it knows how long each spell has left
There is a fixed width between the new line character and the :, I need to figure out how to associate the 2nd line, with the spell before it, the longer affect is how long it should store. any permanent affects should be assigned (-1), as a length
mirror image : modifies none by 3 permanently (mirror)
: modifies none by 21 permanently (image)
haste : modifies dexterity by 4 for 62 hours
deflective shield : modifies armor class by -375 for 250 hours
shield : modifies armor class by -150 for 150 hours
giant strength : modifies strength by 6 for 250 hours
stone skin : modifies armor class by -250 for 250 hours
bless : modifies save vs spell by -31 for 256 hours
: modifies hit roll by 31 for 256 hours
armor : modifies armor class by -125 for 100 hours
____________________________________________________________________________
Reply with quote
OmegaDeus
Apprentice


Joined: 14 Sep 2005
Posts: 121

PostPosted: Fri Nov 11, 2005 5:47 am   
 
I've never done it before so I don't know, but you could look at a lot of what people are doing with the conditional triggers. Maybe those will point you in the right direction
_________________


Look at me I've got zSKILLS
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Fri Nov 11, 2005 10:05 pm   
 
Quote:

mirror image : modifies none by 3 permanently (mirror)
: modifies none by 21 permanently (image)


Is there ever a time when you won't see the second line but will see the first? Do spells have more than one or two lines? If it's just up to two lines then a generic 2-state trigger should work perfectly for you. Because some spells only have 1 line, you will have to provide a stringlist of spell names to prevent this 2-state trigger from matching on the 1-line spells like Haste.

#trigger {({@SpellsWithTwoLines})%s: (modifies * by %n) ({permanent|for })({ly|%d hours})} {#addkey %replace("%1"," ","") Effect1 "%2";#addkey %replace("%1"," ","") Duration %if("%3" = "permanent",-1,%4)}
#condition {^%s: (modifies * by %n) ({permanent|for })({ly|%d hours})} {#addkey %t1 Effect2 "%1";#addkey %t1 Duration %if("%2" = "permanent",-1,%3)}

The above trigger will create a separate datarecord variable for each spell using the spell name without spaces (Mirror Image = MirrorImage). Each variable has up to 3 keys, Effect1 and Effect2 (contains the stuff modified, if you want to get really fancy with your status monitor you could turn the skill name into a hyperlink that uses this info as the mouseoverhint) and Duration (containing -1 for permanancy and # hours if not permanent).
_________________
EDIT: I didn't like my old signature
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD 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