donkeyg Posted January 16, 2013 Group: Members Topic Count: 344 Topics Per Day: 0.07 Content Count: 1060 Reputation: 1 Joined: 02/13/12 Last Seen: November 14, 2016 Share Posted January 16, 2013 ordeal_1-1,0,0,0 script DS_HiddenNpc -1,{ OnClock2130: if(gettime(4) == 1 ) end; i wan to make it sunday only, why it would held during wednesday??? Quote Link to comment Share on other sites More sharing options...
goddameit Posted January 16, 2013 Group: Members Topic Count: 60 Topics Per Day: 0.01 Content Count: 562 Reputation: 219 Joined: 11/22/11 Last Seen: August 3, 2024 Share Posted January 16, 2013 (edited) if(gettime(4) == 1 ) end; if( today = Monday ) end this script Edited January 16, 2013 by goddameit Quote Link to comment Share on other sites More sharing options...
Emistry Posted January 16, 2013 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Sunday at 05:32 PM Share Posted January 16, 2013 because your condition checking is wrong....it only check for monday...then your script only stopped on monday.... the correct condition would be if( gettime(4) ) end; refer gettime Quote Link to comment Share on other sites More sharing options...
AnnieRuru Posted January 16, 2013 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Share Posted January 16, 2013 OnSun2130: I actually wants to rewrite that devil square script, its not an optimized script, and not easily to edit Quote Link to comment Share on other sites More sharing options...
donkeyg Posted January 16, 2013 Group: Members Topic Count: 344 Topics Per Day: 0.07 Content Count: 1060 Reputation: 1 Joined: 02/13/12 Last Seen: November 14, 2016 Author Share Posted January 16, 2013 if( gettime(4) ) end; = mean this is sunday? Quote Link to comment Share on other sites More sharing options...
Emistry Posted January 16, 2013 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Sunday at 05:32 PM Share Posted January 16, 2013 if( gettime(4) ) end; = mean this is sunday? if not sunday....the script will end at this line.... Quote Link to comment Share on other sites More sharing options...
donkeyg Posted January 16, 2013 Group: Members Topic Count: 344 Topics Per Day: 0.07 Content Count: 1060 Reputation: 1 Joined: 02/13/12 Last Seen: November 14, 2016 Author Share Posted January 16, 2013 if( gettime(4) ) end; = mean this is sunday? if not sunday....the script will end at this line.... hmm... end? then how do i make it held at sunday? lol Quote Link to comment Share on other sites More sharing options...
Emistry Posted January 16, 2013 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Sunday at 05:32 PM Share Posted January 16, 2013 because your condition checking is wrong....it only check for monday...then your script only stopped on monday.... the correct condition would be if( gettime(4) ) end; refer gettime Quote Link to comment Share on other sites More sharing options...
donkeyg Posted January 17, 2013 Group: Members Topic Count: 344 Topics Per Day: 0.07 Content Count: 1060 Reputation: 1 Joined: 02/13/12 Last Seen: November 14, 2016 Author Share Posted January 17, 2013 because your condition checking is wrong....it only check for monday...then your script only stopped on monday.... the correct condition would be if( gettime(4) ) end; refer gettime so if i wan to held it on sunday only, it will be like this? if(gettime(4) == 1 || gettime(4) == 2 || gettime(4) == 3 || gettime(4) == 4 || gettime(4) == 5 || gettime(4) == 6 ) Quote Link to comment Share on other sites More sharing options...
Capuche Posted January 17, 2013 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share Posted January 17, 2013 because your condition checking is wrong....it only check for monday...then your script only stopped on monday.... the correct condition would be if( gettime(4) ) end; refer gettime so if i wan to held it on sunday only, it will be like this? if(gettime(4) == 1 || gettime(4) == 2 || gettime(4) == 3 || gettime(4) == 4 || gettime(4) == 5 || gettime(4) == 6 ) Yes or if( gettime(4) != 0 ) end; Quote Link to comment Share on other sites More sharing options...
donkeyg Posted January 17, 2013 Group: Members Topic Count: 344 Topics Per Day: 0.07 Content Count: 1060 Reputation: 1 Joined: 02/13/12 Last Seen: November 14, 2016 Author Share Posted January 17, 2013 because your condition checking is wrong....it only check for monday...then your script only stopped on monday.... the correct condition would be if( gettime(4) ) end; refer gettime so if i wan to held it on sunday only, it will be like this? if(gettime(4) == 1 || gettime(4) == 2 || gettime(4) == 3 || gettime(4) == 4 || gettime(4) == 5 || gettime(4) == 6 ) Yes or if( gettime(4) != 0 ) end; what does the "!" means? Quote Link to comment Share on other sites More sharing options...
Euphy Posted January 17, 2013 Group: Members Topic Count: 72 Topics Per Day: 0.02 Content Count: 2997 Reputation: 1132 Joined: 05/27/12 Last Seen: June 1, 2017 Share Posted January 17, 2013 ! - Logical Not. Reverses the boolean result of an expression. True will become false and false will become true. Example: if(!callfunc("F_dosomething")) { mes "Doing something failed."; close; } trunk/doc/script_commands.txt // If gettime(4) is not 0 --> if day is not Sunday if( gettime(4) != 0 ) end; Quote Link to comment Share on other sites More sharing options...
donkeyg Posted January 17, 2013 Group: Members Topic Count: 344 Topics Per Day: 0.07 Content Count: 1060 Reputation: 1 Joined: 02/13/12 Last Seen: November 14, 2016 Author Share Posted January 17, 2013 OnClock1400:// if(gettime(4) == 0 || if(gettime(4) == 1 || gettime(4) == 3 || gettime(4) == 5 ) end; Something wrong???? i wan to make it held on 2 4 6 only. Quote Link to comment Share on other sites More sharing options...
Emistry Posted January 17, 2013 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Sunday at 05:32 PM Share Posted January 17, 2013 OnClock1400: if( gettime(4) % 2 != 0 ) end; Quote Link to comment Share on other sites More sharing options...
Capuche Posted January 17, 2013 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share Posted January 17, 2013 (edited) OnClock1400:// if(gettime(4) == 0 || if(gettime(4) == 1 || gettime(4) == 3 || gettime(4) == 5 ) end; Something wrong???? i wan to make it held on 2 4 6 only. No it's working. OnClock1400: if( gettime(4) % 2 != 0 ) end; Your code works also with gettime(0) 0 % 2 == 0 and i wan to make it held on 2 4 6 only Just to point it out Edited January 17, 2013 by Capuche Quote Link to comment Share on other sites More sharing options...
donkeyg Posted January 18, 2013 Group: Members Topic Count: 344 Topics Per Day: 0.07 Content Count: 1060 Reputation: 1 Joined: 02/13/12 Last Seen: November 14, 2016 Author Share Posted January 18, 2013 if(gettime(4) == 1 || gettime(4) == 2 || gettime(4) == 3 || gettime(4) == 4 || gettime(4) == 5 || gettime(4) == 6 ) end; hmm. why it's still held on thursday , friday? i wan to make it held on sunday only swt. quite cnofuse Quote Link to comment Share on other sites More sharing options...
Emistry Posted January 18, 2013 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Sunday at 05:32 PM Share Posted January 18, 2013 show your full script.... Quote Link to comment Share on other sites More sharing options...
Question
donkeyg
i wan to make it sunday only, why it would held during wednesday???
Link to comment
Share on other sites
16 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.