ZelosAvalon Posted May 13, 2020 Group: Members Topic Count: 72 Topics Per Day: 0.02 Content Count: 181 Reputation: 33 Joined: 11/11/12 Last Seen: November 8, 2022 Share Posted May 13, 2020 if i am talking to an npc and during this dialogue the server is at night, and the npc's speech was: Have a good day ~ i would like to check it for him to say: have a good night ~ instead of day Can anyone help me with this? best regards, ZelosAvalon Quote Link to comment Share on other sites More sharing options...
0 Cretino Posted May 13, 2020 Group: Members Topic Count: 3 Topics Per Day: 0.00 Content Count: 50 Reputation: 39 Joined: 01/13/12 Last Seen: April 19, 2023 Share Posted May 13, 2020 1 hour ago, ZelosAvalon said: if i am talking to an npc and during this dialogue the server is at night, and the npc's speech was: Have a good day ~ i would like to check it for him to say: have a good night ~ instead of day Can anyone help me with this? best regards, ZelosAvalon You can use these script commands: Spoiler *isnight() *isday() These functions will return 1 or 0 depending on whether the server is in night mode or day mode. 'isnight' returns 1 if it's night and 0 if it isn't, 'isday' the other way around. They can be used interchangeably, pick the one you like more: // These two are equivalent: if (isday()) mes "I only prowl in the night."; if (isnight() != 1) mes "I only prowl in the night."; And you need to configure your 'conf/battle/misc.conf' at this part: Spoiler // Choose if server begin with night (yes) or day (no) night_at_start: no // Define duration in msec of the day (default: 7200000 = 2 hours) // Set to 0 to disable day cycle (but not @day GM command). // Except 0, minimum is 60000 (1 minute) day_duration: 0 // Define duration in msec of the night (default: 1800000 = 30 min) // Set to 0 to disable night cycle (but not @night GM command). // Except 0, minimum is 60000 (1 minute) night_duration: 0 1 Quote Link to comment Share on other sites More sharing options...
0 ZelosAvalon Posted May 13, 2020 Group: Members Topic Count: 72 Topics Per Day: 0.02 Content Count: 181 Reputation: 33 Joined: 11/11/12 Last Seen: November 8, 2022 Author Share Posted May 13, 2020 59 minutes ago, Cretino said: Você pode usar estes comandos de script: Ocultar conteúdo E você precisa configurar o seu ' conf / battle / misc.conf ' nesta parte: Ocultar conteúdo thanks you help me so much!!! Quote Link to comment Share on other sites More sharing options...
0 WhiteEagle Posted May 13, 2020 Group: Members Topic Count: 79 Topics Per Day: 0.02 Content Count: 480 Reputation: 67 Joined: 08/28/12 Last Seen: 11 hours ago Share Posted May 13, 2020 (edited) Hey, if you wanna check the time real time for day and night, use this here: mes (gettime(3)>= 6&&gettime(3)<= 12?"Good Morning":(gettime(3)>=13&&gettime(3)<=18?"Good Afternoon":"Good Evening"))+", "+(Sex?"Mr.":"Mrs.")+" ^0000ff"+strcharinfo(0)+"^000000!"; Edited May 13, 2020 by WhiteEagle 1 Quote Link to comment Share on other sites More sharing options...
0 Emistry Posted May 18, 2020 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: 10 hours ago Share Posted May 18, 2020 if (isnight()) { // night codes } else { // day codes } if you have enabled the day/night rotation.. Quote Link to comment Share on other sites More sharing options...
Question
ZelosAvalon
if i am talking to an npc and during this dialogue the server is at night,
and the npc's speech was:
Have a good day ~
i would like to check it for him to say:
have a good night ~ instead of day
Can anyone help me with this?
best regards, ZelosAvalon
Link to comment
Share on other sites
4 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.