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
teion
Wanderer


Joined: 03 May 2005
Posts: 71

PostPosted: Tue Mar 01, 2016 8:33 pm   

deleting all triggers in a class
 
Hi I have a class with many temporary triggers that sometimes do not all get fired depending on the situation. Is there a way to remove all the temporary triggers without deleting everything else in the class. for the sake of argument lets call the class armour

in the disable script portion of the class i have something like this #unt {} armoury

basically im trying to remove the triggers when disabling this class without having to write out each one by hand
Reply with quote
shalimar
GURU


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

PostPosted: Wed Mar 02, 2016 3:42 am   
 
Unfortunately not.
Even forcing them into another class to try and #UNCLASS the lot will not work, as the homeless settings just move into the parent.

What exactly are you doing that requires so many #TEMPs in the first place?
I might be able to think of a better way if you describe the situation.
_________________
Discord: Shalimar#3679
Reply with quote
teion
Wanderer


Joined: 03 May 2005
Posts: 71

PostPosted: Wed Mar 02, 2016 2:41 pm   
 
I am writing a script that sorts the armory but first it gets an inventory of the containers in the room. For example I create 2 different triggers for each situation where I type inventory here all pack

the mud output will display either Packs : [2] or Pack : [1]

so one of the temp triggers doesn't get used and needs to be deleted or it will keep building in the class. I suppose I could solve this by using a conditional but I've never had much luck with those.

Anyway the trigger does this #temp {^ Packs : ~[%1~]} {#va numberpacks %1 "" armory} armory

I do that for 5 items so 10 triggers in total have to be untriggered before the class is exited.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Wed Mar 02, 2016 8:04 pm   
 
Create the temporary triggers with ID's and then you can #UNTRIGGER them based on ID. You could also create all of them in another class and then #DELCLASS on that separate class.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
Daern
Sorcerer


Joined: 15 Apr 2011
Posts: 809

PostPosted: Fri Mar 04, 2016 2:12 am   
 
So just to clarify, the issue is just with the pluralization? You could use "Pack{s|}" in your pattern to match either an S, or nothing.
Reply with quote
teion
Wanderer


Joined: 03 May 2005
Posts: 71

PostPosted: Fri Mar 04, 2016 8:09 pm   
 
thank you fixed!. the last syntax helped
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