domez86 Posted October 26, 2019 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
0 sader1992 Posted October 27, 2019 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
0 domez86 Posted October 27, 2019 Author 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
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!
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.