summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAli-G <gauvain.dauchy@free.fr>2011-06-30 00:22:41 +0200
committerAli-G <gauvain.dauchy@free.fr>2011-06-30 00:22:41 +0200
commit8acd2a2897a228040904db48f58658bdf024bd3f (patch)
treee925599a0903eac8b261cea912af7599d6947223
parentdc2b41c29d0b6648af8daffbb5c61c2350252f93 (diff)
parente6d0dd75ced8c8687cd1c9749f8c2019d4a9840c (diff)
downloadserverdata-8acd2a2897a228040904db48f58658bdf024bd3f.tar.gz
serverdata-8acd2a2897a228040904db48f58658bdf024bd3f.tar.bz2
serverdata-8acd2a2897a228040904db48f58658bdf024bd3f.tar.xz
serverdata-8acd2a2897a228040904db48f58658bdf024bd3f.zip
Merge branch 'master' of git://gitorious.org/+tmw-admins/tmw/tmwa-server-test
-rw-r--r--Makefile3
-rwxr-xr-xtools/mobxp30
2 files changed, 33 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 5b593c8f..66ef000b 100644
--- a/Makefile
+++ b/Makefile
@@ -10,3 +10,6 @@ login/conf/login_local.conf login/conf/ladmin_local.conf login/save/gm_account.t
world/map/conf/map_local.conf world/map/conf/battle_local.conf world/map/conf/motd.txt world/map/conf/help.txt world/map/conf/atcommand_local.conf \
world/conf/char_local.conf
+mobxp:
+ tools/mobxp < world/map/db/mob_db.txt | tools/aligncsv.py /dev/stdin world/map/db/mob_db.txt
+ sed 's/[[:space:]]*$$//' -i world/map/db/mob_db.txt
diff --git a/tools/mobxp b/tools/mobxp
new file mode 100755
index 00000000..49c74f27
--- /dev/null
+++ b/tools/mobxp
@@ -0,0 +1,30 @@
+#!/bin/bash
+
+IFS=$' \t\n,'
+while read
+do
+ if [ -z "$REPLY" ] || [ "${REPLY:0:1}" = '#' ] || [ "${REPLY:0:2}" = '//' ]
+ then
+ echo "$REPLY"
+ continue
+ fi
+
+ read ID Name Jname LV HP SP EXP JEXP Range1 ATK1 ATK2 DEF MDEF STR AGI VIT INT DEX LUK Range2 Range3 Scale Race Element Mode Speed Adelay Amotion Dmotion Drop1id Drop1per Drop2id Drop2per Drop3id Drop3per Drop4id Drop4per Drop5id Drop5per Drop6id Drop6per Drop7id Drop7per Drop8id Drop8per Item1 Item2 MEXP ExpPer MVP1id MVP1per MVP2id MVP2per MVP3id MVP3per mutationcount mutationstrength <<< "$REPLY"
+ if [ -z "$mutationstrength" ]
+ then
+ echo "$REPLY"
+ fi
+ BOSS=$(((Mode&32)>0))
+ ASSIST=$(((Mode&8)>0))
+ AGGRO=$(((Mode&4)>0))
+
+ MODE_BONUS=$((3*BOSS+1*ASSIST+1*AGGRO+2))
+ NEWJEXP=$(bc <<< "
+ 1 + $MODE_BONUS * $HP * (100 - $DEF) * sqrt(2500 * ($ATK1 + $ATK2) / $Adelay) / sqrt(sqrt($Speed)) / 15000
+ ") || {
+ echo "$REPLY"
+ continue
+ }
+ # echo $ID$'\t'$Name$'\t'Old:$'\t'$JEXP$'\t'New:$'\t'$NEWJEXP$'\t( '$BOSS $AGGRO $ASSIST')'
+ echo $ID, $Name, $Jname, $LV, $HP, $SP, $EXP, $NEWJEXP, $Range1, $ATK1, $ATK2, $DEF, $MDEF, $STR, $AGI, $VIT, $INT, $DEX, $LUK, $Range2, $Range3, $Scale, $Race, $Element, $Mode, $Speed, $Adelay, $Amotion, $Dmotion, $Drop1id, $Drop1per, $Drop2id, $Drop2per, $Drop3id, $Drop3per, $Drop4id, $Drop4per, $Drop5id, $Drop5per, $Drop6id, $Drop6per, $Drop7id, $Drop7per, $Drop8id, $Drop8per, $Item1, $Item2, $MEXP, $ExpPer, $MVP1id, $MVP1per, $MVP2id, $MVP2per, $MVP3id, $MVP3per, $mutationcount, $mutationstrength
+done