Sauerworld Forum

PSL script

MysteryCube

  • *
  • 26
  • +2/-0
  • Aka CubeX.
    • voxelarmy.com
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.
- MysteryCube.
Member of VoxelArmy.

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 ...

MysteryCube

  • *
  • 26
  • +2/-0
  • Aka CubeX.
    • voxelarmy.com
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."]]
- MysteryCube.
Member of VoxelArmy.

RaZgRiZ

  • *
  • 7
  • +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

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