imk0tter

$parserange shortened

May 9th, 2021 (edited)
302
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 0.44 KB | None | 0 0
  1. alias parserange {
  2. tokenize 32 $2 $1
  3. var %x, %y,%c $token($2-,1,45),%b
  4. if ($left($2-,1) == -) {
  5. %x = $calc($1 - %c +1)
  6. tokenize 32 $1 $right($2-,-1)
  7. }
  8. else {
  9. %x = %c
  10. }
  11. if $pos($2-,-,1) == $len($2-) {
  12. %y = $1
  13. }
  14. else if !$v1 {
  15. %y = %x
  16. }
  17. else {
  18. %b = $pos($2-,-,2)
  19. %c = $token($2-,2,45)
  20. if %b && $calc(%b -  $iif($Pos($2-,-,1),$v1,0)) == 1 {
  21. %y = $calc($1 - %c +1)
  22. }
  23. else if !%b {
  24. %y = %c
  25. }
  26. else {
  27. %y = %c
  28. }
  29. }
  30. return %x %y
Add Comment
Please, Sign In to add comment