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
phate
Newbie


Joined: 21 Nov 2007
Posts: 1

PostPosted: Wed Nov 21, 2007 7:19 pm   

trigger/script help
 
I am trying to make a spell manager for a cleric on Legends of Excalibur (lofe.org 8000)
I am trying to use a trigger pattern off of the affect screen in conjuction with a string list variable
The pattern off of the affect is this
1) bladeturning modifies RESIST by 8192 for 71 ticks.

The idea I had is this, have three string variables
@AllSpells- list of every non attack spell I can cast
@CurrentSpells- spells listed in the affect list
@MissingSpells –spells that are in @allspells but not in @Currentspells

Ive got a trigger working that will test for anything in the @allSpells but I cant get it to return the value from @allspells to a variable that I can use to populate the other two string lists, hopefully this makes sense. Or if I am going about this all wrong any one else have an idea of how to do it?
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Wed Nov 21, 2007 8:02 pm   
 
First manually build the list for AllSpells.

Second use triggers to build the CurrentSpells list. You will need a starting and ending trigger for your affects list something like this
Code:
#CLASS AffCap
#VAR CurrentSpells {} {}
#TRIGGER "AffCapture" {You are affected by:} {CurrentSpells="";#T+ AffEnd}
#COND {^%d~)(%w) modifies} {#ADDITEM CurrentSpells {%1}} {looppat|param=99}
#TRIGGER "AffEnd" {No more affects} {#STATE AffCapture 0;#T- AffEnd;MissingSpells=%subregex(@AllSpells,%concat("(",@CurrentSpells,")","");#DELITEM MissingSpells {}}
#CLASS 0

And that is pretty much all the script you need too. Just fill in the missing information.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
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