Advertisement
Specter_

AutoLight

Jul 24th, 2019
361
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. IF(@#allaunchmode=0);
  2. DO;
  3. IF(@#alblock=0);
  4. MATCH(%DAYTIME%,"^(.+?)\:",{#hours});
  5. IF((#hours>17)||(#hours<6));
  6. GAMMA(200,0.5);
  7. ELSE;
  8. #g=%LIGHT%*40;
  9. #g=#g/3;
  10. #g=200-#g;
  11. GAMMA(%#g%,0.5);
  12. ENDIF;
  13. ENDIF;
  14. IFMATCHES(%@&currentcmd%,"^/al$");
  15. @#filtermes=1;
  16. @#allaunchmode=1;
  17. EXEC(AutoLight.txt,"Processing...");
  18. ENDIF;
  19. UNTIL;
  20. ENDIF;
  21. IF(@#allaunchmode=1);
  22. @#allaunchmode=0;
  23. UNSET(@&currentcmd);
  24. MATCH(%@&chatcontent%,"^/al (.+?)\b",{&case});
  25. IFMATCHES(%&case%,"^s$|^set$",&ccase);
  26. MATCH(%@&chatcontent%,"^/al %&ccase% (.+)$",{#g});
  27. IF(#g>200);#g=200;ENDIF;
  28. @#alblock=1;
  29. GAMMA(%#g%,0.5);
  30. LOG(&7[&eAL&7] &cGAMMA set to &a%#g%);
  31. ENDIF;
  32. IFMATCHES(%&case%,"^rs$|^reset$|^r$",&ccase);
  33. LOG(&7[&eAL&7] &cGAMMA resetted);
  34. @#alblock=0;
  35. ENDIF;
  36. IF(%&ccase%=);
  37. ECHO(%@&chatcontent%);
  38. ENDIF;
  39. ENDIF;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement