domez86 Posted October 26, 2019 Group: Members Topic Count: 85 Topics Per Day: 0.02 Content Count: 207 Reputation: 0 Joined: 06/11/13 Last Seen: July 11, 2020 Share Posted October 26, 2019 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! Quote Link to comment Share on other sites More sharing options...
0 sader1992 Posted October 27, 2019 Group: Content Moderator Topic Count: 55 Topics Per Day: 0.01 Content Count: 1691 Reputation: 716 Joined: 12/21/14 Last Seen: 20 hours ago Share Posted October 27, 2019 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; } Quote Link to comment Share on other sites More sharing options...
0 domez86 Posted October 27, 2019 Group: Members Topic Count: 85 Topics Per Day: 0.02 Content Count: 207 Reputation: 0 Joined: 06/11/13 Last Seen: July 11, 2020 Author Share Posted October 27, 2019 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! Quote Link to comment Share on other sites More sharing options...
Question
domez86
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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.