donkeyg Posted January 16, 2013 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
goddameit Posted January 16, 2013 Posted January 16, 2013 (edited) if(gettime(4) == 1 ) end; if( today = Monday ) end this script Edited January 16, 2013 by goddameit Quote
Emistry Posted January 16, 2013 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
AnnieRuru Posted January 16, 2013 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
donkeyg Posted January 16, 2013 Author Posted January 16, 2013 if( gettime(4) ) end; = mean this is sunday? Quote
Emistry Posted January 16, 2013 Posted January 16, 2013 if( gettime(4) ) end; = mean this is sunday? if not sunday....the script will end at this line.... Quote
donkeyg Posted January 16, 2013 Author 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
Emistry Posted January 16, 2013 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
donkeyg Posted January 17, 2013 Author 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
Capuche Posted January 17, 2013 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
donkeyg Posted January 17, 2013 Author 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
Euphy Posted January 17, 2013 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
donkeyg Posted January 17, 2013 Author 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
Emistry Posted January 17, 2013 Posted January 17, 2013 OnClock1400: if( gettime(4) % 2 != 0 ) end; Quote
Capuche Posted January 17, 2013 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
donkeyg Posted January 18, 2013 Author 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
Question
donkeyg
i wan to make it sunday only, why it would held during wednesday???
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.