Mercurial > eagle-eye
comparison usebot.sh @ 113:82eff1aaf0ec
billy3321 <billy3321 AT msn.com>
4HG: branch default
Add chihchunloop to usebot.sh
author | billy3321@f3svr.f3.csu.edu.tw.f3.csu.edu.tw |
---|---|
date | Thu, 30 Oct 2008 12:07:13 +0800 |
parents | ef5461db3951 |
children | 900535236e34 |
comparison
equal
deleted
inserted
replaced
112:ef5461db3951 | 113:82eff1aaf0ec |
---|---|
8 function seteagleeye() { | 8 function seteagleeye() { |
9 read -p "Enter your server ( s1/s2/s3/s4 ): " SER_NAME | 9 read -p "Enter your server ( s1/s2/s3/s4 ): " SER_NAME |
10 read -p "Enter your account: " ACC_NAME | 10 read -p "Enter your account: " ACC_NAME |
11 read -p "Enter your password: " PW_NAME | 11 read -p "Enter your password: " PW_NAME |
12 echo -e "package main;\n\n\$::server = \"${SER_NAME}.ikariam.tw\";\n\$::user = \"${ACC_NAME}\";\n\$::pass = \"${PW_NAME}\";\n\n1;" > ${HOME}/.eagleeye.pm | 12 echo -e "package main;\n\n\$::server = \"${SER_NAME}.ikariam.tw\";\n\$::user = \"${ACC_NAME}\";\n\$::pass = \"${PW_NAME}\";\n\n1;" > ${HOME}/.eagleeye.pm |
13 } | |
14 | |
15 function chihchunloop() { | |
16 read -p "Please enter the coordinate you want to fight(ex: 39:49)" SITE | |
17 SITE_X = $(echo $SITE | cut -d : -f 1) | |
18 SITE_Y = $(echo $SITE | cut -d : -f 2) | |
19 while : ; do | |
20 perl agent.pl | |
21 | |
22 perl scan.pl | |
23 | |
24 let RAN_X=$RANDOM%100 | |
25 let RAN_Y=$RANDOM%100 | |
26 perl scan.pl $RAN_X $RAN_Y | |
27 | |
28 perl warfare.pl $SITE_X $SITE_Y | |
29 done | |
13 } | 30 } |
14 | 31 |
15 echo "Checking for Database..." | 32 echo "Checking for Database..." |
16 if test -f ikariam.sqlite;then | 33 if test -f ikariam.sqlite;then |
17 echo "Find Database, continue..." | 34 echo "Find Database, continue..." |
30 | 47 |
31 fi | 48 fi |
32 | 49 |
33 while true | 50 while true |
34 do | 51 do |
35 echo -e "Welcome to use eagle-eye ikariam bot. Please select the action you want to do.\n 1. Reset the account information file.\n 2. Reset the databse.\n 3. Scan around your island.\n 4. Run the bot.\n 5. List the sheeps(Please scan first).\n 0. Exit Program." | 52 echo -e "Welcome to use eagle-eye ikariam bot. Please select the action you want to do.\n 1. Reset the account information file.\n 2. Reset the databse.\n 3. Scan around your island.\n 4. Run the bot.\n 5. List the sheeps(Please scan first).\n 6. Chihchun's loop, automatic scan and attack sheep.\n 0. Exit Program." |
36 | 53 |
37 read -p "What do you want to do now? Please enter the number:" ACT | 54 read -p "What do you want to do now? Please enter the number:" ACT |
38 case $ACT in | 55 case $ACT in |
39 "1") | 56 "1") |
40 seteagleeye | 57 seteagleeye |
50 perl agent.pl | 67 perl agent.pl |
51 ;; | 68 ;; |
52 "5") | 69 "5") |
53 perl sheep.pl | 70 perl sheep.pl |
54 ;; | 71 ;; |
72 "6") | |
73 chihchunloop | |
55 "0") | 74 "0") |
56 break | 75 break |
57 ;; | 76 ;; |
58 *) | 77 *) |
59 echo "Please enter a number." | 78 echo "Please enter a number." |