Envoy Posted January 8, 2020 Posted January 8, 2020 Buenas, quiero hacer que un npc cambie de mapa con respecto al dia de la semana. por ejemplo, si es lunes, está en prontera, martes en izulde y cosas así, hay alguna forma de obtener el dia de la semana en el script? Quote
Angeluz Posted January 18, 2020 Posted January 18, 2020 Para los días de la semana usa *gettime(<type>) This function will return specified information about the current system time. DT_SECOND - Seconds (of the current minute) DT_MINUTE - Minutes (of the current hour) DT_HOUR - Hour (of the current day) DT_DAYOFWEEK - Week day (constants for MONDAY to SUNDAY are available) DT_DAYOFMONTH - Day of the current month DT_MONTH - Month (constants for JANUARY to DECEMBER are available) DT_YEAR - Year DT_DAYOFYEAR - Day of the year DT_YYYYMMDD - current date in the form YYYYMMDD It will only return numbers. If another type is supplied -1 will be returned. if (gettime(DT_DAYOFWEEK) == SATURDAY) mes "It's a Saturday. I don't work on Saturdays."; Quote
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.