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

Delay but want the value of a variable when I call the delay

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



Joined: 05 Jan 2011
Posts: 36

PostPosted: Sun Feb 05, 2017 10:06 am    Post subject: Delay but want the value of a variable when I call the delay Reply with quote

#delay 30 {grouptalk $area will repop in one minute};

This code will display whatever the current $area var is when the delay fires. Is there any way to have it display the value of the area var when I started the delay? The area var is filled in by GMCP as I move around, so it will be whatever area I am CURRENTLY, not necessarily when I checked the repop.

I can do a work around by keeping track of all the area repops I have in an array and going through that array every second, but I feel like that's overkill when I know the time I want the message to appear....
Back to top
View user's profile Send private message
PowerGod



Joined: 04 Aug 2014
Posts: 339

PostPosted: Sun Feb 05, 2017 4:33 pm    Post subject: Reply with quote

Try this:

Code:

#line substitute variable #delay 30 {grouptalk $area will repop in one minute};
Back to top
View user's profile Send private message
new_to_tin_tin



Joined: 05 Jan 2011
Posts: 36

PostPosted: Sun Feb 05, 2017 6:46 pm    Post subject: Reply with quote

PowerGod wrote:
Try this:

Code:

#line substitute variable #delay 30 {grouptalk $area will repop in one minute};


That seemed to work, thanks! Don't see what the variable/substitute options do, at least in http://tintin.sourceforge.net/manual/line.php or when I type "#line"...Any good resource that I'm missing, or should I just ask away here Smile?
Back to top
View user's profile Send private message
PowerGod



Joined: 04 Aug 2014
Posts: 339

PostPosted: Sun Feb 05, 2017 8:41 pm    Post subject: Reply with quote

#help line will show the options you can use, but not much else

The previous code substitutes all the variables with their values from the following command, before executing it

So it's like to launch the delay without variables in it
Code:

#delay 30 {grouptalk forest will repop in one minute};
Back to top
View user's profile Send private message
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