liskl

tp_mapping

Sep 10th, 2014
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.04 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. Y_ARRAY=()
  4.  
  5. for ((y=-5000; y<=5000; y++)); do
  6.         if [ $(( y % 500 )) -eq 0 ] ; then
  7.                 Y_ARRAY+=("$y")
  8.         fi
  9. done
  10.  
  11. for (( idx=${#Y_ARRAY[@]}-1 ; idx>=0 ; idx-- )) ; do
  12.         for i in ${Y_ARRAY[@]} ; do
  13.                 COORDS="${Y_ARRAY[idx]}, $i"
  14.                 if [[ $( cat ~/minecraft_mapping.txt | grep  "$COORDS" | tail -n1 ) == "$COORDS" ]]; then
  15.                         echo -ne ".";
  16.                 else
  17.                         while [ $( uptime | awk {' print $10 '} | tr -d ",." | sed -e 's/^0*//' ) -gt 200 ]; do
  18.                                 sleep 60s;
  19.                                 echo "WAITING load is to high"
  20.                         done
  21.                         command="/tp liskl ${Y_ARRAY[idx]} 75 $i";
  22.                         echo "$command" >> /home/minecraft/worlds/apr-26-2014/console.in;
  23.                         echo "$COORDS" >> ~/minecraft_mapping.txt;
  24.                         echo "TP to $COORDS";
  25.                         sleep 60s;
  26.                 fi
  27.         done
  28. done
Advertisement
Add Comment
Please, Sign In to add comment