Register  |  Home  |  Chat   |  ArmaBrowser  |  HowTo  |  Wiki  |  ServerStats  |  Donate  |  Forum  |  MapTools  |  Servers  |  Log in 
Forums
Information Desk
Latest News
Round Table
Servers
Trainees
Challenge us!
Off Topic

Clan Information
Public Clan Information
Active CTers+Trainees
All CTers+Trainees
Inactive CTers
CTers Earth Map
CT Groups
CT Medals
Armahacktron Wiki
Forum Ranks
Won/Lost Battles

Servers and Maps
ArmaBrowser
BFC New Ladder
CT Server Ladders
CT Mayhem Ladder
CTWF New Ladder
CT Server Maps
Flower Power Sumo Assault
Map Tools
Want to help? Donate

Jumble
Home Forum
Calendar Chat Messenger IRC
Forum Members
Links FAQ
News View Online

Search

Advanced Search

User Block
Username:

Password:

 Remember me



I forgot my password

Don't have an account yet?
You can register for FREE


Reply to topic
 help making a wild server 
Wacko
CT Rank: Not a CTer
Field's place:
Grid Name:
GID: Not working
CT Wild Fort Rank:
Joined: 07 Mar 2007
Posts: 3036108 Posts
Location: Backyard
Reply with quote
where I'm at:

I have a server that is working in armagetron advanced.
I want to have rotating maps. I have read both the posts bout the scripts , but I think i might be missing something. Can you help?




folder file (file name = "nyc") notice the eddie text document. I converted from eds maps and locations to mine.
[


config file

the everytime has just the cycle pysics, no maps

var folder- everytime is empty


log folder empty also


"eddie" code
Code:
#!/bin/bash

while true
 do
 admin_note_1=""
 admin_note_2=""
 line=""
 read line

 echo $line

## Round 1
 if [ "$line" == '[0] Go (round 10 of 10 )!' ]
  then
   range=6
   num=$RANDOM
   let "num %= $range"
   let "map = $num + 1 "
   if [ $map -le 3 ]
    then
     echo "MAP_FILE Levi/fortress/monkeastman-1.0.0.aamap.xml" > /usr/mrpresident/desktop/nyc/var/everytime.cfg
     echo "ROUND_CENTER_MESSAGE Round 1 - Monk" >> /usr/mrpresident/desktop/nyc/var/everytime.cfg
     echo "$admin_note_1" >> /usr/mrpresident/desktop/nyc/var/everytime.cfg
     echo "$admin_note_2" >> /usr/mrpresident/desktop/nyc/var/everytime.cfg
   elif [ $map -ge 4 ]
    then
     echo "MAP_FILE Levi/fortress/paulkelly-1.0.0.aamap.xml" > /usr/mrpresident/desktop/nyc/var/everytime.cfg
     echo "ROUND_CENTER_MESSAGE Round 1 - Paul Kelly" >> /usr/mrpresident/desktop/nyc/var/everytime.cfg
     echo "$admin_note_1" >> /usr/mrpresident/desktop/nyc/var/everytime.cfg
     echo "$admin_note_2" >> /usr/mrpresident/desktop/nyc/var/everytime.cfg
   fi
 fi

## Round 2
 if [ "$line" == '[0] Go (round 1 of 10 )!' ]
  then
   range=6
   num=$RANDOM
   let "num %= $range"
   let "map = $num + 1 "
   if [ $map -le 2 ]
    then
     echo "MAP_FILE Levi/fortress/richiefitzgerald-1.0.1.aamap.xml" > /usr/mrpresident/desktop/nyc/var/everytime.cfg
     echo "ROUND_CENTER_MESSAGE Round 2 - Richie Fitzgerald" >> /usr/mrpresident/desktop/nyc/var/everytime.cfg
     echo "$admin_note_1" >> /usr/mrpresident/desktop/nyc/var/everytime.cfg
     echo "$admin_note_2" >> /usr/mrpresident/desktop/nyc/var/everytime.cfg
   elif [ $map -ge 3 ]
    then
     echo "MAP_FILE Levi/fortress/monkeastman-1.0.0.aamap.xml" > /usr/mrpresident/desktop/nyc/var/everytime.cfg
     echo "ROUND_CENTER_MESSAGE Round 2 - Monk Eastman" >> /usr/mrpresident/desktop/nyc/var/everytime.cfg
     echo "$admin_note_1" >> /usr/mrpresident/desktop/nyc/var/everytime.cfg
     echo "$admin_note_2" >> /usr/mrpresident/desktop/nyc/var/everytime.cfg
   fi
 fi

## Round 3
 if [ "$line" == '[0] Go (round 2 of 10 )!' ]
  then
   range=6
   num=$RANDOM
   let "num %= $range"
   let "map = $num + 1 "
   if [ $map -le 2 ]
    then
     echo "MAP_FILE Levi/fortress/johnnytorrio-1.0.0.aamap.xml" > /usr/mrpresident/desktop/nyc/var/everytime.cfg
     echo "ROUND_CENTER_MESSAGE Round 3 - Johnny Torrio" >> /usr/mrpresident/desktop/nyc/var/everytime.cfg
     echo "$admin_note_1" >> /usr/mrpresident/desktop/nyc/var/everytime.cfg
     echo "$admin_note_2" >> /usr/mrpresident/desktop/nyc/var/everytime.cfg
   elif [ $map -ge 3 ]
    then
     echo "MAP_FILE Levi/fortress/maxzwerbach-1.0.0.aamap.xml" > /usr/mrpresident/desktop/nyc/var/everytime.cfg
     echo "ROUND_CENTER_MESSAGE Round 3 - Max Zwerbach (again?)" >> /usr/mrpresident/desktop/nyc/var/everytime.cfg
     echo "$admin_note_1" >> /usr/mrpresident/desktop/nyc/var/everytime.cfg
     echo "$admin_note_2" >> /usr/mrpresident/desktop/nyc/var/everytime.cfg
   fi
 fi

## Round 4
 if [ "$line" == '[0] Go (round 3 of 10 )!' ]
  then
   range=6
   num=$RANDOM
   let "num %= $range"
   let "map = $num + 1 "
   if [ $map -le 3 ]
    then
     echo "MAP_FILE Levi/fortress/richiefitzgerald-1.0.0.aamap.xml" > /usr/mrpresident/desktop/nyc/var/everytime.cfg
     echo "ROUND_CENTER_MESSAGE Round 4 - Richie Fitzgerald (again?)" >> /usr/mrpresident/desktop/nyc/var/everytime.cfg
     echo "$admin_note_1" >> //usr/mrpresident/desktop/nyc/var/everytime.cfg
     echo "$admin_note_2" >> /usr/mrpresident/desktop/nyc/var/everytime.cfg
   elif [ $map -ge 4 ]
    then
     echo "MAP_FILE Levi/fortress/paulkelly-1.0.0.aamap.xml" > /usr/mrpresident/desktop/nyc/var/everytime.cfg
     echo "ROUND_CENTER_MESSAGE Round 4 - Paul Kelly (again?)" >> /usr/mrpresident/desktop/nyc/var/everytime.cfg
     echo "$admin_note_1" >> /usr/mrpresident/desktop/nyc/var/everytime.cfg
     echo "$admin_note_2" >> /usr/mrpresident/desktop/nyc/var/everytime.cfg
    fi
  fi
done

_________________
Alles leute sind gemuse aber du bist obst.
View user's profile Find all posts by Levi Send private message
  
Jedi
Crazy Tronner
Server Tech
Honorary Member
Ladle, 1x (Amount: 1) Map Maker (Amount: 1)
CT Rank: Not Ranked
Field's place: sweeper
Grid Name: ct-eddie
GID: ed@ct/jedi
CT Wild Fort Rank: na
Joined: 22 Mar 2006
Posts: 1X9362493 Posts
Location: Wales, UK
Reply with quote
so what's happening? Nothing is getting written to everytime.cfg?

Please describe in detail how you are going about running the server and starting the script.
View user's profile Find all posts by ed Send private message
  
Wacko
CT Rank: Not a CTer
Field's place:
Grid Name:
GID: Not working
CT Wild Fort Rank:
Joined: 07 Mar 2007
Posts: 3036108 Posts
Location: Backyard
Reply with quote
sorry

K, here i go

Terminal==>New Shell===>copy eddie text into it==> Hit enter

Terminal==>New Shell==>cd into "nyc", create the server

Armagetron===>Test, happens to be the regular fortress map, like in fortress cafe===>Close AA

Look at log.txt and everytime.cfg==>nothing

_________________
Alles leute sind gemuse aber du bist obst.
View user's profile Find all posts by Levi Send private message
  
Jedi
Crazy Tronner
Server Tech
Honorary Member
Ladle, 1x (Amount: 1) Map Maker (Amount: 1)
CT Rank: Not Ranked
Field's place: sweeper
Grid Name: ct-eddie
GID: ed@ct/jedi
CT Wild Fort Rank: na
Joined: 22 Mar 2006
Posts: 1X9362493 Posts
Location: Wales, UK
Reply with quote
well, you need to feed the output of the aa console log into eddie. sh.
start eddie.sh something like:
Code:
tail -f -n1 /home/ed/wild/var/consolelog.txt | ./eddie.sh

This is assuming you started tron using a script similar to this:
Code:
#!/bin/sh

tron="/home/ed/tron/bin/armagetronad-dedicated"
config="/home/ed/wild/config"
var="/home/ed/wild/var"
log="/home/ed/wild/var/consolelog.txt"

$tron --configdir $config --vardir $var | tee -a $log


you could feed it directly using something like
Code:

$tron --configdir $config --vardir $var | eddie.sh | tee -a $log


But then you'd have to restart the server every time you modified the script. Not really necessary till you're done tinkering.
View user's profile Find all posts by ed Send private message
  
Wacko
CT Rank: Not a CTer
Field's place:
Grid Name:
GID: Not working
CT Wild Fort Rank:
Joined: 07 Mar 2007
Posts: 3036108 Posts
Location: Backyard
Reply with quote
when i start tron using the 2nd code there


Code:
new-host-5:~ Mrpresident$ #!/bin/sh
-bash: !/bin/sh: event not found
new-host-5:~ Mrpresident$
new-host-5:~ Mrpresident$ tron="/home/desktop/nyc/bin/armagetronad-dedicated"
new-host-5:~ Mrpresident$ config="/home/desktop/nyc/config"
new-host-5:~ Mrpresident$ var="/home/desktop/nyc/var"
new-host-5:~ Mrpresident$ log="/home/desktop/nyc/var/consolelog.txt"
new-host-5:~ Mrpresident$
new-host-5:~ Mrpresident$ $tron --configdir $config --vardir $var | tee -a $log
-bash: /home/desktop/nyc/bin/armagetronad-dedicated: No such file or directory
tee: /home/desktop/nyc/var/consolelog.txt: No such file or directory
new-host-5:~ Mrpresident$

_________________
Alles leute sind gemuse aber du bist obst.
View user's profile Find all posts by Levi Send private message
  
Jedi
Crazy Tronner
Server Tech
Honorary Member
Ladle, 1x (Amount: 1) Map Maker (Amount: 1)
CT Rank: Not Ranked
Field's place: sweeper
Grid Name: ct-eddie
GID: ed@ct/jedi
CT Wild Fort Rank: na
Joined: 22 Mar 2006
Posts: 1X9362493 Posts
Location: Wales, UK
Reply with quote
What os are you using?
View user's profile Find all posts by ed Send private message
  
Crazy Tronner
Server Tech
Honorary Member
Bowl Winner (Amount: 1) defender, 3rd rank (Amount: 1) Fortress Cafe Tournament 1 Winner (Amount: 1) Map Maker (Amount: 1)
CT Rank: 14
Field's place: def-sweep
Grid Name: CT~Voodoo
GID: Voodoo@ct/jedi
CT Wild Fort Rank: na
Joined: 05 May 2006
Posts: 14R361467 Posts
Location: somewhere on earth
Reply with quote
Writing a shell in a file instead of writing it in a terminal can help. otherwise you may need to use export for you var statement like :
export tron="/home/desktop/nyc/bin/armagetronad-dedicated"

which shell are you using ? bash ?
View user's profile Find all posts by Voodoo Send private message Yahoo Messenger
  
Wacko
CT Rank: Not a CTer
Field's place:
Grid Name:
GID: Not working
CT Wild Fort Rank:
Joined: 07 Mar 2007
Posts: 3036108 Posts
Location: Backyard
Reply with quote
@ed mac os 10,

All along I have just been using Terminal. comes w/ mac/ It works for compiling the server from source and running it.

It has "New Shell" and "New Command" and "Connect to server" options

_________________
Alles leute sind gemuse aber du bist obst.
View user's profile Find all posts by Levi Send private message
  
Jedi
Crazy Tronner
Server Tech
Honorary Member
Ladle, 1x (Amount: 1) Map Maker (Amount: 1)
CT Rank: Not Ranked
Field's place: sweeper
Grid Name: ct-eddie
GID: ed@ct/jedi
CT Wild Fort Rank: na
Joined: 22 Mar 2006
Posts: 1X9362493 Posts
Location: Wales, UK
Reply with quote
Sorry I'm not familiar with macos. Never touched macos scripting.
Try replacing #!/bin/sh with #!/bin/bash?
Really, I'm clutching at straws here.
View user's profile Find all posts by ed Send private message
  
Wacko
CT Rank: Not a CTer
Field's place:
Grid Name:
GID: Not working
CT Wild Fort Rank:
Joined: 07 Mar 2007
Posts: 3036108 Posts
Location: Backyard
Reply with quote
ill try it, thanks for the effort.

_________________
Alles leute sind gemuse aber du bist obst.
View user's profile Find all posts by Levi Send private message
  
Wacko
Map Maker (Amount: 1)
CT Rank: Not a CTer
Field's place:
Grid Name:
GID: wrtlprnft@ct/public
CT Wild Fort Rank:
Joined: 06 Oct 2006
Posts: 5Q36206 Posts
Location: 0x08048000
Reply with quote
Are you trying to copy and paste the contents of the script into your terminal? That won't work, you need to flag it as executable (chmod +x /path/to/eddie.sh), then run it with a command like the one ed suggested.

_________________
Want to know how addicted you are? Here's the answer!

I hacked 127.42.3.141!
View user's profile Find all posts by wrtlprnft Send private message
  
Wacko
CT Rank: Not a CTer
Field's place:
Grid Name:
GID: Not working
CT Wild Fort Rank:
Joined: 07 Mar 2007
Posts: 3036108 Posts
Location: Backyard
Reply with quote
Code:
new-host-5:~ Mrpresident$ chmod usr/mrpresident/desktop/nyc/eddie.sh
usage: chmod [-fv] [-R [-H | -L | -P]] [-a | +a | =a  [i][# [ n]]] mode|entry file ...
new-host-5:~ Mrpresident$


So then ==> New Command===>
Code:
#!/bin/bash


if the above is correct, it doesn't work, causing me to suspect it isn't right. when that is done i recieve
Code:
new-host-5:~ Mrpresident$ #!/bin/bash; exit
-bash: !/bin/bash: event not found
new-host-5:~ Mrpresident$

_________________
Alles leute sind gemuse aber du bist obst.
View user's profile Find all posts by Levi Send private message
  
Crazy Tronner
Server Tech
Honorary Member
Bowl Winner (Amount: 1) defender, 3rd rank (Amount: 1) Fortress Cafe Tournament 1 Winner (Amount: 1) Map Maker (Amount: 1)
CT Rank: 14
Field's place: def-sweep
Grid Name: CT~Voodoo
GID: Voodoo@ct/jedi
CT Wild Fort Rank: na
Joined: 05 May 2006
Posts: 14R361467 Posts
Location: somewhere on earth
Reply with quote
Levi,
You just can't run the #!/bin/bash command directly in the terminal. This is a special command that must be the first line of a text file to tell the system which program must run the file content (here bash but it depend of your system, but you must check if bash is install on your system first).

So you must write all these commands ed gave you in a text file and turn it executable with chmod, something like this assuming your filename is eddie.sh as you wrote
chmod +x eddie.sh you

then you can execute it, probably as on any unix system, using ./eddie.sh (unless you add the . to your PATH environnement variable.
View user's profile Find all posts by Voodoo Send private message Yahoo Messenger
  
Wacko
CT Rank: Not a CTer
Field's place:
Grid Name:
GID: Not working
CT Wild Fort Rank:
Joined: 07 Mar 2007
Posts: 3036108 Posts
Location: Backyard
Reply with quote
ok ill try it.

_________________
Alles leute sind gemuse aber du bist obst.
View user's profile Find all posts by Levi Send private message
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT  
Page 1 of 1  

  
  
 Reply to topic  Post a reply  

free counters