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


Joined: 15 Mar 2006
Posts: 3
Location: Ohio

PostPosted: Mon Mar 20, 2006 5:32 am   

#COND & %delitem
 
I know this topic has been gone over a million times because I have searched the database on illusions and conditions to get to where I am now but for some reason I still can not get it to work and I dont know why. I play Aetolia and my prompt is:

H:3504 M:5256 [db eb]

I am trying to make an anti illusion system using the #cond statement based on my prompt because when an illusion is given you will not receive the cure message after eating the herb before the prompt,just the illusion followed by the prompt. What I have so far is like this:

Trigger:

^A feeling of relaxation overcomes you.$

Value:

#class ASH 1
#var HYPERSOMNIA 1
#additem TOEAT ASH
ea

ea=outc ash;eat ash alias

After I receive the affliction/message I will eat ash with the trigger:

You eat some prickly ash bark.

In its value I have:
#cond {H:%1 M:%2 ~[(*)~]} {within|param=1}{%delitem( "ASH", @TOEAT)}

Im hoping after eating the ash on the condition of my prompt within 1 parameter of the illusion the item ASH will be deleted out of the list, if it isnt deleted than on the trigger:

^You may eat another plant.$
I have the value outc @TOEAT;eat @TOEAT

testing the triggers with the #show command I always outc ash and eat ash on the affliction trigger message and after using #show You eat some prickly ash bark, then #show You may eat another plant, it does outc ash;eat ash seeming to completly ignore the #cond or %delitem commands. I am dumbfounded. If someone could help me I would greatly appreciate it. I hope everything here is understandable. Its late and Im tired. Thanks again.
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Tue Mar 28, 2006 2:31 pm   
 
Have a look see here:
http://forums.zuggsoft.com/phpbb/viewtopic.php?t=20428&highlight=prickly+ash+bark

Especially here:
Code:

#TRIGGER {^You eat some prickly ash bark.$} {
  #IF (@VAR/eatingash) {
    VAR/herbal=0
    unafflict anorexia
    #ALARM "herbAlarm" {+2} {
      #IF (@VAR/herbal=0) {
        VAR/herbal=1
        VAR/tempcure=1
        #ECHO Herb balance timed out!
        }
      }
    #TEMP {%dh, %dm} {#VAR VAR/eatingash {0}} "" {prompt|nocr}
    } {
    #SAY ILLUSION: ash
    VAR/ignoring=1
    }
  }


You can walk through that script to see how they detect illusions.
Reply with quote
Zras
Newbie


Joined: 15 Mar 2006
Posts: 3
Location: Ohio

PostPosted: Wed Mar 29, 2006 5:57 pm   
 
Thanks! Ill take a look at it! 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