Jump to content
  • 0

npc warp every 24h


domez86

Question


  • Group:  Members
  • Topic Count:  85
  • Topics Per Day:  0.02
  • Content Count:  207
  • Reputation:   0
  • Joined:  06/11/13
  • Last Seen:  

hi, I would like a npc give you the possibility to enter a map every 24 hours, like:

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

mes: do you want to enter?
choice: yes, quit


yes:
(if you have already entered and 24 hours have not passed)
mes: you can't, 24 hours must pass!
(if 24 hours have passed)
mes: ok! (warp to xxx)


quit:
mes: bye!

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

thanks!

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Content Moderator
  • Topic Count:  55
  • Topics Per Day:  0.02
  • Content Count:  1676
  • Reputation:   702
  • Joined:  12/21/14
  • Last Seen:  

try this

prontera,0,0,0	script daily_warper	444,{
	if(LASTENTERTIME > gettimetick(2)){
		mes "you can enter once every 24hr";
		mes "come back after " + gettimestr("%Y-%m/%d %H:%M:%S",21,LASTENTERTIME);
		end;
	}
	LASTENTERTIME = gettimetick(2) + (60*60*24);
	warp "payon",0,0;
end;
}

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  85
  • Topics Per Day:  0.02
  • Content Count:  207
  • Reputation:   0
  • Joined:  06/11/13
  • Last Seen:  

9 hours ago, sader1992 said:

try this


prontera,0,0,0	script daily_warper	444,{
	if(LASTENTERTIME > gettimetick(2)){
		mes "you can enter once every 24hr";
		mes "come back after " + gettimestr("%Y-%m/%d %H:%M:%S",21,LASTENTERTIME);
		end;
	}
	LASTENTERTIME = gettimetick(2) + (60*60*24);
	warp "payon",0,0;
end;
}

 

perfect, work! tnx!!! just explain to me what is the value 21?
in: ("% Y-% m /% d% H:% M:% S", 21, LASTENTERTIME)

tnx!

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...