Jump to content
  • 0

Question

Posted

I'd like to attach a timer to a player.

 

Example:

 

I will talk to NPC and after talking to NPC . the NPC will block the player to talk into that NPC for  1 week.

 

It's an account based attachment of time.

 

The purpose of the 1 week time is it cannot talk to the NPC even if he goes offline and online again.

 

I just need an idea easy enough to understand.

6 answers to this question

Recommended Posts

Posted


prontera.gat,151,184,5 script Awesome Guy 100,{

if(#ticker<gettimetick(2)) {

mes "I think you're really awesome.";

next;

mes "Now you have to wait a week before you can hear that again.";

set #ticker, gettimetick(2)+60*60*24*7;

} else {

mes "Come back next week for your complement.";

}

close;

}

  • Upvote 1
Posted

Hello sorry for interupting,

Hi Skorm! can you elaborate whats:

"set #ticker, gettimetick(2)+60*60*24*7;"

Because I wanted to make a own script using yours, thanks, and also can it be set a timer on account?

Posted

Hello sorry for interupting,

Hi Skorm! can you elaborate whats:

"set #ticker, gettimetick(2)+60*60*24*7;"

Because I wanted to make a own script using yours, thanks, and also can it be set a timer on account?

 

Not a problem.

set #ticker, gettimetick(2)+60*60*24*7;

#ticker -> Is a permanent account based variable.

gettimetick(2) -> UNIX epoch time (number of seconds elapsed since 1st of January 1970)

+ -> Plus

60 -> 60 Seconds

* -> Times

60 -> 60 Minutes

24 -> 24 Hours

7 -> 7 Days

 

All adds up to the amount of seconds in one week. Which I then added to Unix time. If the current time in seconds is greater than #ticker then the amount of time needed has passed. :)

It's a very simple type of timer. I guarantee anywhere you go you'll be able to find it. Hope I was able to explain it well enough.

  • Upvote 1
Posted

I'd like to attach a timer to a player.

 

Example:

 

I will talk to NPC and after talking to NPC . the NPC will block the player to talk into that NPC for  1 week.

 

It's an account based attachment of time.

 

The purpose of the 1 week time is it cannot talk to the NPC even if he goes offline and online again.

 

I just need an idea easy enough to understand.

hi there

 

could u kindly explain y do u need such a script? i apologize but i did not understand the need of such script.

Posted

I'd like to attach a timer to a player.

 

Example:

 

I will talk to NPC and after talking to NPC . the NPC will block the player to talk into that NPC for  1 week.

 

It's an account based attachment of time.

 

The purpose of the 1 week time is it cannot talk to the NPC even if he goes offline and online again.

 

I just need an idea easy enough to understand.

hi there

 

could u kindly explain y do u need such a script? i apologize but i did not understand the need of such script.

I'd like to limit players to talk to NPC because it gives item.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...