TinTin++ Mud Client The TinTin++ message board

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
TinTin++ Mud Client

Nesting

 
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Script Help
View previous topic :: View next topic  
Author Message
Gaebryal



Joined: 24 Jan 2011
Posts: 19

PostPosted: Mon Mar 07, 2011 4:34 pm    Post subject: Nesting Reply with quote

what is the correct syntax for this, ive tried all kinds of combinations

this action works fine, but its always on, untill its triggered, then its "deleted"

Code:
#ACTION {The %1 is closed.} {
    #SHOWME Door Set to <aff>%1;
    #VAR doorVariable {%1};
    #UNACTION {The %%1 is closed.}
    };



i want to make it so it only works when i push an alias, something similar to this, except it doesnt work so my question is how do i make this work Coffee


Code:
#ALIAS ln {
   #ACTION {The %1 is closed.} {
      #SHOWME Door Set to <aff>%1;
      #VAR doorVariable {%1};
      #UNACTION {The %%1 is closed.}
    };
    look north
}


i mean i could make a a file like "doortriggers.tin and then read it in and kill the class but surely theres another way to do it?
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3274

PostPosted: Mon Mar 07, 2011 9:59 pm    Post subject: Reply with quote

Replace %1 with %%1 and it should work. Smile
Back to top
View user's profile Send private message Send e-mail
Gaebryal



Joined: 24 Jan 2011
Posts: 19

PostPosted: Tue Mar 08, 2011 2:25 pm    Post subject: Reply with quote

still isnt working right, the problem is the UNACTION isnt going off and deleting it, so after i type [ln] anytime i see The * is closed. it says "SET THE DOOR"

for instance when i type [look north] i should see "the door is closed" and nothing happens, only when i type [ln] but because the UNACTION isnt going off, after i type [ln] the first time then both [ln] and [look north] show me "SET THE DOOR"

in this form the UNACTION never fires:

Code:
#ALIAS ln {
   #ACTION {The %%1 is closed.} {
      #SHOWME SET THE DOOR!;
      #UNACTION {The %%1 is closed.};
    };
    look north
}



can an can you nest that UNACTION inside an ACTION?




Code:
* HP:Healthy MV:Full > #killall
#KILL - ALL LISTS CLEARED.


* HP:Healthy MV:Full > #read Doorscript.tin
--- DoorScript.tin Loaded ---
#OK:   4 ALIASES LOADED.
#OK:   1 CLASS LOADED.
#OK:   1 CONFIG LOADED.
#OK:   2 MACROS LOADED.
#OK:   1 VARIABLE LOADED.
#act
################################### ACTIONS ####################################
ln
The door is open.

* HP:Healthy MV:Full > #act
################################### ACTIONS ####################################
#ACTION {The %1 is closed.}={#SHOWME SET THE DOOR!;#UNACTION {The %1 is
closed.};} @ {5}


* HP:Healthy MV:Full > cl door
Ok.

* HP:Healthy MV:Full > ln
SET THE DOOR!
The door is closed. <-- now it should delete the action and not go off again till i hit [ln]


* HP:Healthy MV:Full > look north

* HP:Healthy MV:Full >
SET THE DOOR!
The door is closed.  <-- still goes off, not working
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3274

PostPosted: Tue Mar 08, 2011 3:32 pm    Post subject: Reply with quote

You need to escape once more for the unaction, so use %%%1 for that one.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Script Help All times are GMT - 5 Hours
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
Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads
TinTin++ Homepage

Powered by phpBB © 2001, 2002 phpBB Group