Jump to content
  • 0

Attach timer to player


simplynice

Question


  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  128
  • Reputation:   4
  • Joined:  11/14/11
  • Last Seen:  

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.

Link to comment
Share on other sites

6 answers to this question

Recommended Posts


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   382
  • Joined:  02/03/12
  • Last Seen:  


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
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  276
  • Reputation:   24
  • Joined:  07/06/13
  • Last Seen:  

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?

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   382
  • Joined:  02/03/12
  • Last Seen:  

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
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  39
  • Topics Per Day:  0.01
  • Content Count:  175
  • Reputation:   7
  • Joined:  09/13/12
  • Last Seen:  

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.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  276
  • Reputation:   24
  • Joined:  07/06/13
  • Last Seen:  

/ic /ic /ic /ic /ic Wow thanks Skorm for replies im learning more.  /no1 /no1 /no1 /no1 /no1


 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  128
  • Reputation:   4
  • Joined:  11/14/11
  • Last Seen:  

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.

Link to comment
Share on other sites

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.

×
×
  • Create New...