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

Need help about #event {TIME}

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



Joined: 24 Jan 2018
Posts: 15

PostPosted: Wed Jan 24, 2018 5:20 am    Post subject: Need help about #event {TIME} Reply with quote

How use this event {TIME} ?
#event {0:0:0:1:0:0} {commands} ?
If I want do sth on 21:00 ,how ?
btw,cann't understand :

Code:

#math answer 1:1:1 1d1d1



1:1:1 1d1d1 ......what's this ??? just know 1d4 ... and ,1:1:1 ?
_________________
TinTin Newbie
Back to top
View user's profile Send private message
moire



Joined: 29 Jan 2012
Posts: 27

PostPosted: Wed Jan 24, 2018 10:22 am    Post subject: Reply with quote

Code:

You can use TIME events to trigger when it reaches a certain hour and
minute (and second).

For example:

#event {TIME 15:01} {#show %0 %1 %2 %3 %4 %5 %6}

or

#event {TIME 15:01:00} {#show %0 %1 %2 %3 %4 %5 %6}

Shows the current year month day weekday hour minute seconds when
it is 15:01 o'clock.

argument   meaning
%0         year
%1         month
%2         day
%3         day of week (0 = sunday)
%4         hour
%5         minute
%6         second

------------------------------------------------------------------------

As for your second question the dice example seems to make no sense to me,
too.  I'd like to see the source of your dice example.
Back to top
View user's profile Send private message
PowerGod



Joined: 04 Aug 2014
Posts: 352

PostPosted: Wed Jan 24, 2018 4:59 pm    Post subject: Reply with quote

1d1d1 is just (1d1)d1

the first part just tells how many dices to use for the second part.

That complete formula is strange anyway... it works like this: the numbers I put in parenthesis are merged, so that's an eleven
Code:

1:1:(1 1)d1d1


so the entire last part calculates the seconds (that are always 11 anyway, so seems an useless calculation to me...):
Code:

11d1d1
Back to top
View user's profile Send private message
riper



Joined: 24 Jan 2018
Posts: 15

PostPosted: Sat Jan 27, 2018 7:07 am    Post subject: Reply with quote

Thanx! @moire
I know how use this event now.

@powergod & @moire
the second quest not my code Smile.
It's show me when I regis here
if 1d1d1 == (1d1)d1 , should always set to {1}
_________________
TinTin Newbie
Back to top
View user's profile Send private message
PowerGod



Joined: 04 Aug 2014
Posts: 352

PostPosted: Sat Jan 27, 2018 9:06 am    Post subject: Reply with quote

Maybe wasn't clear enough what I wrote before, so i'll explain step by step:

Code:

- The first number (1:) are hours, so equals to 3600 seconds

- The second number (:1:) are minutes, so equals to 60 seconds

- ATTENTION NOW: The third number is a dice formula, yes, it's NOT just "1"

the space in this formula is IGNORED so these are not 2 ones, but a single 11

:1 1d1d1

so (11d1) equals to 11 and consequently (11d1) still equals to 11...


The last result is 1 hour + 1 minute + 11 seconds
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3844

PostPosted: Sat Jan 27, 2018 10:01 pm    Post subject: Reply with quote

1:1:1 1d1d1 is the captcha to register on the TinTin++ forum.

I'm going to remove part of the conversation above, because otherwise a botter googling for the captcha can easily find the answer.
Back to top
View user's profile Send private message Send e-mail
riper



Joined: 24 Jan 2018
Posts: 15

PostPosted: Sun Jan 28, 2018 5:59 am    Post subject: Reply with quote

PowerGod wrote:
Maybe wasn't clear enough what I wrote before, so i'll explain step by step:


Wow,thanx for your pentience .
So clearly now .

By the way , another question about time event:

if I want todo sth every ten minute,like 8:10,8:20,8:30...

How to do this ?

#event {MINUTE 10} {commands} ?

From manual

Code:
MINUTE

Triggers each minute or given minute

_________________
TinTin Newbie
Back to top
View user's profile Send private message
PowerGod



Joined: 04 Aug 2014
Posts: 352

PostPosted: Sun Jan 28, 2018 10:32 am    Post subject: Reply with quote

The #EVENT is not what you want then, because it will trigger exactly at the minute you give to it, for example "#EVENT {MINUTE 10}" will trigger only once every hour.
In the worst case you can use it without a value to make it trigger every minute and then use a counter to calculate 10, but it's not the best way to obtain what you need.

You can use a #TICKER instead:
Code:

#ticker {name} {commands} {interval in seconds}


and as interval use "600"
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3844

PostPosted: Sun Jan 28, 2018 6:21 pm    Post subject: Reply with quote

Alternatively:

Code:

#event {MINUTE}
{
    #if {%5 % 10 == 0} {#showme 10 minute tick}
}


and of course

Code:

#ticker {10min} {#showme 10 minute tick} {10:00}
Back to top
View user's profile Send private message Send e-mail
riper



Joined: 24 Jan 2018
Posts: 15

PostPosted: Sun Jan 28, 2018 8:38 pm    Post subject: Reply with quote

Thanx for all your reply !

@powergod, I amn't using the ticker bcoz I want it work at real time,like 9:10,9:20,etc .

and @scandum ,wow,you open new door for me. Never know ticker's interval time can be define like this,usually I just know 600 or 3600 . Blink

thanx again,a rewarding day Smile
_________________
TinTin Newbie
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