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
sudin
Beginner


Joined: 25 Feb 2008
Posts: 13

PostPosted: Fri Feb 29, 2008 7:51 am   

activating - desactivating a class
 
Hi here is my question

I have two classes : collect and rdcollect (one collecting items while walking, the other while riding)

I would like these two classes to "avoid" each other (no intersection in maths :)

so when i type #t+ collect i would like rdcollect to be desactivated (so it automatically does a #t- rdcollect)
and the reverse : when i type #t+ rdcollect i would like #t- collect to be executed

How can i do it ?

Thanks, sudin
Reply with quote
shalimar
GURU


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

PostPosted: Fri Feb 29, 2008 8:12 am   
 
#ALIAS togCollect {#IF (%class(collect)) {#T- collect;#T+ rdcollect} {#T- rdcollect;#T+ collect}}

should do it, but its untested
_________________
Discord: Shalimarwildcat
Reply with quote
sudin
Beginner


Joined: 25 Feb 2008
Posts: 13

PostPosted: Fri Feb 29, 2008 10:30 am   
 
Thanks for you answer. A perfect solution. Here is the code i will use :

Code:

#IF (%trigger( collect)) {
  #CLASS collect off
  #CLASS rdcollect on
  } {
  #CLASS collect on
  #CLASS rdcollect off
  }


Really a great idea thanks
Reply with quote
shalimar
GURU


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

PostPosted: Fri Feb 29, 2008 11:15 am   
 
i like turning off the old one first so that at no time are both active
_________________
Discord: Shalimarwildcat
Reply with quote
sudin
Beginner


Joined: 25 Feb 2008
Posts: 13

PostPosted: Fri Feb 29, 2008 1:34 pm   
 
ok) i will swap them :) thanks Very Happy
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