Sauerworld Forum

PSL script

CubeX.

  • *
  • 29
  • +2/-0
PSL script
« on: October 26, 2015, 12:07:49 PM »
Hey, just a little script I made a long time ago to connect quicker on the effic.me servers.

Code: [Select]
psl = [if (> $arg1 "0") [if (< $arg1 "7") [connect effic.me (* $arg1 10000)] [echo "^f7Please select a number between ^f01 ^f7and ^f07^f7."]] [echo "^f7Please select a number between ^f01 ^f7and ^f07^f7."]]

You just have to do /psl 1|7 in game and it'll connect you on a effic.me server between 1 and 7.
If you try /psl 0 or more than 6 it doesn't work.
Have fun.

Fohlen

  • *
  • 28
  • +0/-2
Re: PSL script
« Reply #1 on: October 26, 2015, 04:34:18 PM »
You can fix the 1-6 port range by specifying an optional argument, and set 10000 as it's default then count $arg++ * 10000 ...

CubeX.

  • *
  • 29
  • +2/-0
Re: PSL script
« Reply #2 on: December 12, 2015, 02:56:36 PM »
Okay, new version, better x)
Code: [Select]
psl = [if (&& (> $arg1 0) (< $arg1 7)) [connect effic.me (* $arg1 10000)] [echo "^f7You must choose a ^f0number ^f7between ^f61 ^f7and ^f66^f7."]]

RaZgRiZ

  • *
  • 12
  • +0/-1
Re: PSL script
« Reply #3 on: March 25, 2017, 02:57:36 PM »
psl = [ connect effic.me (* 10000 (max 1 (min 6 $arg1))) ]

seems easier to just clamp the values to a fixed range instead of falling back to an echo.
« Last Edit: March 25, 2017, 11:08:22 PM by RaZgRiZ »

swatllama

  • ***
  • 130
  • +9/-4
Re: PSL script
« Reply #4 on: March 26, 2017, 04:05:02 AM »
THANKS, RAZGRIZ, THIS'LL BE VERY USEFUL.