Browse Source

* Merged changes from trunk [14742:14782/trunk].

git-svn-id: https://svn.code.sf.net/p/rathena/svn/branches/renewal@14783 54d463be-8e91-2dee-dedb-b68131a5f0ec
ai4rei 14 years ago
parent
commit
96a6a43e85
88 changed files with 6001 additions and 876 deletions
  1. 2 0
      conf/Changelog.txt
  2. 1 1
      conf/battle/client.conf
  3. 1 1
      conf/battle/monster.conf
  4. 5 1
      conf/mapflag/nobranch.txt
  5. 4 0
      conf/mapflag/noicewall.txt
  6. 4 0
      conf/mapflag/nomemo.txt
  7. 3 0
      conf/mapflag/nopenalty.txt
  8. 4 0
      conf/mapflag/nosave.txt
  9. 5 0
      conf/mapflag/noteleport.txt
  10. 4 0
      conf/mapflag/nowarp.txt
  11. 4 0
      conf/mapflag/nowarpto.txt
  12. 253 35
      configure
  13. 59 4
      configure.in
  14. 2 0
      db/Changelog.txt
  15. 54 54
      db/const.txt
  16. 4 4
      db/packet_db.txt
  17. 1 1
      db/skill_require_db.txt
  18. 81 22
      doc/script_commands.txt
  19. 17 0
      npc/Changelog.txt
  20. 4 3
      npc/battleground/flavius/flavius01.txt
  21. 4 3
      npc/battleground/flavius/flavius02.txt
  22. 10 8
      npc/battleground/kvm/kvm02.txt
  23. 6 5
      npc/battleground/kvm/kvm03.txt
  24. 4 3
      npc/battleground/tierra/tierra01.txt
  25. 4 3
      npc/battleground/tierra/tierra02.txt
  26. 52 1
      npc/cities/lighthalzen.txt
  27. 78 1
      npc/cities/manuk.txt
  28. 38 1
      npc/cities/splendide.txt
  29. 221 2
      npc/instances/EndlessTower.txt
  30. 258 4
      npc/merchants/hair_dyer.txt
  31. 615 1
      npc/merchants/hair_style.txt
  32. 3 5
      npc/other/arena/arena_aco.txt
  33. 3 2
      npc/other/hugel_bingo.txt
  34. 1767 0
      npc/other/poring_war.txt
  35. 3 3
      npc/other/turbotrack/Expert_16.txt
  36. 3 3
      npc/other/turbotrack/Expert_4.txt
  37. 3 3
      npc/other/turbotrack/Expert_8.txt
  38. 3 3
      npc/other/turbotrack/Normal_16.txt
  39. 3 3
      npc/other/turbotrack/Normal_4.txt
  40. 3 3
      npc/other/turbotrack/Normal_8.txt
  41. 2 2
      npc/quests/The_Sign_Quest.txt
  42. 452 73
      npc/quests/quests_13_1.txt
  43. 667 0
      npc/quests/quests_13_2.txt
  44. 676 0
      npc/quests/quests_alberta.txt
  45. 250 387
      npc/quests/quests_lighthalzen.txt
  46. 7 3
      npc/quests/quests_morocc.txt
  47. 1 0
      npc/scripts_athena.conf
  48. 12 0
      npc/warps/dungeons/anthell.txt
  49. 2 1
      npc/warps/other/sign.txt
  50. 4 4
      sql-files/main.sql
  51. 4 0
      sql-files/upgrade_svn14759.sql
  52. 2 1
      src/char_sql/char.c
  53. 2 5
      src/common/socket.c
  54. 1 1
      src/common/timer.c
  55. 1 1
      src/common/utils.c
  56. 28 27
      src/map/atcommand.c
  57. 2 2
      src/map/battle.c
  58. 2 2
      src/map/battleground.c
  59. 1 1
      src/map/buyingstore.c
  60. 32 6
      src/map/chat.c
  61. 4 1
      src/map/chat.h
  62. 112 73
      src/map/clif.c
  63. 1 1
      src/map/clif.h
  64. 3 1
      src/map/guild.c
  65. 1 1
      src/map/mail.c
  66. 0 3
      src/map/map.c
  67. 2 2
      src/map/mob.c
  68. 8 4
      src/map/npc.c
  69. 3 1
      src/map/party.c
  70. 42 18
      src/map/pc.c
  71. 5 3
      src/map/pc.h
  72. 4 3
      src/map/pet.c
  73. 37 48
      src/map/script.c
  74. 1 1
      src/map/searchstore.c
  75. 1 0
      src/map/skill.c
  76. 3 0
      src/map/status.c
  77. 2 2
      src/map/trade.c
  78. 2 3
      src/map/unit.c
  79. 11 12
      src/map/vending.c
  80. 2 0
      vcproj-10/char-server_sql.vcxproj
  81. 2 0
      vcproj-10/char-server_txt.vcxproj
  82. 2 0
      vcproj-10/login-server_sql.vcxproj
  83. 2 0
      vcproj-10/login-server_txt.vcxproj
  84. 2 0
      vcproj-10/map-server_sql.vcxproj
  85. 2 0
      vcproj-10/map-server_txt.vcxproj
  86. 2 0
      vcproj-10/mapcache.vcxproj
  87. 2 0
      vcproj-10/txt-converter-char.vcxproj
  88. 2 0
      vcproj-10/txt-converter-login.vcxproj

+ 2 - 0
conf/Changelog.txt

@@ -1,5 +1,7 @@
 Date	Added
 
+2011/03/15
+	* Rev. 14744 Fixed option 'monster_ai' referring to setting 'mob_npc_warp' rather than 'mob_warp' (follow up to r8135). [Ai4rei]
 2011/03/06
 	* Rev. 14732 Added search store info related settings. [Ai4rei]
 2011/02/23

+ 1 - 1
conf/battle/client.conf

@@ -48,7 +48,7 @@ min_chat_delay: 0
 
 // valid range of dye's and styles on the client
 min_hair_style: 0
-max_hair_style: 25
+max_hair_style: 27
 min_hair_color: 0
 max_hair_color: 8
 min_cloth_color: 0 

+ 1 - 1
conf/battle/monster.conf

@@ -51,7 +51,7 @@ monster_max_aspd: 199
 //        have players on them, instead of only for mobs who are in the vecinity
 //        of players.
 // 0x040: When set, when the mob's target changes map, the mob will walk towards
-//        any npc-warps in it's sight of view (use with mob_npc_warp below)
+//        any npc-warps in it's sight of view (use with mob_warp below)
 // 0x100: When set, a mob will pick a random skill from it's list and start from
 //        that instead of checking skills in orders (when unset, if a mob has too
 //        many skills, the ones near the end will rarely get selected)

+ 5 - 1
conf/mapflag/nobranch.txt

@@ -335,4 +335,8 @@ jupe_core2	mapflag	nobranch
 brasilis	mapflag	nobranch
 bra_in01	mapflag	nobranch
 
-//evt_zombie	mapflag	nobranch
+//evt_zombie	mapflag	nobranch
+
+// Poring War ==================
+poring_w01	mapflag	nobranch
+poring_w02	mapflag	nobranch

+ 4 - 0
conf/mapflag/noicewall.txt

@@ -141,3 +141,7 @@ nguild_prt	mapflag	noicewall
 4@tower	mapflag	noicewall
 5@tower	mapflag	noicewall
 6@tower	mapflag	noicewall
+
+// Poring War ====================
+poring_w01	mapflag	noicewall
+poring_w02	mapflag	noicewall

+ 4 - 0
conf/mapflag/nomemo.txt

@@ -681,3 +681,7 @@ spl_in01	mapflag	nomemo
 2@nyd	mapflag	nomemo
 
 //evt_zombie	mapflag	nomemo
+
+// Poring War ====================
+poring_w01	mapflag	nomemo
+poring_w02	mapflag	nomemo

+ 3 - 0
conf/mapflag/nopenalty.txt

@@ -251,3 +251,6 @@ bat_a01	mapflag	nopenalty
 bat_a02	mapflag	nopenalty
 
 //evt_zombie	mapflag	nopenalty
+
+// Poring War ==================
+poring_w02	mapflag	nopenalty

+ 4 - 0
conf/mapflag/nosave.txt

@@ -269,3 +269,7 @@ arug_dun01	mapflag	nosave	SavePoint
 schg_dun01	mapflag	nosave	SavePoint
 
 //evt_zombie	mapflag	nosave	SavePoint
+
+// Poring War ====================
+poring_w01	mapflag	nosave	SavePoint
+poring_w02	mapflag	nosave	SavePoint

+ 5 - 0
conf/mapflag/noteleport.txt

@@ -391,3 +391,8 @@ nyd_dun02	mapflag	noteleport
 2@nyd	mapflag	monster_noteleport
 
 //evt_zombie	mapflag	noteleport
+
+// Poring War ====================
+poring_w01	mapflag	noteleport
+poring_w02	mapflag	noteleport
+poring_w02	mapflag	monster_noteleport

+ 4 - 0
conf/mapflag/nowarp.txt

@@ -65,3 +65,7 @@ bat_b01	mapflag	nowarp
 bat_b02	mapflag	nowarp
 bat_a01	mapflag	nowarp
 bat_a02	mapflag	nowarp
+
+// Poring War ==================
+poring_w01	mapflag	nowarp
+poring_w02	mapflag	nowarp

+ 4 - 0
conf/mapflag/nowarpto.txt

@@ -139,3 +139,7 @@ spl_in01	mapflag	nowarpto
 // Nidhoggr's Instance ===========
 1@nyd	mapflag	nowarpto
 2@nyd	mapflag	nowarpto
+
+// Poring War ====================
+poring_w01	mapflag	nowarpto
+poring_w02	mapflag	nowarpto

+ 253 - 35
configure

@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.in Revision: 14708 .
+# From configure.in Revision: 14767 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.59.
 #
@@ -3196,8 +3196,57 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  echo "$as_me:$LINENO: result: yes" >&5
+
+		echo "$as_me:$LINENO: result: yes" >&5
 echo "${ECHO_T}yes" >&6
+		echo "$as_me:$LINENO: checking whether $CC can actually use -Wno-pointer-sign" >&5
+echo $ECHO_N "checking whether $CC can actually use -Wno-pointer-sign... $ECHO_C" >&6
+		# This option causes warnings in C++ mode
+		# Note: -Werror must be before -Wno-pointer-sign, otherwise it does not do anything
+		CFLAGS="$OLD_CFLAGS -Werror -Wno-pointer-sign"
+		cat >conftest.$ac_ext <<_ACEOF
+int foo;
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+				echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+				CFLAGS="$OLD_CFLAGS -Wno-pointer-sign"
+
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+				echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+				CFLAGS="$OLD_CFLAGS"
+
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
@@ -4702,14 +4751,13 @@ fi
 #
 # math library (required)
 #
-
-echo "$as_me:$LINENO: checking for sqrt in -lm" >&5
-echo $ECHO_N "checking for sqrt in -lm... $ECHO_C" >&6
-if test "${ac_cv_lib_m_sqrt+set}" = set; then
+echo "$as_me:$LINENO: checking for library containing sqrt" >&5
+echo $ECHO_N "checking for library containing sqrt... $ECHO_C" >&6
+if test "${ac_cv_search_sqrt+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lm  $LIBS"
+  ac_func_search_save_LIBS=$LIBS
+ac_cv_search_sqrt=no
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -4754,25 +4802,78 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_lib_m_sqrt=yes
+  ac_cv_search_sqrt="none required"
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_lib_m_sqrt=no
 fi
 rm -f conftest.err conftest.$ac_objext \
       conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_m_sqrt" >&5
-echo "${ECHO_T}$ac_cv_lib_m_sqrt" >&6
-if test $ac_cv_lib_m_sqrt = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBM 1
+if test "$ac_cv_search_sqrt" = no; then
+  for ac_lib in m; do
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char sqrt ();
+int
+main ()
+{
+sqrt ();
+  ;
+  return 0;
+}
 _ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_search_sqrt="-l$ac_lib"
+break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-  LIBS="-lm $LIBS"
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+  done
+fi
+LIBS=$ac_func_search_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_search_sqrt" >&5
+echo "${ECHO_T}$ac_cv_search_sqrt" >&6
+if test "$ac_cv_search_sqrt" != no; then
+  test "$ac_cv_search_sqrt" = "none required" || LIBS="$ac_cv_search_sqrt $LIBS"
 
 else
   { { echo "$as_me:$LINENO: error: math library not found... stopping" >&5
@@ -4783,16 +4884,15 @@ fi
 
 
 #
-# clock_gettime (rt on Debian)
+# clock_gettime (optional, rt on Debian)
 #
-
-echo "$as_me:$LINENO: checking for clock_gettime in -lrt" >&5
-echo $ECHO_N "checking for clock_gettime in -lrt... $ECHO_C" >&6
-if test "${ac_cv_lib_rt_clock_gettime+set}" = set; then
+echo "$as_me:$LINENO: checking for library containing clock_gettime" >&5
+echo $ECHO_N "checking for library containing clock_gettime... $ECHO_C" >&6
+if test "${ac_cv_search_clock_gettime+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lrt  $LIBS"
+  ac_func_search_save_LIBS=$LIBS
+ac_cv_search_clock_gettime=no
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -4837,30 +4937,148 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_lib_rt_clock_gettime=yes
+  ac_cv_search_clock_gettime="none required"
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_lib_rt_clock_gettime=no
 fi
 rm -f conftest.err conftest.$ac_objext \
       conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_rt_clock_gettime" >&5
-echo "${ECHO_T}$ac_cv_lib_rt_clock_gettime" >&6
-if test $ac_cv_lib_rt_clock_gettime = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBRT 1
+if test "$ac_cv_search_clock_gettime" = no; then
+  for ac_lib in rt; do
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
 _ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char clock_gettime ();
+int
+main ()
+{
+clock_gettime ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_search_clock_gettime="-l$ac_lib"
+break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-  LIBS="-lrt $LIBS"
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+  done
+fi
+LIBS=$ac_func_search_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_search_clock_gettime" >&5
+echo "${ECHO_T}$ac_cv_search_clock_gettime" >&6
+if test "$ac_cv_search_clock_gettime" != no; then
+  test "$ac_cv_search_clock_gettime" = "none required" || LIBS="$ac_cv_search_clock_gettime $LIBS"
 
 fi
 
 
 
+#
+# CLOCK_MONOTONIC clock for clock_gettime
+# Normally defines _POSIX_TIMERS > 0 and _POSIX_MONOTONIC_CLOCK (for posix
+# compliant systems) and __FreeBSD_cc_version >= 500005 (for FreeBSD
+# >= 5.1.0, which does not have the posix defines (ref. r11983)) would be
+# checked but some systems define them even when they do not support it
+# (ref. bugreport:1003).
+#
+if test "$ac_cv_search_clock_gettime" != "no" ; then
+	echo "$as_me:$LINENO: checking whether CLOCK_MONOTONIC is supported and works" >&5
+echo $ECHO_N "checking whether CLOCK_MONOTONIC is supported and works... $ECHO_C" >&6
+	if test "$cross_compiling" = yes; then
+
+			echo "$as_me:$LINENO: result: guessing no" >&5
+echo "${ECHO_T}guessing no" >&6
+
+
+else
+  cat >conftest.$ac_ext <<_ACEOF
+
+			#include <sys/time.h>
+			#include <time.h>
+			#include <unistd.h>
+
+			int main(int argc, char** argv)
+			{
+				struct timespec tval;
+				return clock_gettime(CLOCK_MONOTONIC, &tval);
+			}
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+			echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+			CFLAGS="$CFLAGS -DHAVE_MONOTONIC_CLOCK"
+
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+
+			# either it failed to compile (CLOCK_MONOTONIC undefined)
+			# or clock_gettime has returned a non-zero value
+			echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+
+
 #
 # MySQL library (optional)
 #

+ 59 - 4
configure.in

@@ -318,7 +318,24 @@ OLD_CFLAGS="$CFLAGS"
 CFLAGS="$CFLAGS -Wno-pointer-sign"
 AC_COMPILE_IFELSE(
 	[int foo;],
-	[AC_MSG_RESULT([yes])],
+	[
+		AC_MSG_RESULT([yes])
+		AC_MSG_CHECKING([whether $CC can actually use -Wno-pointer-sign])
+		# This option causes warnings in C++ mode
+		# Note: -Werror must be before -Wno-pointer-sign, otherwise it does not do anything
+		CFLAGS="$OLD_CFLAGS -Werror -Wno-pointer-sign"
+		AC_COMPILE_IFELSE(
+			[int foo;],
+			[
+				AC_MSG_RESULT([yes])
+				CFLAGS="$OLD_CFLAGS -Wno-pointer-sign"
+			],
+			[
+				AC_MSG_RESULT([no])
+				CFLAGS="$OLD_CFLAGS"
+			]
+		)
+	],
 	[
 		AC_MSG_RESULT([no])
 		CFLAGS="$OLD_CFLAGS"
@@ -555,13 +572,51 @@ AC_CHECK_HEADER([zlib.h], [], [AC_MSG_ERROR([zlib header not found, please speci
 #
 # math library (required)
 #
-AC_CHECK_LIB([m], [sqrt], [], [AC_MSG_ERROR([math library not found... stopping])])
+AC_SEARCH_LIBS([sqrt], [m], [], [AC_MSG_ERROR([math library not found... stopping])])
 
 
 #
-# clock_gettime (rt on Debian)
+# clock_gettime (optional, rt on Debian)
+#
+AC_SEARCH_LIBS([clock_gettime], [rt])
+
+
 #
-AC_CHECK_LIB([rt], [clock_gettime])
+# CLOCK_MONOTONIC clock for clock_gettime
+# Normally defines _POSIX_TIMERS > 0 and _POSIX_MONOTONIC_CLOCK (for posix
+# compliant systems) and __FreeBSD_cc_version >= 500005 (for FreeBSD
+# >= 5.1.0, which does not have the posix defines (ref. r11983)) would be
+# checked but some systems define them even when they do not support it
+# (ref. bugreport:1003).
+#
+if test "$ac_cv_search_clock_gettime" != "no" ; then
+	AC_MSG_CHECKING([whether CLOCK_MONOTONIC is supported and works])
+	AC_RUN_IFELSE(
+		[
+			#include <sys/time.h>
+			#include <time.h>
+			#include <unistd.h>
+			
+			int main(int argc, char** argv)
+			{
+				struct timespec tval;
+				return clock_gettime(CLOCK_MONOTONIC, &tval);
+			}
+		],
+		[
+			AC_MSG_RESULT([yes])
+			CFLAGS="$CFLAGS -DHAVE_MONOTONIC_CLOCK"
+		],
+		[
+			# either it failed to compile (CLOCK_MONOTONIC undefined)
+			# or clock_gettime has returned a non-zero value
+			AC_MSG_RESULT([no])
+		],
+		[
+			AC_MSG_RESULT([guessing no])
+		]
+	)
+fi
 
 
 #

+ 2 - 0
db/Changelog.txt

@@ -9,6 +9,8 @@
 	13005 Angelic Wing Dagger:	NEED INFO.
 =======================
 
+2011/03/19
+	* Rev. 14748 Fixed Beast Strafing (HT_POWER) SP requirement as provided by Playtester (bugreport:4675). [Gepard]
 2011/03/06
 	* Rev. 14732 Added Universal Catalog Silver, Gold and Bronze and their respective boxes. [Ai4rei]
 	- Updated packet info related to search store info.

+ 54 - 54
db/const.txt

@@ -61,7 +61,7 @@ Job_Baby_Knight	4030
 Job_Baby_Priest	4031
 Job_Baby_Wizard	4032
 Job_Baby_Blacksmith	4033
-Job_Baby_Hunter		4034
+Job_Baby_Hunter	4034
 Job_Baby_Assassin	4035
 Job_Baby_Knight2	4036
 Job_Baby_Crusader	4037
@@ -269,22 +269,22 @@ mf_nosave	2
 mf_nobranch	3
 mf_nopenalty	4
 mf_nozenypenalty	5
-mf_pvp		6
+mf_pvp	6
 mf_pvp_noparty	7
 mf_pvp_noguild	8
-mf_gvg		9
+mf_gvg	9
 mf_gvg_noparty	10
 mf_notrade	11
 mf_noskill	12
 mf_nowarp	13
 mf_partylock	14
 mf_noicewall	15
-mf_snow		16
-mf_fog		17
+mf_snow	16
+mf_fog	17
 mf_sakura	18
 mf_leaves	19
-mf_rain		20
-mf_nogo		22
+mf_rain	20
+mf_nogo	22
 mf_clouds	23
 mf_clouds2	24
 mf_fireworks	25
@@ -301,8 +301,8 @@ mf_nonightmaredrop	35
 mf_restricted	36
 mf_nocommand	37
 mf_nodrop	38
-mf_jexp		39
-mf_bexp		40
+mf_jexp	39
+mf_bexp	40
 mf_novending	41
 mf_loadevent 42
 mf_nochat	43
@@ -342,64 +342,64 @@ cell_chknochat	13
 StatusPoint	9	1
 BaseLevel	11	1
 SkillPoint	12	1
-Class		19	1
-Upper		56	1
-Zeny		20	1
-Sex		21	1
-Weight		24	1
+Class	19	1
+Upper	56	1
+Zeny	20	1
+Sex	21	1
+Weight	24	1
 MaxWeight	25	1
 JobLevel	55	1
-BaseExp		1	1
-JobExp		2	1
-Karma		3	1
-Manner		4	1
+BaseExp	1	1
+JobExp	2	1
+Karma	3	1
+Manner	4	1
 NextBaseExp	22	1
 NextJobExp	23	1
-Hp		5	1
-MaxHp		6	1
-Sp		7	1
-MaxSp		8	1
-BaseJob		119	1
+Hp	5	1
+MaxHp	6	1
+Sp	7	1
+MaxSp	8	1
+BaseJob	119	1
 BaseClass	120	1
 killerrid	121 1
 killedrid	122 1
 
-bMaxHP		6
-bMaxSP		8
-bStr		13
-bAgi		14
-bVit		15
-bInt		16
-bDex		17
-bLuk		18
-bAtk		41
-bAtk2		42
-bDef		45
-bDef2		46
-bMdef		47
-bMdef2		48
-bHit		49
-bFlee		50
-bFlee2		51
+bMaxHP	6
+bMaxSP	8
+bStr	13
+bAgi	14
+bVit	15
+bInt	16
+bDex	17
+bLuk	18
+bAtk	41
+bAtk2	42
+bDef	45
+bDef2	46
+bMdef	47
+bMdef2	48
+bHit	49
+bFlee	50
+bFlee2	51
 bCritical	52
-bAspd		53
-bFame		59
+bAspd	53
+bFame	59
 bUnbreakable	60
 
 bAtkRange	1000
-bAtkEle		1001
-bDefEle		1002
+bAtkEle	1001
+bDefEle	1002
 bCastrate	1003
 bMaxHPrate	1004
 bMaxSPrate	1005
 bUseSPrate	1006
-bAddEle		1007
+bAddEle	1007
 bAddRace	1008
 bAddSize	1009
-bSubEle		1010
+bSubEle	1010
 bSubRace	1011
-bAddEff		1012
-bResEff		1013
+bAddEff	1012
+bResEff	1013
 bBaseAtk	1014
 bAspdRate	1015
 bHPrecovRate	1016
@@ -459,9 +459,9 @@ bBreakArmorRate	1069
 bAddStealRate	1070
 bMagicDamageReturn	1071
 bRandomAttackIncrease	1072
-bAllStats		1073
-bAgiVit			1074
-bAgiDexStr		1075
+bAllStats	1073
+bAgiVit		1074
+bAgiDexStr	1075
 bPerfectHide	1076
 bNoKnockback	1077
 bClassChange	1078
@@ -2045,16 +2045,16 @@ CLEAR_NPC	844
 
 HAVEQUEST	0
 PLAYTIME	1
-HUNTING		2
+HUNTING	2
 
 FW_DONTCARE	0
-FW_THIN		100
+FW_THIN	100
 FW_EXTRALIGHT	200
 FW_LIGHT	300
 FW_NORMAL	400
 FW_MEDIUM	500
 FW_SEMIBOLD	600
-FW_BOLD		700
+FW_BOLD	700
 FW_EXTRABOLD	800
 FW_HEAVY	900
 

+ 4 - 4
db/packet_db.txt

@@ -595,7 +595,7 @@ packet_ver: 13
 0x021c,10
 
 //2004-11-15aSakexe
-0x021d,6
+0x021d,6,lesseffect,2
 
 //2004-11-29aSakexe
 packet_ver: 14
@@ -766,7 +766,7 @@ packet_ver: 18
 0x0248,68
 0x0249,3
 0x024a,70
-0x024b,4,auctioncancelreg,0
+0x024b,4,auctioncancelreg,2
 0x024c,8,auctionsetitem,0
 0x024d,14
 0x024e,6,auctioncancel,0
@@ -798,7 +798,7 @@ packet_ver: 19
 0x0251,4
 
 //2005-08-08aSakexe
-0x024d,12,auctionregister,0
+0x024d,12,auctionregister,2:6:10
 0x024e,4
 
 //2005-08-17aSakexe
@@ -829,7 +829,7 @@ packet_ver: 19
 
 //2005-10-17aSakexe
 0x007a,58
-0x025d,6,auctionclose,0
+0x025d,6,auctionclose,2
 0x025e,4
 
 //2005-10-24aSakexe

+ 1 - 1
db/skill_require_db.txt

@@ -391,7 +391,7 @@
 496,0,0,200,0,0,0,99,0,0,none,0,7134,200,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0	//AM_TWILIGHT1##
 497,0,0,200,0,0,0,99,0,0,none,0,7134,200,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0	//AM_TWILIGHT2##
 498,0,0,200,0,0,0,99,0,0,none,0,7134,200,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0	//AM_TWILIGHT3##
-499,0,0,8,0,0,0,11,1,1,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0	//HT_POWER##
+499,0,0,12,0,0,0,11,1,1,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0	//HT_POWER##
 500,0,0,2,0,0,1,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0	//GS_GLITTERING
 501,0,0,10,0,0,0,99,0,0,none,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0	//GS_FLING
 502,0,0,20,0,0,0,99,99,1,none,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0	//GS_TRIPLEACTION

+ 81 - 22
doc/script_commands.txt

@@ -4,7 +4,7 @@
 //= A reference manual for the eAthena scripting language.
 //= Commands are sorted depending on their functionality.
 //===== Version ===========================================
-//= 3.37.20110306
+//= 3.39.20110322
 //=========================================================
 //= 1.0 - First release, filled will as much info as I could
 //=       remember or figure out, most likely there are errors,
@@ -159,6 +159,15 @@
 //=       Added 'buyingstore' command. [Ai4rei]
 //= 3.37.20110306
 //=       Added 'searchstores' command. [Ai4rei]
+//= 3.38.20110313
+//=       Added 'cooking' command. [Ai4rei]
+//=       Fixed item levels in 'produce' command.
+//= 3.39.20110322
+//=       Added 'bg_getareausers' and 'bg_get_data' commands. [Ai4rei]
+//=       Updated description of 'waitingroom2bg_single' command.
+//=       Documented optional parameter 'npc name' of 'waitingroom2bg' command.
+//= 3.40.20110404
+//=       Updated description of 'waitingroom' command to include required zeny/lvl. [Kisuka]
 //=========================================================
 
 This document is a reference manual for all the scripting commands and functions 
@@ -4317,11 +4326,38 @@ Valid item levels are:
  1   - Level 1 Weapons
  2   - Level 2 Weapons
  3   - Level 3 Weapons
- 16  - Blacksmith's Stones and Metals
- 32  - Alchemist's Potions
- 64  - Whitesmith's Coins
- 123 - Whitesmith's Nuggets
- 256 - Assassin Cross's Deadly Poison
+ 21  - Blacksmith's Stones and Metals
+ 22  - Alchemist's Potions, Holy Water, Assassin Cross's Deadly Poison
+ 23  - Elemental Converters
+
+---------------------------------------
+
+*cooking <dish level>;
+
+This command will open a produce window on the client connected to the invoking 
+character. The 'dish level' is the number which determines what kind of dish
+level you can produce. You can see the full list of dishes that can be produced in 
+'db/produce_db.txt'.
+
+The window will be shown empty if the invoking character does not have enough of
+the required incredients to cook a dish.
+
+Valid dish levels are:
+
+11 - Level 1 Dish
+12 - Level 2 Dish
+13 - Level 3 Dish
+14 - Level 4 Dish
+15 - Level 5 Dish
+16 - Level 6 Dish
+17 - Level 7 Dish
+18 - Level 8 Dish
+19 - Level 9 Dish
+20 - Level 10 Dish
+
+Altough it's required to set a dish level, it doesn't matter if you set it to 1
+and you want to cook a level 10 dish, as long as you got the required incredients
+to cook the dish the command works.
 
 ---------------------------------------
 
@@ -5674,7 +5710,7 @@ The function returns 0 if the shop was not found, 1 otherwise.
 
 ---------------------------------------
 
-*waitingroom "<chatroom name>",<limit>{,<event label>,<trigger>};
+*waitingroom "<chatroom name>",<limit>{,<event label>,<trigger>,<required zeny>,<min lvl>,<max lvl>};
 
 This command will create a chat room, owned by the NPC object running this 
 script and displayed above the NPC sprite.
@@ -5685,9 +5721,6 @@ optional event and trigger parameters are given, the event label
 ("<NPC object name>::<label name>") will be invoked as if with a 'doevent' upon 
 the number of people in the chat room reaching the given triggering amount.
 
-It's funny, but for compatibility with jAthena, you can swap the event label and 
-the trigger parameters, and it will still work.
-
 // The NPC will just show a box above its head that says "Hello World", clicking 
 // it will do nothing, since the limit is zero.
     waitingroom "Hello World",0;
@@ -5699,6 +5732,14 @@ the trigger parameters, and it will still work.
 
     waitingroom "Disco - Waiting Room",8,"Bouncer::OnStart",8;
 
+// The NPC will have a box above its head, it will say "Party - Waiting Room" 
+// and will have 8 waiting slots. Clicking this will allow a player who has
+// 5000 zeny and lvl 50~99 to enter the chat room, where the player will be
+// able to wait until 8 people accumulate. Once this happens, it will cause
+// the NPC "Bouncer" run the label "OnStart"
+
+    waitingroom "Party - Waiting Room",5,"Bouncer::OnStart",8,5000,50,99;
+
 Creating a waiting room does not stop the execution of the script and it will 
 continue to the next line.
 
@@ -6008,17 +6049,19 @@ sprite based sprite id in 'db/mob-avail.txt' with this.
 
 ---------------------------------------
 
-*movenpc <NPC name>,x,y;
+*movenpc "<NPC name>",<x>,<y>{,<dir>};
 
 This command looks like the NPCWalkToxy function,but is a little different.
 
-While NPCWalkToXY just makes the NPC 'walk' to the coordinates given 
-(which sometimes gives problems if the path isn't a straight line without objects),
-this command just moves the NPC. It basically warps out and in on the current and given spot.
+While NPCWalkToXY just makes the NPC 'walk' to the coordinates given (which 
+sometimes gives problems if the path isn't a straight line without objects), 
+this command just moves the NPC. It basically warps out and in on the current 
+and given spot. Direction can be used to change the NPC's facing direction.
 
 Example(s):
 
-//This will move Bugga from it's current position to the coordinates 100,20 (if those coordinates are walkable (legit)).
+// This will move Bugga from it's current position to the coordinates 100,20 
+// (if those coordinates are walkable (legit)).
 	moveNPC "Bugga",100,20;
 	
 ---------------------------------------
@@ -6809,9 +6852,9 @@ instance times out while inactive.
 
 ---------------------------------------
 
-========================
+=========================
 |8.- Quest Log commands.|
-========================
+=========================
 ---------------------------------------
 
 *setquest <ID>;
@@ -6880,13 +6923,20 @@ color can be:
 
 ----------------------------------------
 
-===========================
+============================
 |9.- Battleground commands.|
-===========================
+============================
 ---------------------------------------
 
-*waitingroom2bg_single("<mapname>",<x>,<y>,"<On Quit Event>","<On Death Event>");
-*waitingroom2bg("<mapname>",<x>,<y>,"<On Quit Event>","<On Death Event>");
+*waitingroom2bg_single(<battle group>,"<mapname>",<x>,<y>,"<npc name>");
+
+Adds the first waiting player from the chat room of given NPC to an
+existing battleground group and warps it to specified coordinates on
+given map.
+
+---------------------------------------
+
+*waitingroom2bg("<mapname>",<x>,<y>,"<On Quit Event>","<On Death Event>"{,"<npc name>"});
 
 <Mapname> and X Y coordinates refer to where the "respawn" base is, where the player group will respawn when they die.
 <On Quit Event> refers to an NPC label that attaches to the character and is run when they relog.
@@ -6895,6 +6945,8 @@ color can be:
 Unlike the prior command, the latter will attach a GROUP in a waiting room to the battleground, and 
 sets the array $@arenamembers[0] where 0 holds the IDs of the first group, and 1 holds the IDs of the second.
 
+If the option parameter is left out, the waiting room of the current NPC is used.
+
 Example:
 	// Battle Group will be referred to as $@KvM01BG_id1, and when they die, respawn at bat_c01,52,129.
 	set $@KvM01BG_id1, waitingroom2bg("bat_c01",52,129,"KvM01_BG::OnGuillaumeQuit","KvM01_BG::OnGuillaumeDie");
@@ -6992,9 +7044,16 @@ Example:
 
 *bg_get_data(<Battle Group>,<type>);
 
+Retrieves data related to given battle group. Type can be one of the following:
+
+    0 - Amount of players currently belonging to the group.
+
 ----------------------------------------
 
-*bg_getareausers
+*bg_getareausers(<battle group>,<map name>,<x0>,<y0>,<x1>,<y1>);
+
+Retrieves amount of players belonging to given battle group on given
+map within an specified rectangular area.
 
 ----------------------------------------
 

+ 17 - 0
npc/Changelog.txt

@@ -1,11 +1,28 @@
 Date		Added
 ======
+2011/04/08
+	* Rev. 14780 Added missing Hair Dressers and Hair Dyer to Lighthalzen. [L0ne_W0lf]
+	- Hair Dresser will change hair styles ranging between 20 to 27
+	- Assistant Beautician changes to a random style and colour between 1-23.
+	* Updated the Cursed Spirit quest, and added some more town NPCs.
+	* Added more town NPCs to Splendide and Manuk.
 2011/04/06
+	* Rev. 14775 Added two new quests, Alberta Boy and Secret Note of Bazett. [L0ne_W0lf]
+	* Implemented 13.2 update to Report to the New World quest.
 	* Rev. 14769 If you're going to take credit for someone elses work (irony) make sure it's not my work. [L0ne_W0lf]
 	- Corrected credits in the Eden Quest files.
 	- Removed showevent use in the eden_common file.
 	- Removed the duplicates in the eden_common file.
 	- Removed the korean comments in the eden_quests.
+2011/03/21
+	* Fixed and commented out old Anthell entrance warps (bugreport:3589). Moved entrance to cmd_fild08 to match mapcache updates [Gepard]
+	- Fixed an issue in Resurrection of Satan Morroc (Continental Guard Quest) when player dying/logging out during conversation
+	  could prevent summoning of Satan Morroc until server reboot (bugreport:3437).
+2011/03/17
+	* Rev. 14747 Endless Tower fixes: [Gepard]
+	- Added missing end's to prevent accidental disabling of warps between floors. (bugreport:4623)
+	- Added missing end's to prevent infinite mobspawn (bugreport:4540)
+	- Commented out remaining GM-only NPCs.
 2011/02/06
 	* Rev. 14697 Script bug fixing. :] Here's some. I know it's been awhile. [L0ne_W0lf]
 	- Changed some duplicates so they use a floating NPC as their original. (bugreport:1395)

+ 4 - 3
npc/battleground/flavius/flavius01.txt

@@ -3,7 +3,7 @@
 //===== By: ================================================== 
 //= L0ne_W0lf
 //===== Current Version: ===================================== 
-//= 1.1
+//= 1.2
 //===== Compatible With: ===================================== 
 //= eAthena 1.0
 //===== Description: ========================================= 
@@ -14,6 +14,7 @@
 //===== Additional Comments: ================================= 
 //= 1.0 First Version.
 //= 1.1 Fixed pink crystal spawning as blue. [L0ne_W0lf]
+//= 1.2 Updated 'waitingroom' to support required zeny/lvl. [Kisuka]
 //============================================================
 
 // Waiting Room NPCs
@@ -21,7 +22,7 @@
 bat_room,86,227,4	script	Lieutenant Ator	418,{
 	end;
 OnInit:
-	waitingroom "Battle Station",10,"start#bat_b01::OnReadyCheck",1;
+	waitingroom "Battle Station",10,"start#bat_b01::OnReadyCheck",1,0,80,99;
 	end;
 OnEnterBG:
 	set $@FlaviusBG1_id1, waitingroom2bg("bat_b01",10,290,"start#bat_b01::OnGuillaumeQuit","");
@@ -31,7 +32,7 @@ OnEnterBG:
 bat_room,85,204,0	script	Lieutenant Thelokus	414,{
 	end;
 OnInit:
-	waitingroom "Battle Station",10,"start#bat_b01::OnReadyCheck",1;
+	waitingroom "Battle Station",10,"start#bat_b01::OnReadyCheck",1,0,80,99;
 	end;
 OnEnterBG:
 	set $@FlaviusBG1_id2, waitingroom2bg("bat_b01",390,10,"start#bat_b01::OnCroixQuit","");

+ 4 - 3
npc/battleground/flavius/flavius02.txt

@@ -3,7 +3,7 @@
 //===== By: ================================================== 
 //= L0ne_W0lf
 //===== Current Version: ===================================== 
-//= 1.2
+//= 1.3
 //===== Compatible With: ===================================== 
 //= eAthena 1.0
 //===== Description: ========================================= 
@@ -15,6 +15,7 @@
 //= 1.0 First Version.
 //= 1.1 Fixed NPCs being called for waiting rooms. (bugreport:4395)
 //= 1.2 Fixed pink crystal spawning as blue. [L0ne_W0lf]
+//= 1.3 Updated 'waitingroom' to support required zeny/lvl. [Kisuka]
 //============================================================
 
 // Waiting Room NPCs
@@ -22,7 +23,7 @@
 bat_room,142,227,4	script	Lieutenant Huvas	418,{
 	end;
 OnInit:
-	waitingroom "Battle Station",10,"start#bat_b02::OnReadyCheck",1;
+	waitingroom "Battle Station",10,"start#bat_b02::OnReadyCheck",1,0,80,99;
 	end;
 OnEnterBG:
 	set $@FlaviusBG2_id1, waitingroom2bg("bat_b02",10,290,"start#bat_b02::OnGuillaumeQuit","");
@@ -32,7 +33,7 @@ OnEnterBG:
 bat_room,142,204,0	script	Lieutenant Yukon	414,{
 	end;
 OnInit:
-	waitingroom "Battle Station",10,"start#bat_b02::OnReadyCheck",1;
+	waitingroom "Battle Station",10,"start#bat_b02::OnReadyCheck",1,0,80,99;
 	end;
 OnEnterBG:
 	set $@FlaviusBG2_id2, waitingroom2bg("bat_b02",390,10,"start#bat_b02::OnCroixQuit","");

+ 10 - 8
npc/battleground/kvm/kvm02.txt

@@ -3,7 +3,7 @@
 //===== By: ================================================== 
 //= ???, L0ne_W0lf
 //===== Current Version: ===================================== 
-//= 1.2
+//= 1.3
 //===== Compatible With: ===================================== 
 //= eAthena 1.0
 //===== Description: ========================================= 
@@ -17,6 +17,8 @@
 //= 1.2 Upated some announces and dialogs from iRO.
 //=     Changed how the scoreboard works slightly.
 //=     Removed the areapercentheals, and minor things.
+//= 1.3 Fixed wrong names for disablenpc/enablenpc. [Ai4rei]
+//=     Fixed points in text and actual points differing.
 //============================================================
 
 // Waiting Room NPCs
@@ -131,8 +133,8 @@ OnInit:
 	setwall "bat_c02",55,122,5,7,0,"batc02wall_b";
 	setwall "bat_c02",140,56,6,7,0,"batc02wall_c";
 	setwall "bat_c02",140,57,5,7,0,"batc02wall_d";
-	disablenpc "VintenarKvM02a";
-	disablenpc "VintenarKvM02b";
+	disablenpc "KVM Officer#KVM02A";
+	disablenpc "KVM Officer#KVM02B";
 	end;
 
 OnGuillaumeJoin:
@@ -186,8 +188,8 @@ OnReadyCheck:
 	end;
 
 OnStart:
-	disablenpc "VintenarKvM02a";
-	disablenpc "VintenarKvM02b";
+	disablenpc "KVM Officer#KVM02A";
+	disablenpc "KVM Officer#KVM02B";
 	set $@KvM02BG_Victory, 0;
 	// Warp Teams
 	bg_warp $@KvM02BG_id1,"bat_c02",53,128;
@@ -314,8 +316,8 @@ OnCroixWin:
 
 OnStop:
 	stopnpctimer;
-	enablenpc "VintenarKvM02a";
-	enablenpc "VintenarKvM02b";
+	enablenpc "KVM Officer#KVM02A";
+	enablenpc "KVM Officer#KVM02B";
 	// Warp Teams
 	bg_warp $@KvM02BG_id1,"bat_c02",53,128;
 	bg_warp $@KvM02BG_id2,"bat_c02",146,55;
@@ -380,7 +382,7 @@ bat_c02,51,130,5	script	KVM Officer#KVM02A	419,{
 			mes "[KVM Officer]";
 			mes "Good Game.";
 			mes "May the glory of KVM be with you.";
-			mes "You aquire the winning points: 5";
+			mes "You aquire the winning points: 1";
 			close2;
 		}
 		else

+ 6 - 5
npc/battleground/kvm/kvm03.txt

@@ -3,7 +3,7 @@
 //===== By: ================================================== 
 //= ???, L0ne_W0lf
 //===== Current Version: ===================================== 
-//= 1.2
+//= 1.3
 //===== Compatible With: ===================================== 
 //= eAthena 1.0
 //===== Description: ========================================= 
@@ -17,6 +17,7 @@
 //= 1.2 Upated some announces and dialogs from iRO.
 //=     Changed how the scoreboard works slightly.
 //=     Removed the areapercentheals, and minor things.
+//= 1.3 Fixed wrong names for disablenpc/enablenpc. [Ai4rei]
 //============================================================
 
 // Waiting Room NPCs
@@ -131,8 +132,8 @@ OnInit:
 	setwall "bat_c03",55,122,5,7,0,"batc03wall_b";
 	setwall "bat_c03",140,56,6,7,0,"batc03wall_c";
 	setwall "bat_c03",140,57,5,7,0,"batc03wall_d";
-	disablenpc "VintenarKvM03a";
-	disablenpc "VintenarKvM03b";
+	disablenpc "KVM Officer#KVM03A";
+	disablenpc "KVM Officer#KVM03B";
 	end;
 
 OnGuillaumeJoin:
@@ -328,8 +329,8 @@ OnReset:
 	set $@KvM03BG_Victory, 0;
 	if( $@KvM03BG_id1 ) { bg_destroy $@KvM03BG_id1; set $@KvM03BG_id1, 0; }
 	if( $@KvM03BG_id2 ) { bg_destroy $@KvM03BG_id2; set $@KvM03BG_id2, 0; }
-	disablenpc "VintenarKvM03a";
-	disablenpc "VintenarKvM03b";
+	disablenpc "KVM Officer#KVM03A";
+	disablenpc "KVM Officer#KVM03B";
 	mapwarp "bat_c03","bat_room",154,150;
 	maprespawnguildid "bat_c03",0,3; // Just in case someone else
 	bg_updatescore "bat_c03",5,5;

+ 4 - 3
npc/battleground/tierra/tierra01.txt

@@ -3,7 +3,7 @@
 //===== By: ================================================== 
 //= L0ne_W0lf
 //===== Current Version: ===================================== 
-//= 1.1
+//= 1.2
 //===== Compatible With: ===================================== 
 //= eAthena 1.0
 //===== Description: ========================================= 
@@ -14,6 +14,7 @@
 //===== Additional Comments: ================================= 
 //= 1.0 First Version.
 //= 1.1 Corrected setwalls for barricades. [L0ne_W0lf]
+//= 1.2 Updated 'waitingroom' to support required zeny/lvl. [Kisuka]
 //============================================================
 
 // Waiting Room NPCs
@@ -22,7 +23,7 @@ bat_room,57,227,5	script	Lieutenant Kalos	418,{
 	end;
 
 OnInit:
-	waitingroom "Battle Station",10,"start#bat_a01::OnReadyCheck",1;
+	waitingroom "Battle Station",10,"start#bat_a01::OnReadyCheck",1,0,80,99;
 	end;
 
 OnEnterBG:
@@ -34,7 +35,7 @@ bat_room,58,204,1	script	Lieutenant Eyor	414,{
 	end;
 
 OnInit:
-	waitingroom "Battle Station",10,"start#bat_a01::OnReadyCheck",1;
+	waitingroom "Battle Station",10,"start#bat_a01::OnReadyCheck",1,0,80,99;
 	end;
 
 OnEnterBG:

+ 4 - 3
npc/battleground/tierra/tierra02.txt

@@ -3,7 +3,7 @@
 //===== By: ================================================== 
 //= L0ne_W0lf
 //===== Current Version: ===================================== 
-//= 1.0
+//= 1.1
 //===== Compatible With: ===================================== 
 //= eAthena 1.0
 //===== Description: ========================================= 
@@ -13,6 +13,7 @@
 //= - Losing Team: 1 badge
 //===== Additional Comments: ================================= 
 //= 1.0 First Version.
+//= 1.1 Updated 'waitingroom' to support required zeny/lvl. [Kisuka]
 //============================================================
 
 // Waiting Room NPCs
@@ -21,7 +22,7 @@ bat_room,114,227,5	script	Lieutenant Rundel	418,{
 	end;
 
 OnInit:
-	waitingroom "Battle Station",10,"start#bat_a02::OnReadyCheck",1;
+	waitingroom "Battle Station",10,"start#bat_a02::OnReadyCheck",1,0,80,99;
 	end;
 
 OnEnterBG:
@@ -33,7 +34,7 @@ bat_room,114,204,1	script	Lieutenant Guerrit	414,{
 	end;
 
 OnInit:
-	waitingroom "Battle Station",10,"start#bat_a02::OnReadyCheck",1;
+	waitingroom "Battle Station",10,"start#bat_a02::OnReadyCheck",1,0,80,99;
 	end;
 
 OnEnterBG:

+ 52 - 1
npc/cities/lighthalzen.txt

@@ -3,7 +3,7 @@
 //===== By: ================================================== 
 //=  erKURITA, Au{R}oN (Translated by Alan), $ephiroth
 //===== Current Version: ===================================== 
-//= 2.1
+//= 2.2
 //===== Compatible With: ===================================== 
 //= eAthena SVN
 //===== Description: ========================================= 
@@ -41,6 +41,7 @@
 //= 1.9 Added Cool Corp. Event Staff, who oringialy resided in the DTS_warper script file. [L0ne_W0lf]
 //= 2.0 Added missing Lab Staff#amano08 NPC. (bugreport:4319) [Gepard]
 //= 2.1 Commented out Duplicate NPCs. (bugreport:4555)
+//= 2.2 Added missing NPC found in AEGIS files. [L0ne_W0lf]
 //=============================================================
 
 lighthalzen,198,285,5	script	Jiwon#zen5	862,{
@@ -3159,6 +3160,56 @@ lhz_in02,19,274,2	script	Maintenance Guy#lhz	851,{
 }
 */
 
+lighthalzen,337,296,3	script	Rekenber Employee#li_2	868,{
+	if (hg_tre > 54) {
+		mes "[Rekenber Employee]";
+		mes "Greetings. As part of our";
+		mes "effort to relieve the poor,";
+		mes "Rekenber is providing job";
+		mes "opportunities targeted for";
+		mes "citizens of the slum areas.";
+		next;
+		mes "[Rekenber Employee]";
+		mes "You can choose to work";
+		mes "from home, or undergo a";
+		mes "little bit of training for more";
+		mes "professional positions. This";
+		mes "is a great chance to make a";
+		mes "difference... and some money~";
+		emotion e_no1,"Rekenber Employee#li";
+		close;
+	}
+}
+
+lhz_in01,221,131,7	script	Scientist#li_01	865,{
+	if (isequipped(2241) && isequipped(2243)) {
+		if (hg_tre > 54) {
+			mes "[A Scientist]";
+			mes "What happened? All the machines are ruined and the research report are gone! The history of Regenschirm has been hacked!";
+			close;
+		}
+		else {
+			mes "[Scientist]";
+			mes "It takes so long for";
+			mes "this device to process";
+			mes "all the data and give me";
+			mes "the results. Still, the wait";
+			mes "heightens my anticipation...";
+			close;
+		}
+	}
+	else {
+		mes "[Scientist]";
+		mes "What?! Guards!";
+		mes "Hurry, there's an";
+		mes "intruder right here!";
+		emotion e_gasp,"A Scientist#li_01";
+		close2;
+		warp "lhz_in01",33,224;
+		end;
+	}
+}
+
 // Lighthalzen Mushroom.
 // Don't really understand why it's there, but it's funny regardless.
 lhz_in01,157,54,0,0	monster	Red Mushroom	1085,1,120000,100000,0

+ 78 - 1
npc/cities/manuk.txt

@@ -3,7 +3,7 @@
 //===== By: ================================================== 
 //= L0ne_W0lf
 //===== Current Version: ===================================== 
-//= 1.1
+//= 1.2
 //===== Compatible With: ===================================== 
 //= eAthena SVN
 //===== Description: ========================================= 
@@ -12,6 +12,7 @@
 //===== Additional Comments: ================================= 
 //= 1.0 First Version.
 //= 1.1 Added more town NPCs
+//= 1.2 Added more town NPCs
 //============================================================
 
 // cat_enhance
@@ -490,3 +491,79 @@ manuk,253,173,3	script	Manuk Benknee#tre5	449,{
 		close;
 	}
 }
+
+// ep12_2_dailybs
+manuk,251,180,5	script	Young Villager#ep13bs	454,{
+	if (isequipped(2782) == 1) {
+		mes "[Young Villager]";
+		mes "It's past the time of our date, why isn't she here yet!!?";
+		close;
+	}
+	else {
+		mes "[Asd]";
+		mes "Ywo di pi butfs oui Afbsu ";
+		close;
+	}
+}
+
+man_in01,360,137,5	script	Mechanic#ep13bs	454,{
+	if (isequipped(2782) == 1) {
+		mes "[Mechanic]";
+		mes "Alien races are not allowed to enter.";
+		mes "It's very dangerous here, please don't come any closer.";
+		close;
+	}
+	else {
+		mes "[Asoui]";
+		mes "Fs iua sdjosow ww ";
+		mes "Adds wwpq iusnd ";
+		close;
+	}
+}
+
+man_in01,68,187,0	script	Worker#ep13bs1	454,{
+	if (isequipped(2782) == 1) {
+		mes "[Worker]";
+		mes "Hmm, it smells delicious.";
+		mes "It should be time to turn it around now.";
+		next;
+		mes "[Worker]";
+		mes "Hardrock Mammoth steak should be eaten slightly raw!";
+		close;
+	}
+	else {
+		mes "[Tee]";
+		mes "As woue dpi sha we";
+		mes "Two psie bu le";
+		next;
+		mes "[Tee]";
+		mes "Tr sdou powee wwee ";
+		close;
+	}
+}
+
+man_in01,74,181,3	script	Worker#ep13bs2	454,{
+	if (isequipped(2782) == 1) {
+		mes "[Worker]";
+		mes "Chef Cook, how many plates should I put down?";
+		close;
+	}
+	else {
+		mes "[Tee]";
+		mes "We pishd bugs ouwwe iro ";
+		close;
+	}
+}
+
+man_in01,227,280,5	script	Scientist#ep13bs	449,{
+	if (isequipped(2782) == 1) {
+		mes "[Scientist]";
+		mes "Is there only one way we can survive..?";
+		close;
+	}
+	else {
+		mes "[Apti]";
+		mes "Dso piey pioit ioep ";
+		close;
+	}
+}

+ 38 - 1
npc/cities/splendide.txt

@@ -3,7 +3,7 @@
 //===== By: ================================================== 
 //= L0ne_W0lf
 //===== Current Version: ===================================== 
-//= 1.1
+//= 1.2
 //===== Compatible With: ===================================== 
 //= eAthena SVN
 //===== Description: ========================================= 
@@ -12,6 +12,7 @@
 //===== Additional Comments: ================================= 
 //= 1.0 First Version.
 //= 1.1 Added more town NPCs
+//= 1.2 Added more town NPCs
 //============================================================
 
 // cat_enhance
@@ -792,3 +793,39 @@ spl_in01,122,311,1	script	Laphine Soldier#ep13_2	447,{
 	}
 }
 
+// ep33_2_dailybs
+splendide,121,259,3	script	Fairy#ep13bs1	436,{
+	if (isequipped(2782) == 1) {
+		mes "[Fairy]";
+		mes "Have you ever gone to the East side?";
+		mes "Theres lots of ice~";
+		mes "How cold...";
+		close;
+	}
+	else {
+		mes "[nes]";
+		mes "VaFuloDor An ";
+		mes "WosNuffremu Ha TurAshTi";
+		mes "VilTiRini O ";
+		close;
+	}
+}
+
+splendide,163,264,3	script	Fairy#ep13bs2	438,{
+	if (isequipped(2782) == 1) {
+		mes "[Fairy]";
+		mes "What are you looking at!";
+		next;
+		mes "[Fairy]";
+		mes "Oh me! You know beauty when you see it don't you~?!";
+		close;
+	}
+	else {
+		mes "[nes]";
+		mes "UorVeLars No Ador";
+		next;
+		mes "[nes]";
+		mes "SeGothShar An AshDur";
+		close;
+	}
+}

File diff suppressed because it is too large
+ 221 - 2
npc/instances/EndlessTower.txt


+ 258 - 4
npc/merchants/hair_dyer.txt

@@ -3,7 +3,7 @@
 //===== By: ================================================== 
 //= kobra_k88; L0ne_W0lf
 //===== Current Version: ===================================== 
-//= 1.4
+//= 1.5
 //===== Compatible With: ===================================== 
 //= eAthena SVN
 //===== Description: ========================================= 
@@ -14,6 +14,7 @@
 //= 1.2 Rescripted to Aegis 10.3 standards. [L0ne_W0lf]
 //= 1.3 Fixed problem what "freezes" the NPC. (bugreport:509) [Samuray22]
 //= 1.4 Fixed getlook checking the wrong color. (bugreport:2392) [L0ne_W0lf]
+//= 1.5 Added Lighthalzen Hair Dying NPC. [L0ne_W0lf]
 //============================================================ 
 
 prt_in,243,168,4	script	Jovovich	91,{
@@ -78,7 +79,7 @@ prt_in,243,168,4	script	Jovovich	91,{
 						close;
 					}
 
-					if (.@headpalette == getlook(6)) {
+					if (.@headpalette == getlook(VAR_HEADPALETTE)) {
 						mes "[Hairdresser Jovovich]";
 						mes "Eh? But that's the hair color you already have. Please choose a different color.";
 						next;
@@ -111,7 +112,7 @@ prt_in,243,168,4	script	Jovovich	91,{
 						case 8: delitem 975,1; break; //Scarlet_Dyestuffs
 						}
 						set Zeny,Zeny-1000;
-						setlook 6,.@headpalette;
+						setlook VAR_HEADPALETTE,.@headpalette;
 						set .@choose_success,1;
 						break;
 					}
@@ -152,4 +153,257 @@ S_NoDye:
 		close;
 	}
 	return;
-}
+}
+
+// Lighthalzen
+lhz_in02,100,134,3	script	Hair Dyer#lich	850,{
+	mes "[Rossa]";
+	if (Sex == 1) {
+		mes "Welcome, come in~";
+		mes "Oh, I see that you take";
+		mes "much better care of your";
+		mes "hair than those other boys.";
+		mes "Now would you like to dye";
+		mes "your hair another color?";
+	}
+	else {
+		mes "Oh, wow~ Where did";
+		mes "you get your hair styled?";
+		mes "I love it! But... It would";
+		mes "be even more beautiful if";
+		mes "you dyed your hair. What";
+		mes "do you think about that?";
+	}
+	while (.@choose_success != 2) {
+		next;
+		switch(select("Dye Hair:Coloring Information:Cancel")) {
+		case 1:
+			mes "[Rossa]";
+			mes "Ho ho ho ho~";
+			mes "So which color would";
+			mes "you like to try? Something";
+			mes "vivid or dark? Sexy or cute?";
+			next;
+			while (.@choose_success != 2) {
+				if (.@choose_success == 1) {
+					mes "[Rossa]";
+					mes "Ooh, I like this color!";
+					mes "But would you like to";
+					mes "try a different one?";
+					next;
+					switch(select("Yes:No")) {
+					case 1:
+						mes "[Rossa]";
+						mes "Please select";
+						mes "another color~";
+						next;
+						break;
+					case 2:
+						mes "[Rossa]";
+						mes "An excellent choice~";
+						mes "Alright then, thank you";
+						mes "for using my service and";
+						mes "I hope you come by again!";
+						close2;
+						set .@choose_success,2;
+						break;
+					}
+				}
+				while (.@choose_success != 2) {
+					switch(select("Red, please.:Yellow, please.:Purple, please.:Orange, please.:Green, please.:Blue, please.:White, please.:Dark Brown, please.:I like my hair color.")) {
+					case 1:
+						set .@headpalette,8;
+						break;
+					case 2:
+						set .@headpalette,1;
+						break;
+					case 3:
+						set .@headpalette,2;
+						break;
+					case 4:
+						set .@headpalette,3;
+						break;
+					case 5:
+						set .@headpalette,4;
+						break;
+					case 6:
+						set .@headpalette,5;
+						break;
+					case 7:
+						set .@headpalette,6;
+						break;
+					case 8:
+						set .@headpalette,7;
+						break;
+					case 9:
+						if (.@choose_success != 0) {
+							mes "[Rossa]";
+							mes "Are you sure?";
+							mes "Alright then, you";
+							mes "know what's best for";
+							mes "your beauty and to tell";
+							mes "the truth, I agree with you~";
+							close2;
+							set .@choose_success,2;
+						}
+						else {
+							mes "[Rossa]";
+							mes "Oh, I see. Still, I can't";
+							mes "help but feel so disappointed.";
+							mes "You'd look so good if you dyed";
+							mes "your hair a different color~";
+							close2;
+							set .@choose_success,2;
+						}
+						break;
+					}
+					if (getlook(VAR_HEADPALETTE) == .@headpalette) {
+						mes "[Rossa]";
+						mes "Hmm, your hair color";
+						mes "is still fine, so there's";
+						mes "no need to dye it the same";
+						mes "color again, if that's what";
+						mes "you're worried about.";
+						next;
+					}
+					else {
+						if ((.@headpalette == 8) && (countitem(975) == 0)) {
+							mes "[Rossa]";
+							mes "Oh, I'm sorry dear,";
+							mes "but I can't dye your";
+							mes "hair if you didn't bring";
+							mes "Scarlet Dyestuffs with you...";
+							close2;
+							set .@choose_success,2;
+							break;
+						}
+						else if ((.@headpalette == 1) && (countitem(976) == 0)) {
+							mes "[Rossa]";
+							mes "Oh, I'm sorry dear,";
+							mes "but I can't dye your";
+							mes "hair if you didn't bring";
+							mes "Lemon Dyestuffs with you...";
+							close2;
+							set .@choose_success,2;
+							break;
+						}
+						else if ((.@headpalette == 2) && (countitem(981) == 0)) {
+							mes "[Rossa]";
+							mes "Oh, I'm sorry dear,";
+							mes "but I can't dye your";
+							mes "hair if you didn't bring";
+							mes "Violet Dyestuffs with you...";
+							close2;
+							set .@choose_success,2;
+							break;
+						}
+						else if ((.@headpalette == 3) && (countitem(980) == 0)) {
+							mes "[Rossa]";
+							mes "Oh, I'm sorry dear,";
+							mes "but I can't dye your";
+							mes "hair if you didn't bring";
+							mes "Orange Dyestuffs with you...";
+							close2;
+							set .@choose_success,2;
+							break;
+						}
+						else if ((.@headpalette == 4) && (countitem(979) == 0)) {
+							mes "[Rossa]";
+							mes "Oh, I'm sorry dear,";
+							mes "but I can't dye your";
+							mes "hair if you didn't bring";
+							mes "Darkgreen Dyestuffs";
+							mes "with you. Would you come";
+							mes "back after you get some?";
+							close2;
+							set .@choose_success,2;
+							break;
+						}
+						else if ((.@headpalette == 5) && (countitem(978) == 0)) {
+							mes "[Rossa]";
+							mes "Oh, I'm sorry dear,";
+							mes "but I can't dye your";
+							mes "hair if you didn't bring";
+							mes "Cobaltblue Dyestuffs";
+							mes "with you. Would you come";
+							mes "back after you get some?";
+							close2;
+							set .@choose_success,2;
+							break;
+						}
+						else if ((.@headpalette == 6) && (countitem(982) == 0)) {
+							mes "[Rossa]";
+							mes "Oh, I'm sorry dear,";
+							mes "but I can't dye your";
+							mes "hair if you didn't bring";
+							mes "White Dyestuffs with you...";
+							close2;
+							set .@choose_success,2;
+							break;
+						}
+						else if ((.@headpalette == 7) && (countitem(983) == 0)) {
+							mes "[Rossa]";
+							mes "Oh, I'm sorry dear,";
+							mes "but I can't dye your";
+							mes "hair if you didn't bring";
+							mes "Black Dyestuffs with you...";
+							close2;
+							set .@choose_success,2;
+							break;
+						}
+						if (Zeny < 1000) {
+							mes "[Rossa]";
+							mes "Oh, I'm so sorry dear,";
+							mes "but my service fee is";
+							mes "1,000 zeny. Did you forget";
+							mes "to bring your money with you?";
+							close2;
+							set .@choose_success,2;
+							break;
+						}
+						if (.@headpalette == 8) delitem 975,1; //Scarlet_Dyestuffs
+						else if (.@headpalette == 1) delitem 976,1; //Lemon_Dyestuffs
+						else if (.@headpalette == 2) delitem 981,1; //Violet_Dyestuffs
+						else if (.@headpalette == 3) delitem 980,1; //Orange_Dyestuffs
+						else if (.@headpalette == 4) delitem 979,1; //Darkgreen_Dyestuffs
+						else if (.@headpalette == 5) delitem 978,1; //Cobaltblue_Dyestuffs
+						else if (.@headpalette == 6) delitem 982,1; //White_Dyestuffs
+						else if (.@headpalette == 7) delitem 983,1; //Black_Dyestuffs
+						set zeny,zeny-1000;
+						setlook VAR_HEADPALETTE,.@headpalette;
+						set .@choose_success,1;
+						break;
+					}
+				}
+			}
+			break;
+		case 2:
+			mes "[Rossa]";
+			mes "When you're feeling";
+			mes "down, when you just want";
+			mes "to look nice for the one you";
+			mes "love, or when you just want";
+			mes "a different look, why don't";
+			mes "you dye your hair?";
+			next;
+			mes "[Rossa]";
+			mes "All you need is one";
+			mes "Dyestuffs item of the";
+			mes "color that you want to";
+			mes "dye your hair, as well as";
+			mes "a 1,000 zeny service fee.";
+			mes "I'm here for your beauty needs~";
+			break;
+		case 3:
+			mes "[Rossa]";
+			mes "You know, when you";
+			mes "put some effort into";
+			mes "your appearance, you'll";
+			mes "not only look better, but";
+			mes "you'll feel better about";
+			mes "yourself. Makes sense, right?";
+			close;
+		}
+	}
+	close;
+}

+ 615 - 1
npc/merchants/hair_style.txt

@@ -3,7 +3,7 @@
 //===== By: ==================================================
 //= Muad_Dib, Samuray22, Kisuka
 //===== Current Version: =====================================
-//= 1.3
+//= 1.4
 //===== Compatible With: =====================================
 //= eAthena SVN
 //===== Description: =========================================
@@ -12,6 +12,7 @@
 //===== Additional Comments: =================================
 //= 1.2 Rescripted to the Aegis 10.3 Standards. [Samuray22]
 //= 1.3 Updated to match AEGIS script. [Kisuka]
+//= 1.4 Added Lighthalzen Hair Dresser. [L0ne_W0lf]
 //============================================================
 
 // Hair Dresser Veronica
@@ -682,6 +683,619 @@ alberta,33,141,7	script	Roving Hair Dresser	87,{
 	}
 }
 
+
+// Lighthalzen
+lhz_in02,100,143,3	script	Hair Dresser#li	122,{
+	mes "[Prince Shammi]";
+	mes "Welcome to Prince Shammi's";
+	mes "Beauty Shop, the place to go";
+	mes "for faaabulous hair. Don't be";
+	mes "shy, tell me exactly how you";
+	mes "want me to make you glamorous~";
+	next;
+	switch(select("Check all hairstyles:Change hairstyle:Cancel")) {
+	case 1:
+		mes "[Prince Shammi]";
+		mes "Oh, would you like to";
+		mes "see all of the trendy new";
+		mes "hairstyles I offer?";
+		next;
+		mes "[Prince Shammi]";
+		mes "Please, oh please, choose from the following styles and I will show you a preview.";
+		next;
+		switch(select("Old Hairstyles:New Hairstyles")) {
+		case 1:
+			if (Sex == 1) {
+				switch(select("Petite Style:Executioner Style:Prince Style:Deviace Style:Cancel")) {
+				case 1:
+					cutin "hair_m_20",4;
+					mes "[Prince Shammi]";
+					mes "This is the ^3131FFPetite Style^000000,";
+					mes "which softens the gentleman's";
+					mes "appearance with long braids";
+					mes "for a fluffier appearance.";
+					break;
+				case 2:
+					cutin "hair_m_21",4;
+					mes "[Prince Shammi]";
+					mes "Oh, the ^3131FFExecutioner Style^000000!";
+					mes "It's a rugged, shaggy style";
+					mes "for that tough guy look that's";
+					mes "becoming popular these days.";
+					mes "And every girl loves a tough";
+					mes "guy, right? ^333333*Tee hee~*^000000";
+					break;
+				case 3:
+					cutin "hair_m_22",4;
+					mes "[Prince Shammi]";
+					mes "You certainly have an";
+					mes "eye for fashion! Yes, this";
+					mes "is the ^3131FFPrince Style^000000, the";
+					mes "pinnacle of sexiness and";
+					mes "sophistication. Magnifique, no?";
+					mes "Yes, choose this one, this one!";
+					break;
+				case 4:
+					cutin "hair_m_23",4;
+					mes "[Prince Shammi]";
+					mes "A-ha~! The ^3131FFDeviace Style^000000!";
+					mes "This is much like the Prince";
+					mes "Style, but with shorter hair";
+					mes "in the back. Yes, this look";
+					mes "is very neat and dandy.";
+					break;
+				case 5:
+					cutin "hair_f_01",255;
+					mes "[Prince Shammi]";
+					mes "No? You didn't want";
+					mes "to take a look? Please,";
+					mes "you're an adventurer, I know";
+					mes "you can be more daring than";
+					mes "that! Be fashionably adventurous, you fashionable adventurer~";
+					emotion e_lv,"Hair Dresser#i";
+					close;
+				}
+			}
+			else {
+				switch(select("Spring Rabbit Style:Harpy Style:Medusa Style:Isis Style:Cancel")) {
+				case 1:
+					cutin "hair_f_20",4;
+					mes "[Prince Shammi]";
+					mes "Oh yes, this is the ";
+					mes "^3131FFSpring Rabbit Style^000000.";
+					mes "The bobbing forelock";
+					mes "adds an aura of chic,";
+					mes "cutsiness and playfulness.";
+					mes "Yes? No? Yes? No? Oh yes!";
+					break;
+				case 2:
+					cutin "hair_f_21",4;
+					mes "[Prince Shammi]";
+					mes "Ooh, are you interested";
+					mes "in the ^3131FFHarpy Style^000000? The";
+					mes "natural curl coupled with";
+					mes "the pony tail results in";
+					mes "a sophisticated, yet very";
+					mes "natural and relaxed look~";
+					break;
+				case 3:
+					cutin "hair_f_22",4;
+					mes "[Prince Shammi]";
+					mes "Ahh, the ^3131FFMedusa Style^000000~";
+					mes "These boldy flowing locks";
+					mes "scream power and dominance";
+					mes "and is ideal for the big career";
+					mes "woman who wishes to be...";
+					mes "irresistable to men~";
+					break;
+				case 4:
+					cutin "hair_f_23",4;
+					mes "[Prince Shammi]";
+					mes "Ooh, the ^3131FFIsis Style^000000~";
+					mes "Yes, you'll look very cute";
+					mes "with your hair in buns on";
+					mes "on both sides of your head.";
+					mes "It'll be very darling on you!";
+					break;
+				case 5:
+					mes "[Prince Shammi]";
+					mes "No? You didn't want";
+					mes "to take a look? Please,";
+					mes "you're an adventurer, I know";
+					mes "you can be more daring than";
+					mes "that! Be fashionably adventurous, you fashionable adventurer~";
+					emotion e_lv,"Hair Dresser#li";
+					close;
+				}
+			}
+			break;
+		case 2:
+			if (Sex == 1) {
+				switch(select("Emergency Heal Perm:Aura Blade Cut:Power Swing:Renovatio Cut:Cancel")) {
+				case 1:
+					cutin "hair_m_24",4;
+					mes "[Prince Shammi]";
+					mes "This is the ^3131FFEmergency Heal Perm^000000";
+					mes "It is quite popular among the healing class.";
+					break;
+				case 2:
+					cutin "hair_m_25",4;
+					mes "[Prince Shammi]";
+					mes "You must be after a lady yes?";
+					mes "The ^3131FFAura Blade Cut^000000";
+					mes "is known to make the ladies swoon, you tiger you!";
+					break;
+				case 3:
+					cutin "hair_m_26",4;
+					mes "[Prince Shammi]";
+					mes "Oh you brute!";
+					mes "^3131FFPower Swing Cut^000000";
+					mes "Flex your style muscles with this hairstyle. This is definitely your look.";
+					break;
+				case 4:
+					cutin "hair_m_27",4;
+					mes "[Prince Shammi]";
+					mes "Ah! I see you're only interested in the latest trends.";
+					mes "Straight from the runway is the ^3131FFRenovatio Cut^000000.";
+					break;
+				case 5:
+					mes "[Prince Shammi]";
+					mes "No? You didn't want";
+					mes "to take a look? Please,";
+					mes "you're an adventurer, I know";
+					mes "you can be more daring than";
+					mes "that! Be fashionably adventurous, you fashionable adventurer~";
+					emotion e_lv,"Hair Dresser#li";
+					close;
+				}
+			}
+			else {
+				switch(select("Assumptio Perm:Soul Changer Cut:X Tornado Cut:Oratio Cut:Cancel")) {
+				case 1:
+					cutin "hair_f_24",4;
+					mes "[Prince Shammi]";
+					mes "This is the ^3131FFAssumptio Perm^000000";
+					mes "It's a shorter style perm that allows for maximum spellcasting.";
+					break;
+				case 2:
+					cutin "hair_f_25",4;
+					mes "[Prince Shammi]";
+					mes "You must be a man killer no?";
+					mes "The ^3131FFSoul Changer Cut^000000";
+					mes "will make any man open his wall... er heart to you!";
+					break;
+				case 3:
+					cutin "hair_f_26",4;
+					mes "[Prince Shammi]";
+					mes "This is a bit of a trendy style";
+					mes "^3131FFX Tornado Cut^000000";
+					mes "It's for adventurous people who like change.";
+					break;
+				case 4:
+					cutin "hair_f_27",4;
+					mes "[Prince Shammi]";
+					mes "Ah! I see you're only interested in the latest trends.";
+					mes "Straight from the runway is the ^3131FFOratio Cut^000000.";
+					mes "You'll be the envy of all of your friends with this hairstyle.";
+					break;
+				case 5:
+					mes "[Prince Shammi]";
+					mes "No? You didn't want";
+					mes "to take a look? Please,";
+					mes "you're an adventurer, I know";
+					mes "you can be more daring than";
+					mes "that! Be fashionably adventurous, you fashionable adventurer~";
+					emotion e_lv,"Hair Dresser#li";
+					close;
+				}
+			}
+		}
+		close2;
+		cutin "",255;
+		end;
+	case 2:
+		if (BaseLevel < 60) {
+			mes "[Prince Shammi]";
+			mes "Oh, I'm so sorry, but";
+			mes "I can only perform my";
+			mes "services for clients that have";
+			mes "matured enough to find their";
+			mes "true inner beauty. But please";
+			mes "come back once you do, okay?";
+			close;
+		}
+		else if ((countitem(973) < 3) || (countitem(974) < 3) || (countitem(901) < 100) || (countitem(1094) < 100) || (countitem(1020) < 100) || (countitem(1060) < 100) || (countitem(7152) < 100) || (Zeny < 99800)) {
+			mes "[Prince Shammi]";
+			mes "If you've already decided";
+			mes "what hairstyle you'd like,";
+			mes "please have my service charge";
+			mes "ready, as well as the materials";
+			mes "I will need in performing this";
+			mes "service, okay? Please bring...";
+			next;
+			mes "[Prince Shammi]";
+			mes "^3355FF3 Counteragent^000000,";
+			mes "^3355FF3 Mixture^000000,";
+			mes "^3355FF100 Daenggie^000000,";
+			mes "^3355FF100 Short Daenggie^000000...";
+			next;
+			mes "[Prince Shammi]";
+			mes "^3355FF100 Black Hair^000000,";
+			mes "^3355FF100 Golden Hair^000000,";
+			mes "^3355FF100 Glossy Hair^000000";
+			mes "and ^3355FF99,800 zeny^000000.";
+			mes "Once you do that, I'll make";
+			mes "a miracle out of your hair!";
+			close;
+		}
+		mes "[Prince Shammi]";
+		mes "Alright, please choose";
+		mes "which hairstyle you wish";
+		mes "to have from numbers 20 to 25.";
+		mes "Here's a list of the style names just in case you need them~";
+		next;
+		mes "[Prince Shammi]";
+		if (Sex == 1) {
+			mes "No. 20: Petite Style";
+			mes "No. 21: Executioner Style";
+			mes "No. 22: Prince Style";
+			mes "No. 23: Deviace Style";
+			mes "No. 24: Emergency Heal Perm";
+			mes "No. 25: Aura Blade Cut";
+			mes "No. 26: Power Swing and";
+			mes "No. 27: Renovatio Cut.";
+		}
+		else {
+			mes "No. 20: Spring Rabbit Style";
+			mes "No. 21: Harpy Style";
+			mes "No. 22: Medusa Style";
+			mes "No. 23: Isis Style";
+			mes "No. 24: Assumptio Perm";
+			mes "No. 25: Soul Changer Cut";
+			mes "No. 26: X Tornado Cut and";
+			mes "No. 27: Oratio Cut.";
+		}
+		next;
+		input .@input;
+		if (.@input == 0) {
+			mes "[Prince Shammi]";
+			mes "Oh...?";
+			mes "You decided to cancel?";
+			mes "Well, you know what's";
+			mes "best for you, I suppose.";
+			mes "Still, I'm so disappointed~";
+			close;
+		}
+		else if ((.@input < 20) || (.@input > 27)) {
+			mes "[Prince Shammi]";
+			mes "Dearie, please enter";
+			mes "a number from ''20'' to";
+			mes "''25,'' alright? Then I can";
+			mes "get right to work at making";
+			mes "you soooooooo beautiful!";
+			close;
+		}
+		else if (getlook(VAR_HEAD) == .@input) {
+			mes "[Prince Shammi]";
+			mes "Oh dear me, you're not";
+			mes "going to waste money for";
+			mes "the same hairstyle that you";
+			mes "have now, are you? You can";
+			mes "have someone else change";
+			mes "your hair color, you know.";
+			close;
+		}
+		else {
+			if (Sex == 1)
+				cutin "hair_m_"+.@input+".BMP",4;
+			else
+				cutin "hair_f_"+.@input+".BMP",4;
+			mes "[Prince Shammi]";
+			mes "Oooh! Now, is this the";
+			mes "hairstyle that you wanted?";
+			mes "This is No. "+.@input+", by the way.";
+			next;
+			switch(select("Yes.:No.")) {
+			case 1:
+				if (getlook(VAR_HEADPALETTE) == 0) {
+					mes "[Prince Shammi]";
+					mes "Oh, Sweet Christmas,";
+					mes "I almost forgot! Would";
+					mes "you like me to dye your";
+					mes "hair, free of charge? It's";
+					mes "a part of my service, so";
+					mes "please choose a color~";
+					next;
+					switch(select("Red:Yellow:Purple:Orange:Green:Blue:White:Dark Brown")) {
+					case 1:
+						set .@headpalette,8;
+						break;
+					case 2:
+						set .@headpalette,1;
+						break;
+					case 3:
+						set .@headpalette,2;
+						break;
+					case 4:
+						set .@headpalette,3;
+						break;
+					case 5:
+						set .@headpalette,4;
+						break;
+					case 6:
+						set .@headpalette,5;
+						break;
+					case 7:
+						set .@headpalette,6;
+						break;
+					case 8:
+						set .@headpalette,7;
+						break;
+					}
+				}
+				mes "[Prince Shammi]";
+				mes "Okay, let's get";
+				mes "started, shall we?";
+				mes "Keep your head still,";
+				mes "now. Yes, that's good...";
+				next;
+				mes "^3355FF*Snip snip*";
+				mes "*Rustle rustle*";
+				mes "*Clip clip clip clip*";
+				mes "*Bzzzzzzzzzzzzzzzzzzzz*^000000";
+				next;
+				set zeny,zeny-99800;
+				delitem 973,3; //Counteragent
+				delitem 974,3; //Mixture
+				delitem 901,100; //Danggie
+				delitem 1094,100; //Short_Daenggie
+				delitem 1020,100; //Long_Hair
+				delitem 1060,100; //Golden_Hair
+				delitem 7152,100; //Glossy_Hair
+				setlook VAR_HEAD,.@input;
+				setlook VAR_HEADPALETTE,.@headpalette;
+				mes "[Prince Shammi]";
+				mes "Well, we're all finished!";
+				mes "And my, oh my, you look even";
+				mes "more fabulous that I thought";
+				mes "you would! Oh, I can't believe";
+				if (Sex == 1) {
+					mes "how tough and elegant you are~";
+					mes "So ruggedly manly and handsome!";
+				}
+				else {
+					mes "how graceful and elegant you";
+					mes "look! Absolutely gorgeous!";
+				}
+				emotion e_kis,"Hair Dresser#li";
+				next;
+				mes "[Prince Shammi]";
+				mes "You love your new";
+				mes "hair, don't you? Feel";
+				mes "free to come back anytime.";
+				mes "I'll make you the best looking";
+				mes "person in the entire world!";
+				emotion e_no1,"Hair Dresser#li";
+				close;
+			case 2:
+				mes "[Prince Shammi]";
+				mes "Oh, did you forget which";
+				mes "hairstyle goes with which";
+				mes "number? By all means, please";
+				mes "check again! Find the one that";
+				mes "is perfect just for you, okay?";
+				close;
+			}
+		}
+		break;
+	case 3:
+		mes "[Prince Shammi]";
+		mes "Humm ? ";
+		mes "Maybe you don't understand";
+		mes "my futuristic styles.";
+		mes "Goodbye! ";
+		close;
+	}
+}
+
+lhz_in02,91,155,5	script	Assistant Beautician#li	862,{
+	mes "[Assistant Beautician]";
+	mes "Wah?! Sweet Jiminy,";
+	mes "you freaked me out!";
+	mes "What are you doing?!";
+	emotion e_omg,"Assistant Beautician#li";
+	next;
+	mes "[Assistant Beautician]";
+	mes "Oh! Um, a customer!";
+	mes "H-h-h-h-h-hello! Can";
+	mes "I help you with anything?";
+	next;
+	switch(select("What do you do?:Please change my hairstyle.:Who is Prince Shammi?")) {
+	case 1:
+		mes "[Assistant Beautician]";
+		mes "Oh! Me...? I'm";
+		mes "just an assistant";
+		mes "beautician, but I'm";
+		mes "training hard everyday";
+		mes "so that I can become";
+		mes "a real professional!";
+		next;
+		mes "[Assistant Beautician]";
+		mes "Yeah, I do all sorts of";
+		mes "grunt work for the boss while";
+		mes "I'm in training. Sometimes, he";
+		mes "makes me work pretty hard.";
+		mes "In fact, I better get back to work before he gets angry at me!";
+		close;
+	case 2:
+		if (BaseLevel < 60) {
+			mes "[Assistant Beautician]";
+			mes "Me...? Oh no,";
+			mes "no I can't! I mean,";
+			mes "I'd love to but, I'm";
+			mes "still in training and";
+			mes "I can't take responsibility";
+			mes "if I mess up on a little kid!";
+			close;
+		}
+		else if ((Zeny < 250000)) {
+			mes "[Assistant Beautician]";
+			mes "Well... I'm just an";
+			mes "assistant, but I have been";
+			mes "studying hairstyling after";
+			mes "work. If you want, just bring";
+			mes "me 250,000 zeny and I'll try";
+			mes "my best to change your hair~";
+			next;
+			mes "[Assistant Beautician]";
+			mes "I'd appreciate it if you'd";
+			mes "give me this chance! The";
+			mes "boss doesn't think I'm ready";
+			mes "for styling real people yet, so";
+			mes "I haven't had much practice!";
+			next;
+			mes "[Assistant Beautician]";
+			mes "I just know I could";
+			mes "do a good job on your";
+			mes "hair! Just... Just please";
+			mes "understand if I mess up.";
+			mes "It won't be too bad, I promise~";
+			close;
+		}
+		else {
+			mes "[Assistant Beautician]";
+			mes "You're really going to";
+			mes "give me a chance to practice?";
+			mes "Oh, I love you so much! Okay,";
+			mes "I'll need 250,000 zeny to make";
+			mes "up for the material expenses.";
+			mes "Is that okay with you?";
+			next;
+			switch(select("Of course~:On second thought...")) {
+			case 1:
+				mes "[Assistant Beautician]";
+				mes "Great! Now, please";
+				mes "choose a hairstyle";
+				mes "from ''1'' to ''23.''";
+				mes "Um, if you need to";
+				mes "cancel, just enter ''0.''";
+				next;
+				input .@input;
+				if (.@input == 0) {
+					mes "[Assistant Beautician]";
+					mes "Awwww...";
+					mes "I guess you don't";
+					mes "trust me after all...";
+					close;
+				}
+				else if ((.@input < 1) || (.@input > 23)) {
+					mes "[Assistant Beautician]";
+					mes "Huh? I thought I asked";
+					mes "you to enter a number from";
+					mes "''1'' to ''23?'' What did I do";
+					mes "wrong this time? Hmmm...";
+					close;
+				}
+				else {
+					mes "[Assistant Beautician]";
+					mes "So this is the";
+					mes "style you want me";
+					mes "to try to do for you?";
+					if (Sex == 1) {
+						if (.@input < 10)
+							cutin "hair_m_0"+.@input+".BMP",4;
+						else
+							cutin "hair_m_"+.@input+".BMP",4;
+					}
+					else {
+						if (.@input < 10)
+							cutin "hair_f_0"+.@input+".BMP",4;
+						else
+							cutin "hair_f_"+.@input+".BMP",4;
+					}
+					next;
+					switch(select("Yes, let's try it~:Cancel.")) {
+					case 1:
+						break;
+					case 2:
+						mes "[Assistant Beautician]";
+						mes "Oooh, there must";
+						mes "be some style that";
+						mes "you like, right? Hmmm...";
+						close;
+					}
+				}
+				mes "[Assistant Beautician]";
+				mes "Great, you finally";
+				mes "picked one! What, which";
+				mes "one did you pick again?";
+				mes "Ah, I found it, I found it!";
+				mes "Haha! No problem here!";
+				mes "Now it's time to style!";
+				next;
+				nude;
+				mes "[Assistant Beautician]";
+				mes "Bwwwwaaaahhhh!";
+				next;
+				mes "[Assistant Beautician]";
+				mes "Yap! Pwwwaaattt!";
+				next;
+				mes "[Assistant Beautician]";
+				mes "Waaaah!";
+				mes "Oh crap!";
+				mes "Wait, I can...";
+				mes "I can fix this!";
+				next;
+				set .@style_r,rand(1,23);
+				set .@color_r,rand(1,8);
+				mes "[Assistant Beautician]";
+				mes "^333333*Pant Pant Pant*^000000";
+				next;
+				set zeny,zeny-250000;
+				setlook VAR_HEAD,.@style_r;
+				setlook VAR_HEADPALETTE,.@color_r;
+				mes "[Assistant Beautician]";
+				mes "Bwahahaha! Success!";
+				if (.@input == .@style_r) {
+					mes "So... How do you like";
+					mes "your new style? I love it!";
+				}
+				else {
+					mes "Wha...? This isn't what";
+					mes "you wanted? Uh oh... Um...";
+					mes "Well, next time I know I can";
+					mes "do a much better job! Right!";
+				}
+				next;
+				mes "[Assistant Beautician]";
+				mes "Oh, you're such a";
+				mes "sweetheart for helping";
+				mes "me! Thank you for using";
+				mes "my service and come again~";
+				emotion e_kis,"Assistant Beautician#li";
+				close;
+			case 2:
+				mes "[Assistant Beautician]";
+				mes "Huh? Oh no, you're";
+				mes "quitting? Well, I guess";
+				mes "I couldn't trust me to";
+				mes "style my hair either...";
+				mes "You're... You're right.";
+				close;
+			}
+		}
+	case 3:
+		mes "[Assistant Beautician]";
+		mes "Prince Shammi?";
+		mes "He's only a genius when";
+		mes "it comes to hairstyling!";
+		mes "I'm just his apprentice, but";
+		mes "maybe someday, I can be a";
+		mes "force in the fashion world too!";
+		close;
+	}
+}
+
 //===== Old Changelog: =================================
 //= 07/06/05 : Added 1st Version. [Muad_Dib]
 //= Converted to eAthena format by Dr.Evil Fixed typos [Nexon]

+ 3 - 5
npc/other/arena/arena_aco.txt

@@ -3,7 +3,7 @@
 //===== By: ==================================================
 //= L0ne_W0lf
 //===== Current Version: =====================================
-//= 1.1
+//= 1.2
 //===== Compatible With: =====================================
 //= Any Athena Version
 //===== Description: =========================================
@@ -11,6 +11,7 @@
 //===== Additional Comments: =================================
 //= 1.0 First version.
 //= 1.1 Corrected variable typos. (bugreport:4374) [L0ne_w0lf]
+//= 1.2 Updated 'waitingroom' to support required zeny/lvl. [Kisuka]
 //============================================================
 
 arena_room,114,102,0	script	onlyaco#arena	45,1,1,{
@@ -31,10 +32,7 @@ arena_room,136,138,3	script	Acolyte Waiting Room	124,{
 	end;
 
 OnInit:
-	//setarenaeventsize 1
-	waitingroom "Personal Force, Acolyte Class",50,"Acolyte Waiting Room::OnStartArena",1;
-	//SetReqLevel 10 99
-	//SetFeeZeny 1000
+	waitingroom "Personal Force, Acolyte Class",50,"Acolyte Waiting Room::OnStartArena",1,1000,10,99;
 	enablewaitingroomevent;
 	end;
 

+ 3 - 2
npc/other/hugel_bingo.txt

@@ -3,7 +3,7 @@
 //===== By: ==================================================
 //= SinSloth
 //===== Current Version: =====================================
-//= 1.7
+//= 1.8
 //===== Compatible With: =====================================
 //= Any eAthena Version
 //===== Description: =========================================
@@ -18,6 +18,7 @@
 //= 1.5 - Applied a fix to players locations which were not rotating properly. [SinSloth]
 //= 1.6 - Removed nescesity to win to proceed with quest [Yommy]
 //= 1.7 - Replaced effect numerics with constants. [Samuray22]
+//= 1.8 Updated 'waitingroom' to support required zeny/lvl. [Kisuka]
 //============================================================
 
 que_bingo,48,84,5	script	Bingo Waiting Room	124,{
@@ -26,7 +27,7 @@ que_bingo,48,84,5	script	Bingo Waiting Room	124,{
 OnInit:
 	set $hu_bingoa,0;
 	set $hu_bingob,0;
-	waitingroom "Bingo Waiting Room - 5 People",50,"Bingo Waiting Room::OnWarp",5;
+	waitingroom "Bingo Waiting Room - 5 People",50,"Bingo Waiting Room::OnWarp",5,1000;
 	end;
 	
 OnWarp:

+ 1767 - 0
npc/other/poring_war.txt

@@ -0,0 +1,1767 @@
+//===== eAthena Script ======================================= 
+//= Poring War
+//===== By: ================================================== 
+//= Kisuka
+//===== Current Version: ===================================== 
+//= 1.0
+//===== Compatible With: ===================================== 
+//= eAthena SVN
+//===== Description: ========================================= 
+//= [Aegis Conversion]
+//= Poring War
+//===== Additional Comments: ================================= 
+//= 1.0 First version. [Kisuka]
+//============================================================
+
+// Poring War Recruiter
+//============================================================
+prt_fild08,159,371,3	script	Poring War Recruiter#wop	909,{
+	mes "[Poring]";
+	mes "!!!!!";
+	mes "Whoa-! Humans, ring~!!";
+	mes "Gotta hide, hide, right~!";
+	mes "They're tempting us with Jellopy! Don't be fooled!";
+	next;
+	mes "[Poring]";
+	mes "Hwak!!";
+	mes "Ring, Ring~ What's wrong with you people..?";
+	mes "Hey.. Hey, there. Hu.. Humans...";
+	mes "Poring..";
+	next;
+	mes "[Poring]";
+	mes "I.. I've got some interesting work for ya.. Would you be interested?";
+	mes "We.. we porings need lots and lots of brave human worriers, ring~.";
+	next;
+	switch(select("Alright, I'm with you!:What's that?:Ignore")) {
+	case 1:
+		if (Zeny > 499) {
+			mes "[Poring]";
+			mes "Oh, and there's an entrance fee of 500 zeny, ring.";
+			mes "Have a good time, ring.";
+			delitem 7773,countitem(7773);
+			set Zeny,Zeny-500;
+			close2;
+			warp "poring_w01",112,138;
+			end;
+		}else{
+			mes "[Poring]";
+			mes "Oh, and there's an entrance fee of 500 zeny, ring.";
+			mes "...........";
+			mes "Hey, that's life, ring. We need zeny too you know~!";
+			close;
+		}
+	case 2:
+		mes "[Poring]";
+		mes "That's.. because there's been a.. slight confliction in our.. Ring Society..";
+		mes "So we've got to.............have a battle to settle this problem..";
+		mes "You'll see when you get there!";
+		close;
+	case 3:
+		mes "[Poring]";
+		mes "Huhhhh! Hu.. Humans are so cold and cruel!!!";
+		close;
+	}
+}
+
+// Poring Vending Machine
+//============================================================
+poring_w01,100,97,3	script	Poring Vending Machine#w	909,{
+	if (checkweight(714,3) == 0) {
+		mes "- Your are carrying too much items in order to use the Vending Machine. -";
+		close;
+	}
+	mes "It's a vending machine. You can use Poring Coints to purchase.";
+	next;
+	if(select("Purchase.:Read the descriptions of goods.") == 1) {
+		mes "You need Poring Coins to purchase items.";
+		mes "You cannot use any zeny.";
+		mes "Item name - Price Poring Coin(P.Co)";
+		next;
+		switch(select("Marvelous Medal - 4 P.Co:Union of Tribe - 20 P.Co:Poring Box - 30 P.Co:Next")) {
+		case 1:
+			callsub S_PoringVending,7515,4;
+		case 2:
+			callsub S_PoringVending,658,20;
+		case 3:
+			callsub S_PoringVending,12109,30;
+		case 4:
+			mes "This is a special item.";
+			mes "Item name - Poring Coin(P.Co)";
+			next;
+			switch(select("Wild Rose - 15 P.Co:Doppelganger - 20 P.Co:Egnigem Cenia - 20 P.Co:Collection Item")) {
+			case 1:
+				callsub S_PoringVending,12300,15;
+			case 2:
+				callsub S_PoringVending,12301,20;
+			case 3:
+				callsub S_PoringVending,12302,20;
+			case 4:
+				mes "Figures of 1st Job Class Characters including Novice are finally on sale!";
+				mes "Figures except for Novice are all ^4d4dffCharacter bound items^000000.";
+				mes "Please be aware before you make a purchase~";
+				mes "Item name - Poring Coin(P.Co)";
+				next;
+				switch(select("Novice Figure - 50 P.Co:Swordman Figure - 100 P.Co:Thief Figure - 100 P.Co:Merchant Figure - 100 P.Co:Acolyte Figure - 100 P.Co:Mage Figure - 100 P.Co:Archer Figure - 100 P.Co:Random Draw - 50 P.Co:Cancel")) {
+				case 1:
+					callsub S_PoringVending,2765,50;
+				case 2:
+					callsub S_PoringVending,2766,100;
+				case 3:
+					callsub S_PoringVending,2770,100;
+				case 4:
+					callsub S_PoringVending,2771,100;
+				case 5:
+					callsub S_PoringVending,2767,100;
+				case 6:
+					callsub S_PoringVending,2768,100;
+				case 7:
+					callsub S_PoringVending,2769,100;
+				case 8:
+					mes "You have chosen Random Draw.";
+					mes "1 of 7 diffeent kinds of figures will be selected.";
+					next;
+					if(select("Draw:Cancel") == 1) {
+						if(countitem(7539) >= 50) {
+							mes "Insert the Poring coin and pull the lever.";
+							mes "Click~ The item came out of the mouth of the Poring with a rumbling sound.";
+							mes "What could it be?";
+							next;
+							switch(rand(1,17)) {
+							case 5: set .@Random_Figure,2766; break; // Swordman_Figure
+							case 6: set .@Random_Figure,2767; break; // Acolyte_Figure
+							case 8: set .@Random_Figure,2770; break; // Thief_Figure
+							case 11: set .@Random_Figure,2771; break; // Merchant_Figure
+							case 13: set .@Random_Figure,2769; break; // Archer_Figure
+							case 14: set .@Random_Figure,2768; break; // Mage_Figure
+							default: set .@Random_Figure,2765; break; // Novice_Figure
+							}
+							mes "A nice " + getitemname(.@Random_Figure) + ".";
+							delitem 7539,50; // Poring_Coin
+							getitem .@Random_Figure,1;
+							close;
+						}else{
+							mes "Not enough coins.";
+							close;
+						}
+					}
+					mes "["+strcharinfo(0)+"]";
+					mes "... Maybe next time...";
+					close;
+				case 9:
+					mes "["+strcharinfo(0)+"]";
+					mes "... Maybe next time...";
+					close;
+				}
+			}
+		}
+	}
+	mes "Selling Item List";
+	mes "====================";
+	mes "[Marvelous Medal]";
+	mes " : A medal made of special metal only produced in Hugel.";
+	mes " ";
+	mes "[Union of Tribe]";
+	mes " : A statue with the image of a strong union of Tribes. People believe watching this statue actually helps strengthen the relationships between Tribes.";
+	mes " ";
+	mes "[Poring Box]";
+	mes " : A box wrapped with Poring patterned wrapping paper. Something's inside.";
+	mes " ";
+	mes "[Wild Rose]";
+	mes " : Your friend Wild Rose will come and help you.";
+	mes " ";
+	mes "[Mr. Doppel]";
+	mes " : A young nobe, Doppelganger will come and help you.";
+	mes " ";
+	mes "[Egnigem Cenia]";
+	mes " : A beautiful girl, Egnigem Cenia from Somatology Laboratory, is going to come and help you.";
+	mes " ";
+	mes "[Novice Figure]";
+	mes " : A fine figure of a Novice. Can be equiped as an '^4d4dffaccessory^000000'.";
+	mes " HP + 70, extra effect of HP + 30 when equipped by a Novices.";
+	mes " ";
+	mes "[Swordman Figure]";
+	mes " : A nice figure of a Swordman. Can be equipped as an '^4d4dffaccessory^000000'.";
+	mes " VIT + 1, extra effect of DEF + 2 when equipped by Swordman classes.";
+	mes " ";
+	mes "[Merchant Figure]";
+	mes " : A fine figure of a Merchant. Can be equipped as an '^4d4dffaccessory^000000'.";
+	mes " STR + 1, extra effect of CRI + 5 when equipped by Merchant classes.";
+	mes " ";
+	mes "[Thief Figure]";
+	mes " : A fine Figure of a Thief. Can be equipped as an '^4d4dffaccessory^000000'.";
+	mes " AGI + 1, extra effectASPD + 3% when equipped by Thief classes.";
+	mes " ";
+	mes "[Mage Figure]";
+	mes " : A fine figure of a Mage. Can be equipped as an '^4d4dffaccessory^000000'.";
+	mes " INT + 1, an extra SP Recovery increase by 5% when equipped by Mage classes.";
+	mes " ";
+	mes "[Acolyte Figure]";
+	mes " : A fine figure of an Acolyte. Can be equipped as an '^4d4dffaccessory^000000'.";
+	mes " INT + 1, extra effct of SP + 50 when equipped by Acolyte classes.";
+	mes " ";
+	mes "[Archer Figure]";
+	mes " : A fine figure of an Archer. Can be equipped as an '^4d4dffaccessory^000000'.";
+	mes " DEX + 1, extra effct of ATK + 10 when equipped by Archer classes.";
+	close;
+	end;
+
+S_PoringVending:
+	if(countitem(7539) >= getarg(1)) {
+		mes "Click~ The item came out of the mouth of the Poring with a rumbling sound.";
+		delitem 7539,getarg(1); // Poring_Coin
+		getitem getarg(0),1;
+	}else{
+		mes "Not enough coins.";
+	}
+	close;
+}
+
+// Information
+//============================================================
+poring_w01,96,97,3	script	Sweet Devi#wop	738,{
+	if (MaxWeight-Weight < 2000 || checkweight(1201,1) == 0) {
+		mes "- Wait a minute !! -";
+		mes "- Currently you're carrying -";
+		mes "- too many items with you. -";
+		mes "- Please try again -";
+		mes "- after you loose some weight. -";
+		close;
+	}
+	mes "[Deviruchi]";
+	mes "Oh, Another Human Warrior!";
+	mes "How come so many humans want to join our Poring War these days?";
+	next;
+	mes "[Deviruchi]";
+	mes "Well, whatever, as long as I make money out of it~";
+	mes "Ok, Warriors-! Hahaha How badly have I wanted to shout it out~!!";
+	next;
+	mes "[Deviruchi]";
+	mes "You, brave warrior, are you ready to join the holy battle of Angeling and Deviling?";
+	next;
+	mes "[Deviruchi]";
+	mes "Hehehee, I feel kinda shy now.";
+	mes "Anyway, human. Do you want to join our Poring War?";
+	next;
+	switch(select("Am I qualified to join?:How do I join the war?:Cancel:Let me out of here, please!")) {
+	case 1:
+		mes "[Deviruchi]";
+		mes "No racial discrimination! Anyone can join if they're willing to fight.";
+		mes "But the weird thing is that you humans who used to be our greatest enemies are now our participants.";
+		next;
+		mes "[Deviruchi]";
+		mes "If you really want to fight in the war or whatever.. the Team recruiter's right there.";
+		mes "Also, it's totally up to you which team you want to fight for~";
+		close;
+	case 2:
+		mes "[Deviruchi]";
+		mes "It's simple. You see that Team recruiting room?";
+		mes "Each team is composed of 5 people. As soon as 5 members are collected, the battle starts.";
+		mes "You win if you kill the other team's Porings.";
+		next;
+		mes "[Deviruchi]";
+		mes "This also means that the battle needs the total of 10 members.";
+		next;
+		mes "[Deviruchi]";
+		mes "When all 10 members are collected, those participants get to choose a team. Each team then should have 5 members who are in the SAME party.";
+		next;
+		mes "[Deviruchi]";
+		mes "So, finally, half of the members joins the Angeling Team";
+		mes "and the other half joins the Deviling Team.";
+		next;
+		mes "[Deviruchi]";
+		mes "If you're a member of the Angeling Team, your goal is to kill the Devilings at the other team's base and vice versa.";
+		next;
+		mes "[Deviruchi]";
+		mes "Each team should try killing both Porings in the other team's base. After killing one Poring, you have a limited time to kill the other Poring. Otherwise, the one you killed will come back alive.";
+		next;
+		mes "[Deviruchi]";
+		mes "It's sort of like a capture the flag game but with Porings instead. Understood?";
+		mes "And you need to make sure you know who's in which party.";
+		close;
+	case 3:
+		mes "[" + strcharinfo(0) + "]";
+		mes "hmm, I see.";
+		close;
+	case 4:
+		mes "[Deviruchi]";
+		mes "Oh, Alright. I can help.";
+		mes "I'll send you back to your savepoint.";
+		close2;
+		if(WoP_SaveMap$ != "") {
+			savepoint WoP_SaveMap$,WoP_SaveMap_X,WoP_SaveMap_Y;
+			set WoP_SaveMap$,"";
+			set WoP_SaveMap_X,0;
+			set WoP_SaveMap_Y,0;
+		}
+		warp getsavepoint(0), getsavepoint(1), getsavepoint(2);
+		end;
+	}
+
+OnPCLogoutEvent:
+	getmapxy .@map$,.@x,.@y,0;
+	if (.@map$ == "poring_w02") {
+		if(WoP_SaveMap$ != "") {
+			savepoint WoP_SaveMap$,WoP_SaveMap_X,WoP_SaveMap_Y;
+			set WoP_SaveMap$,"";
+			set WoP_SaveMap_X,0;
+			set WoP_SaveMap_Y,0;
+		}
+		delitem 7773,countitem(7773);
+		set wop_team,0;
+	}
+	end;
+
+OnPCDieEvent:
+	getmapxy .@map$,.@x,.@y,0;
+	if (.@map$ == "poring_w02" && wop_team) {
+		if(getsavepoint(0) != "poring_w02" && WoP_SaveMap$ == "") {
+			set WoP_SaveMap$,getsavepoint(0);
+			set WoP_SaveMap_X,getsavepoint(1);
+			set WoP_SaveMap_Y,getsavepoint(2);
+		}
+		if (wop_team == 1) {
+			savepoint "poring_w02",rand(44,51),rand(76,87);
+		}
+		if (wop_team == 2) {
+			savepoint "poring_w02",rand(146,153),rand(76,87);
+		}
+	}
+	end;
+
+OnPCKillEvent:
+	getmapxy .@map$,.@x,.@y,0;
+	if (.@map$ == "poring_w02" && wop_team) {
+		getnameditem 7773,rid2name(killedrid);
+	}
+	end;
+
+OnInit:
+	removemapflag "poring_w02",mf_partylock;
+	removemapflag "poring_w02",mf_pvp;
+	removemapflag "poring_w02",mf_pvp_noguild;
+	removemapflag "poring_w02",mf_pvp_nocalcrank;
+	set $@wop_teamcount,0;
+	set $@wop_deadcount_a,0;
+	set $@wop_deadcount_d,0;
+	set $@wop_team_a,0;
+	set $@wop_team_d,0;
+	set $@wop_doorcount_a,0;
+	set $@wop_doorcount_d,0;
+	end;
+}
+
+// Poring Registers
+//============================================================
+poring_w01,91,97,3	script	Poring#wop_door_all	1002,{
+	end;
+	
+OnInit:
+	waitingroom "[Recruiting 10 Battle Participants]",10,"Poring#wop_door_all::OnStartArena",10,500,9,99;
+	enablewaitingroomevent;
+	end;
+
+OnStartArena:
+	warpwaitingpc "poring_w01",101,70;
+	donpcevent "#wop_warp_rtry::OnReady";
+	disablewaitingroomevent;
+	end;
+
+OnEnable:
+	enablewaitingroomevent;
+	end;
+
+OnDisable:
+	disablewaitingroomevent;
+	end;
+}
+
+poring_w01,91,68,5	script	Poring#wop_door_a	1002,{
+	end;
+
+OnInit:
+	waitingroom "[Angeling Team Recruiter]",5,"Poring#wop_door_a::OnStartArena",5,0,9,99;
+	enablewaitingroomevent;
+	end;
+
+OnStartArena:
+	warpwaitingpc "poring_w02",26,175;
+	disablewaitingroomevent;
+	if($@wop_teamcount == 0) {
+		set $@wop_teamcount,1;
+		donpcevent "Poring#wop_door_d::OnDevilingStart";
+		donpcevent "#wop_warp_rtry::OnStop";
+	}
+	else if($@wop_teamcount == 1) {
+		donpcevent "#wop_master::OnStart";
+		donpcevent "Poring#wop_door_d::OnStop";
+		stopnpctimer;
+	}
+	end;
+
+OnEnable:
+	enablewaitingroomevent;
+	end;
+
+OnDisable:
+	disablewaitingroomevent;
+	end;
+
+OnAngelingStart:
+	initnpctimer;
+	end;
+
+OnStop:
+	stopnpctimer;
+	end;
+
+OnTimer1000:
+	mapannounce "poring_w01","The greatest battle of all time, the recruitment for the Deviling Team is over, ring!",0,0xf08080;
+	end;
+
+OnTimer4000:
+	mapannounce "poring_w01","Join the proud Angeling Team with angel wings!!",0,0xf08080;
+	end;
+
+OnTimer8000:
+	mapannounce "poring_w01","You got one minute to join the Angeling Team. The battle will be cancelled in 1 minute if not ready!!",0,0xf08080;
+	donpcevent "#wop_master::OnAngelingWarn";
+	end;
+
+OnTimer13000:
+	mapannounce "poring_w01","This is the time to join the great Angeling Team, ring!",0,0xf08080;
+	end;
+
+OnTimer20000:
+	mapannounce "poring_w01","This battle is the proud of the porings! Ring! Join the Angeling Team!!",0,0xf08080;
+	end;
+
+OnTimer30000:
+	mapannounce "poring_w01","We don't have much time, ring. Don't let the Devilings contaminate you!",0,0xf08080;
+	end;
+
+OnTimer40000:
+	mapannounce "poring_w01","Come! Join us!",0,0xf08080;
+	end;
+
+OnTimer50000:
+	mapannounce "poring_w01","What a pitty! I can't believe that brave warriors are missing!",0,0xf08080;
+	end;
+
+OnTimer55000:
+	mapannounce "poring_w01","Deviling: You can't leave us waiting for ever!! We're going to cancel the battle, ring!",0,0x33FF66;
+	end;
+
+OnTimer55100:
+	donpcevent "Poring#wop_door_a::OnDisable";
+	donpcevent "Poring#wop_door_d::OnDisable";
+	donpcevent "Poring#wop_door_all::OnDisable";
+	set $@wop_teamcount,0;
+	donpcevent "#wop_master::OnAngelingEnd";
+	donpcevent "#wop_warp_rtry::OnEnable";
+	end;
+
+OnTimer58000:
+	mapannounce "poring_w01","...There is nothing we can do, ring... Lets cheer for the next one, ring.",0,0xf08080;
+	donpcevent "#wop_master::OnReset";
+	stopnpctimer;
+	end;
+}
+
+poring_w01,112,68,3	script	Poring#wop_door_d	1002,{
+	end;
+
+OnInit:
+	waitingroom "[Deviling Team Recruiter]",5,"Poring#wop_door_d::OnStartArena",5,0,9,99;
+	enablewaitingroomevent;
+	end;
+
+OnStartArena:
+	warpwaitingpc "poring_w02",170,175;
+	disablewaitingroomevent;
+	if($@wop_teamcount == 0) {
+		set $@wop_teamcount,1;
+		donpcevent "Poring#wop_door_a::OnAngelingStart";
+		donpcevent "#wop_warp_rtry::OnStop";
+	}
+	else if($@wop_teamcount == 1) {
+		donpcevent "#wop_master::OnStart";
+		donpcevent "Poring#wop_door_a::OnStop";
+		stopnpctimer;
+	}
+	end;
+
+OnEnable:
+	enablewaitingroomevent;
+	end;
+
+OnDisable:
+	disablewaitingroomevent;
+	end;
+
+OnAngelingStart:
+	initnpctimer;
+	end;
+
+OnStop:
+	stopnpctimer;
+	end;
+
+OnTimer1000:
+	mapannounce "poring_w01","No more good people, the recruitment for the Angeling Team is over, ring!",0,0x33FF66;
+	end;
+
+OnTimer4000:
+	mapannounce "poring_w01","Nice members of the Deviling Team! Lets gather, ring!!",0,0x33FF66;
+	end;
+
+OnTimer8000:
+	mapannounce "poring_w01","The battle will be cancelled if the members aren't recruited in one minute!!",0,0x33FF66;
+	donpcevent "#wop_master::OnDevilingWarn";
+	end;
+
+OnTimer13000:
+	mapannounce "poring_w01","This is the time to join the brave Deviling Team, ring!",0,0x33FF66;
+	end;
+
+OnTimer20000:
+	mapannounce "poring_w01","D,E,V,I,L,I,N,G! Deviling Team! Come and join us!",0,0x33FF66;
+	end;
+
+OnTimer30000:
+	mapannounce "poring_w01","There ain't much time left, ring! If you wish to became a member of Deviling Team, Come and Join!",0,0x33FF66;
+	end;
+
+OnTimer40000:
+	mapannounce "poring_w01","D,E,V,I,L,I,N,G! Deviling Team! Come and Join us!!",0,0x33FF66;
+	end;
+
+OnTimer50000:
+	mapannounce "poring_w01","What a pitty! I can't believe there aren't enough players!",0,0x33FF66;
+	end;
+
+OnTimer55000:
+	mapannounce "poring_w01","Angeling: We got no time to wait, stupid Deviling! The battle has been cancelled, ring!",0,0xf08080;
+	end;
+
+OnTimer55100:
+	donpcevent "Poring#wop_door_a::OnDisable";
+	donpcevent "Poring#wop_door_d::OnDisable";
+	donpcevent "Poring#wop_door_all::OnDisable";
+
+	set $@wop_teamcount,0;
+	donpcevent "#wop_master::OnDevilingEnd";
+	donpcevent "#wop_warp_rtry::OnEnable";
+	end;
+
+OnTimer58000:
+	mapannounce "poring_w01","...Ughhhhhh... Tell me that isn't happening, ring! Right, Be ready for the next one, ring!!",0,0x33FF66;
+	donpcevent "#wop_master::OnReset";
+	stopnpctimer;
+	end;
+}
+
+poring_w01,103,70,0	script	#wop_warp_rtry	139,13,13,{
+	end;
+
+OnInit:
+	disablenpc "#wop_warp_rtry";
+	end;
+
+OnEnable:
+	enablenpc "#wop_warp_rtry";
+	end;
+
+OnDisable:
+	disablenpc "#wop_warp_rtry";
+	end;
+
+OnReady:
+	initnpctimer;
+	end;
+
+OnStop:
+	stopnpctimer;
+	end;
+
+OnTouch:
+	warp "poring_w01",112,138;
+	end;
+
+OnTimer3000:
+	mapannounce "poring_w01","Porings: I am giving you 1 minute. Choose your team, ring!",0,0xf08080;
+	end;
+
+OnTimer33000:
+	mapannounce "poring_w01","Porings: 30 seconds left! Come on, Choose a team now, ring?!!",0,0xf08080;
+	end;
+
+OnTimer58000:
+	mapannounce "poring_w01","Porings: You sure you're a warrior?!!! I'm disappointed, ring!",0,0xf08080;
+	end;
+
+OnTimer60000:
+	mapannounce "poring_w01","The battle has been canceled since not all teams are full!!",0,0xf08080;
+	end;
+
+OnTimer61000:
+	enablenpc "#wop_warp_rtry";
+	end;
+
+OnTimer65000:
+	disablenpc "#wop_warp_rtry";
+	donpcevent "#wop_master::OnReset";
+	stopnpctimer;
+	end;
+}
+
+// Mr. Doppel
+//============================================================
+poring_w02,26,181,3	script	Mr. Doppel#wop_team_a	739,{
+	if (checkweight(714,3) == 0) {
+		mes "- Wait a minute !! -";
+		mes "- Currently you're carrying -";
+		mes "- too many items with you. -";
+		mes "- Please try again -";
+		mes "- after you loose some weight. -";
+		close;
+	}
+	set .@a_tname$,getpartyname($@wop_team_a);
+	set .@pname$,getpartyname(getcharid(1));
+	if($@wop_team_a != 0 && $@wop_team_a == getcharid(1)) {
+		mes "[Mr. Doppel]";
+		mes "So, everyone joined the party?";
+		mes "The name of the party is... " + .@pname$ + ", right?";
+		mes "I'll transfer you to the battle staging area.";
+		next;
+		switch(select("No! Wait!:Go to the staging area.")) {
+		case 1:
+			mes "[Mr. Doppel]";
+			mes "What is it now?";
+			mes "Can't you have a little more consideration?";
+			mes "You don't have much time. Decide now!";
+			next;
+			mes "[Mr. Doppel]";
+			mes "If you don't get there in time, you won't make it to the battle.";
+			close;
+		case 2:
+			if((getpartyleader(getcharid(1),2) == getcharid(0))) {
+				mes "[Mr. Doppel]";
+				mes "So, you are the leader. Before going to the battlefield, you should check all your members.";
+				next;
+				switch(select("Very well. I'll be the last.:I am the last. Send me to the battlefield.")) {
+				case 1:
+					mes "[Mr. Doppel]";
+					mes "First, make sure all the members are in your party.";
+					close;
+				case 2:
+					mes "[Mr. Doppel]";
+					mes "Very well. Nice you have done everything on time.";
+					delitem 7773,countitem(7773);
+					close2;
+					set wop_team,0;
+					warp "poring_w02",44,82;
+					end;
+				}
+			}
+			else {
+				mes "[Mr. Doppel]";
+				mes "Right. I'm gonna send you to the battle staging area.";
+				mes "Wait for all the other party members there.";
+				delitem 7773,countitem(7773);
+				close2;
+				set wop_team,0;
+				warp "poring_w02",44,82;
+				end;
+			}
+		}
+	}
+	else {
+		if((getpartyleader(getcharid(1),2) == getcharid(0))) {
+			if($@wop_team_a == 0) {
+				mes "[Mr. Doppel]";
+				mes "So, you are the party leader of Angeling Team.";
+				mes "Are you sure all the members are in your party?";
+				mes "First, lets register your party name, after, we'll check the members.";
+				next;
+				mes "[Mr. Doppel]";
+				mes "Lets see... The name of the party is...";
+				mes " ";
+				mes "^4d4dff " + .@pname$ + " ^000000";
+				mes " ";
+				mes "Right? That is the name you wish?";
+				next;
+				switch(select("No! You're wrong.:Yes. I would like to register that name.:Cancel")) {
+				case 1:
+					mes "[Mr. Doppel]";
+					mes "Hey, I don't have all day! Make your mind and register as fast as you can.";
+					mes "Don't forget to let all the members join the party. Only the members of a registered party can join the battle.";
+					close;
+				case 2:
+					mes "[Mr. Doppel]";
+					mes "So, I'll register your party name as - " +.@pname$ + " -.";
+					mes "Now, Tell your ^4d4dffmembers to confirm your party^000000.";
+					mes "I'll send you to the battlefield as soon as I confirm your party.";
+					set $@wop_team_a,getcharid(1);
+					mapannounce "poring_w02","The registration of the Angeling Team has been confirmed. The party members must confirm their team with Mr. Doppel.",0,0x33FF66;
+					close;
+				case 3:
+					mes "[Mr. Doppel]";
+					mes "The clock is ticking. Make up your mind and register as soon as you can.";
+					close;
+				}
+			}
+			else {
+				mes "[Mr. Doppel]";
+				mes "So, you are the leader of the party.";
+				mes "Haven't you finished the party registration yet?";
+				mes "You must stay on the one that has been registered!";
+				next;
+				mes "[Mr. Doppel]";
+				mes "The name of the party is ";
+				mes " " + .@a_tname$ + " ";
+				mes "Please, confirm.";
+				close;
+			}
+		}
+		else {
+			mes "[Mr. Doppel]";
+			mes "If you aren't a registered member of the party, you can't join the battle.";
+			next;
+			mes "[Mr. Doppel]";
+			mes "I'll check again and, after the registeration of the party name, you'll be sent to the battlefield.";
+			mes "We must stay together as a party, since this is a team game. Otherwise, we'll have problems.";
+			close;
+		}
+	}
+
+OnInit:
+	disablenpc "Mr. Doppel#wop_team_a";
+	end;
+
+OnEnable:
+	enablenpc "Mr. Doppel#wop_team_a";
+	end;
+
+OnDisable:
+	disablenpc "Mr. Doppel#wop_team_a";
+	end;
+}
+
+poring_w02,170,181,3	script	Mr. Doppel#wop_team_d	739,{
+	if (checkweight(714,3) == 0) {
+		mes "- Wait a minute !! -";
+		mes "- Currently you're carrying -";
+		mes "- too many items with you. -";
+		mes "- Please try again -";
+		mes "- after you loose some weight. -";
+		close;
+	}
+	set .@d_tname$,getpartyname($@wop_team_d);
+	set .@pname$,getpartyname(getcharid(1));
+	if($@wop_team_d != 0 && $@wop_team_d == getcharid(1)) {
+		mes "[Mr. Doppel]";
+		mes "So, everyone joined the party?";
+		mes "The name of the party is... " + .@pname$ + ", right?";
+		mes "I'll transfer you to the battle staging area.";
+		next;
+		switch(select("No! Wait!:Go to the staging area.")) {
+		case 1:
+			mes "[Mr. Doppel]";
+			mes "What is it now?";
+			mes "Can't you have a little more consideration?";
+			mes "You don't have much time. Decide now!";
+			next;
+			mes "[Mr. Doppel]";
+			mes "If you don't get there in time, you won't make it to the battle.";
+			close;
+		case 2:
+			if((getpartyleader(getcharid(1),2) == getcharid(0))) {
+				mes "[Mr. Doppel]";
+				mes "So, you are the leader. Before going to the battlefield, you should check all your members.";
+				next;
+				switch(select("Very well. I'll be the last.:I am the last. Send me to the battlefield.")) {
+				case 1:
+					mes "[Mr. Doppel]";
+					mes "First, make sure all the members are in your party.";
+					close;
+				case 2:
+					mes "[Mr. Doppel]";
+					mes "Very well. Nice you have done everything on time.";
+					delitem 7773,countitem(7773);
+					close2;
+					set wop_team,0;
+					warp "poring_w02",153,82;
+					end;
+				}
+			}else{
+				mes "[Mr. Doppel]";
+				mes "Right. I'm gonna send you to the battle staging area.";
+				mes "Wait for all the other party members there.";
+				delitem 7773,countitem(7773);
+				close2;
+				set wop_team,0;
+				warp "poring_w02",153,82;
+				end;
+			}
+		}
+	}else{
+		if((getpartyleader(getcharid(1),2) == getcharid(0))) {
+			if($@wop_team_d == 0) {
+				mes "[Mr. Doppel]";
+				mes "So, you are the party leader of Deviling Team.";
+				mes "Are you sure all the members are in your party?";
+				mes "First, lets register your party name, after, we'll check the members.";
+				next;
+				mes "[Mr. Doppel]";
+				mes "Lets see... The name of the party is...";
+				mes " ";
+				mes "^4d4dff " + .@pname$ + " ^000000";
+				mes " ";
+				mes "Right? That is the name you wish?";
+				next;
+				switch(select("No! You're wrong.:Yes. I would like to register that name.:Cancel")) {
+				case 1:
+					mes "[Mr. Doppel]";
+					mes "Hey, I don't have all day! Make your mind and register as fast as you can.";
+					mes "Don't forget to let all the members join the party. Only the members of a registered party can join the battle.";
+					close;
+				case 2:
+					mes "[Mr. Doppel]";
+					mes "So, I'll register your party name as - " + .@pname$ + " -.";
+					mes "Now, Tell your ^4d4dffmembers to confirm your party^000000.";
+					mes "I'll send you to the battlefield as soon as I confirm your party.";
+					set $@wop_team_d,getcharid(1);
+					mapannounce "poring_w02","The registration of the Deviling Team has been confirmed. The party members must confirm their team with Mr. Doppel.",0,0x33FF66;
+					close;
+				case 3:
+					mes "[Mr. Doppel]";
+					mes "The clock is ticking. Make up your mind and register as soon as you can.";
+					close;
+				}
+			}else{
+				mes "[Mr. Doppel]";
+				mes "So, you are the leader of the party.";
+				mes "Haven't you finished the party registration yet?";
+				mes "You must stay on the one that has been registered!";
+				next;
+				mes "[Mr. Doppel]";
+				mes "The name of the party is ";
+				mes " " + .@d_tname$ + " ";
+				mes "Please, confirm.";
+				close;
+			}
+		}else{
+			mes "[Mr. Doppel]";
+			mes "If you aren't a registered member of the party, you can't join the battle.";
+			next;
+			mes "[Mr. Doppel]";
+			mes "I'll check again and, after the registeration of the party name, you'll be sent to the battlefield.";
+			mes "We must stay together as a party, since this is a team game. Otherwise, we'll have problems.";
+			close;
+		}
+	}
+
+OnInit:
+	disablenpc "Mr. Doppel#wop_team_d";
+	end;
+
+OnEnable:
+	enablenpc "Mr. Doppel#wop_team_d";
+	end;
+
+OnDisable:
+	disablenpc "Mr. Doppel#wop_team_d";
+	end;
+}
+
+poring_w02,1,1,0	script	#wop_master	-1,{
+	end;
+
+OnReset:
+	removemapflag "poring_w02",mf_partylock;
+	removemapflag "poring_w02",mf_pvp;
+	removemapflag "poring_w02",mf_pvp_noguild;
+	removemapflag "poring_w02",mf_pvp_nocalcrank;
+	mapwarp "poring_w02","poring_w01",112,138;
+	donpcevent "#wop_angellium1::OnReset";
+	donpcevent "#wop_angellium2::OnReset";
+	donpcevent "#wop_devillium1::OnReset";
+	donpcevent "#wop_devillium2::OnReset";
+	set $@wop_team_a,0;
+	set $@wop_team_d,0;
+	set $@wop_deadcount_a,0;
+	set $@wop_deadcount_d,0;
+	set $@wop_teamcount,0;
+	set $@wop_doorcount_a,0;
+	set $@wop_doorcount_d,0;
+	donpcevent "#wop_warp_a::OnDisable";
+	donpcevent "#wop_warp_d::OnDisable";
+	donpcevent "#wop_warp_rtry::OnDisable";
+	donpcevent "Poring#wop_door_a::OnEnable";
+	donpcevent "Poring#wop_door_d::OnEnable";
+	donpcevent "Poring#wop_door_all::OnEnable";
+	stopnpctimer;
+	end;
+
+Onstart:
+	initnpctimer;
+	end;
+
+OnAngelingWarn:
+	mapannounce "poring_w02","Deviling Team Recruitment is complete. The battle will be canceled automatically if the Angeling Team Recruitment isn't ready in 1 minute.",0,0xf08080;
+	end;
+
+OnDevilingWarn:
+	mapannounce "poring_w02","Angeling Team Recruitment is complete. The battle will be canceled automatically if the Deviling Team Recruitment isn't ready in 1 minute.",0,0xf08080;
+	end;
+
+OnDevilingEnd:
+	mapannounce "poring_w02","Deviling Team Recruitment failed. The battle will be canceled shortly.",0,0xf08080;
+	end;
+
+OnAngelingEnd:
+	mapannounce "poring_w02","Angeling Team Recruitment failed. The battle will be canceled shortly.",0,0xf08080;
+	end;
+
+OnStop:
+	stopnpctimer;
+	end;
+
+OnAngelingWin:
+	removemapflag "poring_w02",mf_partylock;
+	removemapflag "poring_w02",mf_pvp;
+	removemapflag "poring_w02",mf_pvp_noguild;
+	removemapflag "poring_w02",mf_pvp_nocalcrank;
+	mapannounce "poring_w02","Mr. Doppel: Angeling Team of party " + getpartyname($@wop_team_a) + " won the battle!",0,0xf08080;
+	donpcevent "Deviruchi#wop_endmaster::OnEnable";
+	stopnpctimer;
+	end;
+
+OnDevilingWin:
+	removemapflag "poring_w02",mf_partylock;
+	removemapflag "poring_w02",mf_pvp;
+	removemapflag "poring_w02",mf_pvp_noguild;
+	removemapflag "poring_w02",mf_pvp_nocalcrank;
+	mapannounce "poring_w02","Mr. Doppel: Deviling Team of party " + getpartyname($@wop_team_d) + " won the battle!",0,0xf08080;
+	donpcevent "Deviruchi#wop_endmaster::OnEnable";
+	stopnpctimer;
+	end;
+
+OnTimer5000:
+	mapannounce "poring_w02","Mr. Doppel: Welcome to all the warriors that have come to fight the battle.",0,0xf08080;
+	donpcevent "Mr. Doppel#wop_team_a::OnEnable";
+	donpcevent "Mr. Doppel#wop_team_d::OnEnable";
+	end;
+
+OnTimer8000:
+	mapannounce "poring_w02","Mr. Doppel: Each member of the team must join the group, and the leader will register their team name.",0,0xf08080;
+	end;
+
+OnTimer12000:
+	mapannounce "poring_w02","Mr. Doppel: You have 50 seconds. Join the group, register it's name and go to the battlefield.",0,0xf08080;
+	end;
+
+OnTimer32000:
+	mapannounce "poring_w02","Mr. Doppel: You still have 30 seconds. Join the group, register it's name and go to the battlefield.",0,0xf08080;
+	end;
+
+OnTimer62000:
+	mapannounce "poring_w02","Mr. Doppel: Time is up. The rules will be explained shortly before the battle.",0,0xf08080;
+	end;
+
+OnTimer70000:
+	mapannounce "poring_w02","Mr. Doppel: All ready? Let me explain the battle rules.",0,0xf08080;
+	end;
+
+OnTimer75000:
+	mapannounce "poring_w02","Mr. Doppel: The Angeling Team has to protect 2 Angelings on their bases and, at the same time, eliminate the Devilings on their Deviling Team bases, and vice-versa.",0,0xf08080;
+	end;
+
+OnTimer80000:
+	mapannounce "poring_w02","Mr. Doppel: Your team wins if you eliminate the 2 monsters of the enemy team. The rules are as simple as that.",0,0xf08080;
+	end;
+
+OnTimer85000:
+	mapannounce "poring_w02","Mr. Doppel: But the Angelings or the Devilings return to life after a certain period of time, so it's important to eliminate the other Poring quickly, after you have eliminated the first.",0,0xf08080;
+	end;
+
+OnTimer90000:
+	mapannounce "poring_w02","Mr. Doppel: Also know that those Porings are furious and will attack everybody, it doesnt matter to what team they belong.",0,0xf08080;
+	end;
+
+OnTimer95000:
+	mapannounce "poring_w02","Mr. Doppel: Basically, the Porings are natural enemies of the humans, so the attack is innevitable, even if both are on the same team.",0,0xf08080;
+	end;
+
+OnTimer100000:
+	mapannounce "poring_w02","Mr. Doppel: In certain areas, you will need War Badges that are obtained by eliminating members of the other team. Alright, lets begin!",0,0xf08080;
+	setmapflag "poring_w02",mf_partylock;
+	setmapflag "poring_w02",mf_pvp;
+	setmapflag "poring_w02",mf_pvp_noguild;
+	setmapflag "poring_w02",mf_pvp_nocalcrank;
+	donpcevent "#wop_warp_a::OnEnable";
+	donpcevent "#wop_warp_d::OnEnable";
+	donpcevent "#wop_angellium1::OnAngelingSpawn";
+	donpcevent "#wop_angellium2::OnAngelingSpawn";
+	donpcevent "#wop_devillium1::OnDevilingSpawn";
+	donpcevent "#wop_devillium2::OnDevilingSpawn";
+	end;
+
+OnTimer700000:
+	mapannounce "poring_w02","Mr. Doppel: Time is up. Soon, you will be teleported to the Winners Stage.",0,0xf08080;
+	removemapflag "poring_w02",mf_partylock;
+	removemapflag "poring_w02",mf_pvp;
+	removemapflag "poring_w02",mf_pvp_noguild;
+	removemapflag "poring_w02",mf_pvp_nocalcrank;
+	donpcevent "#wop_angellium1::OnReset";
+	donpcevent "#wop_angellium2::OnReset";
+	donpcevent "#wop_devillium1::OnReset";
+	donpcevent "#wop_devillium2::OnReset";
+	end;
+
+OnTimer703000:
+	donpcevent "Deviruchi#wop_endmaster::OnEnable";
+	stopnpctimer;
+	end;
+}
+
+poring_w02,51,82,0	script	#wop_warp_a	139,1,1,{
+	end;
+
+OnInit:
+	disablenpc "#wop_warp_a";
+	end;
+
+OnEnable:
+	enablenpc "#wop_warp_a";
+	specialeffect EF_MAPPILLAR2,AREA,"#wop_warp_a";
+	end;
+
+OnDisable:
+	disablenpc "#wop_warp_a";
+	end;
+
+OnTouch:
+	set wop_team,1;
+	warp "poring_w02",57,82;
+	end;
+}
+
+poring_w02,146,82,0	script	#wop_warp_d	139,1,1,{
+	end;
+
+OnInit:
+	disablenpc "#wop_warp_d";
+	end;
+
+OnEnable:
+	enablenpc "#wop_warp_d";
+	specialeffect EF_MAPPILLAR2,AREA,"#wop_warp_d";
+	end;
+
+OnDisable:
+	disablenpc "#wop_warp_d";
+	end;
+
+OnTouch:
+	set wop_team,2;
+	warp "poring_w02",140,82;
+	end;
+}
+
+// Poring Spawn
+//============================================================
+poring_w02,80,82,0	script	#wop_angellium1	-1,{
+	end;
+
+OnReset:
+	killmonster "poring_w02","#wop_angellium1::OnMyMobDead";
+	stopnpctimer;
+	end;
+
+OnAngelingSpawn:
+	monster "poring_w02",80,82,"Angeling",1766,1,"#wop_angellium1::OnMyMobDead";
+	end;
+
+OnMyMobDead:
+	set $@wop_deadcount_a,$@wop_deadcount_a + 1;
+	if($@wop_deadcount_a == 1) {
+		mapannounce "poring_w02","Mr. Doppel: The Angeling on the 1st base has been killed! 1 point lost!!",0,0x00ff00;
+		initnpctimer;
+	}
+	else {
+		donpcevent "#wop_angellium1::OnReset";
+		donpcevent "#wop_angellium2::OnReset";
+		donpcevent "#wop_devillium1::OnReset";
+		donpcevent "#wop_devillium2::OnReset";
+		donpcevent "#wop_master::OnDevilingWin";
+	}
+	end;
+
+OnTimer120000:
+	set $@wop_deadcount_a,$@wop_deadcount_a - 1;
+	donpcevent "#wop_angellium1::OnAngelingSpawn";
+	mapannounce "poring_w02","Mr. Doppel: The Angeling on the 1st base has been revived! 1 point gained!!",0,0x00ff00;
+	stopnpctimer;
+}
+
+poring_w02,98,41,0	script	#wop_angellium2	-1,{
+	end;
+
+OnReset:
+	killmonster "poring_w02","#wop_angellium2::OnMyMobDead";
+	stopnpctimer;
+	end;
+
+OnAngelingSpawn:
+	monster "poring_w02",98,41,"Angeling",1766,1,"#wop_angellium2::OnMyMobDead";
+	end;
+
+OnMyMobDead:
+	set $@wop_deadcount_a,$@wop_deadcount_a + 1;
+	if($@wop_deadcount_a == 1) {
+		mapannounce "poring_w02","Mr. Doppel: The Angeling on the 2nd base has been killed! 1 point lost!!",0,0x00ff00;
+		initnpctimer;
+	}
+	else {
+		donpcevent "#wop_angellium1::OnReset";
+		donpcevent "#wop_angellium2::OnReset";
+		donpcevent "#wop_devillium1::OnReset";
+		donpcevent "#wop_devillium2::OnReset";
+		donpcevent "#wop_master::OnDevilingWin";
+	}
+	end;
+
+OnTimer120000:
+	set $@wop_deadcount_a,$@wop_deadcount_a - 1;
+	donpcevent "#wop_angellium2::OnAngelingSpawn";
+	mapannounce "poring_w02","Mr. Doppel: The Angeling on the 2nd base has been revived! 1 point gained!!",0,0x00ff00;
+	stopnpctimer;
+	end;
+}
+
+poring_w02,116,82,0	script	#wop_devillium1	-1,{
+	end;
+
+OnReset:
+	killmonster "poring_w02","#wop_devillium1::OnMyMobDead";
+	stopnpctimer;
+	end;
+
+OnDevilingSpawn:
+	monster "poring_w02",116,82,"Deviling",1767,1,"#wop_devillium1::OnMyMobDead";
+	end;
+
+OnMyMobDead:
+	set $@wop_deadcount_d,$@wop_deadcount_d + 1;
+	if($@wop_deadcount_d == 1) {
+		mapannounce "poring_w02","Mr. Doppel: The Deviling on the 1st base has been killed! 1 point lost!!",0,0x00ff00;
+		initnpctimer;
+	}
+	else {
+		donpcevent "#wop_devillium1::OnReset";
+		donpcevent "#wop_devillium2::OnReset";
+		donpcevent "#wop_devillium1::OnReset";
+		donpcevent "#wop_devillium2::OnReset";
+		donpcevent "#wop_master::OnAngelingWin";
+	}
+	end;
+
+OnTimer120000:
+	set $@wop_deadcount_d,$@wop_deadcount_d - 1;
+	donpcevent "#wop_devillium1::OndevilingSpawn";
+	mapannounce "poring_w02","Mr. Doppel: The Deviling on the 1st base has been revived! 1 point gained!!",0,0x00ff00;
+	stopnpctimer;
+	end;
+}
+
+poring_w02,98,124,0	script	#wop_devillium2	-1,{
+	end;
+
+OnReset:
+	killmonster "poring_w02","#wop_devillium2::OnMyMobDead";
+	stopnpctimer;
+	end;
+
+OndevilingSpawn:
+	monster "poring_w02",98,124,"Deviling",1767,1,"#wop_devillium2::OnMyMobDead";
+	end;
+
+OnMyMobDead:
+	set $@wop_deadcount_d,$@wop_deadcount_d + 1;
+	if($@wop_deadcount_d == 1) {
+		mapannounce "poring_w02","Mr. Doppel: The deviling on the 2nd base has been killed! 1 point lost!!",0,0x00ff00;
+		initnpctimer;
+	}
+	else {
+		donpcevent "#wop_devillium1::OnReset";
+		donpcevent "#wop_devillium2::OnReset";
+		donpcevent "#wop_devillium1::OnReset";
+		donpcevent "#wop_devillium2::OnReset";
+		donpcevent "#wop_master::OnAngelingWin";
+	}
+	end;
+
+OnTimer120000:
+	set $@wop_deadcount_d,$@wop_deadcount_d - 1;
+	donpcevent "#wop_devillium2::OndevilingSpawn";
+	mapannounce "poring_w02","Mr. Doppel: The deviling on the 2nd base has been revived! 1 point gained!!",0,0x00ff00;
+	stopnpctimer;
+}
+
+// Deviruchi
+//============================================================
+poring_w02,99,201,3	script	Deviruchi#wop_endmaster	738,{
+	if (MaxWeight-Weight < 2000 || checkweight(1201,1) == 0) {
+		mes "- Wait a minute !! -";
+		mes "- Currently you're carrying -";
+		mes "- too many items with you. -";
+		mes "- Please try again -";
+		mes "- after you loose some weight. -";
+		close;
+	}
+	set .@a_point,$@wop_deadcount_a;
+	set .@d_point,$@wop_deadcount_d;
+	if(getcharid(1) == $@wop_team_a) {
+		if(.@a_point < .@d_point) {
+			mes "[Devi]";
+			mes "Good work!";
+			mes "Thanks to you, we increased our chances of victory.";
+			mes "Please, accept these Poring Coins as a sign of our appreciation.";
+			next;
+			if(wop_team == 1) {
+				mes "[Devi]";
+				mes "Goodbye, my human friend.";
+				close2;
+				getitem 7539,3; // Poring_Coin
+				warp "prt_fild08",150,370;
+				end;
+			}
+			else {
+				mes "[Devi]";
+				mes "Wait a minute, you look suspicious!!";
+				mes "Ah, I got it! You are on the side of the Devilings?!";
+				mes "You are spying on us!";
+				mes "I will never forgive you!";
+				close2;
+				percentheal 99,0;
+				warp "prt_fild08",150,370;
+				end;
+			}
+		}
+		else if(.@a_point == .@d_point) {
+			mes "[Devi]";
+			mes "You did the best you could.";
+			mes "I' ts a shame the battle was tied...";
+			mes "Even so, thanks for coming to fight for us. Please, accept this Poring Coin.";
+			next;
+			if(wop_team == 1) {
+				mes "[Devi]";
+				mes "Goodbye, my human friend.";
+				close2;
+				getitem 7539,1; // Poring_Coin
+				warp "prt_fild08",150,370;
+				end;
+			}
+			else {
+				mes "[Devi]";
+				mes "Wait a minute, you look suspicious!!";
+				mes "Ah, I got it! You are on the side of the Devilings?!";
+				mes "You are spying on us!";
+				mes "It must have been you that made us tie the battle!!";
+				mes "I will never forgive you!";
+				close2;
+				percentheal 99,0;
+				warp "prt_fild08",150,370;
+				end;
+			}
+		}
+		else {
+			if(wop_team == 1) {
+				mes "[Devi]";
+				mes "Well, I guess we had bad luck...";
+				mes "I cant give you anything, since we lost and everything...";
+				next;
+				mes "[Devi]";
+				mes "Goodbye, my human friend.";
+				close2;
+				warp "prt_fild08",150,370;
+				end;
+			}
+			else {
+				mes "[Devi]";
+				mes "Wait a minute... There is a traitor here!";
+				mes "Ah, I got it! You are on the side of the Devilings?!";
+				mes "You are spying on us, Angelings!";
+				next;
+				mes "[Devi]";
+				mes "You should be ashamed!";
+				close2;
+				percentheal 99,0;
+				warp "prt_fild08",150,370;
+				end;
+			}
+		}
+	}
+	else if(getcharid(1) == $@wop_team_d) {
+		if (.@a_point > .@d_point) {
+			mes "[Devi]";
+			mes "Good work!";
+			mes "Thanks to you, we increased our chances of victory.";
+			mes "Please, accept these Poring Coins as a sign of our appreciation.";
+			next;
+			if (wop_team == 2) {
+				mes "[Devi]";
+				mes "Goodbye, my human friend.";
+				close2;
+				getitem 7539,3; // Poring_Coin
+				warp "prt_fild08",150,370;
+				end;
+			}
+			else {
+				mes "[Devi]";
+				mes "Wait a minute, you look suspicious!!";
+				mes "Ah, I got it! You are on the side of the Angelings?!";
+				mes "You are spying on us!!";
+				mes "I will never forgive you!";
+				close2;
+				percentheal 99,0;
+				warp "prt_fild08",150,370;
+				end;
+			}
+		}
+		else if(.@a_point == .@d_point) {
+			mes "[Devi]";
+			mes "You did the best you could.";
+			mes "It's a shame the battle was tied...";
+			mes "Even so, thanks for coming to fight for us. Please, accept this Poring Coin.";
+			next;
+			if(wop_team == 2) {
+				mes "[Devi]";
+				mes "Goodbye, my human friend.";
+				close2;
+				getitem 7539,1; // Poring_Coin
+				warp "prt_fild08",150,370;
+				end;
+			}
+			else {
+				mes "[Devi]";
+				mes "Wait a minute, you look suspicious!!";
+				mes "Ah, I got it! You are on the side of the Angelings?!";
+				mes "You are spying on us!";
+				mes "It must have been you that made us tie the battle!!";
+				mes "I will never forgive you!";
+				close2;
+				percentheal 99,0;
+				warp "prt_fild08",150,370;
+				end;
+			}
+		}
+		else {
+			if(wop_team == 2) {
+				mes "[Devi]";
+				mes "Well, I guess we had bad luck...";
+				mes "I cant give you anything, since we lost and everything...";
+				next;
+				mes "[Devi]";
+				mes "I will allow you to return to your human world.";
+				close2;
+				warp "prt_fild08",150,370;
+				end;
+			}
+			else {
+				mes "[Devi]";
+				mes "Wait a minute, you look suspicious!!";
+				mes "Ah, I got it! You are on the side of the Angelings?!";
+				mes "You are spying on us, Devilings!";
+				next;
+				mes "[Devi]";
+				mes "You should be ashamed!";
+				close2;
+				percentheal 99,0;
+				warp "prt_fild08",150,370;
+				end;
+			}
+		}
+	}
+	else {
+		mes "[Devi]";
+		mes "This is weird...Your party name ain't registered.";
+		mes "Im sorry, but rules are rules. I can't help you if your party ain't registered.";
+		close;
+	}
+OnInit:
+	disablenpc "Deviruchi#wop_endmaster";
+	end;
+
+OnEnable:
+	enablenpc "Deviruchi#wop_endmaster";
+	initnpctimer;
+	end;
+
+OnDisable:
+	disablenpc "Deviruchi#wop_endmaster";
+	end;
+
+OnTimer3000:
+	mapwarp "poring_w02","poring_w02",99,196;
+	end;
+
+OnTimer5000:
+	mapannounce "poring_w02","Mr. Doppel: Allow me to offer a souvenir to the humans that fought bravely for the Porings! Please, speak to Devi.",0,0x00ff00;
+	end;
+
+OnTimer65000:
+	mapannounce "poring_w02","Mr. Doppel: Time is up! Let me teleport you.",0,0x00ff00;
+	end;
+
+OnTimer68000:
+	mapwarp "poring_w02","poring_w01",112,138;
+	end;
+
+OnTimer68100:
+	donpcevent "#wop_master::OnStop";
+	donpcevent "#wop_devillium1::OnReset";
+	donpcevent "#wop_devillium2::OnReset";
+	donpcevent "#wop_angellium1::OnReset";
+	donpcevent "#wop_angellium2::OnReset";
+	set $@wop_team_a,0;
+	set $@wop_team_d,0;
+	set $@wop_deadcount_a,0;
+	set $@wop_deadcount_d,0;
+	set $@wop_teamcount,0;
+	set $@wop_doorcount_a,0;
+	set $@wop_doorcount_d,0;
+	donpcevent "#wop_warp_a::OnDisable";
+	donpcevent "#wop_warp_d::OnDisable";
+	donpcevent "Mr. Doppel#wop_team_a::OnDisable";
+	donpcevent "Mr. Doppel#wop_team_d::OnDisable";
+	donpcevent "#wop_warp_rtry::OnDisable";
+	donpcevent "Poring#wop_door_a::OnReset";
+	donpcevent "Poring#wop_door_d::OnReset";
+	donpcevent "Poring#wop_door_all::OnReset";
+	stopnpctimer;
+	end;
+}
+
+// Gate Guardian
+//============================================================
+poring_w02,99,52,0	script	Angeling Guardian#wop_da	111,{
+	cutin "wop_emb0" + $@wop_doorcount_a,1;
+	if($@wop_doorcount_a < 3) {
+		if (wop_team == 2) {
+			mes "There is a device to equip the War Badges.";
+			mes "I can see the empty slots to equip the Badges.";
+			next;
+			switch(select("Equip War Badge.:Cancel.")) {
+			case 1:
+				if(countitem(7773)) {
+					if($@wop_doorcount_a < 3) {
+						mes "War Badge equipped.";
+						delitem 7773,1; // War_Badge
+						set $@wop_doorcount_a,$@wop_doorcount_a + 1;
+						cutin "wop_emb0" + $@wop_doorcount_a,1;
+						if($@wop_doorcount_a == 4) {
+							next;
+							mes "Gate Activated.";
+							donpcevent "#aroom_ingate_wop::OnEnable";
+							donpcevent "#aroom_outgate_wop::OnEnable";
+						}
+						close2;
+					}
+					else {
+						mes "All War Badges equipped.";
+						mes "No need to equip any more.";
+						close2;
+					}
+				}
+				else {
+					mes "^4d4dff - War Badge missing. You can obtain a War badge by killing members of the other team. - ^000000";
+					close2;
+				}
+				break;
+			case 2:
+				mes "Cancel.";
+				close2;
+			}
+		}
+		else {
+			mes "There is a device to equip a War Badge.";
+			mes "Be carefull to not allow the enemy to take and equip your War Badge here.";
+			close2;
+		}
+	}
+	else {
+		mes "All War Badges have been equipped.";
+		close2;
+	}
+	cutin "",255;
+	end;
+
+OnInit:
+	set $@wop_doorcount_a,0;
+	end;
+}
+
+poring_w02,103,52,0	script	#aroom_ingate_wop	139,1,1,{
+	end;
+
+OnInit:
+	disablenpc "#aroom_ingate_wop";
+	end;
+
+OnEnable:
+	enablenpc "#aroom_ingate_wop";
+	end;
+
+OnDisable:
+	disablenpc "#aroom_ingate_wop";
+	end;
+
+OnTouch:
+	warp "poring_w02",99,49;
+	end;
+}
+
+poring_w02,93,51,0	script	#aroom_outgate_wop	139,1,1,{
+	end;
+
+OnInit:
+	disablenpc "#aroom_outgate_wop";
+	end;
+
+OnEnable:
+	enablenpc "#aroom_outgate_wop";
+	end;
+
+OnDisable:
+	disablenpc "#aroom_outgate_wop";
+	end;
+
+OnTouch:
+	warp "poring_w02",99,54;
+	end;
+}
+
+poring_w02,98,113,0	script	Deviling Guardian#wop_dd	111,{
+	cutin "wop_emb0" + $@wop_doorcount_d,1;
+	if($@wop_doorcount_d < 3) {
+		if (wop_team == 1) {
+			mes "There is a device to equip the War Badges.";
+			mes "I can see the empty slots to equip the Badges.";
+			next;
+			switch(select("Equip War Badge.:Cancel.")) {
+			case 1:
+				if(countitem(7773)) {
+					if($@wop_doorcount_d < 3) {
+						mes "War Badge equipped.";
+						delitem 7773,1; // War_Badge
+						set $@wop_doorcount_d,$@wop_doorcount_d + 1;
+						cutin "wop_emb0" + $@wop_doorcount_d,1;
+						if($@wop_doorcount_d == 4) {
+							next;
+							mes "Gate Activated.";
+							donpcevent "#droom_ingate_wop::OnEnable";
+							donpcevent "#droom_outgate_wop::OnEnable";
+						}
+						close2;
+					}
+					else {
+						mes "All War Badges equipped.";
+						mes "No need to equip any more.";
+						close2;
+					}
+				}
+				else {
+					mes "^4d4dff - War Badge missing. You can obtain a War badge by killing members of the other team. - ^000000";
+					close2;
+				}
+				break;
+			case 2:
+				mes "Cancel.";
+				close2;
+			}
+		}
+		else {
+			mes "There is a device to equip a War Badge.";
+			mes "Be carefull to not allow the enemy to take and equip your War Badge here.";
+			close2;
+		}
+	}
+	else {
+		mes "All War Badges have been equipped.";
+		close2;
+	}
+	cutin "",255;
+	end;
+
+OnInit:
+	set $@wop_doorcount_d,0;
+	end;
+}
+
+poring_w02,93,113,0	script	#droom_ingate_wop	139,1,1,{
+	end;
+
+OnInit:
+	disablenpc "#droom_ingate_wop";
+	end;
+
+OnEnable:
+	enablenpc "#droom_ingate_wop";
+	end;
+
+OnDisable:
+	disablenpc "#droom_ingate_wop";
+	end;
+
+OnTouch:
+	warp "poring_w02",98,116;
+	end;
+}
+
+poring_w02,103,114,0	script	#droom_outgate_wop	139,1,1,{
+	end;
+
+OnInit:
+	disablenpc "#droom_outgate_wop";
+	end;
+
+OnEnable:
+	enablenpc "#droom_outgate_wop";
+	end;
+
+OnDisable:
+	disablenpc "#droom_outgate_wop";
+	end;
+
+OnTouch:
+	warp "poring_w02",98,111;
+	end;
+}
+
+// Other NPCs
+//============================================================
+-	script	Angeling Side Poring#wpa	-1,{
+	end;
+}
+
+-	script	Deviling Side Marin#wpd	-1,{
+	end;
+}
+
+poring_w01,79,102,5	duplicate(Angeling Side Poring#wpa)	Angeling Side Poring#wa1	1002
+poring_w01,80,107,5	duplicate(Angeling Side Poring#wpa)	Angeling Side Poring#wa2	1002
+poring_w01,84,108,5	duplicate(Angeling Side Poring#wpa)	Angeling Side Poring#wa3	1002
+poring_w01,84,112,5	duplicate(Angeling Side Poring#wpa)	Angeling Side Poring#wa4	1002
+poring_w01,88,112,5	duplicate(Angeling Side Poring#wpa)	Angeling Side Poring#wa5	1002
+
+poring_w01,114,112,3	duplicate(Deviling Side Marin#wpd)	Deviling Side Marin#wd1	1242
+poring_w01,117,111,3	duplicate(Deviling Side Marin#wpd)	Deviling Side Marin#wd2	1242
+poring_w01,117,108,3	duplicate(Deviling Side Marin#wpd)	Deviling Side Marin#wd3	1242
+poring_w01,122,108,3	duplicate(Deviling Side Marin#wpd)	Deviling Side Marin#wd4	1242
+poring_w01,121,105,3	duplicate(Deviling Side Marin#wpd)	Deviling Side Marin#wd5	1242
+
+poring_w01,84,108,3	script	#wop_ex_1	139,3,3,{
+	end;
+
+OnTouch:
+	mes "[Porings]";
+	mes "P~ooooooooo -!!!";
+	mes "Let's teach them a lesson, ring!";
+	mes "We are no longer betting our lives for Jellopies, ring!!!";
+	next;
+	mes "[Porings]";
+	mes "Let's go! Let's fight! Let's win, win, win!!!";
+	emotion e_go,0,"Angeling Side Poring#wa1";
+	emotion e_go,0,"Angeling Side Poring#wa2";
+	emotion e_go,0,"Angeling Side Poring#wa3";
+	emotion e_go,0,"Angeling Side Poring#wa4";
+	emotion e_go,0,"Angeling Side Poring#wa5";
+	next;
+	if(wop_team == 1) {
+		mes "[Porings]";
+		mes "Ohhhhhh, there he is, the warrior that fought for us!!";
+		mes "Oh my god... Nice, ring!";
+		mes "Poring~ Poring~ Poooooo~";
+		mes "Party of Angeling~ Popopo, Poring!";
+	}
+	else if(wop_team == 2) {
+		mes "[Porings]";
+		mes "Wait, YOU! Aren't you on the side of the Devilings?!";
+		mes "Get out now! Leave!!";
+		mes "Booooo~ Boo~ Boooo~";
+		emotion e_omg,0,"Angeling Side Poring#wa1";
+		emotion e_an,0,"Angeling Side Poring#wa2";
+		emotion e_omg,0,"Angeling Side Poring#wa3";
+		emotion e_an,0,"Angeling Side Poring#wa4";
+		emotion e_gasp,0,"Angeling Side Poring#wa5";
+	}
+	else {
+		mes "[Porings]";
+		mes "Hey, human. How about fighting for us Porings on Angeling's side??!";
+		emotion e_hlp,0,"Angeling Side Poring#wa1";
+		emotion e_go,0,"Angeling Side Poring#wa2";
+		emotion e_hlp,0,"Angeling Side Poring#wa3";
+		emotion e_go,0,"Angeling Side Poring#wa4";
+		emotion e_go,0,"Angeling Side Poring#wa5";
+	}
+	next;
+	mes "[Porings]";
+	mes "Party of Angeling~ Popopo, Poring!";
+	mes "Victory~ Victory~ Pooooooo~";
+	next;
+	mes "- Porings are cheerfully shouting for the victory. -";
+	close;
+}
+
+poring_w01,119,107,3	script	#wop_ex_2	139,3,3,{
+	end;
+
+OnTouch:
+	mes "[Marins]";
+	mes "Woooooaaaaaaaaaaa!";
+	mes "Finally, it's time for us to teach those stupid pigs a lesson!!";
+	mes "Those Porings with low-grades are all idiots!!";
+	next;
+	mes "[Marins]";
+	mes "Let's go! Let's fight! Fight for Triumph!!!!";
+	emotion e_go,0,"Deviling Side Marin#wd1";
+	emotion e_go,0,"Deviling Side Marin#wd2";
+	emotion e_go,0,"Deviling Side Marin#wd3";
+	emotion e_go,0,"Deviling Side Marin#wd4";
+	emotion e_go,0,"Deviling Side Marin#wd5";
+	next;
+	if(wop_team == 1) {
+		mes "[Marins]";
+		mes "Ohhhh... Here is the warrior that fought for us!!";
+		mes "Amazing!";
+		mes "This proves that humans recognize us as true monsters!!";
+	}
+	else if(wop_team == 2) {
+		mes "[Marins]";
+		mes "Wait, YOU! Aren't you on the side of the Angelings?!";
+		mes "Get out now! Leave!!";
+		mes "Booooo~ Boo~ Boooo~";
+		emotion e_omg,0,"Deviling Side Marin#wd1";
+		emotion e_an,0,"Deviling Side Marin#wd2";
+		emotion e_omg,0,"Deviling Side Marin#wd3";
+		emotion e_an,0,"Deviling Side Marin#wd4";
+		emotion e_gasp,0,"Deviling Side Marin#wd5";
+	}
+	else {
+		mes "[Marins]";
+		mes "Hey, human. Don't you wanna fight for Deviling, the noble of darkness? What do you say?!";
+		emotion e_hlp,0,"Deviling Side Marin#wd1";
+		emotion e_go,0,"Deviling Side Marin#wd2";
+		emotion e_hlp,0,"Deviling Side Marin#wd3";
+		emotion e_go,0,"Deviling Side Marin#wd4";
+		emotion e_go,0,"Deviling Side Marin#wd5";
+	}
+	next;
+	mes "[Marins]";
+	mes "The world's Best Miraculous Poring! Deviling has it all! Go, Deviling, Go-!!";
+	next;
+	mes "- Marins are cheerfully shouting for the victory. -";
+	close;
+}

+ 3 - 3
npc/other/turbotrack/Expert_16.txt

@@ -3,7 +3,7 @@
 //===== By: ==================================================
 //= L0ne_W0lf
 //===== Current Version: =====================================
-//= 1.3
+//= 1.4
 //===== Compatible With: =====================================
 //= eAthena SVN
 //===== Description: ========================================= 
@@ -14,14 +14,14 @@
 //= 1.1 Fixed small official bug. [L0ne_W0lf]
 //= 1.2 Fixed a little mistake [akrus]
 //= 1.3 Corrected issue with top record setting. [L0ne_W0lf]
+//= 1.4 Updated 'waitingroom' to support required zeny/lvl. [Kisuka]
 //============================================================
 
 turbo_room,124,135,3	script	Expert mode - 16 person	124,{
 	end;
 
 OnInit:
-	waitingroom "Expert mode - 16 person",60,"Expert mode - 16 person::OnStartArena",16;
-	//SetFeeZeny 1000
+	waitingroom "Expert mode - 16 person",60,"Expert mode - 16 person::OnStartArena",16,1000,10,99;
 	enablewaitingroomevent "Expert mode - 16 person";
 	end;
 

+ 3 - 3
npc/other/turbotrack/Expert_4.txt

@@ -3,7 +3,7 @@
 //===== By: ==================================================
 //= L0ne_W0lf
 //===== Current Version: =====================================
-//= 1.3
+//= 1.4
 //===== Compatible With: =====================================
 //= eAthena SVN
 //===== Description: ========================================= 
@@ -14,14 +14,14 @@
 //= 1.1 Fixed small official bug. [L0ne_W0lf]
 //= 1.2 Fixed a little mistake [akrus]
 //= 1.3 Corrected issue with top record setting. [L0ne_W0lf]
+//= 1.4 Updated 'waitingroom' to support required zeny/lvl. [Kisuka]
 //============================================================
 
 turbo_room,110,135,3	script	Expert mode - 4 person	124,{
 	end;
 
 OnInit:
-	waitingroom "Expert mode - 4 person",60,"Expert mode - 4 person::OnStartArena",4;
-	//SetFeeZeny 1000
+	waitingroom "Expert mode - 4 person",60,"Expert mode - 4 person::OnStartArena",4,1000,10,99;
 	enablewaitingroomevent "Expert mode - 4 person";
 	end;
 

+ 3 - 3
npc/other/turbotrack/Expert_8.txt

@@ -3,7 +3,7 @@
 //===== By: ==================================================
 //= L0ne_W0lf
 //===== Current Version: =====================================
-//= 1.3
+//= 1.4
 //===== Compatible With: =====================================
 //= eAthena SVN
 //===== Description: ========================================= 
@@ -14,14 +14,14 @@
 //= 1.1 Fixed small official bug. [L0ne_W0lf]
 //= 1.2 Fixed a little mistake [akrus]
 //= 1.3 Corrected issue with top record setting. [L0ne_W0lf]
+//= 1.4 Updated 'waitingroom' to support required zeny/lvl. [Kisuka]
 //============================================================
 
 turbo_room,117,135,3	script	Expert mode - 8 person	124,{
 	end;
 
 OnInit:
-	waitingroom "Expert mode - 8 person",60,"Expert mode - 8 person::OnStartArena",8;
-	//SetFeeZeny 1000
+	waitingroom "Expert mode - 8 person",60,"Expert mode - 8 person::OnStartArena",8,1000,10,99;
 	enablewaitingroomevent "Expert mode - 8 person";
 	end;
 

+ 3 - 3
npc/other/turbotrack/Normal_16.txt

@@ -3,7 +3,7 @@
 //===== By: ==================================================
 //= L0ne_W0lf
 //===== Current Version: =====================================
-//= 1.5
+//= 1.6
 //===== Compatible With: =====================================
 //= eAthena SVN
 //===== Description: ========================================= 
@@ -16,14 +16,14 @@
 //= 1.3 Fixed a little mistake [akrus]
 //= 1.4 Corrected issue with top record setting. [L0ne_W0lf]
 //= 1.5 Fixed name being saved under expert mode. (bugreport:4433) [L0ne_W0lf]
+//= 1.6 Updated 'waitingroom' to support required zeny/lvl. [Kisuka]
 //============================================================
 
 turbo_room,91,135,3	script	Normal mode - 16 person	124,{
 	end;
 
 OnInit:
-	waitingroom "Normal mode - 16 person",60,"Normal mode - 16 person::OnStartArena",16;
-	//SetFeeZeny 1000
+	waitingroom "Normal mode - 16 person",60,"Normal mode - 16 person::OnStartArena",16,1000,10,99;
 	enablewaitingroomevent "Normal mode - 16 person";
 	end;
 

+ 3 - 3
npc/other/turbotrack/Normal_4.txt

@@ -3,7 +3,7 @@
 //===== By: ==================================================
 //= L0ne_W0lf
 //===== Current Version: =====================================
-//= 1.4
+//= 1.5
 //===== Compatible With: =====================================
 //= eAthena SVN
 //===== Description: ========================================= 
@@ -15,14 +15,14 @@
 //= 1.2 Replaced effect numerics with constants. [L0ne_W0lf]
 //= 1.3 Fixed a little mistake [akrus]
 //= 1.4 Corrected issue with top record setting. [L0ne_W0lf]
+//= 1.5 Updated 'waitingroom' to support required zeny/lvl. [Kisuka]
 //============================================================
 
 turbo_room,77,135,3	script	Normal mode - 4 person	124,{
 	end;
 
 OnInit:
-	waitingroom "Normal mode - 4 person",60,"Normal mode - 4 person::OnStartArena",4;
-	//SetFeeZeny 1000
+	waitingroom "Normal mode - 4 person",60,"Normal mode - 4 person::OnStartArena",4,1000,10,99;
 	enablewaitingroomevent "Normal mode - 4 person";
 	end;
 

+ 3 - 3
npc/other/turbotrack/Normal_8.txt

@@ -3,7 +3,7 @@
 //===== By: ==================================================
 //= L0ne_W0lf
 //===== Current Version: =====================================
-//= 1.5
+//= 1.6
 //===== Compatible With: =====================================
 //= eAthena SVN
 //===== Description: ========================================= 
@@ -16,14 +16,14 @@
 //= 1.3 Fixed a little mistake [akrus]
 //= 1.4 Corrected issue with top record setting. [L0ne_W0lf]
 //= 1.5 Fixed name being saved under expert mode. (bugreport:4433) [L0ne_W0lf]
+//= 1.6 Updated 'waitingroom' to support required zeny/lvl. [Kisuka]
 //============================================================
 
 turbo_room,84,135,3	script	Normal mode - 8 person	124,{
 	end;
 
 OnInit:
-	waitingroom "Normal mode - 8 person",60,"Normal mode - 8 person::OnStartArena",8;
-	//SetFeeZeny 1000
+	waitingroom "Normal mode - 8 person",60,"Normal mode - 8 person::OnStartArena",8,1000,10,99;
 	enablewaitingroomevent "Normal mode - 8 person";
 	end;
 

+ 2 - 2
npc/quests/The_Sign_Quest.txt

@@ -21,6 +21,7 @@
 //=     Moved the disablewaitingroomevent in dancing portion.
 //= 3.3 Applied Kazukin's fix for the dancing portion. (bugreport:3966) [L0ne_W0lf]
 //= 3.4 Added Renewal Changes. [Kisuka]
+//= 3.4 Updated 'waitingroom' to support required zeny/lvl. [Kisuka]
 //============================================================ 
 
 //============================================================ 
@@ -5217,8 +5218,7 @@ cmd_in01,33,33,1	script	Standby Room#sign	66,{
 	end;
 
 OnInit:
-	waitingroom "DANCE~ DANCE~",20,"Standby Room#sign::OnStartArena",1;
-	//SetReqLevel 44 99
+	waitingroom "DANCE~ DANCE~",20,"Standby Room#sign::OnStartArena",1,0,44,99;
 	enablewaitingroomevent;
 	end;
 

+ 452 - 73
npc/quests/quests_13_1.txt

@@ -3,7 +3,7 @@
 //===== By: ================================================== 
 //= L0ne_W0lf
 //===== Current Version: ===================================== 
-//= 1.7
+//= 1.8
 //===== Compatible With: ===================================== 
 //= eAthena SVN
 //===== Description: ========================================= 
@@ -34,6 +34,8 @@
 //= 1.5 Removed a 'close;' which should have been 'close2'. (bugreport:4276)
 //= 1.6 Fixed check in cat hand agent.
 //= 1.7 Moved the close in Cat Hand Service Warps. (bugreport:4079) [L0ne_W0lf]
+//= 1.8 Added 13.2 Additions to Report from the New World NPCs
+//=     Upped success rates for Report from the New World drops.
 //============================================================ 
 
 // Onward to the New World
@@ -11474,12 +11476,308 @@ mid_campin,90,121,5	script	Hibba Agip	459,{
 		cutin "ep13_captin_edq",255;
 		close;
 	}
-	else if (ep13_1_edq > 13) {
+	else if (ep13_1_edq == 14) {
 		mes "[Hibba Agip]";
 		mes "Hey, how have you been? It's too early to say that we've figured out who's the mastermind.";
 		next;
 		mes "[Hibba Agip]";
 		mes "Please be patient, I'll contact you when the time is right.";
+		next;
+		mes "[Hibba Agip]";
+		mes "Wait, have you explored this area yet? I mean the wide tundra and fields around the camp.";
+		next;
+		mes "[Hibba Agip]";
+		mes "There are many fun things outside. If you are an adventurer, go explore for yourself. Come back after you've explored the areas around the camp.";
+		cutin "ep13_captin_edq",255;
+		close;
+	}
+	else if ((ep13_1_edq == 15) && (ins_nyd == 1)) {
+		mes "[Hibba Agip]";
+		mes "Ah, it's you again. So, are you accustomed to this area now?";
+		next;
+		mes "[Hibba Agip]";
+		mes "What brings you here again? You seem to have something to say to me.";
+		next;
+		switch(select("I just want to say hello.:I found a weird portal below the mine cave.")) {
+		case 1:
+			mes "[Hibba Agip]";
+			mes "Well hello then...";
+			next;
+			mes "[Hibba Agip]";
+			mes "Please be patient. I'll contact you when the time is right.";
+			cutin "ep13_captin_edq",255;
+			break;
+		case 2:
+			mes "[Hibba Agip]";
+			mes "What portal? I've never heard about it.";
+			next;
+			mes "[Hibba Agip]";
+			mes "That place must be where both races fight against each other. It might be dangerous there.";
+			next;
+			mes "[Hibba Agip]";
+			mes "I have no idea of what it is like. It is not in my field of expertise.";
+			next;
+			mes "[Hibba Agip]";
+			mes "There is someone here who can help you. He is a historian from Rune-Midgarts. He may be aware of some relics or something that could help.";
+			next;
+			mes "[Hibba Agip]";
+			mes "Find the historian and see if he has any useful information for you.";
+			set ins_nyd,2;
+			cutin "ep13_captin_edq",255;
+			break;
+		}
+		close;
+	}
+	else if ((ins_nyd > 1) && (ins_nyd < 7)) {
+		mes "[Hibba Agip]";
+		mes "He's at his post, you can't find him?";
+		next;
+		mes "[Hibba Agip]";
+		mes "His name is Magniffer... look for him.. he's somewhere around here...";
+		cutin "ep13_captin_edq",255;
+		close;
+	}
+	else if (ins_nyd == 7) {
+		// 13.2 Addon
+		mes "[Hibba Agip]";
+		mes "Did you talk with the scholar? Thesedays, I haven't seen him for a while.";
+		next;
+		mes "[Staff Officer Abidal]";
+		mes "That's because you don't like talking to him.";
+		next;
+		mes "[Hibba Agip]";
+		mes "Hey, don't judge me like that...the problem is only that I can't see him often.";
+		next;
+		mes "[Hibba Agip]";
+		mes "Whatever. Did something happen because he showed up to me? Tell me more.";
+		next;
+		switch(select("Tell the story.")) {
+		case 1:
+			mes "[Hibba Agip]";
+			mes "Hmmm... umm... so...";
+			next;
+			mes "[Hibba Agip]";
+			mes "So, that's why that happened like that... It's so complicated...";
+			next;
+			mes "[Hibba Agip]";
+			mes "And you guys...you just take a task that you start up at first.";
+			next;
+			mes "[Staff Officer Abidal]";
+			mes "You sent him to Doctor Magnifer first....";
+			next;
+			mes "[Hibba Agip]";
+			mes "I just thought that he needed someone to talk to.";
+			next;
+			mes "[Staff Officer Abidal]";
+			mes "Ah yeah... you're right.";
+			next;
+			mes "[Hibba Agip]";
+			mes "Hmm... for example, you want to investigate a cave that you found, but you got on the Laphine and Sapha's nerves. right?";
+			next;
+			mes "[Hibba Agip]";
+			mes "And that two guys pay attention and stay quiet, but they are doing it for themselves..";
+			next;
+			mes "[Hibba Agip]";
+			mes "The most important thing is that this place is the ground that the Yggdrasilberry takes root acording to Magnifer.";
+			next;
+			mes "[Hibba Agip]";
+			mes "Abidal, do you have anything to say about this?";
+			next;
+			mes "[Staff Officer Abidal]";
+			mes "Our object is to make contact with one tribe and investgate this world and how adaptable it can be.";
+			next;
+			mes "[Staff Officer Abidal]";
+			mes "Actually, we don't have to make this situation bigger than it already is.";
+			next;
+			mes "[Hibba Agip]";
+			mes "Yeah right. I don't want to extend this thing anymore...";
+			next;
+			mes "[Staff Officer Abidal]";
+			mes "But the two tribes have remained neutral towards us up until now.";
+			next;
+			mes "[Staff Officer Abidal]";
+			mes "We don't really know what attitude they have towards us.";
+			next;
+			mes "[Hibba Agip]";
+			mes "Yeah.. that makes sense... If they made a general attack, we would probably fail.";
+			next;
+			mes "[Staff Officer Abidal]";
+			mes "We should map out a strategy. There is a method that uses Laphine and Sapha's together.";
+			next;
+			mes "[Staff Officer Abidal]";
+			mes "We send this guy to one of the tribes and ask for cooperation in our investgation.";
+			next;
+			mes "[Hibba Agip]";
+			mes "Will they help us? They have already said threatening words...";
+			next;
+			mes "[Staff Officer Abidal]";
+			mes "Of course they will help us. if they reject our demand, we just say that we'll ask for help from the other tribe.";
+			next;
+			mes "[Hibba Agip]";
+			mes "Right, if we do that, they will have no other choice.";
+			next;
+			mes "[Staff Officer Abidal]";
+			mes "In this situation, they want to avoid showing that place to the other tribe.";
+			next;
+			mes "[Staff Officer Abidal]";
+			mes "So, they have to cooperate with us.";
+			next;
+			mes "[Hibba Agip]";
+			mes "Oh, you have a malicious idea.";
+			next;
+			mes "[Staff Officer Abidal]";
+			mes "That's called that Kuhotanrangjigea from east. I didn't make that by myself.";
+			next;
+			mes "[Hibba Agip]";
+			mes "Whatever.. Hey, you there... your name is " + name + " right? Do you know what to do?";
+			next;
+			mes "[Hibba Agip]";
+			mes "Go to one of the tribes and ask for help officially. I'll send someone to the other tribe.";
+			next;
+			mes "[Hibba Agip]";
+			mes "I'm going to give you a choice. Which tribe do you want to go to?";
+			next;
+			switch(select("Laphine:Sapha")) {
+			case 1:
+				mes "[Hibba Agip]";
+				mes "Okay, then I place responsibility on you. from now on you focus on acquiring a good reputation with the Laphine.";
+				next;
+				mes "[Hibba Agip]";
+				mes "It won't be easy to get a good impression from the Sapha again.";
+				next;
+				mes "[Hibba Agip]";
+				mes "So you must earn us a good reputation from the Laphine.";
+				next;
+				mes "[Hibba Agip]";
+				mes "Will you choose the Laphine?";
+				next;
+				switch(select("Choose Laphine.:Think again.")) {
+				case 1:
+					mes "[Hibba Agip]";
+					mes "Good. You are now responsible with building our relationship with the Laphine tribe.";
+					next;
+					mes "[Hibba Agip]";
+					mes "Go to the chief of the Laphine and if he doesn't accept our request, just say that you are going to ask for help from the Sapha.";
+					next;
+					mes "[Hibba Agip]";
+					mes "You have your orders! Now I'm going to look for an adventurer who is willing to be sent to the Sapha.";
+					set ins_nyd,81;
+					cutin "ep13_captin_edq",255;
+					break;
+				case 2:
+					mes "[Hibba Agip]";
+					mes "Yeah? Then think again and decide.";
+					cutin "ep13_captin_edq",255;
+					break;
+				}
+				break;
+			case 2:
+				mes "[Hibba Agip]";
+				mes "Okay, then I place responsibility on you. from now on you focus on acquiring a good reputation with the Sapha.";
+				next;
+				mes "[Hibba Agip]";
+				mes "It won't be easy to get a good impression from the Laphine again.";
+				next;
+				mes "[Hibba Agip]";
+				mes "So you must earn us a good reputation from the Sapha.";
+				next;
+				mes "[Hibba Agip]";
+				mes "Will you choose the Sapha?";
+				next;
+				switch(select("Choose Sapha.:Think again.")) {
+				case 1:
+					mes "[Hibba Agip]";
+					mes "Good. You are now responsible with building our relationship with the Sapha tribe.";
+					next;
+					mes "[Hibba Agip]";
+					mes "Go to the chief of the Sapha and if he doesn't accept our request, just say that you are going to ask for help from the Laphine.";
+					next;
+					mes "[Hibba Agip]";
+					mes "You have your orders! Now I'm going to look for an adventurer who is willing to be sent to the Laphine.";
+					set ins_nyd,82;
+					cutin "ep13_captin_edq",255;
+					break;
+				case 2:
+					mes "[Hibba Agip]";
+					mes "Yeah? then think again and decide.";
+					cutin "ep13_captin_edq",255;
+					break;
+				}
+				break;
+			}
+			break;
+		}
+		close;
+	}
+	else if (ins_nyd == 81) {
+		mes "[Hibba Agip]";
+		mes "Good. You are now responsible with building our relationship with the Laphine tribe.";
+		next;
+		mes "[Hibba Agip]";
+		mes "Go to the chief of the Laphine and if he doesn't accept our request, just say that you are going to ask for help from the Sapha.";
+		next;
+		mes "[Hibba Agip]";
+		mes "I'm going to look for an adventurer who is willing to be sent to the Sapha.";
+		cutin "ep13_captin_edq",255;
+		close;
+	}
+	else if (ins_nyd == 82) {
+		mes "[Hibba Agip]";
+		mes "Good. You are now responsible with building our relationship with the Sapha tribe.";
+		next;
+		mes "[Hibba Agip]";
+		mes "Go to the chief of the Sapha and if he doesn't accept our request, just say that you are going to ask for help from the Laphine.";
+		next;
+		mes "[Hibba Agip]";
+		mes "You have your orders! Now I'm going to look for an adventurer who is willing to be sent to the Laphine.";
+		cutin "ep13_captin_edq",255;
+		close;
+	}
+	else if ((ins_nyd == 91) || (ins_nyd == 101) || (ins_nyd == 111)) {
+		mes "[Hibba Agip]";
+		mes "How's the activity in Laphine? They have a stern character.";
+		next;
+		mes "[Hibba Agip]";
+		mes "I'm not cut out for matching with them...ew...";
+		next;
+		mes "[Hibba Agip]";
+		mes "I'm going to send a few able men to the Sapha, you don't have to worry about it.";
+		cutin "ep13_captin_edq",255;
+		close;
+	}
+	else if ((ins_nyd == 92) || (ins_nyd == 102) || (ins_nyd == 112)) {
+		mes "[Hibba Agip]";
+		mes "How's the activity Sapha? They have a stern character.";
+		next;
+		mes "[Hibba Agip]";
+		mes "I'm not cut out for matching with them...ew...";
+		next;
+		mes "[Hibba Agip]";
+		mes "I'm going to send a few able men to the Laphine, you don't have to worry about it.";
+		cutin "ep13_captin_edq",255;
+		close;
+	}
+	else if ((ins_nyd == 121) || (ins_nyd == 131) || (ins_nyd == 132)) {
+		mes "[Hibba Agip]";
+		mes "You've come back alive? Let us celebrate your immunity!";
+		next;
+		mes "[Hibba Agip]";
+		mes "Who would have thought that that outsiders would be treated so vulgar by the leaders of the other tribes?";
+		next;
+		mes "[Hibba Agip]";
+		mes "I have said before this thing is not the last, and certainly there is something waiting for us.";
+		next;
+		mes "[Hibba Agip]";
+		mes "It is time for us to head out, is it not, instructor?";
+		next;
+		mes "[Staff Officer Abidal]";
+		mes "Right... It's time...";
+		next;
+		mes "[Instructor Igrid]";
+		mes "I'm ready.";
+		next;
+		mes "[Hibba Agip]";
+		mes "I am looking forward to what will happen... Whew...";
 		cutin "ep13_captin_edq",255;
 		close;
 	}
@@ -11704,8 +12002,8 @@ mid_campin,94,118,3	script	Staff Officer Abidal	755,{
 						mes "[Staff Officer Abidal]";
 						mes "Umm... This page should go here and..";
 						next;
-						set .@ep13_edq_wrong,rand(1,12);
-						if ((countitem(11013) == 0) && (.@ep13_edq_wrong == 4)) {
+						set .@ep13_edq_wrong,rand(1,7);
+						if ((countitem(11013) == 0) && (.@ep13_edq_wrong == 1)) {
 							mes "[Staff Officer Abidal]";
 							mes "Thank you for your hard work. We were able to restore one volume of the report.";
 							next;
@@ -11718,7 +12016,7 @@ mid_campin,94,118,3	script	Staff Officer Abidal	755,{
 							mes "Keep up the good work on finding the rest of the volumes.";
 							close;
 						}
-						else if ((countitem(11013) == 1) && (.@ep13_edq_wrong == 4)) {
+						else if ((countitem(11013) == 1) && (.@ep13_edq_wrong == 1)) {
 							mes "[Staff Officer Abidal]";
 							mes "Thank you for your hard work. We were able to restore one volume of the report.";
 							next;
@@ -11727,7 +12025,7 @@ mid_campin,94,118,3	script	Staff Officer Abidal	755,{
 							delitem 6040,10; //Some_Of_Report
 							close;
 						}
-						else if ((countitem(11014) == 0) && (.@ep13_edq_wrong == 6)) {
+						else if ((countitem(11014) == 0) && ((.@ep13_edq_wrong == 3) || (.@ep13_edq_wrong == 2))) {
 							mes "[Staff Officer Abidal]";
 							mes "Thank you for your hard work. We were able to restore one volume of the report.";
 							next;
@@ -11740,7 +12038,7 @@ mid_campin,94,118,3	script	Staff Officer Abidal	755,{
 							mes "Keep up the good work on finding the rest of the volumes.";
 							close;
 						}
-						else if ((countitem(11014) == 1) && (.@ep13_edq_wrong == 6)) {
+						else if ((countitem(11014) == 1) && ((.@ep13_edq_wrong == 3) || (.@ep13_edq_wrong == 2))) {
 							mes "[Staff Officer Abidal]";
 							mes "Thank you for your hard work. We were able to restore one volume of the report.";
 							next;
@@ -11749,7 +12047,7 @@ mid_campin,94,118,3	script	Staff Officer Abidal	755,{
 							delitem 6040,10; //Some_Of_Report
 							close;
 						}
-						else if ((countitem(11015) == 0) && (.@ep13_edq_wrong == 8)) {
+						else if ((countitem(11015) == 0) && ((.@ep13_edq_wrong == 5) || (.@ep13_edq_wrong == 6))) {
 							mes "[Staff Officer Abidal]";
 							mes "Thank you for your hard work. We were able to restore one volume of the report.";
 							next;
@@ -11762,7 +12060,7 @@ mid_campin,94,118,3	script	Staff Officer Abidal	755,{
 							mes "Keep up the good work on finding the rest of the volumes.";
 							close;
 						}
-						else if ((countitem(11015) == 1) && (.@ep13_edq_wrong == 8)) {
+						else if ((countitem(11015) == 1) && ((.@ep13_edq_wrong == 5) || (.@ep13_edq_wrong == 6))) {
 							mes "[Staff Officer Abidal]";
 							mes "Thank you for your hard work. We were able to restore one volume of the report.";
 							next;
@@ -11771,7 +12069,7 @@ mid_campin,94,118,3	script	Staff Officer Abidal	755,{
 							delitem 6040,10; //Some_Of_Report
 							close;
 						}
-						else if ((countitem(11016) == 0) && (.@ep13_edq_wrong == 10)) {
+						else if ((countitem(11016) == 0) && (.@ep13_edq_wrong == 7)) {
 							mes "[Staff Officer Abidal]";
 							mes "Thank you for your hard work. We were able to restore one volume of the report.";
 							next;
@@ -11784,7 +12082,7 @@ mid_campin,94,118,3	script	Staff Officer Abidal	755,{
 							mes "Keep up the good work on finding the rest of the volumes.";
 							close;
 						}
-						else if ((countitem(11016) == 1) && (.@ep13_edq_wrong == 10)) {
+						else if ((countitem(11016) == 1) && (.@ep13_edq_wrong == 7)) {
 							mes "[Staff Officer Abidal]";
 							mes "Thank you for your hard work. We were able to restore one volume of the report.";
 							next;
@@ -11807,8 +12105,8 @@ mid_campin,94,118,3	script	Staff Officer Abidal	755,{
 						mes "[Staff Officer Abidal]";
 						mes "Umm... This page should go here and..";
 						next;
-						set .@ep13_edq_wrong,rand(1,10);
-						if ((countitem(11013) == 0) && (.@ep13_edq_wrong == 4)) {
+						set .@ep13_edq_wrong,rand(1,5);
+						if ((countitem(11013) == 0) && (.@ep13_edq_wrong == 1)) {
 							mes "[Staff Officer Abidal]";
 							mes "Thank you for your hard work. We were able to restore one volume of the report.";
 							next;
@@ -11821,7 +12119,7 @@ mid_campin,94,118,3	script	Staff Officer Abidal	755,{
 							mes "Keep up the good work on finding the rest of the volumes.";
 							close;
 						}
-						else if ((countitem(11013) == 1) && (.@ep13_edq_wrong == 4)) {
+						else if ((countitem(11013) == 1) && (.@ep13_edq_wrong == 1)) {
 							mes "[Staff Officer Abidal]";
 							mes "Thank you for your hard work. We were able to restore one volume of the report.";
 							next;
@@ -11830,7 +12128,7 @@ mid_campin,94,118,3	script	Staff Officer Abidal	755,{
 							delitem 6040,10; //Some_Of_Report
 							close;
 						}
-						else if ((countitem(11014) == 0) && (.@ep13_edq_wrong == 6)) {
+						else if ((countitem(11014) == 0) && (.@ep13_edq_wrong == 2)) {
 							mes "[Staff Officer Abidal]";
 							mes "Thank you for your hard work. We were able to restore one volume of the report.";
 							next;
@@ -11843,7 +12141,7 @@ mid_campin,94,118,3	script	Staff Officer Abidal	755,{
 							mes "Keep up the good work on finding the rest of the volumes.";
 							close;
 						}
-						else if ((countitem(11014) == 1) && (.@ep13_edq_wrong == 6)) {
+						else if ((countitem(11014) == 1) && (.@ep13_edq_wrong == 2)) {
 							mes "[Staff Officer Abidal]";
 							mes "Thank you for your hard work. We were able to restore one volume of the report.";
 							next;
@@ -11852,7 +12150,7 @@ mid_campin,94,118,3	script	Staff Officer Abidal	755,{
 							delitem 6040,10; //Some_Of_Report
 							close;
 						}
-						else if ((countitem(11015) == 0) && (.@ep13_edq_wrong == 8)) {
+						else if ((countitem(11015) == 0) && ((.@ep13_edq_wrong == 3) || (.@ep13_edq_wrong == 4))) {
 							mes "[Staff Officer Abidal]";
 							mes "Thank you for your hard work. We were able to restore one volume of the report.";
 							next;
@@ -11865,7 +12163,7 @@ mid_campin,94,118,3	script	Staff Officer Abidal	755,{
 							mes "Keep up the good work on finding the rest of the volumes.";
 							close;
 						}
-						else if ((countitem(11015) == 1) && (.@ep13_edq_wrong == 8)) {
+						else if ((countitem(11015) == 1) && ((.@ep13_edq_wrong == 3) || (.@ep13_edq_wrong == 4))) {
 							mes "[Staff Officer Abidal]";
 							mes "Thank you for your hard work. We were able to restore one volume of the report.";
 							next;
@@ -11874,7 +12172,7 @@ mid_campin,94,118,3	script	Staff Officer Abidal	755,{
 							delitem 6040,10; //Some_Of_Report
 							close;
 						}
-						else if ((countitem(11016) == 0) && (.@ep13_edq_wrong == 10)) {
+						else if ((countitem(11016) == 0) && (.@ep13_edq_wrong == 5)) {
 							mes "[Staff Officer Abidal]";
 							mes "Thank you for your hard work. We were able to restore one volume of the report.";
 							next;
@@ -11887,7 +12185,7 @@ mid_campin,94,118,3	script	Staff Officer Abidal	755,{
 							mes "Keep up the good work on finding the rest of the volumes.";
 							close;
 						}
-						else if ((countitem(11016) == 1) && (.@ep13_edq_wrong == 10)) {
+						else if ((countitem(11016) == 1) && (.@ep13_edq_wrong == 5)) {
 							mes "[Staff Officer Abidal]";
 							mes "Thank you for your hard work. We were able to restore one volume of the report.";
 							next;
@@ -12006,7 +12304,7 @@ mid_campin,94,118,3	script	Staff Officer Abidal	755,{
 			close;
 		}
 	}
-	else if ((ep13_1_edq > 8) && (ep13_1_edq < 13)) {
+	else if ((ep13_1_edq == 8) || ((ep13_1_edq > 8) && (ep13_1_edq < 13))) {
 		mes "[Staff Officer Abidal]";
 		mes "Phew, I'm glad we can resume the mission again.";
 		next;
@@ -12014,7 +12312,18 @@ mid_campin,94,118,3	script	Staff Officer Abidal	755,{
 		mes "...Aren't you leaving? I think you should.";
 		close;
 	}
+	else if (ins_nyd > 0) {
+		// 13.2 addon
+		mes "[Staff Officer Abidal]";
+		mes "I heard that you got a new duty from Commander Agip.";
+		next;
+		mes "[Staff Officer Abidal]";
+		mes "...Aren't you leaving? I think you should.";
+		close;
+	}
 	else {
+		mes "[Staff Officer Abidal]";
+		mes "Hello, I'm Staff Officer Abidal. Safe travels, Adventurer.";
 		close;
 	}
 }
@@ -12063,6 +12372,12 @@ mid_campin,85,118,7	script	Instructor Igrid	751,{
 		mes "What are you looking at? Go mind your own business!";
 		close;
 	}
+	else {
+		// 13.2 addon
+		mes "[Instructor Igrid]";
+		mes "I am Expedition Training Instructor Igrid, and the commander responsible for training soldiers. ";
+		close;
+	}
 }
 
 mid_camp,206,286,3	script	Expedition Messenger	997,{
@@ -12335,9 +12650,9 @@ man_fild01,315,95,3	script	Expedition Scout#1	707,{
 				mes "Oh, you must be" + strcharinfo(0) + ". I heard that you'll be delivering the report.";
 				next;
 				mes "[Expedition Scout]";
-				mes "Good news! I've found 3 pieces of paper that appear to be part of the report.";
+				mes "Good news! I've found 5 pieces of paper that appear to be part of the report.";
 				next;
-				getitem 6040,3; //Some_Of_Report
+				getitem 6040,5; //Some_Of_Report
 				changequest 3090,3091;
 				erasequest 3090;
 				setquest 3091;
@@ -12350,9 +12665,9 @@ man_fild01,315,95,3	script	Expedition Scout#1	707,{
 				mes "Oh, you must be" + strcharinfo(0) + ". I heard that you'll be delivering the report.";
 				next;
 				mes "[Expedition Scout]";
-				mes "Good news! I've found 1 piece of paper that appear to be part of the report.";
+				mes "Good news! I've found 2 pieces of paper that appear to be part of the report.";
 				next;
-				getitem 6040,1; //Some_Of_Report
+				getitem 6040,2; //Some_Of_Report
 				changequest 3090,3091;
 				erasequest 3090;
 				setquest 3091;
@@ -12365,9 +12680,9 @@ man_fild01,315,95,3	script	Expedition Scout#1	707,{
 				mes "Oh, you must be" + strcharinfo(0) + ". I heard that you'll be delivering the report.";
 				next;
 				mes "[Expedition Scout]";
-				mes "Good news! I've found 2 pieces of paper that appear to be part of the report.";
+				mes "Good news! I've found 3 pieces of paper that appear to be part of the report.";
 				next;
-				getitem 6040,2; //Some_Of_Report
+				getitem 6040,3; //Some_Of_Report
 				changequest 3090,3091;
 				erasequest 3090;
 				setquest 3091;
@@ -12405,9 +12720,9 @@ man_fild01,315,95,3	script	Expedition Scout#1	707,{
 				mes "Oh, you must be" + strcharinfo(0) + ". I heard that you'll be delivering the report.";
 				next;
 				mes "[Expedition Scout]";
-				mes "Good news! I've found 3 pieces of paper that appear to be part of the report.";
+				mes "Good news! I've found 5 pieces of paper that appear to be part of the report.";
 				next;
-				getitem 6040,3; //Some_Of_Report
+				getitem 6040,5; //Some_Of_Report
 				erasequest 3091;
 				setquest 3091;
 				mes "[Expedition Scout]";
@@ -12419,9 +12734,9 @@ man_fild01,315,95,3	script	Expedition Scout#1	707,{
 				mes "Oh, you must be" + strcharinfo(0) + ". I heard that you'll be delivering the report.";
 				next;
 				mes "[Expedition Scout]";
-				mes "Good news! I've found 1 piece of paper that appear to be part of the report.";
+				mes "Good news! I've found 2 pieces of paper that appear to be part of the report.";
 				next;
-				getitem 6040,1; //Some_Of_Report
+				getitem 6040,2; //Some_Of_Report
 				erasequest 3091;
 				setquest 3091;
 				mes "[Expedition Scout]";
@@ -12433,9 +12748,9 @@ man_fild01,315,95,3	script	Expedition Scout#1	707,{
 				mes "Oh, you must be" + strcharinfo(0) + ". I heard that you'll be delivering the report.";
 				next;
 				mes "[Expedition Scout]";
-				mes "Good news! I've found 2 pieces of paper that appear to be part of the report.";
+				mes "Good news! I've found 3 pieces of paper that appear to be part of the report.";
 				next;
-				getitem 6040,2; //Some_Of_Report
+				getitem 6040,3; //Some_Of_Report
 				erasequest 3091;
 				setquest 3091;
 				mes "[Expedition Scout]";
@@ -12510,9 +12825,9 @@ man_fild03,202,251,3	script	Expedition Scout#2	707,{
 				mes "Oh, you must be" + strcharinfo(0) + ". I heard that you'll be delivering the report.";
 				next;
 				mes "[Expedition Scout]";
-				mes "Good news! I've found 3 pieces of paper that appear to be part of the report.";
+				mes "Good news! I've found 5 pieces of paper that appear to be part of the report.";
 				next;
-				getitem 6040,3; //Some_Of_Report
+				getitem 6040,5; //Some_Of_Report
 				changequest 3090,3091;
 				erasequest 3090;
 				setquest 3091;
@@ -12525,9 +12840,9 @@ man_fild03,202,251,3	script	Expedition Scout#2	707,{
 				mes "Oh, you must be" + strcharinfo(0) + ". I heard that you'll be delivering the report.";
 				next;
 				mes "[Expedition Scout]";
-				mes "Good news! I've found 1 piece of paper that appear to be part of the report.";
+				mes "Good news! I've found 2 piece of paper that appear to be part of the report.";
 				next;
-				getitem 6040,1; //Some_Of_Report
+				getitem 6040,2; //Some_Of_Report
 				changequest 3090,3091;
 				erasequest 3090;
 				setquest 3091;
@@ -12540,9 +12855,9 @@ man_fild03,202,251,3	script	Expedition Scout#2	707,{
 				mes "Oh, you must be" + strcharinfo(0) + ". I heard that you'll be delivering the report.";
 				next;
 				mes "[Expedition Scout]";
-				mes "Good news! I've found 2 pieces of paper that appear to be part of the report.";
+				mes "Good news! I've found 3 pieces of paper that appear to be part of the report.";
 				next;
-				getitem 6040,2; //Some_Of_Report
+				getitem 6040,3; //Some_Of_Report
 				changequest 3090,3091;
 				erasequest 3090;
 				setquest 3091;
@@ -12580,9 +12895,9 @@ man_fild03,202,251,3	script	Expedition Scout#2	707,{
 				mes "Oh, you must be" + strcharinfo(0) + ". I heard that you'll be delivering the report.";
 				next;
 				mes "[Expedition Scout]";
-				mes "Good news! I've found 3 pieces of paper that appear to be part of the report.";
+				mes "Good news! I've found 5 pieces of paper that appear to be part of the report.";
 				next;
-				getitem 6040,3; //Some_Of_Report
+				getitem 6040,5; //Some_Of_Report
 				erasequest 3091;
 				setquest 3091;
 				mes "[Expedition Scout]";
@@ -12594,9 +12909,9 @@ man_fild03,202,251,3	script	Expedition Scout#2	707,{
 				mes "Oh, you must be" + strcharinfo(0) + ". I heard that you'll be delivering the report.";
 				next;
 				mes "[Expedition Scout]";
-				mes "Good news! I've found 1 piece of paper that appear to be part of the report.";
+				mes "Good news! I've found 2 pieces of paper that appear to be part of the report.";
 				next;
-				getitem 6040,1; //Some_Of_Report
+				getitem 6040,2; //Some_Of_Report
 				erasequest 3091;
 				setquest 3091;
 				mes "[Expedition Scout]";
@@ -12608,9 +12923,9 @@ man_fild03,202,251,3	script	Expedition Scout#2	707,{
 				mes "Oh, you must be" + strcharinfo(0) + ". I heard that you'll be delivering the report.";
 				next;
 				mes "[Expedition Scout]";
-				mes "Good news! I've found 2 pieces of paper that appear to be part of the report.";
+				mes "Good news! I've found 3 pieces of paper that appear to be part of the report.";
 				next;
-				getitem 6040,2; //Some_Of_Report
+				getitem 6040,3; //Some_Of_Report
 				erasequest 3091;
 				setquest 3091;
 				mes "[Expedition Scout]";
@@ -12675,9 +12990,9 @@ spl_fild02,295,368,3	script	Expedition Scout#3	707,{
 				mes "Oh, you must be" + strcharinfo(0) + ". I heard that you'll be delivering the report.";
 				next;
 				mes "[Expedition Scout]";
-				mes "Good news! I've found 3 pieces of paper that appear to be part of the report.";
+				mes "Good news! I've found 5 pieces of paper that appear to be part of the report.";
 				next;
-				getitem 6040,3; //Some_Of_Report
+				getitem 6040,5; //Some_Of_Report
 				changequest 3090,3091;
 				erasequest 3090;
 				setquest 3091;
@@ -12690,9 +13005,9 @@ spl_fild02,295,368,3	script	Expedition Scout#3	707,{
 				mes "Oh, you must be" + strcharinfo(0) + ". I heard that you'll be delivering the report.";
 				next;
 				mes "[Expedition Scout]";
-				mes "Good news! I've found 1 piece of paper that appear to be part of the report.";
+				mes "Good news! I've found 2 pieces of paper that appear to be part of the report.";
 				next;
-				getitem 6040,1; //Some_Of_Report
+				getitem 6040,2; //Some_Of_Report
 				changequest 3090,3091;
 				erasequest 3090;
 				setquest 3091;
@@ -12705,9 +13020,9 @@ spl_fild02,295,368,3	script	Expedition Scout#3	707,{
 				mes "Oh, you must be" + strcharinfo(0) + ". I heard that you'll be delivering the report.";
 				next;
 				mes "[Expedition Scout]";
-				mes "Good news! I've found 2 pieces of paper that appear to be part of the report.";
+				mes "Good news! I've found 3 pieces of paper that appear to be part of the report.";
 				next;
-				getitem 6040,2; //Some_Of_Report
+				getitem 6040,3; //Some_Of_Report
 				changequest 3090,3091;
 				erasequest 3090;
 				setquest 3091;
@@ -12745,9 +13060,9 @@ spl_fild02,295,368,3	script	Expedition Scout#3	707,{
 				mes "Oh, you must be" + strcharinfo(0) + ". I heard that you'll be delivering the report.";
 				next;
 				mes "[Expedition Scout]";
-				mes "Good news! I've found 3 pieces of paper that appear to be part of the report.";
+				mes "Good news! I've found 5 pieces of paper that appear to be part of the report.";
 				next;
-				getitem 6040,3; //Some_Of_Report
+				getitem 6040,5; //Some_Of_Report
 				erasequest 3091;
 				setquest 3091;
 				mes "[Expedition Scout]";
@@ -12759,9 +13074,9 @@ spl_fild02,295,368,3	script	Expedition Scout#3	707,{
 				mes "Oh, you must be" + strcharinfo(0) + ". I heard that you'll be delivering the report.";
 				next;
 				mes "[Expedition Scout]";
-				mes "Good news! I've found 1 piece of paper that appear to be part of the report.";
+				mes "Good news! I've found 2 piece of paper that appear to be part of the report.";
 				next;
-				getitem 6040,1; //Some_Of_Report
+				getitem 6040,2; //Some_Of_Report
 				erasequest 3091;
 				setquest 3091;
 				mes "[Expedition Scout]";
@@ -12773,9 +13088,9 @@ spl_fild02,295,368,3	script	Expedition Scout#3	707,{
 				mes "Oh, you must be" + strcharinfo(0) + ". I heard that you'll be delivering the report.";
 				next;
 				mes "[Expedition Scout]";
-				mes "Good news! I've found 2 pieces of paper that appear to be part of the report.";
+				mes "Good news! I've found 3 pieces of paper that appear to be part of the report.";
 				next;
-				getitem 6040,2; //Some_Of_Report
+				getitem 6040,3; //Some_Of_Report
 				erasequest 3091;
 				setquest 3091;
 				mes "[Expedition Scout]";
@@ -12850,9 +13165,9 @@ spl_fild03,172,71,3	script	Expedition Scout#4	707,{
 				mes "Oh, you must be" + strcharinfo(0) + ". I heard that you'll be delivering the report.";
 				next;
 				mes "[Expedition Scout]";
-				mes "Good news! I've found 3 pieces of paper that appear to be part of the report.";
+				mes "Good news! I've found 5 pieces of paper that appear to be part of the report.";
 				next;
-				getitem 6040,3; //Some_Of_Report
+				getitem 6040,5; //Some_Of_Report
 				changequest 3090,3091;
 				erasequest 3090;
 				setquest 3091;
@@ -12865,9 +13180,9 @@ spl_fild03,172,71,3	script	Expedition Scout#4	707,{
 				mes "Oh, you must be" + strcharinfo(0) + ". I heard that you'll be delivering the report.";
 				next;
 				mes "[Expedition Scout]";
-				mes "Good news! I've found 1 piece of paper that appear to be part of the report.";
+				mes "Good news! I've found 2 pieces of paper that appear to be part of the report.";
 				next;
-				getitem 6040,1; //Some_Of_Report
+				getitem 6040,2; //Some_Of_Report
 				changequest 3090,3091;
 				erasequest 3090;
 				setquest 3091;
@@ -12880,9 +13195,9 @@ spl_fild03,172,71,3	script	Expedition Scout#4	707,{
 				mes "Oh, you must be" + strcharinfo(0) + ". I heard that you'll be delivering the report.";
 				next;
 				mes "[Expedition Scout]";
-				mes "Good news! I've found 2 pieces of paper that appear to be part of the report.";
+				mes "Good news! I've found 3 pieces of paper that appear to be part of the report.";
 				next;
-				getitem 6040,2; //Some_Of_Report
+				getitem 6040,3; //Some_Of_Report
 				changequest 3090,3091;
 				erasequest 3090;
 				setquest 3091;
@@ -12920,9 +13235,9 @@ spl_fild03,172,71,3	script	Expedition Scout#4	707,{
 				mes "Oh, you must be" + strcharinfo(0) + ". I heard that you'll be delivering the report.";
 				next;
 				mes "[Expedition Scout]";
-				mes "Good news! I've found 3 pieces of paper that appear to be part of the report.";
+				mes "Good news! I've found 5 pieces of paper that appear to be part of the report.";
 				next;
-				getitem 6040,3; //Some_Of_Report
+				getitem 6040,5; //Some_Of_Report
 				erasequest 3091;
 				setquest 3091;
 				mes "[Expedition Scout]";
@@ -12934,9 +13249,9 @@ spl_fild03,172,71,3	script	Expedition Scout#4	707,{
 				mes "Oh, you must be" + strcharinfo(0) + ". I heard that you'll be delivering the report.";
 				next;
 				mes "[Expedition Scout]";
-				mes "Good news! I've found 1 piece of paper that appear to be part of the report.";
+				mes "Good news! I've found 2 pieces of paper that appear to be part of the report.";
 				next;
-				getitem 6040,1; //Some_Of_Report
+				getitem 6040,2; //Some_Of_Report
 				erasequest 3091;
 				setquest 3091;
 				mes "[Expedition Scout]";
@@ -12948,9 +13263,9 @@ spl_fild03,172,71,3	script	Expedition Scout#4	707,{
 				mes "Oh, you must be" + strcharinfo(0) + ". I heard that you'll be delivering the report.";
 				next;
 				mes "[Expedition Scout]";
-				mes "Good news! I've found 2 pieces of paper that appear to be part of the report.";
+				mes "Good news! I've found 3 pieces of paper that appear to be part of the report.";
 				next;
-				getitem 6040,2; //Some_Of_Report
+				getitem 6040,3; //Some_Of_Report
 				erasequest 3091;
 				setquest 3091;
 				mes "[Expedition Scout]";
@@ -13502,6 +13817,10 @@ OnEnable:
 	monster "spl_fild02",0,0,"Luciola Vespa",1994,1,"ep13_spl_fild02_mon_edq::OnMyMobDead";
 	monster "spl_fild02",0,0,"Luciola Vespa",1994,1,"ep13_spl_fild02_mon_edq::OnMyMobDead";
 	monster "spl_fild02",0,0,"Luciola Vespa",1994,1,"ep13_spl_fild02_mon_edq::OnMyMobDead";
+	monster "spl_fild02",0,0,"Luciola Vespa",1994,1,"ep13_spl_fild02_mon_edq::OnMyMobDead";
+	monster "spl_fild02",0,0,"Luciola Vespa",1994,1,"ep13_spl_fild02_mon_edq::OnMyMobDead";
+	monster "spl_fild02",0,0,"Pinguicula",1995,1,"ep13_spl_fild02_mon_edq::OnMyMobDead";
+	monster "spl_fild02",0,0,"Pinguicula",1995,1,"ep13_spl_fild02_mon_edq::OnMyMobDead";
 	monster "spl_fild02",0,0,"Pinguicula",1995,1,"ep13_spl_fild02_mon_edq::OnMyMobDead";
 	monster "spl_fild02",0,0,"Pinguicula",1995,1,"ep13_spl_fild02_mon_edq::OnMyMobDead";
 	monster "spl_fild02",0,0,"Pinguicula",1995,1,"ep13_spl_fild02_mon_edq::OnMyMobDead";
@@ -13524,7 +13843,19 @@ OnTimer600000:
 
 OnMyMobDead:
 	set .@spl_fild02_mob_dead,mobcount("spl_fild02","ep13_spl_fild02_mon_edq::OnMyMobDead");
-	if (.@spl_fild02_mob_dead < 10) && ((ep13_1_edq == 71) || (ep13_1_edq == 72)) {
+	if (.@spl_fild02_mob_dead < 14) && ((ep13_1_edq == 71) || (ep13_1_edq == 72)) {
+		getitem 6040,1; //Some_Of_Report
+	}
+	else if (.@spl_fild02_mob_dead < 13) && ((ep13_1_edq == 71) || (ep13_1_edq == 72)) {
+		getitem 6040,1; //Some_Of_Report
+	}
+	else if (.@spl_fild02_mob_dead < 12) && ((ep13_1_edq == 71) || (ep13_1_edq == 72)) {
+		getitem 6040,1; //Some_Of_Report
+	}
+	else if (.@spl_fild02_mob_dead < 11) && ((ep13_1_edq == 71) || (ep13_1_edq == 72)) {
+		getitem 6040,1; //Some_Of_Report
+	}
+	else if (.@spl_fild02_mob_dead < 10) && ((ep13_1_edq == 71) || (ep13_1_edq == 72)) {
 		getitem 6040,1; //Some_Of_Report
 	}
 	else if (.@spl_fild02_mob_dead < 9) && ((ep13_1_edq == 71) || (ep13_1_edq == 72)) {
@@ -13570,9 +13901,13 @@ OnEnable:
 	monster "spl_fild03",0,0,"Luciola Vespa",1994,1,"ep13_spl_fild03_mon_edq::OnMyMobDead";
 	monster "spl_fild03",0,0,"Luciola Vespa",1994,1,"ep13_spl_fild03_mon_edq::OnMyMobDead";
 	monster "spl_fild03",0,0,"Luciola Vespa",1994,1,"ep13_spl_fild03_mon_edq::OnMyMobDead";
+	monster "spl_fild03",0,0,"Luciola Vespa",1994,1,"ep13_spl_fild03_mon_edq::OnMyMobDead";
+	monster "spl_fild03",0,0,"Cornus",1992,1,"ep13_spl_fild03_mon_edq::OnMyMobDead";
 	monster "spl_fild03",0,0,"Cornus",1992,1,"ep13_spl_fild03_mon_edq::OnMyMobDead";
 	monster "spl_fild03",0,0,"Cornus",1992,1,"ep13_spl_fild03_mon_edq::OnMyMobDead";
 	monster "spl_fild03",0,0,"Cornus",1992,1,"ep13_spl_fild03_mon_edq::OnMyMobDead";
+	monster "spl_fild03",0,0,"Cornus",1992,1,"ep13_spl_fild03_mon_edq::OnMyMobDead";
+	monster "spl_fild03",0,0,"Naga",1993,1,"ep13_spl_fild03_mon_edq::OnMyMobDead";
 	monster "spl_fild03",0,0,"Naga",1993,1,"ep13_spl_fild03_mon_edq::OnMyMobDead";
 	monster "spl_fild03",0,0,"Naga",1993,1,"ep13_spl_fild03_mon_edq::OnMyMobDead";
 	monster "spl_fild03",0,0,"Naga",1993,1,"ep13_spl_fild03_mon_edq::OnMyMobDead";
@@ -13594,7 +13929,19 @@ OnTimer600000:
 
 OnMyMobDead:
 	set .@spl_fild03_mob_dead,mobcount("spl_fild03","ep13_spl_fild03_mon_edq::OnMyMobDead");
-	if (.@spl_fild03_mob_dead < 10) && ((ep13_1_edq == 71) || (ep13_1_edq == 72)) {
+	if (.@spl_fild03_mob_dead < 14) && ((ep13_1_edq == 71) || (ep13_1_edq == 72)) {
+		getitem 6040,1; //Some_Of_Report
+	}
+	else if (.@spl_fild03_mob_dead < 13) && ((ep13_1_edq == 71) || (ep13_1_edq == 72)) {
+		getitem 6040,1; //Some_Of_Report
+	}
+	else if (.@spl_fild03_mob_dead < 12) && ((ep13_1_edq == 71) || (ep13_1_edq == 72)) {
+		getitem 6040,1; //Some_Of_Report
+	}
+	else if (.@spl_fild03_mob_dead < 11) && ((ep13_1_edq == 71) || (ep13_1_edq == 72)) {
+		getitem 6040,1; //Some_Of_Report
+	}
+	else if (.@spl_fild03_mob_dead < 10) && ((ep13_1_edq == 71) || (ep13_1_edq == 72)) {
 		getitem 6040,1; //Some_Of_Report
 	}
 	else if (.@spl_fild03_mob_dead < 9) && ((ep13_1_edq == 71) || (ep13_1_edq == 72)) {
@@ -13642,6 +13989,10 @@ OnEnable:
 	monster "man_fild01",0,0,"Nepenthes",1988,1,"ep13_man_fild01_mon_edq::OnMyMobDead";
 	monster "man_fild01",0,0,"Nepenthes",1988,1,"ep13_man_fild01_mon_edq::OnMyMobDead";
 	monster "man_fild01",0,0,"Nepenthes",1988,1,"ep13_man_fild01_mon_edq::OnMyMobDead";
+	monster "man_fild01",0,0,"Nepenthes",1988,1,"ep13_man_fild01_mon_edq::OnMyMobDead";
+	monster "man_fild01",0,0,"Nepenthes",1988,1,"ep13_man_fild01_mon_edq::OnMyMobDead";
+	monster "man_fild01",0,0,"Hillslion",1989,1,"ep13_man_fild01_mon_edq::OnMyMobDead";
+	monster "man_fild01",0,0,"Hillslion",1989,1,"ep13_man_fild01_mon_edq::OnMyMobDead";
 	monster "man_fild01",0,0,"Hillslion",1989,1,"ep13_man_fild01_mon_edq::OnMyMobDead";
 	monster "man_fild01",0,0,"Hillslion",1989,1,"ep13_man_fild01_mon_edq::OnMyMobDead";
 	monster "man_fild01",0,0,"Hillslion",1989,1,"ep13_man_fild01_mon_edq::OnMyMobDead";
@@ -13664,7 +14015,19 @@ OnTimer600000:
 
 OnMyMobDead:
 	set .@man_fild01_mob_dead,mobcount("man_fild01","ep13_man_fild01_mon_edq::OnMyMobDead");
-	if (.@man_fild01_mob_dead < 10) && ((ep13_1_edq == 71) || (ep13_1_edq == 72)) {
+	if (.@man_fild01_mob_dead < 14) && ((ep13_1_edq == 71) || (ep13_1_edq == 72)) {
+		getitem 6040,1; //Some_Of_Report
+	}
+	else if (.@man_fild01_mob_dead < 13) && ((ep13_1_edq == 71) || (ep13_1_edq == 72)) {
+		getitem 6040,1; //Some_Of_Report
+	}
+	else if (.@man_fild01_mob_dead < 12) && ((ep13_1_edq == 71) || (ep13_1_edq == 72)) {
+		getitem 6040,1; //Some_Of_Report
+	}
+	else if (.@man_fild01_mob_dead < 11) && ((ep13_1_edq == 71) || (ep13_1_edq == 72)) {
+		getitem 6040,1; //Some_Of_Report
+	}
+	else if (.@man_fild01_mob_dead < 10) && ((ep13_1_edq == 71) || (ep13_1_edq == 72)) {
 		getitem 6040,1; //Some_Of_Report
 	}
 	else if (.@man_fild01_mob_dead < 9) && ((ep13_1_edq == 71) || (ep13_1_edq == 72)) {
@@ -13712,6 +14075,10 @@ OnEnable:
 	monster "man_fild03",0,0,"Centipede",1987,1,"ep13_man_fild03_mon_edq::OnMyMobDead";
 	monster "man_fild03",0,0,"Centipede",1987,1,"ep13_man_fild03_mon_edq::OnMyMobDead";
 	monster "man_fild03",0,0,"Centipede",1987,1,"ep13_man_fild03_mon_edq::OnMyMobDead";
+	monster "man_fild03",0,0,"Centipede",1987,1,"ep13_man_fild03_mon_edq::OnMyMobDead";
+	monster "man_fild03",0,0,"Centipede",1987,1,"ep13_man_fild03_mon_edq::OnMyMobDead";
+	monster "man_fild03",0,0,"Tatacho",1986,1,"ep13_man_fild03_mon_edq::OnMyMobDead";
+	monster "man_fild03",0,0,"Tatacho",1986,1,"ep13_man_fild03_mon_edq::OnMyMobDead";
 	monster "man_fild03",0,0,"Tatacho",1986,1,"ep13_man_fild03_mon_edq::OnMyMobDead";
 	monster "man_fild03",0,0,"Tatacho",1986,1,"ep13_man_fild03_mon_edq::OnMyMobDead";
 	monster "man_fild03",0,0,"Tatacho",1986,1,"ep13_man_fild03_mon_edq::OnMyMobDead";
@@ -13734,7 +14101,19 @@ OnTimer600000:
 
 OnMyMobDead:
 	set .@man_fild03_mob_dead,mobcount("man_fild03","ep13_man_fild03_mon_edq::OnMyMobDead");
-	if (.@man_fild03_mob_dead < 10) && ((ep13_1_edq == 71) || (ep13_1_edq == 72)) {
+	if (.@man_fild03_mob_dead < 14) && ((ep13_1_edq == 71) || (ep13_1_edq == 72)) {
+		getitem 6040,1; //Some_Of_Report
+	}
+	else if (.@man_fild03_mob_dead < 13) && ((ep13_1_edq == 71) || (ep13_1_edq == 72)) {
+		getitem 6040,1; //Some_Of_Report
+	}
+	else if (.@man_fild03_mob_dead < 12) && ((ep13_1_edq == 71) || (ep13_1_edq == 72)) {
+		getitem 6040,1; //Some_Of_Report
+	}
+	else if (.@man_fild03_mob_dead < 11) && ((ep13_1_edq == 71) || (ep13_1_edq == 72)) {
+		getitem 6040,1; //Some_Of_Report
+	}
+	else if (.@man_fild03_mob_dead < 10) && ((ep13_1_edq == 71) || (ep13_1_edq == 72)) {
 		getitem 6040,1; //Some_Of_Report
 	}
 	else if (.@man_fild03_mob_dead < 9) && ((ep13_1_edq == 71) || (ep13_1_edq == 72)) {

+ 667 - 0
npc/quests/quests_13_2.txt

@@ -19,6 +19,7 @@
 //= Daily Quests:
 //= - Midgard Ore
 //= - Alfheim Perfume
+//= Secret note of Bazett
 //= Yggdrasil Dungeon Floor 2 puzzle.
 //===== Additional Comments: =================================
 //= 1.0 First version
@@ -10792,6 +10793,672 @@ OnTimer60000:
 	end;
 }
 
+// Secret note of Bazett
+//============================================================ 
+mid_camp,283,198,5	script	Bazett Teablack#ep13bs	883,{
+	if (checkweight(1201,1) == 0) {
+		mes " - Hold on!! -";
+		mes " - You are carrying too many different items - ";
+		mes " - You cannot receive the reward - ";
+		mes " - Please use the Kafra service - ";
+		mes " - And try again. - ";
+		close;
+	}
+	if (ep13_2_rhea < 100) {
+		mes "[Industrious Man]";
+		mes "Hu~~";
+		mes "That's pretty interesting...";
+		mes "I will take note of it in my research papers.";
+		emotion e_ic,"Bazett Teablack#ep13bs";
+		next;
+		mes "[Industrious Man]";
+		mes "write..write...";
+		mes "crunch..crunch...";
+		next;
+		mes " - He doesn't seem to recognize that I am standing next to him as he continues writing something. -";
+		next;
+		mes "[Industrious Man]";
+		mes "write..write...";
+		mes "crunch..crunch...";
+		mes "....";
+		close;
+	}
+	if (ep13_2_busut < 1) {
+		if (isequipped(2782) == 1) {
+			mes "[Industrious Man]";
+			mes "Hu~~";
+			mes "That's pretty interesting...";
+			mes "I will take note of it in my research papers.";
+			emotion e_ic,"Bazett Teablack#ep13bs";
+			next;
+			mes "[Industrious Man]";
+			mes "write..write...";
+			mes "crunch..crunch...";
+			next;
+			mes " - He doesn't seem to recognize that I am standing next to him as he continues writing something. -";
+			next;
+			mes "[Industrious Man]";
+			mes "write..write...";
+			mes "crunch..crunch...";
+			mes "....";
+			next;
+			mes "[Industrious Man]";
+			mes "Auch!!!";
+			mes "Who...who are you?!";
+			mes "How long have you been standing there?";
+			emotion e_omg,"Bazett Teablack#ep13bs";
+			next;
+			mes "["+strcharinfo(0)+"]";
+			mes "Uh, I'm just passing by.";
+			mes "You look like you're busy with something.";
+			next;
+			mes "["+strcharinfo(0)+"]";
+			mes "See you~!!";
+			emotion e_swt2,1;
+			next;
+			mes "[Industrious Man]";
+			mes "Uh!! Wait!!";
+			mes "Your finger... Is that..?!";
+			next;
+			mes " - He grabs your hand with a surprised look -";
+			next;
+			mes "[Industrious Man]";
+			mes "This is the ^0000FFRing of the Ancient Wise King^000000!!!!!";
+			mes "This has to be fate that I've met you!";
+			next;
+			mes "[Industrious Man]";
+			mes "My research is not going so well. The god of fate must have sent you to me. I'm sure of it!!";
+			emotion e_no1,"Bazett Teablack#ep13bs";
+			next;
+			mes "["+strcharinfo(0)+"]";
+			mes "......";
+			mes "......What?!";
+			emotion e_omg,1;
+			next;
+			mes "[Industrious Man]";
+			mes "Would you like to help me with my search?";
+			next;
+			switch(select("What kind of search?:Sure.:Borrrring.")) {
+			case 1:
+				mes "[Industrious Man]";
+				mes "To put it simply, I'm searching for fairies and giants that live around here.";
+				next;
+				mes "[Industrious Man]";
+				mes "Though I believe they all live in the same place, they are sure to have different cultures.";
+				mes "...first and foremost is proof of their existence.";
+				next;
+				mes "[Industrious Man]";
+				mes "What about it?";
+				mes "Are you interested?";
+				next;
+				switch(select("Sure.:Not really.")) {
+				case 1:
+					mes "[Industrious Man]";
+					mes "Haha... I just know that I'm right!";
+					mes "Hahahaha!!";
+					next;
+					mes "[Industrious Man]";
+					mes "So let's work together from this point on. Let me introduce myself.";
+					mes "As you can see from my name tag, my name is ^0000FFBazett Teablack^000000.";
+					next;
+					mes "["+strcharinfo(0)+"]";
+					mes "I am "+strcharinfo(0)+".";
+					next;
+					select("OK, so what can I do for you?");
+					mes "[Bazett]";
+					mes ""+strcharinfo(0)+" let's see..!!";
+					mes "Search Manuk and Splendide fields everyday for signs of the fairies or giants.";
+					next;
+					mes "[Bazett]";
+					mes "It's not difficult.";
+					mes "So please share any information that you can gather as you travel through those areas.";
+					next;
+					mes "[Bazett]";
+					mes "Hopefully I can find what I am looking for with the information you can find.";
+					set ep13_2_busut,2;
+					setquest 11101;
+					close;
+				case 2:
+					mes "[Industrious Man]";
+					mes ".............";
+					mes ".............";
+					mes ".............";
+					mes ".............";
+					mes "...........Why!!!!!";
+					emotion e_sob,"Bazett Teablack#ep13bs";
+					next;
+					mes "[Industrious Man]";
+					mes "Well if you decide to change your mind, come back to me.";
+					set ep13_2_busut,1;
+					close;
+				}
+				break;
+			case 2:
+				mes "[Industrious Man]";
+				mes "Haha... I just know that I'm right!";
+				mes "Hahahaha!!";
+				next;
+				mes "[Industrious Man]";
+				mes "So let's work together from this point on. Let me introduce myself.";
+				mes "As you can see from my name tag, my name is ^0000FFBazett Teablack^000000.";
+				next;
+				mes "["+strcharinfo(0)+"]";
+				mes "I am "+strcharinfo(0)+".";
+				next;
+				select("OK, so what can I do for you?");
+				mes "[Bazett]";
+				mes ""+strcharinfo(0)+" let's see..!!";
+				mes "Search Manuk and Splendide fields everyday for signs of the fairies or giants.";
+				next;
+				mes "[Bazett]";
+				mes "It's not difficult.";
+				mes "So please share any information that you can gather as you travel through those areas.";
+				next;
+				mes "[Bazett]";
+				mes "Hopefully I can find what I am looking for with the information you can find.";
+				set ep13_2_busut,2;
+				setquest 11101;
+				close;
+			case 3:
+				mes "[Industrious Man]";
+				mes ".............";
+				next;
+				mes "[Industrious Man]";
+				mes ".............";
+				mes ".............";
+				next;
+				mes "[Industrious Man]";
+				mes ".............";
+				mes ".............";
+				mes ".............";
+				next;
+				mes "[Industrious Man]";
+				mes ".............";
+				mes ".............";
+				mes ".............";
+				mes ".............";
+				next;
+				mes "[Industrious Man]";
+				mes ".............";
+				mes ".............";
+				mes ".............";
+				mes ".............";
+				mes "...........Why!!!!!";
+				emotion e_sob,"Bazett Teablack#ep13bs";
+				next;
+				mes "[Industrious Man]";
+				mes "Well if you decide to change your mind, come back to me.";
+				set ep13_2_busut,1;
+				close;
+			}
+		}
+		else {
+			if (rand(1,2) == 1) {
+				mes "[Industrious Man]";
+				mes "Gthgh sdsWryi";
+				mes "Apeu hjsu opuer ";
+				next;
+				mes "["+strcharinfo(0)+"]";
+				mes "?????";
+				mes "What'd you say?";
+				next;
+				mes "[Industrious Man]";
+				mes "Oh! Sorry, I think I said it wrong...";
+				mes "I was just infatuated with my research...";
+				next;
+				mes "[Industrious Man]";
+				mes "You should find a way to understand this strange language that I've discovered here in the Ash Vacuum.";
+				next;
+				mes "[Industrious Man]";
+				mes "Without the ability to communicate it would be really difficult to get around here, don't you think?";
+				close;
+			}
+			else {
+				mes "[Industrious Man]";
+				mes "TalDathMush Di nahDeh";
+				mes "ReAnduDu So sehr";
+				next;
+				mes "["+strcharinfo(0)+"]";
+				mes "?????";
+				mes "Huh?";
+				next;
+				mes "[Industrious Man]";
+				mes "Oh! I must've said it wrong...";
+				mes "My research hasn't been going too well lately.";
+				next;
+				mes "[Industrious Man]";
+				mes "There should be a way for you to understand this strange language here.";
+				next;
+				mes "[Industrious Man]";
+				mes "Without the ability to communicate it would be really difficult to get around here, don't you think?";
+				close;
+			}
+		}
+	}
+	if (ep13_2_busut == 1) {
+		mes "[Industrious Man]";
+		mes "Ah! You've returned!";
+		mes "Now are you interested in my research?";
+		next;
+		switch(select("Yes.:No.")) {
+		case 1:
+			mes "[Industrious Man]";
+			mes "Haha... I just know that I'm right!";
+			mes "Hahahaha!!";
+			next;
+			mes "[Industrious Man]";
+			mes "So let's work together from this point on. Let me introduce myself.";
+			mes "As you can see from my name tag, my name is ^0000FFBazett Teablack^000000.";
+			next;
+			mes "["+strcharinfo(0)+"]";
+			mes "I am "+strcharinfo(0)+".";
+			next;
+			select("OK, so what can I do for you?");
+			mes "[Bazett]";
+			mes ""+strcharinfo(0)+" let's see..!!";
+			mes "Search Manuk and Splendide fields everyday for signs of the fairies or giants.";
+			next;
+			mes "[Bazett]";
+			mes "It's not difficult.";
+			mes "So please share any information that you can gather as you travel through those areas.";
+			next;
+			mes "[Bazett]";
+			mes "Hopefully I can find what I am looking for with the information you can find.";
+			set ep13_2_busut,2;
+			setquest 11101;
+			close;
+		case 2:
+			mes "[Industrious Man]";
+			mes ".............";
+			mes "Well if you decide to change your mind, come back to me.";
+			emotion e_sob,"Bazett Teablack#ep13bs";
+			close;
+		}
+	}
+	if (ep13_2_busut == 2) {
+		mes "[Bazett]";
+		mes "Um... for today can you search for giants in the Manuk Field?";
+		mes "That place is pretty cold so, you might need a coat.";
+		next;
+		mes "[Bazett]";
+		mes "I used this note so it should still be useful. Take it...";
+		mes "Ah... and don't worry about the title of the note.";
+		next;
+		mes "[Bazett]";
+		mes "After you've finished searching bring that note back to me.";
+		next;
+		mes "[Bazett]";
+		mes "Got it? Ok take care and see you soon.";
+		set ep13_2_busut,3;
+		set ep13_2_bs1,1;
+		set ep13_2_bs2,1;
+		set ep13_2_bs3,1;
+		set ep13_2_bs4,1;
+		getitem 6074,1; //Bazett's_Order
+		changequest 11101,11102;
+		close;
+	}
+	if (ep13_2_busut == 3) {
+		mes "[Bazett]";
+		mes "How's the search going?";
+		next;
+		if (countitem(6074) < 1) {
+			mes "[Bazett]";
+			mes "!!!!!!!";
+			mes "You lost the notes!!?";
+			mes "Sigh...";
+			next;
+			mes "[Bazett]";
+			mes "What's done has been done.";
+			mes "I'll give you a new one.";
+			getitem 6074,1; //Bazett's_Order
+			close;
+		}
+		else {
+			mes "[Bazett]";
+			mes "Take it easy...";
+			close;
+		}
+	}
+	if (ep13_2_busut == 4) {
+		mes "[Bazett]";
+		mes "Oh! You're done with the investigation?";
+		next;
+		switch(select("Yes.:Not yet...")) {
+		case 1:
+			if (countitem(6074) < 1) {
+				mes "[Bazett]";
+				mes "!!!!!!!";
+				mes "You lost the notes!!?";
+				mes "Sigh...";
+				next;
+				mes "[Bazett]";
+				mes "What's done has been done.";
+				mes "You must be tired, go take a rest.";
+				mes "I'll go prepare new notes.";
+				mes "You can just go investigate again for me.";
+				set ep13_2_busut,7;
+				erasequest 11102;
+				setquest 11104;
+				close;
+			}
+			else {
+				mes "[Bazett]";
+				mes "May I take a look at the notes first?";
+				mes "Oh!!";
+				next;
+				mes " - Bazett is reading the detailed contents - ";
+				mes " - He seems to be captivated. - ";
+				mes " - It's better if I leave him alone. - ";
+				mes " - So he can finish. - ";
+				next;
+				mes "[Bazett]";
+				mes "Mm...there are actually such things?!";
+				next;
+				mes "[Bazett]";
+				mes "Mm...I see, I see.";
+				next;
+				mes "[Bazett]";
+				mes "Even though the content is simple, it's well organized and interesting.";
+				mes "As expected of "+strcharinfo(0)+"!!";
+				next;
+				mes "[Bazett]";
+				mes "You've done well.";
+				mes "You must be exhausted. Go take a rest. We'll continue tomorrow.";
+				next;
+				mes "[Bazett]";
+				mes "Ah... this isn't much, but it's a coin that the giants use.";
+				mes "Maybe you can buy something from them with this.";
+				delitem 6074,1; //Bazett's_Order
+				set ep13_2_busut,7;
+				if (ep13_2_bs1 == 3) getitem 6080,1; //Manuk_Coin
+				if (ep13_2_bs2 == 3) getitem 6080,1; //Manuk_Coin
+				if (ep13_2_bs3 == 3) getitem 6080,1; //Manuk_Coin
+				if (ep13_2_bs4 == 3) getitem 6080,1; //Manuk_Coin
+				erasequest 11102;
+				setquest 11104;
+				close;
+			}
+			break;
+		case 2:
+			mes "[Bazett]";
+			mes "Take it easy...";
+			close;
+		}
+	}
+	else {
+		mes "[Bazett]";
+		mes "You've done well.";
+		mes "You must be exhausted. Go take a rest, we'll continue tomorrow.";
+		close;
+	}
+}
+
+manuk,193,135,0	script	Worker#ep13bs	454,{
+	if (isequipped(2782) == 1) {
+		if (ep13_2_busut == 3) {
+			if (ep13_2_bs1 == 1) {
+				mes "[Worker]";
+				mes "Oops, it's dangerous, almost broken.";
+				mes "I should hurry to change it...otherwise.";
+				next;
+				mes "["+strcharinfo(0)+"]";
+				mes "What's the matter?";
+				next;
+				mes "[Worker]";
+				mes "Ah....here.....um...";
+				mes "......";
+				mes ".........";
+				mes "Nothing!!";
+				emotion e_omg,"Worker#ep13bs";
+				next;
+				mes "["+strcharinfo(0)+"]";
+				mes "What's up?";
+				next;
+				mes "[Worker]";
+				mes "You are an outsider.";
+				mes "......";
+				mes "I was suprised by your voice.";
+				next;
+				mes "["+strcharinfo(0)+"]";
+				mes "Yes, sorry to startle you.";
+				emotion e_heh,1;
+				next;
+				mes "[Worker]";
+				mes "Haha, it's ok.";
+				mes "Recently I heard about people like you but it's the first time I've actually met one.";
+				next;
+				mes "[Worker]";
+				mes "You speak our language pretty good.";
+				next;
+				mes "["+strcharinfo(0)+"]";
+				mes "Ah...anyway..you look like you're having some trouble. What happened?";
+				next;
+				mes "[Worker]";
+				mes "Nothing!!";
+				next;
+				mes "["+strcharinfo(0)+"]";
+				mes "Are you sure? Fate has to have brought us together for a reason.";
+				mes "Tell me~";
+				next;
+				mes "[Worker]";
+				mes "......";
+				mes "Frankly...";
+				next;
+				mes "[Worker]";
+				mes "The screw is too old to use to fix the tent, so I should change it before it breaks.";
+				next;
+				mes "[Worker]";
+				mes "I can't leave so I'm just waiting for my friend to pass by to help me.";
+				next;
+				mes "["+strcharinfo(0)+"]";
+				mes "Can I help you?";
+				next;
+				mes "[Worker]";
+				mes "No~that's alright. We just met so I can't ask you for a favor.";
+				next;
+				mes "["+strcharinfo(0)+"]";
+				mes "That's ok! We can help each other!";
+				next;
+				mes "- Suddenly there is a screeching sound as the screw breaks -";
+				next;
+				mes "[Worker]";
+				mes "Ugh!!!";
+				mes "**Sigh**";
+				emotion e_sob,"Worker#ep13bs";
+				emotion e_sob,1;
+				next;
+				mes "[Worker]";
+				mes "Well that's that!";
+				mes "Anyway my name is ^0000FFGill^000000.";
+				next;
+				mes "[Gill]";
+				mes "I need something to fix the tent with, if you can get^0000FF 30 Horn of Hillslion^000000, I can make them into sturdy enough screws.";
+				next;
+				mes "[Gill]";
+				mes "Sorry, again for making you do this but I will be waiting here for you.";
+				set ep13_2_bs1,2;
+				setquest 11105;
+				close;
+			}
+			else if (ep13_2_bs1 == 2) {
+				if (countitem(6032) > 29) {
+					mes "[Gill]";
+					mes "You helped me collect all of the Horns of Hillslion?";
+					mes "Thank you so much.";
+					next;
+					mes "[Gill]";
+					mes "It's all because of you, we are able to prevent anything disastrous.";
+					mes "^0000FFEven though you're also an alien race, but compared to the vile fairies^000000, I'm glad to have met someone like "+strcharinfo(0)+".";
+					delitem 6032,30; //Horn_Of_Hilsrion
+					set ep13_2_bs1,3;
+					set ep13_2_busut,4;
+					completequest 11105;
+					close;
+				}
+				else {
+					mes "[Gill]";
+					mes "Sorry, again for making you do this but I will be waiting here for you to bring back the^0000FF 30 Horn of Hillslions.^000000.";
+					close;
+				}
+			}
+			else if (ep13_2_bs1 == 3) {
+				mes "[Gill]";
+				mes "Thank you for helping me.";
+				mes "^0000FFEven though you're also an alien race, but compared to the vile fairies^000000, I'm glad to have met someone like "+strcharinfo(0)+".";
+				close;
+			}
+			else {
+				mes "[Worker]";
+				mes "This is too dangerous, it's become too loose...";
+				mes "It must be replaced soon...";
+				close;
+			}
+		}
+		else if (ep13_2_busut == 4) {
+			if (ep13_2_bs1 == 1) {
+				mes "[Worker]";
+				mes "This is too dangerous, it's become too loose...";
+				mes "It must be replaced soon...";
+				next;
+				mes "["+strcharinfo(0)+"]";
+				mes "Is something wrong?";
+				next;
+				mes "[Worker]";
+				mes "Ah... see here...";
+				mes "......";
+				mes ".........";
+				mes "Nevermind. Nothing.";
+				emotion e_omg,"Worker#ep13bs";
+				next;
+				mes "["+strcharinfo(0)+"]";
+				mes "You don't have to be like this.";
+				next;
+				mes "[Worker]";
+				mes "You are one of the strange race, aren't you?";
+				mes "......";
+				mes "To suddenly hear you speak our language gave me a bit of a shock.";
+				next;
+				mes "["+strcharinfo(0)+"]";
+				mes "Since I'm travelling here, so I thought I'd need it...";
+				emotion e_heh,1," ET_SMILE";
+				next;
+				mes "[Worker]";
+				mes "Haha, is that so?";
+				mes "I've heard of the rumour that your race exists, but I've never seen one before.";
+				next;
+				mes "[Worker]";
+				mes "And to think you can speak our language. Interesting.";
+				next;
+				mes "["+strcharinfo(0)+"]";
+				mes "Ah...but just a moment ago, you were having a hard time with something. Is something wrong?";
+				next;
+				mes "[Worker]";
+				mes "It's nothing.";
+				next;
+				mes "["+strcharinfo(0)+"]";
+				mes "Ah~ It must be fate that we met~";
+				mes "You can just tell me.";
+				next;
+				mes "[Worker]";
+				mes "......";
+				mes "Well...";
+				next;
+				mes "[Worker]";
+				mes "The screw that is used to keep our tent in place is rusting away... we must get a new one.";
+				next;
+				mes "[Worker]";
+				mes "But I can't leave this place, so I was waiting for someone to pass by.";
+				mes "And you just happened to talk to me. I thought you were someone from our tribe.";
+				next;
+				mes "["+strcharinfo(0)+"]";
+				mes "I can help you.";
+				next;
+				mes "[Worker]";
+				mes "No, it's alright. We just met, so I don't want to trouble you.";
+				next;
+				mes "["+strcharinfo(0)+"]";
+				mes "Don't worry about it! Life is all about helping eachother, don't you think so?";
+				next;
+				mes " - While the disagreement is taking place, - ";
+				mes " - The screw that has held its ground til now - ";
+				mes " - Finally gives in and breaks in half. - ";
+				next;
+				mes "[Worker]";
+				mes "Ah!!!";
+				emotion e_sob,"Worker#ep13bs";
+				emotion e_sob,1;
+				next;
+				mes "[Worker]";
+				mes "I can't just care about pride now.";
+				mes "Let me introduce myself, I am ^0000FFGill^000000.";
+				next;
+				mes "[Gill]";
+				mes "I need a screw to stablize our tent, and it can be found from the ^0000FFHillslion^000000 monster.";
+				mes "Please help me collect ^0000FF30 Horns of Hillslion^000000, and that should be enough for now.";
+				next;
+				mes "[Gill]";
+				mes "I'm really sorry, so please hurry.";
+				set ep13_2_bs1,2;
+				setquest 11105;
+				close;
+			}
+			else if (ep13_2_bs1 == 2) {
+				if (countitem(6032) > 29) {
+					mes "[Gill]";
+					mes "You helped me collect all of the Horns of Hillslion?";
+					mes "Thank you so much.";
+					next;
+					mes "[Gill]";
+					mes "It's all because of you, we are able to prevent anything disastrous.";
+					mes "^0000FFEven though you're also an alien race, but compared to the vile fairies^000000, I'm glad to have met someone like "+strcharinfo(0)+".";
+					delitem 6032,30; //Horn_Of_Hilsrion
+					set ep13_2_bs1,3;
+					completequest 11105;
+					close;
+				}
+				else {
+					mes "[Gill]";
+					mes "Making you do something like this, I feel ashamed.";
+					close;
+				}
+			}
+			else if (ep13_2_bs1 == 3) {
+				mes "[Gill]";
+				mes "Thank you for helping me.";
+				mes "^0000FFEven though you're also an alien race, but compared to the vile Fairies^000000, I'm glad to have met someone like "+strcharinfo(0)+".";
+				close;
+			}
+			else {
+				mes "[Worker]";
+				mes "This is too dangerous, it's become too loose...";
+				mes "It must be replaced soon...";
+				close;
+			}
+		}
+		else {
+			mes "[Gill]";
+			mes "You're here again?";
+			mes "Talking with someone occasionally is quite relaxing.";
+			close;
+		}
+	}
+	else {
+		mes "[Worker]";
+		mes "Ehahdie O Ehai";
+		mes "Ohek Hekdh I dkek";
+		mes "Ohehp Qe Tehdhah";
+		next;
+		mes "[Worker]";
+		mes "Ehaodke Thdieqak Khehdi";
+		mes "PHhdkel";
+		mes "Thhdqdcczk U dheagelokd dok";
+		next;
+		mes "- You can't understand what he's saying. - ";
+		close;
+	}
+}
+
 // Yggdrasil Dungeon Floor 2 puzzle.
 //============================================================ 
 nyd_dun02,178,255,0	script	Strange Device#ep13_out	844,3,3,{

+ 676 - 0
npc/quests/quests_alberta.txt

@@ -14,6 +14,8 @@
 //= Hat of Sun God, Sunday Hat, Mage Hat, Magician Hat Quests
 //= [Aegis conversion]
 //= Turtle Island Quests
+//= [Aegis Conversion]
+//= Alberta Boy
 //===== Additional Comments: ================================= 
 //= Fully working
 //= 1.1 Fixed Spore Doll exploit, Gramp's Tiger skin label bug
@@ -2317,3 +2319,677 @@ tur_dun03,67,130,4	script	Knight#tur4	105,{
 	mes "Anyway, be careful in this third level of Turtle Island. A lot of our men were annihilated when they went to explore the East and North sides, so be careful!";
 	close;
 }
+
+// Alberta Boy
+//============================================================ 
+alberta_in,131,95,5	script	Iromo#ep3_2	706,{
+	if (ep13_2_hiki == 13) {
+		mes "[Iromo]";
+		mes "But... this world is...";
+		mes "What a big world... Not just humans...";
+		mes "Other lifeforms just like us...";
+		mes "Where could they be?...";
+		next;
+		mes "[Iromo]";
+		mes "...Their lives.. and...";
+		mes "Their kingdom... and land...";
+		mes "Where could they be...";
+		next;
+		mes "[Iromo]";
+		mes "If they exist, that'd be great...";
+		mes "No... they must exist...";
+		mes "I wish one day... one day I can go there...";
+		close;
+	}
+	if (ep13_2_hiki == 12) {
+		mes "[Iromo]";
+		mes "If it's too painful...";
+		mes "It's better if I don't...";
+		next;
+		mes "-Silent pause-";
+		next;
+		set name,PcName;
+		mes "-" + name + " starts to speak-";
+		mes "-And tells him of the journeys-";
+		mes "-Adventures, joy, sorrow, and loss-";
+		mes "-One by one to the boy-";
+		next;
+		mes "-Fighting monsters, and winning-";
+		mes "-Coming across many people, and-";
+		mes "-leaving them, and tells of many other things-";
+		mes "-As much as possible, to the boy.-";
+		next;
+		mes "-Much has happened, and-";
+		mes "-There were many dangers, but in the end-";
+		mes "-Happy things outweighs the bad,-";
+		mes "-What I have received is more than what I have lost.-";
+		mes "-I try hard to convey this message to Iromo.-";
+		next;
+		mes "[Iromo]";
+		mes "...";
+		next;
+		mes "[Iromo]";
+		mes "...So in the end...";
+		mes "You just want me... to go outside...";
+		mes "Am I right...";
+		next;
+		select("It's true, you'll get more than you pay.");
+		mes "[Iromo]";
+		mes "...";
+		next;
+		mes "[Iromo]";
+		mes "...But now... I am not going outside.";
+		mes "I am still afraid...";
+		next;
+		mes "[Iromo]";
+		mes "Even if I don't go out right now,";
+		mes "I will still... make an effort to do so.";
+		mes "One day, I will surely become...";
+		mes "..An adventurer... and do many, many things.";
+		next;
+		set ep13_2_hiki,13;
+		completequest 10089;
+		getexp 80000,0;
+		mes "[Iromo]";
+		mes "The world is big, there are many things...";
+		mes "I have not seen yet. Yes... I want to...";
+		mes "...see them all.";
+		close;
+	}
+	if ((ep13_2_hiki == 11) && (friendship > 14)) {
+		mes "[Iromo]";
+		mes "To go on an adventure with my friends,";
+		mes "I would still rather stay here.";
+		mes "I would still rather stay here quietly and safely.";
+		next;
+		mes "[Iromo]";
+		mes "Alright...go away. I know...";
+		mes "I know what you want to say...what an annoyance...";
+		next;
+		mes "-You don't give up, and continue to-";
+		mes "-tell of the stories-";
+		mes "-shared with friends.-";
+		mes "-You tell of the truth.-";
+		next;
+		mes "-Someone met long ago,-";
+		mes "-Suddenly leaves,-";
+		mes "-and finally reunited, but-";
+		mes "-because of the cruel fate-";
+		mes "-he dies in this tragedy.-";
+		mes "-In the end, it's all a tragedy...-";
+		next;
+		mes "-But you emphasize -";
+		mes "-Even though the ending is tragic,-";
+		mes "-A beautiful friendship-";
+		mes "-Will not disappear because of that.-";
+		next;
+		mes "[Iromo]";
+		mes "...";
+		next;
+		mes "[Iromo]";
+		mes "...Thank you for telling me...";
+		mes "They are great friends...";
+		next;
+		if (Sex == 0) {
+			mes "[Iromo]";
+			mes "...And? ...What do you...";
+			mes "Want to say to me this time...";
+			mes "You've told me many stories...";
+			mes "...How about one of your own?";
+			next;
+		}
+		else {
+			mes "[Iromo]";
+			mes "...And? ...What do you...";
+			mes "Want to say to me this time...";
+			mes "You've told me many stories...";
+			mes "...How about one of your own?";
+			next;
+		}
+		select("Friendship cannot be forgotten.");
+		mes "[Iromo]";
+		mes "...";
+		next;
+		select("To have that kind of friends and that kind of friendship...");
+		select("You need to get out of your house and see the world.");
+		mes "[Iromo]";
+		mes "Though you changed a story... but...";
+		mes "You're still talking about this...";
+		next;
+		select("To be honest, the other kids miss you.");
+		mes "[Iromo]";
+		mes "...Him? ...Miss me? That's...";
+		mes "Something from a long time ago...";
+		next;
+		select("There are many things you don't know yet.");
+		mes "[Iromo]";
+		mes "...";
+		next;
+		select("Don't you think it's a waste to stay home?");
+		mes "[Iromo]";
+		mes "...";
+		next;
+		select("In order to find safety, you would give up fun adventures?");
+		select("That's too bad. Change is a very fun thing.");
+		mes "[Iromo]";
+		mes "...Change...";
+		mes "Is fun...?";
+		next;
+		select("Outside this city and this kingdom, there is a bigger world.");
+		mes "[Iromo]";
+		mes "...";
+		next;
+		select("Since it's so big, there are many fun things.");
+		mes "[Iromo]";
+		mes "Really...? Other than Alberta, and Rune-Midgarts...?";
+		mes "There are other places...?";
+		next;
+		set ep13_2_hiki,12;
+		changequest 10088,10089;
+		mes "[Iromo]";
+		mes "But... there will also be many troubles...";
+		mes "Isn't that true... I can't relax...";
+		mes "I... don't like those...";
+		close;
+	}
+	if (ep13_2_hiki == 11) {
+		mes "[Iromo]";
+		mes "To go on an adventure with my friends,";
+		mes "I would still rather stay here.";
+		mes "I would still rather stay here quietly and safely.";
+		next;
+		mes "[Iromo]";
+		mes "Alright... go away. I know...";
+		mes "I know what you want to say... what an annoyance...";
+		close;
+	}
+	if (ep13_2_hiki == 10) {
+		set .@cooltime,checkquest(10087,PLAYTIME);
+		if (.@cooltime == 2) {
+			mes "[Iromo]";
+			mes "...You really are annoying...";
+			mes "What exactly do you want from me...?";
+			next;
+			mes "[Iromo]";
+			mes "A long time ago... I had a friend just like you.";
+			mes "I met him when I went out to play...";
+			mes "But...";
+			mes "He must've forgotten all about me...";
+			next;
+			set ep13_2_hiki,11;
+			changequest 10087,10088;
+			getexp 67000,0;
+			mes "[Iromo]";
+			mes "Nevermind... it's not unexpected...";
+			mes "To go on an adventure with my friends,";
+			mes "I would still rather stay here.";
+			mes "I would still rather stay here quietly and safely.";
+			close;
+		}
+		mes "[Iromo]";
+		mes "...What... Right now, I...";
+		mes "I don't want to... hear anything...";
+		mes "Go away...";
+		close;
+	}
+	if ((ep13_2_hiki == 9) && (lhz_rekenber > 21)) {
+		mes "[Iromo]";
+		mes "...What is it... this time...?";
+		next;
+		select("A story about a pair of siblings.");
+		mes "-Tell him about Kazien and Lyozien.-";
+		mes "-Because of ill fate,-";
+		mes "-They were born to do illegal tasks-";
+		mes "-But the innocent Lyozien-";
+		mes "-Trusted his brother...-";
+		next;
+		mes "-And even though Kazien has become-";
+		mes "-a criminal, but as an older brother-";
+		mes "-He hopes to take good care of his younger brother.-";
+		next;
+		mes "-This is a story from far away,-";
+		mes "-But because you have seen it with your own eyes,-";
+		mes "-You can clearly express-";
+		mes "-Your feelings.-";
+		next;
+		mes "-This story must be able to-";
+		mes "-Stir up the interest of-";
+		mes "-Iromo, who has always wanted a brother.-";
+		next;
+		mes "[Iromo]";
+		mes "I see...They were great siblings...";
+		mes "Tragic...but also beautiful.";
+		mes "If only...I can be the protagonist...";
+		mes "..in such a story...";
+		next;
+		mes "[Iromo]";
+		mes "...But...I'm an only child...";
+		mes "...So there's nothing I can do...";
+		next;
+		select("You don't need to be related by blood to be brothers.");
+		mes "[Iromo]";
+		mes "...";
+		next;
+		select("You can find make of these brothers outside.");
+		mes "[Iromo]";
+		mes "...Outside?...";
+		next;
+		select("But if you stay at home, nothing will change.");
+		mes "[Iromo]";
+		mes "...";
+		next;
+		mes "[Iromo]";
+		mes "...What... So it's all my fault...";
+		mes "What you want to say...";
+		mes "...is always the same...";
+		mes "Get out... I'm not in the mood...";
+		next;
+		set ep13_2_hiki,10;
+		changequest 10086,10087;
+		getexp 57000,0;
+		mes "[Iromo]";
+		mes "...I'm not in a good mood, get out...";
+		close;
+	}
+	if ((ep13_2_hiki == 8) || (ep13_2_hiki == 9)) {
+		set .@cooltime,checkquest(10085,PLAYTIME);
+		if (.@cooltime == 2) {
+			mes "[Iromo]";
+			mes "You never give up, don't you?";
+			mes "What are you trying to say?";
+			next;
+			mes "[Iromo]";
+			mes "It is frustrating. But...";
+			mes "Why do you care about me so much?";
+			next;
+			if (Sex == 0) {
+				mes "[Iromo]";
+				mes "Really, its not that bad...";
+				mes "I wish I could have a sister like you.";
+				next;
+			}
+			else {
+				mes "[Iromo]";
+				mes "Really, its not that bad...";
+				mes "I wish I could have a brother like you.";
+				next;
+			}
+			mes "[Iromo]";
+			mes "Do you have any stories about siblings?";
+			next;
+			set ep13_2_hiki,9;
+			changequest 10085,10086;
+			mes "[Iromo]";
+			mes "What? Anything to say?";
+			mes "Seriously!";
+			mes "Just leave me alone.";
+			close;
+		}
+		mes "[Iromo]";
+		mes "Thank you for caring...";
+		mes "But that is ok...No thanks...";
+		close;
+	}
+	if (ep13_2_hiki == 7) {
+		set .@goyang,checkquest(10084,HUNTING);
+		if (.@goyang == 2) {
+			mes "[Iromo]";
+			mes "Oh, you made the furious cat";
+			mes "go away from the village?";
+			mes "...Oh, you did..Thanks!";
+			next;
+			mes "[Iromo]";
+			mes "But, I am still scared of";
+			mes "being outside.";
+			mes "I would rather stay at home.";
+			next;
+			set ep13_2_hiki,8;
+			changequest 10084,10085;
+			getexp 47000,0;
+			mes "[Iromo]";
+			mes "Thank you for being helpful.";
+			mes "But, no thanks.";
+			close;
+		}
+		mes "[Iromo]";
+		mes "If I go out, I will see the scary cat.";
+		next;
+		mes "[Iromo]";
+		mes "He will bite me..and";
+		mes "scratch me again.";
+		mes "I should stay at home.";
+		close;
+	}
+	if ((ep13_2_hiki == 6) && (countitem(528) > 0) && (countitem(501) > 0)) {
+		mes "[Iromo]";
+		mes "...Huh? This smell...";
+		mes "This is the one I like the most.";
+		mes "Ha Ha!";
+		next;
+		mes "[Iromo]";
+		mes "But..my mom is beside me.";
+		mes "(Wink, Wink)";
+		next;
+		mes "[Iromo]";
+		mes "...Thanks! I need to hide this.";
+		mes "Anyway, thank you!";
+		next;
+		mes "[Iromo]";
+		mes "It smells so good.";
+		next;
+		mes "[Iromo]";
+		mes "Huh?? If I go out,";
+		mes "then can I get these things?";
+		next;
+		mes "[Iromo]";
+		mes "......";
+		next;
+		mes "[Iromo]";
+		mes "But... I'm scared...";
+		next;
+		mes "[Iromo]";
+		mes "I am scared. If I go out...";
+		mes "No, I don't want to get hurt again.";
+		next;
+		select("Again?");
+		mes "[Iromo]";
+		mes "...there is a weird cat that can walk on two feet.";
+		mes "I like cats so I approached him.";
+		mes "Then suddenly he scratched and bit me.";
+		next;
+		delitem 528,1; //Monster's_Feed
+		delitem 501,1; //Red_Potion
+		set ep13_2_hiki,7;
+		changequest 10083,10084;
+		getexp 37500,0;
+		mes "[Iromo]";
+		mes "I don't want to see the cat again.";
+		mes "If I go out, I will see him. It is scary.";
+		close;
+	}
+	if ((ep13_2_hiki == 3) || (ep13_2_hiki == 4) || (ep13_2_hiki == 5) || (ep13_2_hiki == 5)) {
+		mes "[Iromo]";
+		mes "... I don't like being outside of the village.";
+		mes "Being inside of the house is the best.";
+		close;
+	}
+	if ((ep13_2_hiki == 1) || (ep13_2_hiki == 2)) {
+		mes "[Iromo]";
+		mes "Mother told me that";
+		mes "I should go out and play";
+		mes "with friends. But I don't";
+		mes "want to go out with them.";
+		next;
+		mes "[Iromo]";
+		mes "It is little bit inconvenient that";
+		mes "I can't get delicious food";
+		mes "that grows outside of the village.";
+		mes "I can stand it.";
+		next;
+		set ep13_2_hiki,2;
+		changequest 10079,10080;
+		mes "[Iromo]";
+		mes "But, I can have other food";
+		mes "instead of the outside food.";
+		mes "That way I don't have to go out.";
+		close;
+	}
+	mes "[Iromo]";
+	mes "......";
+	next;
+	mes "[Iromo]";
+	mes "I like my house and my room.";
+	mes "I don't want to go out.";
+	close;
+}
+
+alberta_in,120,93,3	script	Iromo's Mother#ep3_2	53,{
+	if (ep13_2_hiki == 8) {
+		mes "[Mother]";
+		mes "Thank you for helping my son.";
+		mes "But I think we can't do anything";
+		mes "about him anymore.";
+		next;
+		mes "[Mother]";
+		mes "Iromo was really active and";
+		mes "curious about the world.";
+		mes "He wanted to see all the";
+		mes "sights of the world.";
+		next;
+		mes "[Mother]";
+		mes "But look at him now.";
+		mes "He doesn't go out anymore.";
+		mes "He is just stuck inside of his room.";
+		next;
+		mes "[Mother]";
+		mes "He became a timid person.";
+		mes "If he has an argument with me,";
+		mes "he doesn't talk to me for a week.";
+		next;
+		mes "[Mother]";
+		mes "You might have";
+		mes "a hard time getting";
+		mes "Iromo to talk to you.";
+		close;
+	}
+	if (ep13_2_hiki == 7) {
+		mes "[Mother]";
+		mes "Oh, I remember";
+		mes "what happened last time...";
+		mes "One day, Iromo came home";
+		mes "with tears in his eyes";
+		mes "And he seemed hurt.";
+		next;
+		mes "[Mother]";
+		mes "It was not a big injury.";
+		mes "I was worried about him so much.";
+		mes "But, he never tells me what happened that day.";
+		next;
+		mes "[Mother]";
+		mes "After that day, he hasn't talked to people much and doesn't go out at all.";
+		next;
+		mes "[Mother]";
+		mes "I hope he tells me what happened that day.";
+		mes "Iromo was such a good boy...";
+		close;
+	}
+	if ((ep13_2_hiki == 4) || (ep13_2_hiki == 5) || (ep13_2_hiki == 6)) {
+		mes "[Mother]";
+		mes "Hum.. Iromo's favorite?";
+		mes "Let me think...";
+		mes "Actually he likes all kinds of food.";
+		mes "He is not picky about food.";
+		next;
+		mes "[Mother]";
+		mes "When he went out with friends,";
+		mes "he spent all his pocket money,";
+		mes "but I don't know what he has been eating.";
+		next;
+		set ep13_2_hiki,3;
+		mes "[Mother]";
+		mes "Oh, why don't you ask Iromo's friend?";
+		mes "I think he would know about his favorite food.";
+		close;
+	}
+	if ((ep13_2_hiki == 2) || (ep13_2_hiki == 3)) {
+		mes "[Mother]";
+		mes "Hum.. Iromo's favorite?";
+		mes "Let me think...";
+		mes "Actually he likes all kinds of food.";
+		mes "He is not picky about food.";
+		next;
+		mes "[Mother]";
+		mes "When he went out with friends,";
+		mes "he spent all his pocket money,";
+		mes "but I don't know what he has been eating.";
+		next;
+		set ep13_2_hiki,3;
+		mes "[Mother]";
+		mes "Oh, why don't you ask Iromo's friend?";
+		mes "I think he would know about his favorite food.";
+		close;
+	}
+	mes "[Mother]";
+	mes "This little boy is my son, Iromo.";
+	next;
+	mes "[Mother]";
+	mes "He used to go out all the time.";
+	mes "He loved playing outside with friends.";
+	next;
+	mes "[Mother]";
+	mes "But, somehow...";
+	mes "he doesn't go out anymore.";
+	next;
+	if (BaseLevel > 40) {
+		set ep13_2_hiki,1;
+		setquest 10079;
+	}
+	mes "[Mother]";
+	mes "I am so worried about him...";
+	mes "What happened to him..?";
+	close;
+}
+
+alberta,45,106,5	script	Little Boy#ep3_2	706,{
+	if (ep13_2_hiki == 6) {
+		mes "[Little Boy]";
+		mes "Iromo? He used to like ^FF0000Monster's Feed^000000 and ^FF0000Red Potion^000000.";
+		next;
+		mes "[Little Boy]";
+		mes "Oh ya and one more thing~!";
+		mes "I like Bananas. Haha.";
+		close;
+	}
+	if (ep13_2_hiki == 5) {
+		mes "[Little Boy]";
+		mes "......";
+		next;
+		mes "[Little Boy]";
+		mes "Yummy! Banana is always delicious!";
+		mes "Bananas are the best fruits ever!";
+		next;
+		mes "[Little Boy]";
+		mes "Thanks for the Banana...";
+		mes "Now I can think about";
+		mes "what Iromo likes to eat.";
+		next;
+		mes "[Little Boy]";
+		mes "He used to like junk food.";
+		mes "You know, cheap and weird tasting snacks...";
+		mes "So he had to hide when he had them.";
+		next;
+		mes "[Little Boy]";
+		mes "His mother wouldn't let him";
+		mes "have those kind of snacks...";
+		mes "So he hid them from her.";
+		mes "I don't know why he liked";
+		mes "those junk foods anyways.";
+		next;
+		mes "[Little Boy]";
+		mes "He usually enjoyed having";
+		mes "Monster's Feed.";
+		mes "He said it is good";
+		mes "with Red Potion soup.";
+		mes "He always had a Red Potion and Monster's Feed for his lunch.";
+		next;
+		mes "[Little Boy]";
+		mes "He's got a weird appetite.";
+		mes "I can't understand why he liked";
+		mes "those foods. He was odd...";
+		next;
+		set ep13_2_hiki,6;
+		changequest 10082,10083;
+		mes "[Little Boy]";
+		mes "Anyway, I already told you";
+		mes "what I know about him.";
+		mes "So, I am done now.";
+		mes "Let me know if you have more Bananas. Haha.";
+		mes "I love Bananas~~!";
+		close;
+	}
+	if ((ep13_2_hiki == 4) && (countitem(513) > 0)) {
+		mes "[Little Boy]";
+		mes "Huh? What a delicious smell!";
+		mes "You brought me Bananas!";
+		mes "Oh, thanks so much!";
+		next;
+		mes "[Little Boy]";
+		mes "Let me have them first.";
+		next;
+		mes "[Little Boy]";
+		mes "Chew, chew...";
+		next;
+		mes "[Little Boy]";
+		mes "Yum Yum...";
+		next;
+		delitem 513,1; //Banana
+		set ep13_2_hiki,5;
+		changequest 10081,10082;
+		mes "[Little Boy]";
+		mes "Wait. Wait...";
+		mes "***Gulp***";
+		mes "just a second...";
+		mes "Wait.";
+		close;
+	}
+	if (ep13_2_hiki == 4) {
+		mes "[Little Boy]";
+		mes "Banana~banana~";
+		mes "I love bananas~";
+		next;
+		mes "[Little Boy]";
+		mes "They don't sell bananas in this village...";
+		mes "I am eager to have bananas.";
+		next;
+		mes "[Little Boy]";
+		mes "Oh~ you promised!";
+		mes "Bring bananas for me~!! I will wait for you!";
+		close;
+	}
+	if (ep13_2_hiki == 3) {
+		mes "[Little Boy]";
+		mes "I am hugry. We don't have";
+		mes "much snack bar in this village.";
+		next;
+		mes "[Little Boy]";
+		mes "Huh? Iromo?";
+		mes "Oh, I haven't seen him for a long time...";
+		mes "Hum.. Where is he?";
+		mes "Did he move out?";
+		next;
+		mes "[Little Boy]";
+		mes "Huh? His favorite food?.";
+		mes "Hum.. What was it..?";
+		next;
+		mes "[Little Boy]";
+		mes "If I can remember it can you buy me a banana?";
+		next;
+		mes "[Little Boy]";
+		mes "Banana~banana~";
+		mes "I love bananas~";
+		next;
+		mes "[Little Boy]";
+		mes "They don't sell bananas in this village...";
+		mes "I am eager to have bananas.";
+		next;
+		set ep13_2_hiki,4;
+		changequest 10080,10081;
+		mes "[Little Boy]";
+		mes "Oh, you will buy me a banana?";
+		mes "I'll try to remember what Iromo's favorite food is for sure if you bring it to me.";
+		close;
+	}
+	mes "[Little Boy]";
+	mes "I am hugry. We don't have";
+	mes "much snack bar in this village.";
+	next;
+	mes "[Little Boy]";
+	mes "I hope they sell bananas";
+	mes "in this village.";
+	mes "Like other nice villages.";
+	next;
+	mes "[Little Boy]";
+	mes "This village is so boring...";
+	mes "What a small village.";
+	close;
+}

File diff suppressed because it is too large
+ 250 - 387
npc/quests/quests_lighthalzen.txt


+ 7 - 3
npc/quests/quests_morocc.txt

@@ -3,7 +3,7 @@
 //===== By: ================================================== 
 //= kobra_k88
 //===== Current Version: ===================================== 
-//= 2.8
+//= 2.9
 //===== Compatible With: ===================================== 
 //= eAthena 7.15 +
 //===== Description: ========================================= 
@@ -41,6 +41,8 @@
 //=     finished it to return to the previous map.
 //= 2.7 Corrected weight checks, they only check for inventory slots. [L0ne_W0lf]
 //= 2.8 Disabled Assassin bar pub NPCs, as they are included in the 13.1 quests file. [L0ne_W0lf]
+//= 2.9 Fixed player dying/logging out during conversation could prevent
+//=     summoning of Satan Morroc until server reboot. [Gepard]
 //============================================================ 
 
 // Stop Post Quest
@@ -1899,7 +1901,6 @@ OnDisable:
 
 moc_fild21,178,239,0	script	Group of Evil#edq	844,1,1,{
 	if (((rebirth_moc_edq == 4) || (rebirth_moc_edq == 7)) && ($@re_moc == 1)) {
-		set $@re_moc,2;
 		mes "Awed by the time-space gap where darkness is given life, you instinctively step back.";
 		next;
 		mes "You can feel the power of the darkness rise from the gap where light and darkness are mingled.";
@@ -1907,7 +1908,10 @@ moc_fild21,178,239,0	script	Group of Evil#edq	844,1,1,{
 		mes "[" + strcharinfo(0) + "]";
 		mes "Wah...!";
 		close2;
-		donpcevent "Satan Summon#edq::OnEnable";
+		if($@re_moc == 1) {
+			set $@re_moc,2;
+			donpcevent "Satan Summon#edq::OnEnable";
+		}
 		end;
 	}
 	else {

+ 1 - 0
npc/scripts_athena.conf

@@ -297,6 +297,7 @@ npc: npc/other/mail.txt
 npc: npc/other/marriage.txt
 npc: npc/other/monster_museum.txt
 //npc: npc/other/msg_boards.txt
+npc: npc/other/poring_war.txt
 npc: npc/other/powernpc.txt
 npc: npc/other/pvp.txt
 npc: npc/other/resetskill.txt

+ 12 - 0
npc/warps/dungeons/anthell.txt

@@ -13,9 +13,21 @@
 //= 1.4 Removed Duplicates [Silent]
 //= 1.5 Updated warps for episode 12.1 [L0ne_W0lf]
 //= 1.6 Renewal warp adjustments.
+//= 1.6 Fixed coordinates for pre-2010/06/09 maps (bugreport:3589)
+//=     Moved entrance to cmd_fild08 to match mapcache [Gepard]
 //============================================================
 
 //= Ant Hell =================================================
+
+/* Pre 2010-06-09adata_x1.gpf version
+ * Requires modified mapcache and client-side maps
+ */
+//moc_fild20,156,143,0	warp	moc_ant1-1	1,1,anthell01,35,263
+//anthell01,35,267,0	warp	moc_ant1-2	1,1,moc_fild20,161,144
+//moc_fild20,337,315,0	warp	moc_ant2-1	1,1,anthell02,168,170
+//anthell02,171,170,0	warp	moc_ant2-2	1,1,moc_fild20,333,315
+
+/* 2010-06-09 version */
 cmd_fild08,335,355,0	warp	moc_ant1-1	3,4,anthell01,35,262
 anthell01,35,267,0	warp	moc_ant1-2	1,1,cmd_fild08,330,355
 cmd_fild08,348,82,0	warp	moc_ant2-1	3,3,anthell02,168,170

+ 2 - 1
npc/warps/other/sign.txt

@@ -13,6 +13,7 @@
 //= 1.1 A few more warps. [MasterOfMuppets]
 //= 1.2 Completed the warps [MasterOfMuppets]
 //= 1.3 Added Renewal Changes. [Kisuka]
+//= 1.3 Correct AEGIS Warps. [Kisuka]
 //============================================================
 
 cmd_in01,17,34,0	warp	sign01	1,1,comodo,187,164
@@ -35,4 +36,4 @@ que_sign01,113,132,0	warp	sign07	1,1,nif_in,117,173
 
 que_sign01,45,15,0	warp	sign08	1,1,niflheim,146,245
 
-que_sign02,22,313,0	warp	sign09	1,1,niflheim,30,156
+que_sign02,22,313,0	warp	sign09	1,1,niflheim,30,156

+ 4 - 4
sql-files/main.sql

@@ -37,10 +37,10 @@ CREATE TABLE IF NOT EXISTS `cart_inventory` (
   `identify` smallint(6) NOT NULL default '0',
   `refine` tinyint(3) unsigned NOT NULL default '0',
   `attribute` tinyint(4) NOT NULL default '0',
-  `card0` int(11) NOT NULL default '0',
-  `card1` int(11) NOT NULL default '0',
-  `card2` int(11) NOT NULL default '0',
-  `card3` int(11) NOT NULL default '0',
+  `card0` smallint(11) NOT NULL default '0',
+  `card1` smallint(11) NOT NULL default '0',
+  `card2` smallint(11) NOT NULL default '0',
+  `card3` smallint(11) NOT NULL default '0',
   `expire_time` int(11) unsigned NOT NULL default '0',
   PRIMARY KEY  (`id`),
   KEY `char_id` (`char_id`)

+ 4 - 0
sql-files/upgrade_svn14759.sql

@@ -0,0 +1,4 @@
+ALTER TABLE `cart_inventory` MODIFY COLUMN `card0` SMALLINT(11) NOT NULL DEFAULT '0';
+ALTER TABLE `cart_inventory` MODIFY COLUMN `card1` SMALLINT(11) NOT NULL DEFAULT '0';
+ALTER TABLE `cart_inventory` MODIFY COLUMN `card2` SMALLINT(11) NOT NULL DEFAULT '0';
+ALTER TABLE `cart_inventory` MODIFY COLUMN `card3` SMALLINT(11) NOT NULL DEFAULT '0';

+ 2 - 1
src/char_sql/char.c

@@ -473,7 +473,8 @@ int mmo_char_tosql(int char_id, struct mmo_charstatus* p)
 		(p->party_id != cp->party_id) || (p->guild_id != cp->guild_id) ||
 		(p->pet_id != cp->pet_id) || (p->weapon != cp->weapon) || (p->hom_id != cp->hom_id) ||
 		(p->shield != cp->shield) || (p->head_top != cp->head_top) ||
-		(p->head_mid != cp->head_mid) || (p->head_bottom != cp->head_bottom) || (p->delete_date != cp->delete_date)
+		(p->head_mid != cp->head_mid) || (p->head_bottom != cp->head_bottom) || (p->delete_date != cp->delete_date) ||
+		(p->rename != cp->rename)
 	)
 	{	//Save status
 		if( SQL_ERROR == Sql_Query(sql_handle, "UPDATE `%s` SET `base_level`='%d', `job_level`='%d',"

+ 2 - 5
src/common/socket.c

@@ -749,7 +749,7 @@ int do_sockets(int next)
 		if(session[i]->wdata_size)
 			session[i]->func_send(i);
 
-		if(session[i]->eof) //func_send can't free a session, this is safe.
+		if(session[i]->flag.eof) //func_send can't free a session, this is safe.
 		{	//Finally, even if there is no data to parse, connections signalled eof should be closed, so we call parse_func [Skotlex]
 			session[i]->func_parse(i); //This should close the session immediately.
 		}
@@ -1351,9 +1351,6 @@ void send_shortlist_do_sends()
 {
 	int i = 0;
 
-	// Assume all or most of the fd's don't remain in the shortlist
-	memset(send_shortlist_set, 0, sizeof(send_shortlist_set));
-
 	while( i < send_shortlist_count )
 	{
 		int fd = send_shortlist_array[i];
@@ -1375,7 +1372,6 @@ void send_shortlist_do_sends()
 			// be sent from it we'll keep it in the shortlist.
 			if( session[fd] && !session[fd]->flag.eof && session[fd]->wdata_size )
 			{
-				send_shortlist_set[fd/32] |= 1<<(fd%32);
 				++i;
 				continue;
 			}
@@ -1383,6 +1379,7 @@ void send_shortlist_do_sends()
 
 		// Remove fd from shortlist, move the last fd to the current position
 		send_shortlist_array[i] = send_shortlist_array[--send_shortlist_count];
+		send_shortlist_set[fd/32]&=~(1<<(fd%32));
 	}
 }
 #endif

+ 1 - 1
src/common/timer.c

@@ -146,7 +146,7 @@ static unsigned int tick(void)
 	//
 		return (unsigned int)((_rdtsc() - RDTSC_BEGINTICK) / RDTSC_CLOCK);
 	//
-#elif (defined(_POSIX_TIMERS) && _POSIX_TIMERS > 0 && defined(_POSIX_MONOTONIC_CLOCK) /* posix compliant */) || (defined(__FreeBSD_cc_version) && __FreeBSD_cc_version >= 500005 /* FreeBSD >= 5.1.0 */)
+#elif defined(HAVE_MONOTONIC_CLOCK)
 	struct timespec tval;
 	clock_gettime(CLOCK_MONOTONIC, &tval);
 	return tval.tv_sec * 1000 + tval.tv_nsec / 1000000;

+ 1 - 1
src/common/utils.c

@@ -269,7 +269,7 @@ unsigned int get_percentage(const unsigned int A, const unsigned int B)
 	if( B == 0 )
 	{
 		ShowError("get_percentage(): divison by zero! (A=%u,B=%u)\n", A, B);
-		return -1;
+		return ~0U;
 	}
 
 	result = 100 * ((double)A / (double)B);

+ 28 - 27
src/map/atcommand.c

@@ -1150,7 +1150,7 @@ ACMD_FUNC(storage)
 {
 	nullpo_retr(-1, sd);
 	
-	if (sd->npc_id || sd->vender_id || sd->state.buyingstore || sd->state.trading || sd->state.storage_flag)
+	if (sd->npc_id || sd->state.vending || sd->state.buyingstore || sd->state.trading || sd->state.storage_flag)
 		return -1;
 
 	if (storage_storageopen(sd) == 1)
@@ -1177,7 +1177,7 @@ ACMD_FUNC(guildstorage)
 		return -1;
 	}
 
-	if (sd->npc_id || sd->vender_id || sd->state.buyingstore || sd->state.trading)
+	if (sd->npc_id || sd->state.vending || sd->state.buyingstore || sd->state.trading)
 		return -1;
 
 	if (sd->state.storage_flag == 1) {
@@ -2462,7 +2462,7 @@ ACMD_FUNC(monster)
 	if (number <= 0)
 		number = 1;
 
-	if (strlen(name) < 1)
+	if( !name[0] )
 		strcpy(name, "--ja--");
 
 	// If value of atcommand_spawn_quantity_limit directive is greater than or equal to 1 and quantity of monsters is greater than value of the directive
@@ -2543,7 +2543,7 @@ ACMD_FUNC(monstersmall)
 	if (number <= 0)
 		number = 1;
 
-	if (strlen(name) < 1)
+	if( !name[0] )
 		strcpy(name, "--ja--");
 
 	// If value of atcommand_spawn_quantity_limit directive is greater than or equal to 1 and quantity of monsters is greater than value of the directive
@@ -2619,7 +2619,7 @@ ACMD_FUNC(monsterbig)
 	if (number <= 0)
 		number = 1;
 
-	if (strlen(name) < 1)
+	if( !name[0] )
 		strcpy(name, "--ja--");
 
 	// If value of atcommand_spawn_quantity_limit directive is greater than or equal to 1 and quantity of monsters is greater than value of the directive
@@ -6030,7 +6030,7 @@ ACMD_FUNC(autotrade)
 		return -1;
 	}
 	
-	if( !sd->vender_id && !sd->state.buyingstore ) { //check if player is vending or buying
+	if( !sd->state.vending && !sd->state.buyingstore ) { //check if player is vending or buying
 		clif_displaymessage(fd, msg_txt(549)); // "You should have a shop open to use @autotrade."
 		return -1;
 	}
@@ -6068,7 +6068,7 @@ ACMD_FUNC(changegm)
 		return -1;
 	}
 
-	if (strlen(message)==0)
+	if( !message[0] )
 	{
 		clif_displaymessage(fd, "Command usage: @changegm <guildmember name>");
 		return -1;
@@ -6091,7 +6091,7 @@ ACMD_FUNC(changeleader)
 {
 	nullpo_retr(-1, sd);
 	
-	if (strlen(message)==0)
+	if( !message[0] )
 	{
 		clif_displaymessage(fd, "Command usage: @changeleader <party member name>");
 		return -1;
@@ -7829,31 +7829,32 @@ ACMD_FUNC(monsterignore)
  *------------------------------------------*/
 ACMD_FUNC(fakename)
 {
-	char name[NAME_LENGTH];
 	nullpo_retr(-1, sd);
-	
-	if((!message || !*message) && strlen(sd->fakename) > 1) {
-		sd->fakename[0]='\0';
-		clif_charnameack(0, &sd->bl);
-		clif_displaymessage(sd->fd,"Returned to real name.");
-		return 0;
-	}
 
-	if (!message || !*message || sscanf(message, "%23[^\n]", name) < 1) {
-		clif_displaymessage(sd->fd,"You must enter a name.");
+	if( !message || !*message )
+	{
+		if( sd->fakename[0] )
+		{
+			sd->fakename[0] = '\0';
+			clif_charnameack(0, &sd->bl);
+			clif_displaymessage(sd->fd, "Returned to real name.");
+			return 0;
+		}
+
+		clif_displaymessage(sd->fd, "You must enter a name.");
 		return -1;
 	}
 
-	if(strlen(name) < 2) {
-		clif_displaymessage(sd->fd,"Fake name must be at least two characters.");
+	if( strlen(message) < 2 )
+	{
+		clif_displaymessage(sd->fd, "Fake name must be at least two characters.");
 		return -1;
 	}
 	
-	memcpy(sd->fakename,name,NAME_LENGTH);
-	sd->fakename[NAME_LENGTH-1] = '\0';
+	safestrncpy(sd->fakename, message, sizeof(sd->fakename));
 	clif_charnameack(0, &sd->bl);
-	clif_displaymessage(sd->fd,"Fake name enabled.");
-	
+	clif_displaymessage(sd->fd, "Fake name enabled.");
+
 	return 0;
 }
 
@@ -7987,7 +7988,7 @@ ACMD_FUNC(duel)
 		return 0;
 	}
 
-	if(strlen(message) > 0) {
+	if( message[0] ) {
 		if(sscanf(message, "%d", &maxpl) >= 1) {
 			if(maxpl < 2 || maxpl > 65535) {
 				clif_displaymessage(fd, msg_txt(357)); // "Duel: Invalid value."
@@ -8163,7 +8164,7 @@ ACMD_FUNC(clone)
  *-----------------------------------*/
 ACMD_FUNC(main)
 {
-	if(strlen(message) > 0) {
+	if( message[0] ) {
 
 		if(strcmpi(message, "on") == 0) {
 			if(!sd->state.mainchat) {
@@ -9249,7 +9250,7 @@ ACMD_FUNC(commands)
 		if( gm_lvl < atcommand_info[i].level2 && stristr(command,"charcommands") )
 			continue;
 
-		slen = (unsigned int)strlen(atcommand_info[i].command);
+		slen = strlen(atcommand_info[i].command);
 
 		// flush the text buffer if this command won't fit into it
 		if( slen + cur - line_buff >= CHATBOX_SIZE )

+ 2 - 2
src/map/battle.c

@@ -1442,8 +1442,8 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo
 				case MC_MAMMONITE:
 					skillratio += 50*skill_lv;
 					break;
-				case HT_POWER: //FIXME: How exactly is the STR based damage supposed to be done? [Skotlex]
-					skillratio += 5*sstatus->str;
+				case HT_POWER:
+					skillratio += -50+8*sstatus->str;
 					break;
 				case AC_DOUBLE:
 				case MA_DOUBLE:

+ 2 - 2
src/map/battleground.c

@@ -130,7 +130,7 @@ int bg_team_leave(struct map_session_data *sd, int flag)
 		sprintf(output, "Server : %s has quit the game...", sd->status.name);
 	else
 		sprintf(output, "Server : %s is leaving the battlefield...", sd->status.name);
-	clif_bg_message(bg, "Server", output, strlen(output) + 1);
+	clif_bg_message(bg, 0, "Server", output, strlen(output) + 1);
 
 	if( bg->logout_event[0] && flag )
 		npc_event(sd, bg->logout_event, 0);
@@ -212,7 +212,7 @@ int bg_send_message(struct map_session_data *sd, const char *mes, int len)
 	nullpo_ret(sd);
 	if( sd->state.bg_id == 0 || (bg = bg_team_search(sd->state.bg_id)) == NULL )
 		return 0;
-	clif_bg_message(bg, sd->status.name, mes, len);
+	clif_bg_message(bg, sd->bl.id, sd->status.name, mes, len);
 	return 0;
 }
 

+ 1 - 1
src/map/buyingstore.c

@@ -46,7 +46,7 @@ static unsigned int buyingstore_getuid(void)
 
 bool buyingstore_setup(struct map_session_data* sd, unsigned char slots)
 {
-	if( !battle_config.feature_buying_store || sd->vender_id || sd->state.buyingstore || sd->state.trading || slots == 0 )
+	if( !battle_config.feature_buying_store || sd->state.vending || sd->state.buyingstore || sd->state.trading || slots == 0 )
 	{
 		return false;
 	}

+ 32 - 6
src/map/chat.c

@@ -23,7 +23,7 @@ int chat_triggerevent(struct chat_data *cd); // forward declaration
 
 /// Initializes a chatroom object (common functionality for both pc and npc chatrooms).
 /// Returns a chatroom object on success, or NULL on failure.
-static struct chat_data* chat_createchat(struct block_list* bl, const char* title, const char* pass, int limit, bool pub, int trigger, const char* ev)
+static struct chat_data* chat_createchat(struct block_list* bl, const char* title, const char* pass, int limit, bool pub, int trigger, const char* ev, int zeny, int minLvl, int maxLvl)
 {
 	struct chat_data* cd;
 	nullpo_retr(NULL, bl);
@@ -36,6 +36,9 @@ static struct chat_data* chat_createchat(struct block_list* bl, const char* titl
 	cd->users = 0;
 	cd->limit = min(limit, ARRAYLENGTH(cd->usersd));
 	cd->trigger = trigger;
+	cd->zeny = zeny;
+	cd->minLvl = minLvl;
+	cd->maxLvl = maxLvl;
 	memset(cd->usersd, 0, sizeof(cd->usersd));
 	cd->owner = bl;
 	safestrncpy(cd->npc_event, ev, sizeof(cd->npc_event));
@@ -69,7 +72,7 @@ int chat_createpcchat(struct map_session_data* sd, const char* title, const char
 	if( sd->chatID )
 		return 0; //Prevent people abusing the chat system by creating multiple chats, as pointed out by End of Exam. [Skotlex]
 
-	if( sd->vender_id || sd->state.buyingstore )
+	if( sd->state.vending || sd->state.buyingstore )
 	{// not chat, when you already have a store open
 		return 0;
 	}
@@ -88,7 +91,7 @@ int chat_createpcchat(struct map_session_data* sd, const char* title, const char
 
 	pc_stop_walking(sd,1);
 
-	cd = chat_createchat(&sd->bl, title, pass, limit, pub, 0, "");
+	cd = chat_createchat(&sd->bl, title, pass, limit, pub, 0, "", 0, 1, MAX_LEVEL);
 	if( cd )
 	{
 		cd->users = 1;
@@ -113,7 +116,7 @@ int chat_joinchat(struct map_session_data* sd, int chatid, const char* pass)
 	nullpo_ret(sd);
 	cd = (struct chat_data*)map_id2bl(chatid);
 
-	if( cd == NULL || cd->bl.type != BL_CHAT || cd->bl.m != sd->bl.m || sd->vender_id || sd->state.buyingstore || sd->chatID || cd->users >= cd->limit )
+	if( cd == NULL || cd->bl.type != BL_CHAT || cd->bl.m != sd->bl.m || sd->state.vending || sd->state.buyingstore || sd->chatID || cd->users >= cd->limit )
 	{
 		clif_joinchatfail(sd,0);
 		return 0;
@@ -125,6 +128,22 @@ int chat_joinchat(struct map_session_data* sd, int chatid, const char* pass)
 		return 0;
 	}
 
+	if( sd->status.base_level < cd->minLvl || sd->status.base_level > cd->maxLvl )
+	{
+		if(sd->status.base_level < cd->minLvl)
+			clif_joinchatfail(sd,5);
+		else
+			clif_joinchatfail(sd,6);
+
+		return 0;
+	}
+
+	if( sd->status.zeny < cd->zeny )
+	{
+		clif_joinchatfail(sd,4);
+		return 0;
+	}
+
 	pc_stop_walking(sd,1);
 	cd->usersd[cd->users] = sd;
 	cd->users++;
@@ -299,7 +318,7 @@ int chat_kickchat(struct map_session_data* sd, const char* kickusername)
 }
 
 /// Creates a chat room for the npc.
-int chat_createnpcchat(struct npc_data* nd, const char* title, int limit, bool pub, int trigger, const char* ev)
+int chat_createnpcchat(struct npc_data* nd, const char* title, int limit, bool pub, int trigger, const char* ev, int zeny, int minLvl, int maxLvl)
 {
 	struct chat_data* cd;
 	nullpo_ret(nd);
@@ -310,7 +329,14 @@ int chat_createnpcchat(struct npc_data* nd, const char* title, int limit, bool p
 		return 0;
 	}
 
-	cd = chat_createchat(&nd->bl, title, "", limit, pub, trigger, ev);
+	if( zeny > MAX_ZENY || maxLvl > MAX_LEVEL )
+	{
+		ShowError("chat_createnpcchat: npc '%s' has a required lvl or amount of zeny over the max limit!\n", nd->exname);
+		return 0;
+	}
+
+	cd = chat_createchat(&nd->bl, title, "", limit, pub, trigger, ev, zeny, minLvl, maxLvl);
+
 	if( cd )
 	{
 		nd->chat_id = cd->bl.id;

+ 4 - 1
src/map/chat.h

@@ -17,6 +17,9 @@ struct chat_data {
 	uint8 users;                     // current user count
 	uint8 limit;                     // join limit
 	uint8 trigger;                   // number of users needed to trigger event
+	uint32 zeny;						 // required zeny to join
+	uint32 minLvl;					 // minimum base level to join
+	uint32 maxLvl;					 // maximum base level allowed to join
 	struct map_session_data* usersd[20];
 	struct block_list* owner;
 	char npc_event[50];
@@ -30,7 +33,7 @@ int chat_changechatowner(struct map_session_data* sd, const char* nextownername)
 int chat_changechatstatus(struct map_session_data* sd, const char* title, const char* pass, int limit, bool pub);
 int chat_kickchat(struct map_session_data* sd, const char* kickusername);
 
-int chat_createnpcchat(struct npc_data* nd, const char* title, int limit, bool pub, int trigger, const char* ev);
+int chat_createnpcchat(struct npc_data* nd, const char* title, int limit, bool pub, int trigger, const char* ev, int zeny, int minLvl, int maxLvl);
 int chat_deletenpcchat(struct npc_data* nd);
 int chat_enableevent(struct chat_data* cd);
 int chat_disableevent(struct chat_data* cd);

+ 112 - 73
src/map/clif.c

@@ -3297,8 +3297,8 @@ int clif_addchat(struct chat_data* cd,struct map_session_data *sd)
 }
 
 /*==========================================
- * Announce the new owner
- * R 00e1 <owner flag>.l <nick>.24B
+ * Announce the new owner (ZC_ROLE_CHANGE)
+ * R 00e1 <role>.L <nick>.24B
  *------------------------------------------*/
 void clif_changechatowner(struct chat_data* cd, struct map_session_data* sd)
 {
@@ -3307,18 +3307,12 @@ void clif_changechatowner(struct chat_data* cd, struct map_session_data* sd)
 	nullpo_retv(sd);
 	nullpo_retv(cd);
 
-	//FIXME: this announces a swap between positions 0 and 1 (probably not what we want) [ultramage]
-	//FIXME: aegis sends obviously incorrect packets; need to figure out what to send to display it correctly :X
-	//TODO: is it just owner swap, or can it do general-purpose reordering?
-	// It's not position, but operator flag, everyone set to 1 gets chat
-	// operator menu (yes, that means a chat may host multiple operators) [Ai4rei]
-
 	WBUFW(buf, 0) = 0xe1;
-	WBUFL(buf, 2) = 1;
+	WBUFL(buf, 2) = 1;  // normal
 	memcpy(WBUFP(buf,6),cd->usersd[0]->status.name,NAME_LENGTH);
 
 	WBUFW(buf,30) = 0xe1;
-	WBUFL(buf,32) = 0;
+	WBUFL(buf,32) = 0;  // owner (menu)
 	memcpy(WBUFP(buf,36),sd->status.name,NAME_LENGTH);
 
 	clif_send(buf,packet_len(0xe1)*2,&sd->bl,CHAT);
@@ -3645,7 +3639,7 @@ static void clif_getareachar_pc(struct map_session_data* sd,struct map_session_d
 			clif_dispchat(cd,sd->fd);
 	}
 
-	if(dstsd->vender_id)
+	if( dstsd->state.vending )
 		clif_showvendingboard(&dstsd->bl,dstsd->message,sd->fd);
 
 	if( dstsd->state.buyingstore )
@@ -4077,7 +4071,7 @@ int clif_outsight(struct block_list *bl,va_list ap)
 				if(cd->usersd[0]==sd)
 					clif_dispchat(cd,tsd->fd);
 			}
-			if(sd->vender_id)
+			if( sd->state.vending )
 				clif_closevendingboard(bl,tsd->fd);
 			if( sd->state.buyingstore )
 				clif_buyingstore_disappear_entry_single(tsd, sd);
@@ -7624,7 +7618,9 @@ int clif_refresh(struct map_session_data *sd)
 	return 0;
 }
 
-// updates the object's (bl) name on client
+/// Updates the object's (bl) name on client (ZC_ACK_REQNAME/ZC_ACK_REQNAMEALL)
+/// 0095 <unit id>.L <char name>.24B
+/// 0195 <unit id>.L <char name>.24B <party name>.24B <guild name>.24B <position name>.24B
 int clif_charnameack (int fd, struct block_list *bl)
 {
 	unsigned char buf[103];
@@ -7647,24 +7643,31 @@ int clif_charnameack (int fd, struct block_list *bl)
 			if (ssd->fd == fd && ssd->disguise)
 				WBUFL(buf,2) = -bl->id;
 
-			if (strlen(ssd->fakename)>1) {
+			if( ssd->fakename[0] )
+			{
+				WBUFW(buf, 0) = cmd = 0x195;
 				memcpy(WBUFP(buf,6), ssd->fakename, NAME_LENGTH);
+				WBUFB(buf,30) = WBUFB(buf,54) = WBUFB(buf,78) = 0;
 				break;
 			}
 			memcpy(WBUFP(buf,6), ssd->status.name, NAME_LENGTH);
-			
-			if (!battle_config.display_party_name) {
-				if (ssd->status.party_id > 0 && ssd->status.guild_id > 0 && (g = guild_search(ssd->status.guild_id)) != NULL)
-					p = party_search(ssd->status.party_id);
-			}else{
-				if (ssd->status.party_id > 0)
-					p = party_search(ssd->status.party_id);
-			}
 
-			if( ssd->status.guild_id > 0 && (g = guild_search(ssd->status.guild_id)) != NULL )
+			if( ssd->status.party_id )
+			{
+				p = party_search(ssd->status.party_id);
+			}
+			if( ssd->status.guild_id )
 			{
-				ARR_FIND(0, g->max_member, i, g->member[i].account_id == ssd->status.account_id && g->member[i].char_id == ssd->status.char_id);
-				if( i < g->max_member ) ps = g->member[i].position;
+				if( ( g = guild_search(ssd->status.guild_id) ) != NULL )
+				{
+					ARR_FIND(0, g->max_member, i, g->member[i].account_id == ssd->status.account_id && g->member[i].char_id == ssd->status.char_id);
+					if( i < g->max_member ) ps = g->member[i].position;
+				}
+			}
+
+			if( !battle_config.display_party_name && g == NULL )
+			{// do not display party unless the player is also in a guild
+				p = NULL;
 			}
 
 			if (p == NULL && g == NULL)
@@ -7766,7 +7769,7 @@ int clif_charnameupdate (struct map_session_data *ssd)
 
 	nullpo_ret(ssd);
 
-	if (strlen(ssd->fakename)>1)
+	if( ssd->fakename[0] )
 		return 0; //No need to update as the party/guild was not displayed anyway.
 
 	WBUFW(buf,0) = cmd;
@@ -9606,11 +9609,14 @@ void clif_parse_ChatRoomStatusChange(int fd, struct map_session_data* sd)
 }
 
 /*==========================================
- * S 00e0 ?.l <nick>.24B
+ * CZ_REQ_ROLE_CHANGE
+ * S 00e0 <role>.L <nick>.24B
+ * role:
+ *  0 = owner (ROOMROLE_OWNER)
+ *  1 = normal (ROOMROLE_GENERAL)
  *------------------------------------------*/
 void clif_parse_ChangeChatOwner(int fd, struct map_session_data* sd)
 {
-	//TODO: the first argument seems to be the destination position (always 0) [ultramage]
 	chat_changechatowner(sd,(char*)RFIFOP(fd,6));
 }
 
@@ -10265,6 +10271,7 @@ void clif_parse_ItemIdentify(int fd,struct map_session_data *sd)
 		return;
 	if( idx == -1 )
 	{// cancel pressed
+		sd->menuskill_val = sd->menuskill_id = 0;
 		return;
 	}
 	skill_identify(sd,idx-2);
@@ -10418,7 +10425,7 @@ void clif_parse_MoveFromKafra(int fd,struct map_session_data *sd)
  *------------------------------------------*/
 void clif_parse_MoveToKafraFromCart(int fd, struct map_session_data *sd)
 {
-	if(sd->vender_id)	
+	if( sd->state.vending )
 		return;
 	if (!pc_iscarton(sd))
 		return;
@@ -10435,7 +10442,7 @@ void clif_parse_MoveToKafraFromCart(int fd, struct map_session_data *sd)
  *------------------------------------------*/
 void clif_parse_MoveFromKafraToCart(int fd, struct map_session_data *sd)
 {
-	if (sd->vender_id)
+	if( sd->state.vending )
 		return;
 	if (!pc_iscarton(sd))
 		return;
@@ -12846,24 +12853,29 @@ void clif_parse_Mail_send(int fd, struct map_session_data *sd)
  * AUCTION SYSTEM
  * By Zephyrus
  *==========================================*/
+
+
+/// Opens/closes the auction window (ZC_AUCTION_WINDOWS)
+/// 025f <type>.L
+/// type:
+///     0 = open
+///     1 = close
 void clif_Auction_openwindow(struct map_session_data *sd)
 {
 	int fd = sd->fd;
 
-	if( sd->state.storage_flag || sd->vender_id || sd->state.buyingstore || sd->state.trading )
+	if( sd->state.storage_flag || sd->state.vending || sd->state.buyingstore || sd->state.trading )
 		return;
 
-	WFIFOHEAD(fd,12);
+	WFIFOHEAD(fd,packet_len(0x25f));
 	WFIFOW(fd,0) = 0x25f;
 	WFIFOL(fd,2) = 0;
-	WFIFOB(fd,6) = 0xb6;
-	WFIFOB(fd,7) = 0x00;
-	WFIFOB(fd,8) = 0xa6;
-	WFIFOB(fd,9) = 0xde;
-	WFIFOW(fd,10) = 0;
-	WFIFOSET(fd,12);
+	WFIFOSET(fd,packet_len(0x25f));
 }
 
+
+/// Returns auction item search results (ZC_AUCTION_ITEM_REQ_SEARCH)
+/// 0252 <packet len>.W <pages>.L <count>.L { <auction id>.L <seller name>.24B <name id>.W <type>.L <amount>.W <identified>.B <damaged>.B <refine>.B <card1>.W <card2>.W <card3>.W <card4>.W <now price>.L <max price>.L <buyer name>.24B <delete time>.L }*
 void clif_Auction_results(struct map_session_data *sd, short count, short pages, uint8 *buf)
 {
 	int i, fd = sd->fd, len = sizeof(struct auction_data);
@@ -12871,7 +12883,7 @@ void clif_Auction_results(struct map_session_data *sd, short count, short pages,
 	struct item_data *item;
 	int k;
 
-	WFIFOHEAD(fd,20);
+	WFIFOHEAD(fd,12 + (count * 83));
 	WFIFOW(fd,0) = 0x252;
 	WFIFOW(fd,2) = 12 + (count * 83);
 	WFIFOL(fd,4) = pages;
@@ -12890,9 +12902,8 @@ void clif_Auction_results(struct map_session_data *sd, short count, short pages,
 		else
 			WFIFOW(fd,28+k) = auction.item.nameid;
 
-		WFIFOW(fd,30+k) = auction.type;
-		WFIFOW(fd,32+k) = 0; // ??
-		WFIFOW(fd,34+k) = auction.item.amount; // Allways 1
+		WFIFOL(fd,30+k) = auction.type;
+		WFIFOW(fd,34+k) = auction.item.amount; // Always 1
 		WFIFOB(fd,36+k) = auction.item.identify;
 		WFIFOB(fd,37+k) = auction.item.attribute;
 		WFIFOB(fd,38+k) = auction.item.refine;
@@ -12905,7 +12916,7 @@ void clif_Auction_results(struct map_session_data *sd, short count, short pages,
 		safestrncpy((char*)WFIFOP(fd,55+k), auction.buyer_name, NAME_LENGTH);
 		WFIFOL(fd,79+k) = (uint32)auction.timestamp;
 	}
-	WFIFOSET(fd, 12 + (count * 83));
+	WFIFOSET(fd,WFIFOW(fd,2));
 }
 
 static void clif_Auction_setitem(int fd, int index, bool fail)
@@ -12928,7 +12939,7 @@ void clif_parse_Auction_cancelreg(int fd, struct map_session_data *sd)
 void clif_parse_Auction_setitem(int fd, struct map_session_data *sd)
 {
 	int idx = RFIFOW(fd,2) - 2;
-	int amount = RFIFOL(fd,4); // Allways 1
+	int amount = RFIFOL(fd,4); // Always 1
 	struct item_data *item;
 
 	if( sd->auction.amount > 0 )
@@ -12963,34 +12974,40 @@ void clif_parse_Auction_setitem(int fd, struct map_session_data *sd)
 	clif_Auction_setitem(fd, idx + 2, false);
 }
 
-// 0 = You have failed to bid into the auction
-// 1 = You have successfully bid in the auction
-// 2 = The auction has been canceled
-// 3 = An auction with at least one bidder cannot be canceled
-// 4 = You cannot register more than 5 items in an auction at a time
-// 5 = You do not have enough Zeny to pay the Auction Fee
-// 6 = You have won the auction
-// 7 = You have failed to win the auction
-// 8 = You do not have enough Zeny
-// 9 = You cannot place more than 5 bids at a time
-
+/// Result from an auction action (ZC_AUCTION_RESULT)
+/// 0250 <result>.B
+/// result:
+///     0 = You have failed to bid into the auction
+///     1 = You have successfully bid in the auction
+///     2 = The auction has been canceled
+///     3 = An auction with at least one bidder cannot be canceled
+///     4 = You cannot register more than 5 items in an auction at a time
+///     5 = You do not have enough Zeny to pay the Auction Fee
+///     6 = You have won the auction
+///     7 = You have failed to win the auction
+///     8 = You do not have enough Zeny
+///     9 = You cannot place more than 5 bids at a time
 void clif_Auction_message(int fd, unsigned char flag)
 {
-	WFIFOHEAD(fd,3);
+	WFIFOHEAD(fd,packet_len(0x250));
 	WFIFOW(fd,0) = 0x250;
 	WFIFOB(fd,2) = flag;
-	WFIFOSET(fd,3);
+	WFIFOSET(fd,packet_len(0x250));
 }
 
-// 0 = You have ended the auction
-// 1 = You cannot end the auction
-// 2 = Bid number is incorrect
+
+/// Result of the auction close request (ZC_AUCTION_ACK_MY_SELL_STOP)
+/// 025e <result>.W
+/// result:
+///     0 = You have ended the auction
+///     1 = You cannot end the auction
+///     2 = Bid number is incorrect
 void clif_Auction_close(int fd, unsigned char flag)
 {
-	WFIFOHEAD(fd,6);
-	WFIFOW(fd,0) = 0x25d;
-	WFIFOL(fd,2) = flag;
-	WFIFOSET(fd,6);
+	WFIFOHEAD(fd,packet_len(0x25e));
+	WFIFOW(fd,0) = 0x25d;  // BUG: The client identifies this packet as 0x25d (CZ_AUCTION_REQ_MY_SELL_STOP)
+	WFIFOW(fd,2) = flag;
+	WFIFOSET(fd,packet_len(0x25e));
 }
 
 void clif_parse_Auction_register(int fd, struct map_session_data *sd)
@@ -13749,7 +13766,10 @@ int clif_bg_xy_remove(struct map_session_data *sd)
 	return 0;
 }
 
-int clif_bg_message(struct battleground_data *bg, const char *name, const char *mes, int len)
+
+/// Notifies clients of a battleground message (ZC_BATTLEFIELD_CHAT)
+/// 02dc <packet len>.W <account id>.L <name>.24B <message>.?B
+int clif_bg_message(struct battleground_data *bg, int src_id, const char *name, const char *mes, int len)
 {
 	struct map_session_data *sd;
 	unsigned char *buf;
@@ -13760,7 +13780,7 @@ int clif_bg_message(struct battleground_data *bg, const char *name, const char *
 
 	WBUFW(buf,0) = 0x2dc;
 	WBUFW(buf,2) = len + NAME_LENGTH + 8;
-	WBUFL(buf,4) = sd->state.bg_id;
+	WBUFL(buf,4) = src_id;
 	memcpy(WBUFP(buf,8), name, NAME_LENGTH);
 	memcpy(WBUFP(buf,32), mes, len);
 	clif_send(buf,WBUFW(buf,2), &sd->bl, BG);
@@ -13974,6 +13994,7 @@ void clif_party_show_picker(struct map_session_data * sd, struct item * item_dat
 {
 #if PACKETVER >= 20071002
 	unsigned char buf[22];
+	struct item_data* id = itemdb_search(item_data->nameid);
 
 	WBUFW(buf,0)=0x2b8;
 	WBUFL(buf,2) = sd->status.account_id;
@@ -13981,12 +14002,9 @@ void clif_party_show_picker(struct map_session_data * sd, struct item * item_dat
 	WBUFB(buf,8) = item_data->identify;
 	WBUFB(buf,9) = item_data->attribute;
 	WBUFB(buf,10) = item_data->refine;
-	WBUFW(buf,11) = item_data->card[0];
-	WBUFW(buf,13) = item_data->card[1];
-	WBUFW(buf,15) = item_data->card[2];
-	WBUFW(buf,17) = item_data->card[3];
-	//WBUFW(buf,19) = 0; // equip location? 32+2 for left/right hand, 0x8000 for 'throw' (verify this)
-	//WBUFB(buf,21) = 0; // item type
+	clif_addcards(WBUFP(buf,11), item_data);
+	WBUFW(buf,19) = id->equip; // equip location
+	WBUFB(buf,21) = itemtype(id->type); // item type
 	clif_send(buf, packet_len(0x2b8), &sd->bl, PARTY_SAMEMAP_WOS);
 #endif
 }
@@ -14033,6 +14051,26 @@ void clif_showdigit(struct map_session_data* sd, unsigned char type, int value)
 }
 
 
+/// Notification of the state of client command /effect (CZ_LESSEFFECT)
+/// 021d <state>.L
+/// state:
+///     0 = Full effects
+///     1 = Reduced effects
+///
+/// @note   The state is used on Aegis for sending skill unit packet
+///         0x11f (ZC_SKILL_ENTRY) instead of 0x1c9 (ZC_SKILL_ENTRY2)
+///         whenever possible. Due to the way the decision check is
+///         constructed, this state tracking was rendered useless,
+///         as the only skill unit, that is sent with 0x1c9 is
+///         Graffiti.
+void clif_parse_LessEffect(int fd, struct map_session_data* sd)
+{
+	int isLess = RFIFOL(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0]);
+
+	sd->state.lesseffect = ( isLess != 0 );
+}
+
+
 /// Buying Store System
 ///
 
@@ -14813,7 +14851,7 @@ static int packetdb_readdb(void)
 	   12, 26,  9, 11, -1, -1, 10,  2,282, 11,  4, 36, -1, -1,  4,  2,
 	//#0x0240
 	   -1, -1, -1, -1, -1,  3,  4,  8, -1,  3, 70,  4,  8, 12,  4, 10,
-	    3, 32, -1,  3,  3,  5,  5,  8,  2,  3, -1,  6,  4, -1,  4,  0,
+	    3, 32, -1,  3,  3,  5,  5,  8,  2,  3, -1,  6,  4,  6,  4,  6,
 	    6,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
 	    0,  0,  0,  0,  8,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
 	//#0x0280
@@ -15129,6 +15167,7 @@ static int packetdb_readdb(void)
 		{clif_parse_PartyBookingDeleteReq,"bookingdelreq"},
 #endif
 		{clif_parse_PVPInfo,"pvpinfo"},
+		{clif_parse_LessEffect,"lesseffect"},
 		// Buying Store
 		{clif_parse_ReqOpenBuyingStore,"reqopenbuyingstore"},
 		{clif_parse_ReqCloseBuyingStore,"reqclosebuyingstore"},

+ 1 - 1
src/map/clif.h

@@ -451,7 +451,7 @@ int clif_guild_xy_remove(struct map_session_data *sd);
 int clif_bg_hp(struct map_session_data *sd);
 int clif_bg_xy(struct map_session_data *sd);
 int clif_bg_xy_remove(struct map_session_data *sd);
-int clif_bg_message(struct battleground_data *bg, const char *name, const char *mes, int len);
+int clif_bg_message(struct battleground_data *bg, int src_id, const char *name, const char *mes, int len);
 int clif_bg_updatescore(int m);
 int clif_bg_updatescore_single(struct map_session_data *sd);
 int clif_sendbgemblem_area(struct map_session_data *sd);

+ 3 - 1
src/map/guild.c

@@ -357,7 +357,9 @@ int guild_create(struct map_session_data *sd, const char *name)
 	nullpo_ret(sd);
 
 	safestrncpy(tname, name, NAME_LENGTH);
-	if( strlen(trim(tname)) == 0 )
+	trim(tname);
+
+	if( !tname[0] )
 		return 0; // empty name
 
 	if( sd->status.guild_id )

+ 1 - 1
src/map/mail.c

@@ -162,7 +162,7 @@ int mail_openmail(struct map_session_data *sd)
 {
 	nullpo_ret(sd);
 
-	if( sd->state.storage_flag || sd->vender_id || sd->state.buyingstore || sd->state.trading )
+	if( sd->state.storage_flag || sd->state.vending || sd->state.buyingstore || sd->state.trading )
 		return 0;
 
 	clif_Mail_window(sd->fd, 0);

+ 0 - 3
src/map/map.c

@@ -89,7 +89,6 @@ char *LOG_CONF_NAME;
 char *MAP_CONF_NAME;
 char *BATTLE_CONF_FILENAME;
 char *ATCOMMAND_CONF_FILENAME;
-char *CHARCOMMAND_CONF_FILENAME;
 char *SCRIPT_CONF_NAME;
 char *MSG_CONF_NAME;
 char *GRF_PATH_FILENAME;
@@ -3515,7 +3514,6 @@ void map_helpscreen(int flag)
 	puts("  --map-config <file>		Load map-server configuration from <file>");
 	puts("  --battle-config <file>	Load battle configuration from <file>");
 	puts("  --atcommand-config <file>	Load atcommand configuration from <file>");
-	puts("  --charcommand-config <file>	Load charcommand configuration from <file>");
 	puts("  --script-config <file>	Load script configuration from <file>");
 	puts("  --msg-config <file>		Load message configuration from <file>");
 	puts("  --grf-path-file <file>	Load grf path file configuration from <file>");
@@ -3564,7 +3562,6 @@ int do_init(int argc, char *argv[])
 	MAP_CONF_NAME = "conf/map_athena.conf";
 	BATTLE_CONF_FILENAME = "conf/battle_athena.conf";
 	ATCOMMAND_CONF_FILENAME = "conf/atcommand_athena.conf";
-	CHARCOMMAND_CONF_FILENAME = "conf/charcommand_athena.conf";
 	SCRIPT_CONF_NAME = "conf/script_athena.conf";
 	MSG_CONF_NAME = "conf/msg_athena.conf";
 	GRF_PATH_FILENAME = "conf/grf-files.txt";

+ 2 - 2
src/map/mob.c

@@ -2586,7 +2586,7 @@ int mob_class_change (struct mob_data *md, int class_)
 	mob_stop_walking(md, 0);
 	unit_skillcastcancel(&md->bl, 0);
 	status_set_viewdata(&md->bl, class_);
-	clif_mob_class_change(md,class_);
+	clif_mob_class_change(md,md->vd->class_);
 	status_calc_mob(md, 1);
 	md->ud.state.speed_changed = 1; //Speed change update.
 
@@ -4167,7 +4167,7 @@ static bool mob_parse_row_mobskilldb(char** str, int columns, int current)
 		ms->val[1] = 0; //Do not "set" it.
 	}
 
-	if(str[17] != NULL && strlen(str[17])>2)
+	if(*str[17])
 		ms->emotion=atoi(str[17]);
 	else
 		ms->emotion=-1;

+ 8 - 4
src/map/npc.c

@@ -160,9 +160,13 @@ int npc_enable_sub(struct block_list *bl, va_list ap)
 
 int npc_enable(const char* name, int flag)
 {
-	struct npc_data* nd = (struct npc_data*)strdb_get(npcname_db, name);
+	struct npc_data* nd = npc_name2id(name);
+
 	if (nd==NULL)
+	{
+		ShowError("npc_enable: Attempted to %s a non-existing NPC '%s' (flag=%d).\n", (flag&3) ? "show" : "hide", name, flag);
 		return 0;
+	}
 
 	if (flag&1)
 		nd->sc.option&=~OPTION_INVISIBLE;
@@ -813,7 +817,7 @@ int npc_touchnext_areanpc(struct map_session_data* sd, bool leavemap)
 
 		nd->touching_id = sd->touching_id = 0;
 		snprintf(name, ARRAYLENGTH(name), "%s::%s", nd->exname, script_config.ontouch_name);
-		map_forcountinarea(npc_touch_areanpc_sub,nd->bl.m,nd->bl.m - xs,nd->bl.y - ys,nd->bl.x + xs,nd->bl.y + ys,1,BL_PC,sd->bl.id,nd->bl.id,name);
+		map_forcountinarea(npc_touch_areanpc_sub,nd->bl.m,nd->bl.x - xs,nd->bl.y - ys,nd->bl.x + xs,nd->bl.y + ys,1,BL_PC,sd->bl.id,nd->bl.id,name);
 	}
 	return 0;
 }
@@ -902,7 +906,7 @@ int npc_touch_areanpc2(struct mob_data *md)
 		switch( map[m].npc[i]->subtype )
 		{
 			case WARP:
-				if( !battle_config.mob_warp&1 )
+				if( !( battle_config.mob_warp&1 ) )
 					continue;
 				xs = map[m].npc[i]->u.warp.xs;
 				ys = map[m].npc[i]->u.warp.ys;
@@ -1034,7 +1038,7 @@ struct npc_data* npc_checknear(struct map_session_data* sd, struct block_list* b
  *------------------------------------------*/
 int npc_globalmessage(const char* name, const char* mes)
 {
-	struct npc_data* nd = (struct npc_data *) strdb_get(npcname_db, name);
+	struct npc_data* nd = npc_name2id(name);
 	char temp[100];
 
 	if (!nd)

+ 3 - 1
src/map/party.c

@@ -128,7 +128,9 @@ int party_create(struct map_session_data *sd,char *name,int item,int item2)
 	char tname[NAME_LENGTH];
 
 	safestrncpy(tname, name, NAME_LENGTH);
-	if( strlen(trim(tname)) == 0 )
+	trim(tname);
+
+	if( !tname[0] )
 	{// empty name
 		return 0;
 	}

+ 42 - 18
src/map/pc.c

@@ -3251,7 +3251,10 @@ int pc_payzeny(struct map_session_data *sd,int zeny)
 	nullpo_ret(sd);
 
 	if( zeny < 0 )
-	  	return pc_getzeny(sd, -zeny);
+	{
+		ShowError("pc_payzeny: Paying negative Zeny (zeny=%d, account_id=%d, char_id=%d).\n", zeny, sd->status.account_id, sd->status.char_id);
+		return 1;
+	}
 
 	if( sd->status.zeny < zeny )
 		return 1; //Not enough.
@@ -3307,7 +3310,10 @@ int pc_getzeny(struct map_session_data *sd,int zeny)
 	nullpo_ret(sd);
 
 	if( zeny < 0 )
-		return pc_payzeny(sd, -zeny);
+	{
+		ShowError("pc_getzeny: Obtaining negative Zeny (zeny=%d, account_id=%d, char_id=%d).\n", zeny, sd->status.account_id, sd->status.char_id);
+		return 1;
+	}
 
 	if( zeny > MAX_ZENY - sd->status.zeny )
 		zeny = MAX_ZENY - sd->status.zeny;
@@ -3447,7 +3453,7 @@ int pc_dropitem(struct map_session_data *sd,int n,int amount)
 	if(sd->status.inventory[n].nameid <= 0 ||
 		sd->status.inventory[n].amount <= 0 ||
 		sd->status.inventory[n].amount < amount ||
-		sd->state.trading || sd->vender_id != 0 ||
+		sd->state.trading || sd->state.vending ||
 		!sd->inventory_data[n] //pc_delitem would fail on this case.
 		)
 		return 0;
@@ -3887,7 +3893,7 @@ int pc_putitemtocart(struct map_session_data *sd,int idx,int amount)
 	
 	item_data = &sd->status.inventory[idx];
 
-	if( item_data->nameid == 0 || amount < 1 || item_data->amount < amount || sd->vender_id )
+	if( item_data->nameid == 0 || amount < 1 || item_data->amount < amount || sd->state.vending )
 		return 1;
 
 	if( pc_cart_additem(sd,item_data,amount) == 0 )
@@ -3927,7 +3933,7 @@ int pc_getitemfromcart(struct map_session_data *sd,int idx,int amount)
 	
 	item_data=&sd->status.cart[idx];
 
-	if(item_data->nameid==0 || amount < 1 || item_data->amount<amount || sd->vender_id )
+	if(item_data->nameid==0 || amount < 1 || item_data->amount<amount || sd->state.vending )
 		return 1;
 	if((flag = pc_additem(sd,item_data,amount)) == 0)
 		return pc_cart_delitem(sd,idx,amount,0);
@@ -6220,7 +6226,7 @@ int pc_readparam(struct map_session_data* sd,int type)
  *------------------------------------------*/
 int pc_setparam(struct map_session_data *sd,int type,int val)
 {
-	int i = 0;
+	int i = 0, statlimit;
 
 	nullpo_ret(sd);
 
@@ -6283,7 +6289,7 @@ int pc_setparam(struct map_session_data *sd,int type,int val)
 		}
 		break;
 	case SP_SEX:
-		sd->status.sex = val;
+		sd->status.sex = val ? SEX_MALE : SEX_FEMALE;
 		break;
 	case SP_WEIGHT:
 		sd->weight = val;
@@ -6292,34 +6298,52 @@ int pc_setparam(struct map_session_data *sd,int type,int val)
 		sd->max_weight = val;
 		break;
 	case SP_HP:
-		sd->battle_status.hp = val;
+		sd->battle_status.hp = cap_value(val, 1, (int)sd->battle_status.max_hp);
 		break;
 	case SP_MAXHP:
-		sd->battle_status.max_hp = val;
+		sd->battle_status.max_hp = cap_value(val, 1, battle_config.max_hp);
+
+		if( sd->battle_status.max_hp < sd->battle_status.hp )
+		{
+			sd->battle_status.hp = sd->battle_status.max_hp;
+			clif_updatestatus(sd, SP_HP);
+		}
 		break;
 	case SP_SP:
-		sd->battle_status.sp = val;
+		sd->battle_status.sp = cap_value(val, 0, (int)sd->battle_status.max_sp);
 		break;
 	case SP_MAXSP:
-		sd->battle_status.max_sp = val;
+		sd->battle_status.max_sp = cap_value(val, 1, battle_config.max_sp);
+
+		if( sd->battle_status.max_sp < sd->battle_status.sp )
+		{
+			sd->battle_status.sp = sd->battle_status.max_sp;
+			clif_updatestatus(sd, SP_SP);
+		}
 		break;
 	case SP_STR:
-		sd->status.str = val;
+		statlimit = pc_maxparameter(sd);
+		sd->status.str = cap_value(val, 1, statlimit);
 		break;
 	case SP_AGI:
-		sd->status.agi = val;
+		statlimit = pc_maxparameter(sd);
+		sd->status.agi = cap_value(val, 1, statlimit);
 		break;
 	case SP_VIT:
-		sd->status.vit = val;
+		statlimit = pc_maxparameter(sd);
+		sd->status.vit = cap_value(val, 1, statlimit);
 		break;
 	case SP_INT:
-		sd->status.int_ = val;
+		statlimit = pc_maxparameter(sd);
+		sd->status.int_ = cap_value(val, 1, statlimit);
 		break;
 	case SP_DEX:
-		sd->status.dex = val;
+		statlimit = pc_maxparameter(sd);
+		sd->status.dex = cap_value(val, 1, statlimit);
 		break;
 	case SP_LUK:
-		sd->status.luk = val;
+		statlimit = pc_maxparameter(sd);
+		sd->status.luk = cap_value(val, 1, statlimit);
 		break;
 	case SP_KARMA:
 		sd->status.karma = val;
@@ -7538,7 +7562,7 @@ int pc_checkitem(struct map_session_data *sd)
 
 	nullpo_ret(sd);
 
-	if( sd->vender_id ) //Avoid reorganizing items when we are vending, as that leads to exploits (pointed out by End of Exam)
+	if( sd->state.vending ) //Avoid reorganizing items when we are vending, as that leads to exploits (pointed out by End of Exam)
 		return 0;
 
 	if( battle_config.item_check )

+ 5 - 3
src/map/pc.h

@@ -130,6 +130,8 @@ struct map_session_data {
 		unsigned ignoreAll : 1;
 		unsigned debug_remove_map : 1; // temporary state to track double remove_map's [FlavioJS]
 		unsigned buyingstore : 1;
+		unsigned lesseffect : 1;
+		unsigned vending : 1;
 		unsigned short autoloot;
 		unsigned short autolootid; // [Zephyrus]
 		unsigned noks : 3; // [Zeph Kill Steal Protection]
@@ -522,9 +524,9 @@ extern int duel_count;
 #define pc_setsit(sd)         ( (sd)->state.dead_sit = (sd)->vd.dead_sit = 2 )
 #define pc_isdead(sd)         ( (sd)->state.dead_sit == 1 )
 #define pc_issit(sd)          ( (sd)->vd.dead_sit == 2 )
-#define pc_isidle(sd)         ( (sd)->chatID || (sd)->vender_id || (sd)->state.buyingstore || DIFF_TICK(last_tick, (sd)->idletime) >= battle_config.idle_no_share )
-#define pc_istrading(sd)      ( (sd)->npc_id || (sd)->vender_id || (sd)->state.buyingstore || (sd)->state.trading )
-#define pc_cant_act(sd)       ( (sd)->npc_id || (sd)->vender_id || (sd)->state.buyingstore || (sd)->chatID || (sd)->sc.opt1 || (sd)->state.trading || (sd)->state.storage_flag )
+#define pc_isidle(sd)         ( (sd)->chatID || (sd)->state.vending || (sd)->state.buyingstore || DIFF_TICK(last_tick, (sd)->idletime) >= battle_config.idle_no_share )
+#define pc_istrading(sd)      ( (sd)->npc_id || (sd)->state.vending || (sd)->state.buyingstore || (sd)->state.trading )
+#define pc_cant_act(sd)       ( (sd)->npc_id || (sd)->state.vending || (sd)->state.buyingstore || (sd)->chatID || (sd)->sc.opt1 || (sd)->state.trading || (sd)->state.storage_flag )
 #define pc_setdir(sd,b,h)     ( (sd)->ud.dir = (b) ,(sd)->head_dir = (h) )
 #define pc_setchatid(sd,n)    ( (sd)->chatID = n )
 #define pc_ishiding(sd)       ( (sd)->sc.option&(OPTION_HIDE|OPTION_CLOAK|OPTION_CHASEWALK) )

+ 4 - 3
src/map/pet.c

@@ -1220,7 +1220,7 @@ int read_petdb()
 	for( i = 0; i < ARRAYLENGTH(filename); i++ )
 	{
 		char line[1024];
-		int lines;
+		int lines, entries;
 
 		sprintf(line, "%s/%s", db_path, filename[i]);
 		fp=fopen(line,"r");
@@ -1231,7 +1231,7 @@ int read_petdb()
 			continue;
 		}
 
-		lines = 0;
+		lines = entries = 0;
 		while( fgets(line, sizeof(line), fp) && j < MAX_PET_DB )
 		{			
 			char *str[22], *p;
@@ -1326,12 +1326,13 @@ int read_petdb()
 				pet_db[j].equip_script = parse_script(str[21], filename[i], lines, 0);
 
 			j++;
+			entries++;
 		}
 
 		if( j >= MAX_PET_DB )
 			ShowWarning("read_petdb: Reached max number of pets [%d]. Remaining pets were not read.\n ", MAX_PET_DB);
 		fclose(fp);
-		ShowStatus("Done reading '"CL_WHITE"%d"CL_RESET"' pets in '"CL_WHITE"%s"CL_RESET"'.\n",j,filename[i]);
+		ShowStatus("Done reading '"CL_WHITE"%d"CL_RESET"' pets in '"CL_WHITE"%s"CL_RESET"'.\n", entries, filename[i]);
 	}
 	return 0;
 }

+ 37 - 48
src/map/script.c

@@ -9268,46 +9268,22 @@ BUILDIN_FUNC(globalmes)
 
 /// Creates a waiting room (chat room) for this npc.
 ///
-/// waitingroom "<title>",<limit>,<trigger>,"<event>";
-/// waitingroom "<title>",<limit>,"<event>",<trigger>;
-/// waitingroom "<title>",<limit>,"<event>";
-/// waitingroom "<title>",<limit>;
+/// waitingroom "<title>",<limit>{,"<event>"{,<trigger>{,<zeny>{,<minlvl>{,<maxlvl>}}}}};
 BUILDIN_FUNC(waitingroom)
 {
-	struct npc_data* nd;
-	const char* title;
-	const char* ev = "";
-	int limit;
-	int trigger = 0;
+	struct npc_data* nd;	
 	int pub = 1;
-
-	title = script_getstr(st, 2);
-	limit = script_getnum(st, 3);
-
-	if( script_hasdata(st,5) )
-	{
-		struct script_data* last = script_getdata(st, 5);
-		get_val(st, last);
-		if( data_isstring(last) )
-		{// ,<trigger>,"<event>"
-			trigger = script_getnum(st, 4);
-			ev = script_getstr(st, 5);
-		}
-		else
-		{// ,"<event>",<trigger>
-			ev = script_getstr(st, 4);
-			trigger = script_getnum(st,5);
-		}
-	}
-	else if( script_hasdata(st,4) )
-	{// ,"<event>"
-		ev = script_getstr(st, 4);
-		trigger = limit;
-	}
+	const char* title = script_getstr(st, 2);
+	int limit = script_getnum(st, 3);
+	const char* ev = script_hasdata(st,4) ? script_getstr(st,4) : "";
+	int trigger =  script_hasdata(st,5) ? script_getnum(st,5) : limit;
+	int zeny =  script_hasdata(st,6) ? script_getnum(st,6) : 0;
+	int minLvl =  script_hasdata(st,7) ? script_getnum(st,7) : 1;
+	int maxLvl =  script_hasdata(st,8) ? script_getnum(st,8) : MAX_LEVEL;
 
 	nd = (struct npc_data *)map_id2bl(st->oid);
 	if( nd != NULL )
-		chat_createnpcchat(nd, title, limit, pub, trigger, ev);
+		chat_createnpcchat(nd, title, limit, pub, trigger, ev, zeny, minLvl, maxLvl);
 
 	return 0;
 }
@@ -9471,11 +9447,19 @@ BUILDIN_FUNC(warpwaitingpc)
 	for( i = 0; i < n && cd->users > 0; i++ )
 	{
 		sd = cd->usersd[0];
-		if( sd == NULL )
-		{
-			ShowDebug("script:warpwaitingpc: no user in chat room position 0 (cd->users=%d,%d/%d)\n", cd->users, i, n);
-			mapreg_setreg(reference_uid(add_str("$@warpwaitingpc"), i), 0);
-			continue;// Broken npc chat room?
+
+		if( strcmp(map_name,"SavePoint") == 0 && map[sd->bl.m].flag.noteleport )
+		{// can't teleport on this map
+			break;
+		}
+
+		if( cd->zeny )
+		{// fee set
+			if( (uint32)sd->status.zeny < cd->zeny )
+			{// no zeny to cover set fee
+				break;
+			}
+			pc_payzeny(sd, cd->zeny);
 		}
 
 		mapreg_setreg(reference_uid(add_str("$@warpwaitingpc"), i), sd->bl.id);
@@ -9483,12 +9467,7 @@ BUILDIN_FUNC(warpwaitingpc)
 		if( strcmp(map_name,"Random") == 0 )
 			pc_randomwarp(sd,CLR_TELEPORT);
 		else if( strcmp(map_name,"SavePoint") == 0 )
-		{
-			if( map[sd->bl.m].flag.noteleport )
-				return 0;// can't teleport on this map
-
 			pc_setpos(sd, sd->status.save_point.map, sd->status.save_point.x, sd->status.save_point.y, CLR_TELEPORT);
-		}
 		else
 			pc_setpos(sd, mapindex_name2id(map_name), x, y, CLR_OUTSIGHT);
 	}
@@ -11459,7 +11438,15 @@ BUILDIN_FUNC(specialeffect)
 			clif_specialeffect(&nd->bl, type, target);
 	}
 	else
-		clif_specialeffect(bl, type, target);
+	{
+		if (target == SELF) {
+			TBL_PC *sd=script_rid2sd(st);
+			if (sd)
+				clif_specialeffect_single(bl,type,sd->fd);
+		} else {
+			clif_specialeffect(bl, type, target);
+		}
+	}
 
 	return 0;
 }
@@ -11792,6 +11779,8 @@ BUILDIN_FUNC(movenpc)
 	if ((nd = npc_name2id(npc)) == NULL)
 		return -1;
 
+	if (script_hasdata(st,5))
+		nd->ud.dir = script_getnum(st,5);
 	npc_movenpc(nd, x, y);
 	return 0;
 }
@@ -13111,7 +13100,7 @@ BUILDIN_FUNC(checkvending) // check vending [Nab4]
 		sd = script_rid2sd(st);
 
 	if(sd)
-		script_pushint(st,(sd->vender_id != 0));
+		script_pushint(st,sd->state.vending);
 	else
 		script_pushint(st,0);
 
@@ -15029,7 +15018,7 @@ struct script_function buildin_func[] = {
 	BUILDIN_DEF(skillpointcount,""),
 	BUILDIN_DEF(changebase,"i?"),
 	BUILDIN_DEF(changesex,""),
-	BUILDIN_DEF(waitingroom,"si??"),
+	BUILDIN_DEF(waitingroom,"si?????"),
 	BUILDIN_DEF(delwaitingroom,"?"),
 	BUILDIN_DEF2(waitingroomkickall,"kickwaitingroomall","?"),
 	BUILDIN_DEF(enablewaitingroomevent,"?"),
@@ -15102,7 +15091,7 @@ struct script_function buildin_func[] = {
 	BUILDIN_DEF(mapwarp,"ssii??"),		// Added by RoVeRT
 	BUILDIN_DEF(atcommand,"s"), // [MouseJstr]
 	BUILDIN_DEF(charcommand,"s"), // [MouseJstr]
-	BUILDIN_DEF(movenpc,"sii"), // [MouseJstr]
+	BUILDIN_DEF(movenpc,"sii?"), // [MouseJstr]
 	BUILDIN_DEF(message,"ss"), // [MouseJstr]
 	BUILDIN_DEF(npctalk,"s"), // [Valaris]
 	BUILDIN_DEF(mobcount,"ss"),

+ 1 - 1
src/map/searchstore.c

@@ -71,7 +71,7 @@ static bool searchstore_hasstore(struct map_session_data* sd, unsigned char type
 {
 	switch( type )
 	{
-		case SEARCHTYPE_VENDING:      return (bool)( sd->vender_id != 0 );
+		case SEARCHTYPE_VENDING:      return sd->state.vending;
 		case SEARCHTYPE_BUYING_STORE: return sd->state.buyingstore;
 	}
 	return false;

+ 1 - 0
src/map/skill.c

@@ -398,6 +398,7 @@ int skillnotok (int skillid, struct map_session_data *sd)
 			break;
 		case MC_VENDING:
 		case MC_IDENTIFY:
+		case ALL_BUYING_STORE:
 			return 0; // always allowed
 		case WZ_ICEWALL:
 			// noicewall flag [Valaris]

+ 3 - 0
src/map/status.c

@@ -7439,6 +7439,9 @@ int status_change_clear_buffs (struct block_list* bl, int type)
 			case SC_FOOD_DEX_CASH:
 			case SC_FOOD_INT_CASH:
 			case SC_FOOD_LUK_CASH:
+			case SC_EXPBOOST:
+			case SC_JEXPBOOST:
+			case SC_ITEMBOOST:
 				continue;
 				
 			//Debuffs that can be removed.

+ 2 - 2
src/map/trade.c

@@ -138,8 +138,8 @@ void trade_tradeack(struct map_session_data *sd, int type)
 	}
 
 	//Check if you can start trade.
-	if (sd->npc_id || sd->vender_id || sd->state.buyingstore || sd->state.storage_flag ||
-		tsd->npc_id || tsd->vender_id || tsd->state.buyingstore || tsd->state.storage_flag)
+	if (sd->npc_id || sd->state.vending || sd->state.buyingstore || sd->state.storage_flag ||
+		tsd->npc_id || tsd->state.vending || tsd->state.buyingstore || tsd->state.storage_flag)
 	{	//Fail
 		clif_tradestart(sd, 2);
 		clif_tradestart(tsd, 2);

+ 2 - 3
src/map/unit.c

@@ -802,7 +802,7 @@ int unit_can_move(struct block_list *bl)
 	
 	if (sd && (
 		pc_issit(sd) ||
-		sd->vender_id ||
+		sd->state.vending ||
 		sd->state.buyingstore ||
 		sd->state.blockedmove
 	))
@@ -1871,8 +1871,7 @@ int unit_remove_map_(struct block_list *bl, clr_type clrtype, const char* file,
 			chat_leavechat(sd,0);
 		if(sd->trade_partner)
 			trade_tradecancel(sd);
-		if(sd->vender_id)
-			vending_closevending(sd);
+		vending_closevending(sd);
 		buyingstore_close(sd);
 		searchstore_close(sd);
 		if(sd->state.storage_flag == 1)

+ 11 - 12
src/map/vending.c

@@ -19,16 +19,11 @@
 #include <stdio.h>
 #include <string.h>
 
-static int vending_nextid = 1;
+static int vending_nextid = 0;
 
 /// Returns an unique vending shop id.
 static int vending_getuid(void)
 {
-	if(!vending_nextid)
-	{// wrapped around, 0 is reserved for "not vending" state on eathena
-		vending_nextid = 1;
-	}
-
 	return vending_nextid++;
 }
 
@@ -39,8 +34,11 @@ void vending_closevending(struct map_session_data* sd)
 {
 	nullpo_retv(sd);
 
-	sd->vender_id = 0;
-	clif_closevendingboard(&sd->bl,0);
+	if( sd->state.vending )
+	{
+		sd->state.vending = false;
+		clif_closevendingboard(&sd->bl, 0);
+	}
 }
 
 /*==========================================
@@ -53,7 +51,7 @@ void vending_vendinglistreq(struct map_session_data* sd, int id)
 
 	if( (vsd = map_id2sd(id)) == NULL )
 		return;
-	if( vsd->vender_id == 0 )
+	if( !vsd->state.vending )
 		return; // not vending
 
 	if ( !pc_can_give_items(pc_isGM(sd)) || !pc_can_give_items(pc_isGM(vsd)) ) //check if both GMs are allowed to trade
@@ -78,7 +76,7 @@ void vending_purchasereq(struct map_session_data* sd, int aid, int uid, const ui
 	struct map_session_data* vsd = map_id2sd(aid);
 
 	nullpo_retv(sd);
-	if( vsd == NULL || vsd->vender_id == 0 || vsd->bl.id == sd->bl.id )
+	if( vsd == NULL || !vsd->state.vending || vsd->bl.id == sd->bl.id )
 		return; // invalid shop
 
 	if( vsd->vender_id != uid )
@@ -309,6 +307,7 @@ void vending_openvending(struct map_session_data* sd, const char* message, bool
 		return;
 	}
 
+	sd->state.vending = true;
 	sd->vender_id = vending_getuid();
 	sd->vend_num = i;
 	safestrncpy(sd->message, message, MESSAGE_SIZE);
@@ -324,7 +323,7 @@ bool vending_search(struct map_session_data* sd, unsigned short nameid)
 {
 	int i;
 
-	if( !sd->vender_id )
+	if( !sd->state.vending )
 	{// not vending
 		return false;
 	}
@@ -347,7 +346,7 @@ bool vending_searchall(struct map_session_data* sd, const struct s_search_store_
 	unsigned int idx, cidx;
 	struct item* it;
 
-	if( !sd->vender_id )
+	if( !sd->state.vending )
 	{// not vending
 		return true;
 	}

+ 2 - 0
vcproj-10/char-server_sql.vcxproj

@@ -45,6 +45,8 @@
     <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\</OutDir>
     <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectName)\$(Configuration)\</IntDir>
     <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+    <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">char-server_sql</TargetName>
+    <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">char-server_sql</TargetName>
   </PropertyGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>

+ 2 - 0
vcproj-10/char-server_txt.vcxproj

@@ -45,6 +45,8 @@
     <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\</OutDir>
     <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectName)\$(Configuration)\</IntDir>
     <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+    <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">char-server</TargetName>
+    <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">char-server</TargetName>
   </PropertyGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>

+ 2 - 0
vcproj-10/login-server_sql.vcxproj

@@ -45,6 +45,8 @@
     <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\</OutDir>
     <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectName)\$(Configuration)\</IntDir>
     <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+    <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">login-server_sql</TargetName>
+    <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">login-server_sql</TargetName>
   </PropertyGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>

+ 2 - 0
vcproj-10/login-server_txt.vcxproj

@@ -43,6 +43,8 @@
     <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\</OutDir>
     <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectName)\$(Configuration)\</IntDir>
     <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+    <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">login-server</TargetName>
+    <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">login-server</TargetName>
   </PropertyGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>

+ 2 - 0
vcproj-10/map-server_sql.vcxproj

@@ -44,6 +44,8 @@
     <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\</OutDir>
     <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectName)\$(Configuration)\</IntDir>
     <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+    <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">map-server_sql</TargetName>
+    <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">map-server_sql</TargetName>
   </PropertyGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>

+ 2 - 0
vcproj-10/map-server_txt.vcxproj

@@ -43,6 +43,8 @@
     <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\</OutDir>
     <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectName)\$(Configuration)\</IntDir>
     <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+    <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">map-server</TargetName>
+    <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">map-server</TargetName>
   </PropertyGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>

+ 2 - 0
vcproj-10/mapcache.vcxproj

@@ -43,6 +43,8 @@
     <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\</OutDir>
     <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectName)\$(Configuration)\</IntDir>
     <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+    <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">mapcache</TargetName>
+    <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">mapcache</TargetName>
   </PropertyGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>

+ 2 - 0
vcproj-10/txt-converter-char.vcxproj

@@ -45,6 +45,8 @@
     <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\tools\</OutDir>
     <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectName)\$(Configuration)\</IntDir>
     <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+    <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">char-converter</TargetName>
+    <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">char-converter</TargetName>
   </PropertyGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>

+ 2 - 0
vcproj-10/txt-converter-login.vcxproj

@@ -45,6 +45,8 @@
     <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\tools\</OutDir>
     <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectName)\$(Configuration)\</IntDir>
     <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+    <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">login-converter</TargetName>
+    <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">login-converter</TargetName>
   </PropertyGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>

Some files were not shown because too many files changed in this diff