summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--conf/battle/skill.conf17
-rwxr-xr-xconfigure275
-rw-r--r--configure.in186
-rw-r--r--db/const.txt17
-rw-r--r--db/pet_db.txt2
-rw-r--r--db/pre-re/skill_cast_db.txt2
-rw-r--r--db/re/item_db.conf2
-rw-r--r--db/re/skill_cast_db.txt2
-rw-r--r--doc/script_commands.txt206
-rw-r--r--npc/battleground/flavius/flavius01.txt4
-rw-r--r--npc/battleground/flavius/flavius02.txt8
-rw-r--r--npc/battleground/flavius/flavius_enter.txt292
-rw-r--r--npc/battleground/kvm/kvm_enter.txt16
-rw-r--r--npc/battleground/tierra/tierra01.txt10
-rw-r--r--npc/battleground/tierra/tierra02.txt10
-rw-r--r--npc/battleground/tierra/tierra_enter.txt292
-rw-r--r--npc/cities/aldebaran.txt296
-rw-r--r--npc/custom/battleground/bg_common.txt84
-rw-r--r--npc/custom/bgqueue/flavius.txt4
-rw-r--r--npc/custom/breeder.txt2
-rw-r--r--npc/custom/jobmaster.txt4
-rw-r--r--npc/events/RWC_2011.txt4
-rw-r--r--npc/events/christmas_2005.txt2
-rw-r--r--npc/events/dumplingfestival.txt72
-rw-r--r--npc/events/easter_2010.txt160
-rw-r--r--npc/events/event_skill_reset.txt93
-rw-r--r--npc/events/gdevent_aru.txt19
-rw-r--r--npc/events/gdevent_sch.txt19
-rw-r--r--npc/events/halloween_2008.txt338
-rw-r--r--npc/events/nguild/nguild_managers.txt121
-rw-r--r--npc/events/twintowers.txt79
-rw-r--r--npc/events/whiteday.txt181
-rw-r--r--npc/events/xmas.txt10
-rw-r--r--npc/instances/EndlessTower.txt10
-rw-r--r--npc/instances/NydhoggsNest.txt14
-rw-r--r--npc/instances/OrcsMemory.txt8
-rw-r--r--npc/instances/SealedShrine.txt42
-rw-r--r--npc/jobs/2-1/assassin.txt2
-rw-r--r--npc/jobs/2-1/blacksmith.txt26
-rw-r--r--npc/jobs/2-1/hunter.txt14
-rw-r--r--npc/jobs/2-1/knight.txt10
-rw-r--r--npc/jobs/2-1/priest.txt6
-rw-r--r--npc/jobs/2-1/wizard.txt2
-rw-r--r--npc/jobs/2-2/alchemist.txt12
-rw-r--r--npc/jobs/2-2/bard.txt2
-rw-r--r--npc/jobs/2-2/crusader.txt8
-rw-r--r--npc/jobs/2-2/dancer.txt4
-rw-r--r--npc/jobs/2-2/rogue.txt12
-rw-r--r--npc/jobs/2-2/sage.txt28
-rw-r--r--npc/jobs/2-2e/SoulLinker.txt8
-rw-r--r--npc/jobs/valkyrie.txt2
-rw-r--r--npc/merchants/renters.txt6
-rw-r--r--npc/other/CashShop_Functions.txt2
-rw-r--r--npc/other/turbo_track.txt2
-rw-r--r--npc/pre-re/jobs/1-1/acolyte.txt4
-rw-r--r--npc/pre-re/jobs/1-1/mage.txt6
-rw-r--r--npc/pre-re/jobs/1-1/merchant.txt6
-rw-r--r--npc/pre-re/quests/collection/quest_alligator.txt12
-rw-r--r--npc/pre-re/quests/collection/quest_caramel.txt12
-rw-r--r--npc/pre-re/quests/collection/quest_coco.txt12
-rw-r--r--npc/pre-re/quests/collection/quest_creamy.txt12
-rw-r--r--npc/pre-re/quests/collection/quest_demonpungus.txt12
-rw-r--r--npc/pre-re/quests/collection/quest_disguiseloliruri.txt8
-rw-r--r--npc/pre-re/quests/collection/quest_dokebi.txt12
-rw-r--r--npc/pre-re/quests/collection/quest_dryad.txt12
-rw-r--r--npc/pre-re/quests/collection/quest_fabre.txt12
-rw-r--r--npc/pre-re/quests/collection/quest_frilldora.txt12
-rw-r--r--npc/pre-re/quests/collection/quest_goat.txt12
-rw-r--r--npc/pre-re/quests/collection/quest_golem.txt12
-rw-r--r--npc/pre-re/quests/collection/quest_hode.txt12
-rw-r--r--npc/pre-re/quests/collection/quest_leafcat.txt12
-rw-r--r--npc/pre-re/quests/collection/quest_mantis.txt4
-rw-r--r--npc/pre-re/quests/collection/quest_pecopeco.txt12
-rw-r--r--npc/pre-re/quests/collection/quest_pupa.txt12
-rw-r--r--npc/pre-re/quests/collection/quest_zhupolong.txt4
-rw-r--r--npc/quests/newgears/2008_headgears.txt4
-rw-r--r--npc/quests/ninja_quests.txt371
-rw-r--r--npc/quests/quests_13_1.txt42
-rw-r--r--npc/quests/quests_13_2.txt58
-rw-r--r--npc/quests/quests_alberta.txt11
-rw-r--r--npc/quests/quests_ayothaya.txt4
-rw-r--r--npc/quests/quests_hugel.txt15
-rw-r--r--npc/quests/quests_lighthalzen.txt4
-rw-r--r--npc/quests/quests_louyang.txt4
-rw-r--r--npc/quests/quests_morocc.txt216
-rw-r--r--npc/re/cities/malangdo.txt2
-rw-r--r--npc/re/cities/malaya.txt2
-rw-r--r--npc/re/guild/invest_main.txt4
-rw-r--r--npc/re/instances/BakonawaLake.txt12
-rw-r--r--npc/re/instances/BangungotHospital.txt39
-rw-r--r--npc/re/instances/BuwayaCave.txt12
-rw-r--r--npc/re/instances/HazyForest.txt17
-rw-r--r--npc/re/instances/MalangdoCulvert.txt24
-rw-r--r--npc/re/instances/OctopusCave.txt8
-rw-r--r--npc/re/instances/OldGlastHeim.txt16
-rw-r--r--npc/re/instances/WolfchevLaboratory.txt18
-rw-r--r--npc/re/jobs/3-1/archbishop.txt2
-rw-r--r--npc/re/jobs/3-1/guillotine_cross.txt95
-rw-r--r--npc/re/jobs/3-1/mechanic.txt2
-rw-r--r--npc/re/jobs/3-1/ranger.txt27
-rw-r--r--npc/re/jobs/3-1/rune_knight.txt12
-rw-r--r--npc/re/jobs/3-1/warlock.txt2
-rw-r--r--npc/re/jobs/3-2/genetic.txt64
-rw-r--r--npc/re/jobs/3-2/minstrel.txt4
-rw-r--r--npc/re/jobs/3-2/royal_guard.txt2
-rw-r--r--npc/re/jobs/3-2/shadow_chaser.txt14
-rw-r--r--npc/re/jobs/3-2/sorcerer.txt2
-rw-r--r--npc/re/jobs/3-2/sura.txt4
-rw-r--r--npc/re/jobs/3-2/wanderer.txt8
-rw-r--r--npc/re/jobs/novice/novice.txt40
-rw-r--r--npc/re/jobs/novice/supernovice_ex.txt20
-rw-r--r--npc/re/jobs/repair.txt8
-rw-r--r--npc/re/merchants/renters.txt12
-rw-r--r--npc/re/quests/eden/11-25.txt20
-rw-r--r--npc/re/quests/eden/26-40.txt16
-rw-r--r--npc/re/quests/eden/41-55.txt9
-rw-r--r--npc/re/quests/eden/56-70.txt10
-rw-r--r--npc/re/quests/eden/71-85.txt21
-rw-r--r--npc/re/quests/eden/86-90.txt16
-rw-r--r--npc/re/quests/eden/91-99.txt16
-rw-r--r--npc/re/quests/eden/eden_quests.txt60
-rw-r--r--npc/re/quests/eden/eden_tutorial.txt52
-rw-r--r--npc/re/quests/homun_s.txt28
-rw-r--r--npc/re/quests/magic_books.txt20
-rw-r--r--npc/re/quests/quests_brasilis.txt37
-rw-r--r--npc/re/quests/quests_dewata.txt32
-rw-r--r--npc/re/quests/quests_dicastes.txt135
-rw-r--r--npc/re/quests/quests_eclage.txt22
-rw-r--r--npc/re/quests/quests_malangdo.txt250
-rw-r--r--npc/re/quests/quests_malaya.txt212
-rw-r--r--npc/re/quests/quests_mora.txt168
-rw-r--r--npc/re/quests/quests_morocc.txt20
-rw-r--r--sql-files/item_db_re.sql2
-rw-r--r--src/char/Makefile.in2
-rw-r--r--src/char/char.c10
-rw-r--r--src/char/char.h2
-rw-r--r--src/char/int_mail.c3
-rw-r--r--src/char/int_storage.c1
-rw-r--r--src/char/inter.c23
-rw-r--r--src/login/Makefile.in2
-rw-r--r--src/login/login.c1
-rw-r--r--src/map/Makefile.in2
-rw-r--r--src/map/atcommand.c42
-rw-r--r--src/map/battle.c17
-rw-r--r--src/map/battle.h1
-rw-r--r--src/map/chrif.c7
-rw-r--r--src/map/clif.c43
-rw-r--r--src/map/clif.h2
-rw-r--r--src/map/guild.c8
-rw-r--r--src/map/map.c29
-rw-r--r--src/map/map.h13
-rw-r--r--src/map/mob.c53
-rw-r--r--src/map/mob.h1
-rw-r--r--src/map/npc.c75
-rw-r--r--src/map/packets.h37
-rw-r--r--src/map/path.c7
-rw-r--r--src/map/pc.c171
-rw-r--r--src/map/pc.h21
-rw-r--r--src/map/script.c404
-rw-r--r--src/map/script.h8
-rw-r--r--src/map/skill.c57
-rw-r--r--src/map/skill.h1
-rw-r--r--src/map/status.c102
-rw-r--r--src/map/unit.c35
-rw-r--r--src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc20
-rw-r--r--src/plugins/HPMHooking/HPMHooking.HookingPoints.inc5
-rw-r--r--src/plugins/HPMHooking/HPMHooking.Hooks.inc137
-rw-r--r--src/plugins/Makefile.in2
-rw-r--r--src/tool/Makefile.in2
169 files changed, 3594 insertions, 3360 deletions
diff --git a/conf/battle/skill.conf b/conf/battle/skill.conf
index 10cca4af7..1bb58211a 100644
--- a/conf/battle/skill.conf
+++ b/conf/battle/skill.conf
@@ -69,9 +69,9 @@ skill_out_range_consume: no
skillrange_by_distance: 14
// Should the equipped weapon's range override the skill's range defined in the skill_db for most weapon-based skills? (Note 3)
-// NOTE: Skills affected by this option are those whose range in the skill_db are negative. Note that unless monster_ai&0x400 is
-// set, the range of all skills is 9 for monsters.
-skillrange_from_weapon: 30
+// NOTE: Skills affected by this option are those whose range in the skill_db are negative. By default always the skill range is used.
+// Note that if you want all monster skills to have a range of 9 you need to set monster_ai&0x400.
+skillrange_from_weapon: 0
// Should a check on the caster's status be performed in all skill attacks?
// When set to yes, meteors, storm gust and any other ground skills will have
@@ -293,4 +293,13 @@ mob_max_skilllvl: 100
// 1: Gutter line system without demi gutter bug
// 2-20: Area around caster (2 = 5x5, 3 = 7x7, 4 = 9x9, ..., 20 = 41x41)
// Note: If you knock the target out of the area it will only be hit once and won't do splash damage
-bowling_bash_area: 0 \ No newline at end of file
+bowling_bash_area: 0
+
+// How many attempts should a monster need until it can escape from an icewall casted directly on it?
+// On official servers, monsters can only leave an icewall to the west and south. If their target is north or east of them
+// they will continously try to chase it but fail doing so. This brings them into a loop during which they will cast idle
+// and rudeattacked skills (if attacked). Official servers have a safety system that eventually allows monsters to escape
+// when their walk routine failed many times in row so they won't stay on the loop endlessly. The time for this seems to be
+// around 15 seconds for fast monsters and 35 seconds for slow monsters, this equals about 75 attempts.
+// Set this to 0 if you don't want monsters to be stuck in icewalls at all.
+icewall_walk_block: 75 \ No newline at end of file
diff --git a/configure b/configure
index 815b7d21a..52050b25c 100755
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
#! /bin/sh
-# From configure.in 3a79f91.
+# From configure.in 2ae9f0c.
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69.
#
@@ -623,9 +623,10 @@ ac_includes_default="\
ac_subst_vars='LTLIBOBJS
LIBOBJS
-DLLEXT
HAVE_PERL
HAVE_DOXYGEN
+PLUGINSTATIC
+STATIC
PCRE_CFLAGS
PCRE_LIBS
HAVE_PCRE
@@ -634,6 +635,7 @@ MYSQL_CFLAGS
MYSQL_VERSION
HAVE_MYSQL
MYSQL_CONFIG_HOME
+DLLEXT
WITH_PLUGINS
SOFLAGS
AR
@@ -701,6 +703,7 @@ enable_rdtsc
enable_profiler
enable_64bit
enable_lto
+enable_static
enable_sanitize
enable_renewal
with_maxconn
@@ -1352,6 +1355,8 @@ Optional Features:
--disable-64bit Enforce 32bit output on x86_64 systems.
--enable-lto Enables or Disables Linktime Code Optimization (LTO
is enabled by default)
+ --enable-static Enables or Disables Statick Linking (STATIC is
+ disabled by default)
--enable-sanitize Enables or Disables Sanitize Address Checking
(SANITIZE is disabled by default)
--disable-renewal Disable Ragnarok Renewal support (override settings
@@ -3660,6 +3665,26 @@ fi
#
+# static linking
+#
+# Check whether --enable-static was given.
+if test "${enable_static+set}" = set; then :
+ enableval=$enable_static;
+ enable_static="$enableval"
+ case $enableval in
+ "no");;
+ "yes");;
+ *) as_fn_error $? "invalid argument --enable-static=$disableval... stopping" "$LINENO" 5;;
+ esac
+
+else
+ enable_static="no"
+
+fi
+
+
+
+#
# adress sanitize
#
# Check whether --enable-sanitize was given.
@@ -6597,6 +6622,57 @@ case $enable_renewal in
esac
#
+# Host specific stuff
+#
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host OS" >&5
+$as_echo_n "checking host OS... " >&6; }
+host_os="`uname`"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $host_os" >&5
+$as_echo "$host_os" >&6; }
+fd_setsize=""
+DLLEXT=".so"
+case $host_os in
+Solaris* )
+ LIBS="$LIBS -lsocket -lnsl -ldl"
+ ;;
+Linux* )
+ LIBS="$LIBS -ldl"
+ ;;
+FreeBSD*)
+ CPPFLAGS="$CPPFLAGS -D__FREEBSD__"
+ ;;
+NetBSD*)
+ CPPFLAGS="$CPPFLAGS -D__NETBSD__"
+ ;;
+CYGWIN*)
+ CPPFLAGS="$CPPFLAGS -DFD_SETSIZE=4096 -DCYGWIN"
+ fd_setsize="done"
+ DLLEXT=".dll"
+ ;;
+Darwin*)
+ DLLEXT=".dylib"
+ ;;
+esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for MinGW" >&5
+$as_echo_n "checking for MinGW... " >&6; }
+if test -n "`$CC --version 2>/dev/null | grep -i mingw`" ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ CPPFLAGS="$CPPFLAGS -DMINGW"
+ if test -z "$fd_setsize" ; then
+ CPPFLAGS="$CPPFLAGS -DFD_SETSIZE=4096"
+ fi
+ LIBS="$LIBS -lws2_32"
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+#
# zlib library (required)
#
if test -n "${ZLIB_HOME}" ; then
@@ -7319,45 +7395,10 @@ else
MYSQL_VERSION="unknown"
fi
-MYSQL_OLD_LDFLAGS="$LDFLAGS" ; LDFLAGS="$LDFLAGS $MYSQL_LIBS"
+MYSQL_OLD_LIBS="$LIBS" ; LIBS="$LIBS $MYSQL_LIBS"
MYSQL_OLD_CPPFLAGS="$CPPFLAGS" ; CPPFLAGS="$CPPFLAGS $MYSQL_CFLAGS"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for mysql_init in -lmysqlclient" >&5
-$as_echo_n "checking for mysql_init in -lmysqlclient... " >&6; }
-if ${ac_cv_lib_mysqlclient_mysql_init+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lmysqlclient $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char mysql_init ();
-int
-main ()
-{
-return mysql_init ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_mysqlclient_mysql_init=yes
-else
- ac_cv_lib_mysqlclient_mysql_init=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mysqlclient_mysql_init" >&5
-$as_echo "$ac_cv_lib_mysqlclient_mysql_init" >&6; }
-if test "x$ac_cv_lib_mysqlclient_mysql_init" = xyes; then :
+ac_fn_c_check_func "$LINENO" "mysql_init" "ac_cv_func_mysql_init"
+if test "x$ac_cv_func_mysql_init" = xyes; then :
HAVE_MYSQL="yes"
fi
@@ -7370,7 +7411,7 @@ fi
CPPFLAGS="$MYSQL_OLD_CPPFLAGS"
-LDFLAGS="$MYSQL_OLD_LDFLAGS"
+LIBS="$MYSQL_OLD_LIBS"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MySQL library (required)" >&5
$as_echo_n "checking MySQL library (required)... " >&6; }
@@ -7515,6 +7556,107 @@ fi
+
+#
+# static Support test
+#
+if test "$enable_static" != "no" ; then
+
+ STATIC="-static"
+ PLUGINSTATIC="-static-libgcc"
+
+ OLD_CFLAGS="$CFLAGS"
+ OLD_LDFLAGS="$LDFLAGS"
+ OLD_LIBS="$LIBS"
+
+ CFLAGS="$OLD_CFLAGS $MYSQL_CFLAGS $PCRE_CFLAGS -static"
+ LDFLAGS="$OLD_LDFLAGS -static"
+ LIBS="$OLD_LIBS $MYSQL_LIBS $PCRE_LIBS"
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -static" >&5
+$as_echo_n "checking whether $CC supports -static... " >&6; }
+ if test "$cross_compiling" = yes; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: guessing no" >&5
+$as_echo "guessing no" >&6; }
+ STATIC=""
+
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ int main(int argc, char **argv){
+ return 0;
+ }
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ STATIC=""
+
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ CFLAGS="$OLD_CFLAGS -static-libgcc"
+ LDFLAGS="$OLD_LDFLAGS -static-libgcc"
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -static-libgcc" >&5
+$as_echo_n "checking whether $CC supports -static-libgcc... " >&6; }
+ if test "$cross_compiling" = yes; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: guessing no" >&5
+$as_echo "guessing no" >&6; }
+ PLUGINSTATIC=""
+
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ int main(int argc, char **argv){
+ return 0;
+ }
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ PLUGINSTATIC=""
+
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+ CFLAGS="$OLD_CFLAGS"
+ LDFLAGS="$OLD_LDFLAGS"
+ LIBS="$OLD_LIBS"
+fi
+
+STATIC=${STATIC}
+
+PLUGINSTATIC=${PLUGINSTATIC}
+
+
+
+
#
# Doxygen, perl (for HPMHookGen)
#
@@ -7597,57 +7739,6 @@ fi
-#
-# Host specific stuff
-#
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host OS" >&5
-$as_echo_n "checking host OS... " >&6; }
-host_os="`uname`"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $host_os" >&5
-$as_echo "$host_os" >&6; }
-fd_setsize=""
-DLLEXT=".so"
-case $host_os in
-Solaris* )
- LIBS="$LIBS -lsocket -lnsl -ldl"
- ;;
-Linux* )
- LIBS="$LIBS -ldl"
- ;;
-FreeBSD*)
- CPPFLAGS="$CPPFLAGS -D__FREEBSD__"
- ;;
-NetBSD*)
- CPPFLAGS="$CPPFLAGS -D__NETBSD__"
- ;;
-CYGWIN*)
- CPPFLAGS="$CPPFLAGS -DFD_SETSIZE=4096 -DCYGWIN"
- fd_setsize="done"
- DLLEXT=".dll"
- ;;
-Darwin*)
- DLLEXT=".dylib"
- ;;
-esac
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for MinGW" >&5
-$as_echo_n "checking for MinGW... " >&6; }
-if test -n "`$CC --version 2>/dev/null | grep -i mingw`" ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- CPPFLAGS="$CPPFLAGS -DMINGW"
- if test -z "$fd_setsize" ; then
- CPPFLAGS="$CPPFLAGS -DFD_SETSIZE=4096"
- fi
- LIBS="$LIBS -lws2_32"
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
###############################################################################
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
diff --git a/configure.in b/configure.in
index 6b0604e07..ec3b1f735 100644
--- a/configure.in
+++ b/configure.in
@@ -272,6 +272,29 @@ AC_ARG_ENABLE(
#
+# static linking
+#
+AC_ARG_ENABLE(
+ [static],
+ AC_HELP_STRING(
+ [--enable-static],
+ [
+ Enables or Disables Statick Linking (STATIC is disabled by default)
+ ]
+ ),
+ [
+ enable_static="$enableval"
+ case $enableval in
+ "no");;
+ "yes");;
+ *) AC_MSG_ERROR([[invalid argument --enable-static=$disableval... stopping]]);;
+ esac
+ ],
+ [enable_static="no"]
+)
+
+
+#
# adress sanitize
#
AC_ARG_ENABLE(
@@ -1095,6 +1118,52 @@ case $enable_renewal in
esac
#
+# Host specific stuff
+#
+AC_MSG_CHECKING([host OS])
+host_os="`uname`"
+AC_MSG_RESULT([$host_os])
+fd_setsize=""
+DLLEXT=".so"
+case $host_os in
+Solaris* )
+ LIBS="$LIBS -lsocket -lnsl -ldl"
+ ;;
+Linux* )
+ LIBS="$LIBS -ldl"
+ ;;
+FreeBSD*)
+ CPPFLAGS="$CPPFLAGS -D__FREEBSD__"
+ ;;
+NetBSD*)
+ CPPFLAGS="$CPPFLAGS -D__NETBSD__"
+ ;;
+CYGWIN*)
+ CPPFLAGS="$CPPFLAGS -DFD_SETSIZE=4096 -DCYGWIN"
+ fd_setsize="done"
+ DLLEXT=".dll"
+ ;;
+Darwin*)
+ DLLEXT=".dylib"
+ ;;
+esac
+AC_SUBST([DLLEXT])
+
+AC_MSG_CHECKING([for MinGW])
+if test -n "`$CC --version 2>/dev/null | grep -i mingw`" ; then
+ AC_MSG_RESULT([yes])
+ CPPFLAGS="$CPPFLAGS -DMINGW"
+ if test -z "$fd_setsize" ; then
+ CPPFLAGS="$CPPFLAGS -DFD_SETSIZE=4096"
+ fi
+ LIBS="$LIBS -lws2_32"
+else
+ AC_MSG_RESULT([no])
+fi
+
+
+
+#
# zlib library (required)
#
if test -n "${ZLIB_HOME}" ; then
@@ -1187,12 +1256,12 @@ else
MYSQL_VERSION="unknown"
fi
-MYSQL_OLD_LDFLAGS="$LDFLAGS" ; LDFLAGS="$LDFLAGS $MYSQL_LIBS"
+MYSQL_OLD_LIBS="$LIBS" ; LIBS="$LIBS $MYSQL_LIBS"
MYSQL_OLD_CPPFLAGS="$CPPFLAGS" ; CPPFLAGS="$CPPFLAGS $MYSQL_CFLAGS"
-AC_CHECK_LIB([mysqlclient], [mysql_init], [HAVE_MYSQL="yes"], [])
+AC_CHECK_FUNC([mysql_init], [HAVE_MYSQL="yes"])
AC_CHECK_HEADER([mysql.h], [], [HAVE_MYSQL=""])
CPPFLAGS="$MYSQL_OLD_CPPFLAGS"
-LDFLAGS="$MYSQL_OLD_LDFLAGS"
+LIBS="$MYSQL_OLD_LIBS"
AC_MSG_CHECKING([MySQL library (required)])
if test "$HAVE_MYSQL" = "yes" ; then
@@ -1251,59 +1320,82 @@ AC_SUBST([HAVE_PCRE])
AC_SUBST([PCRE_LIBS])
AC_SUBST([PCRE_CFLAGS])
+
#
-# Doxygen, perl (for HPMHookGen)
+# static Support test
#
+if test "$enable_static" != "no" ; then
-AC_CHECK_PROG([HAVE_DOXYGEN],[doxygen],[yes],[no])
+ STATIC="-static"
+ PLUGINSTATIC="-static-libgcc"
-AC_CHECK_PROG([HAVE_PERL],[perl],[yes],[no])
+ OLD_CFLAGS="$CFLAGS"
+ OLD_LDFLAGS="$LDFLAGS"
+ OLD_LIBS="$LIBS"
-#
-# Host specific stuff
-#
-AC_MSG_CHECKING([host OS])
-host_os="`uname`"
-AC_MSG_RESULT([$host_os])
-fd_setsize=""
-DLLEXT=".so"
-case $host_os in
-Solaris* )
- LIBS="$LIBS -lsocket -lnsl -ldl"
- ;;
-Linux* )
- LIBS="$LIBS -ldl"
- ;;
-FreeBSD*)
- CPPFLAGS="$CPPFLAGS -D__FREEBSD__"
- ;;
-NetBSD*)
- CPPFLAGS="$CPPFLAGS -D__NETBSD__"
- ;;
-CYGWIN*)
- CPPFLAGS="$CPPFLAGS -DFD_SETSIZE=4096 -DCYGWIN"
- fd_setsize="done"
- DLLEXT=".dll"
- ;;
-Darwin*)
- DLLEXT=".dylib"
- ;;
-esac
-AC_SUBST([DLLEXT])
+ CFLAGS="$OLD_CFLAGS $MYSQL_CFLAGS $PCRE_CFLAGS -static"
+ LDFLAGS="$OLD_LDFLAGS -static"
+ LIBS="$OLD_LIBS $MYSQL_LIBS $PCRE_LIBS"
-AC_MSG_CHECKING([for MinGW])
-if test -n "`$CC --version 2>/dev/null | grep -i mingw`" ; then
- AC_MSG_RESULT([yes])
- CPPFLAGS="$CPPFLAGS -DMINGW"
- if test -z "$fd_setsize" ; then
- CPPFLAGS="$CPPFLAGS -DFD_SETSIZE=4096"
- fi
- LIBS="$LIBS -lws2_32"
-else
- AC_MSG_RESULT([no])
+ AC_MSG_CHECKING([whether $CC supports -static])
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([
+ int main(int argc, char **argv){
+ return 0;
+ }
+ ])],
+ [
+ AC_MSG_RESULT([yes])
+ ],
+ [
+ AC_MSG_RESULT([no])
+ STATIC=""
+ ],
+ [
+ AC_MSG_RESULT([guessing no])
+ STATIC=""
+ ]
+ )
+ CFLAGS="$OLD_CFLAGS -static-libgcc"
+ LDFLAGS="$OLD_LDFLAGS -static-libgcc"
+
+ AC_MSG_CHECKING([whether $CC supports -static-libgcc])
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([
+ int main(int argc, char **argv){
+ return 0;
+ }
+ ])],
+ [
+ AC_MSG_RESULT([yes])
+ ],
+ [
+ AC_MSG_RESULT([no])
+ PLUGINSTATIC=""
+ ],
+ [
+ AC_MSG_RESULT([guessing no])
+ PLUGINSTATIC=""
+ ]
+ )
+
+ CFLAGS="$OLD_CFLAGS"
+ LDFLAGS="$OLD_LDFLAGS"
+ LIBS="$OLD_LIBS"
fi
+AC_SUBST(STATIC, ${STATIC})
+AC_SUBST(PLUGINSTATIC, ${PLUGINSTATIC})
+
+#
+# Doxygen, perl (for HPMHookGen)
+#
+
+AC_CHECK_PROG([HAVE_DOXYGEN],[doxygen],[yes],[no])
+
+AC_CHECK_PROG([HAVE_PERL],[perl],[yes],[no])
+
###############################################################################
AC_OUTPUT
diff --git a/db/const.txt b/db/const.txt
index 06fa8a3db..8f649b4f3 100644
--- a/db/const.txt
+++ b/db/const.txt
@@ -3363,9 +3363,14 @@ SCFLAG_LOADED 0x04
SCFLAG_FIXEDRATE 0x08
SCFLAG_NOICON 0x10
-// Dragon Colors
-DRAGON_GREEN 1
-DRAGON_BROWN 2
-DRAGON_GRAY 3
-DRAGON_BLUE 4
-DRAGON_RED 5 \ No newline at end of file
+// Mount types
+MOUNT_NONE 0
+MOUNT_PECO 1
+MOUNT_WUG 2
+MOUNT_MADO 3
+MOUNT_DRAGON 4
+MOUNT_DRAGON_GREEN 4
+MOUNT_DRAGON_BROWN 5
+MOUNT_DRAGON_GRAY 6
+MOUNT_DRAGON_BLUE 7
+MOUNT_DRAGON_RED 8
diff --git a/db/pet_db.txt b/db/pet_db.txt
index 24e5e4cfd..5a3431b25 100644
--- a/db/pet_db.txt
+++ b/db/pet_db.txt
@@ -77,7 +77,7 @@
1023,ORK_WARRIOR,Orc Warrior,635,9017,10009,537,80,60,20,100,250,20,500,150,1,0,600,200,300,{ petskillattack2 "NPC_PIERCINGATT",100,1,0,10; },{ bonus bAtk,10; bonus bDef,-3; }
1026,MUNAK,Munak,636,9018,10008,537,80,60,20,100,250,20,500,150,0,0,300,750,300,{ petskillattack2 "NPC_DARKNESSATTACK",444,1,0,10; },{ bonus bInt,1; bonus bDef,1; }
1110,DOKEBI,Dokebi,637,9019,10005,537,80,60,20,100,250,20,500,150,0,0,300,300,800,{ petskillattack "BS_HAMMERFALL",1,0,10; },{ bonus bMatkRate,1; bonus bAtkRate,-1; }
-1170,SOHEE,Sohee,638,9020,10016,537,80,60,10,100,250,20,500,150,0,0,100,1000,200,{ petheal 400,60,33,100; },{ bonus bStr,1; bonus bDex,1; }
+1170,SOHEE,Sohee,638,9020,10016,537,80,60,10,100,250,20,500,150,0,0,100,1000,200,{ petskillsupport AL_HEAL,10,60,33,100; },{ bonus bStr,1; bonus bDex,1; }
1029,ISIS,Isis,639,9021,10006,537,80,60,10,100,250,20,500,150,0,0,650,450,150,{ petskillsupport "PR_MAGNIFICAT",2,60,50,50; },{ bonus bMatkRate,-1; bonus bAtkRate,1; }
1155,PETIT,Petite,640,9022,10011,537,80,60,20,100,250,20,500,150,0,0,800,400,100,{ petskillattack2 "WZ_HEAVENDRIVE",500,1,0,10; },{ bonus bDef,-2; bonus bMdef,-2; bonus bAspdRate,1; }
1109,DEVIRUCHI,Deviruchi,641,9023,10004,711,80,60,10,100,250,20,500,150,0,0,800,200,100,{ petskillbonus bAgiDexStr,6,20,40; },{ bonus bMatkRate,1; bonus bAtkRate,1; bonus bMaxHPrate,-3; bonus bMaxSPrate,-3; }
diff --git a/db/pre-re/skill_cast_db.txt b/db/pre-re/skill_cast_db.txt
index 95a402c4f..8b901e602 100644
--- a/db/pre-re/skill_cast_db.txt
+++ b/db/pre-re/skill_cast_db.txt
@@ -158,7 +158,7 @@
//-- WZ_FIREPILLAR
80,3000:2700:2400:2100:1800:1500:1200:900:600:300,1000,0,30000,600:800:1000:1200:1400:1600:1800:2000:2200:2400,0
//-- WZ_SIGHTRASHER
-81,700,2000,0,500,0,0
+81,500,2000,0,500,0,0
//-- WZ_METEOR
83,15000,2000:3000:3000:4000:4000:5000:5000:6000:6000:7000,0,500,5000,0
//-- WZ_JUPITEL
diff --git a/db/re/item_db.conf b/db/re/item_db.conf
index ff779399f..42cd378f1 100644
--- a/db/re/item_db.conf
+++ b/db/re/item_db.conf
@@ -82605,7 +82605,7 @@ item_db: (
Buy: 20
Upper: 63
Delay: 3000
- Script: <" setmounting(); ">
+ Script: <" setcashmount(); ">
},
{
Id: 12623
diff --git a/db/re/skill_cast_db.txt b/db/re/skill_cast_db.txt
index 8f33acdcf..37b004bfa 100644
--- a/db/re/skill_cast_db.txt
+++ b/db/re/skill_cast_db.txt
@@ -568,7 +568,7 @@
//===== Champion ===========================
//-- CH_PALMSTRIKE
-370,300,0,0,0,0,0,
+370,0,300,0,0,0,0,
//-- CH_TIGERFIST
371,0,0,0,0,2000:4000:6000:8000:10000,0,
//==========================================
diff --git a/doc/script_commands.txt b/doc/script_commands.txt
index 7efcc77ad..7e00e50dc 100644
--- a/doc/script_commands.txt
+++ b/doc/script_commands.txt
@@ -974,14 +974,14 @@ Within executable script code, some lines can be labels:
<label name>:
Labels are points of reference in your script, which can be used to route
-execution with 'goto', 'menu' and 'jump_zero' commands, invoked with
-'doevent' and 'donpcevent' commands and are otherwise essential. A label's
-name may not be longer than 22 characters. (23rd is the ':'.) There is
-some confusion in the source about whether it's 22, 23 or 24 all over the
-place, so keeping labels under 22 characters could be wise. It may only
-contain alphanumeric characters and underscore. In addition to labels you
-name yourself, there are also some special labels which the script engine
-will start execution from if a special event happens:
+execution with 'goto' and 'menu' commands, invoked with 'doevent', 'donpcevent'
+and 'callsub' commands and are otherwise essential. A label's name may not be
+longer than 22 characters. (23rd is the ':'.) There is some confusion in the
+source about whether it's 22, 23 or 24 all over the place, so keeping labels
+under 22 characters could be wise. It may only contain alphanumeric characters
+and underscore. In addition to labels you name yourself, there are also some
+special labels which the script engine will start execution from if a special
+event happens:
OnClock<hour><minute>:
OnMinute<minute>:
@@ -2058,6 +2058,14 @@ else if (<condition 2>) {
*jump_zero (<condition>),<label>;
+ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+ @ /!\ This command is deprecated @
+ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+
+This command is deprecated and it should not be used in new scripts, as it is
+scheduled to be removed at any time on or after November 27th, 2014. Please
+consider using 'if', 'switch', 'for', 'while', as appropriate.
+
This command works like an 'if'+'goto' combination in one go. (See 'if').
If the condition is false (equal to zero) this command will immediately
jump to the specified label like in 'goto'.
@@ -3819,50 +3827,78 @@ falcon and 0 if they don't.
---------------------------------------
-*setriding {<flag>};
-*checkriding()
+*setmount {<flag>};
+*checkmount()
-If <flag> is 0 this command will remove the mount from the character.
+If <flag> is MOUNT_NONE (or 0) this command will remove the mount from the
+character.
-Otherwise it gives the invoking character a combat mount specific to their
-class.
+Otherwise it gives the invoking character the desired combat mount, where
+allowed by their class and skills.
+
+If no flag is specified, the mount is automatically chosen according to the
+character's class and skills.
+
+The following flag values are accepted:
+
+ MOUNT_NONE:
+ - Dismount
+ MOUNT_PECO:
+ - PecoPeco (Knight series class)
+ - GrandPeco (Crusader series class)
+ - Gryphon (Royal Guard)
+ MOUNT_WUG:
+ - Warg (Ranger)
+ MOUNT_MADO:
+ - Mado Gear (Mechanic)
+ MOUNT_DRAGON:
+ MOUNT_DRAGON_GREEN:
+ MOUNT_DRAGON_BROWN:
+ MOUNT_DRAGON_GRAY:
+ MOUNT_DRAGON_BLUE:
+ MOUNT_DRAGON_RED:
+ - Dragon (Rune Knight)
+ if MOUNT_DRAGON is specified, a the default (green) dragon will be used.
- - PecoPeco (Knight series class)
+Unlike 'setfalcon' and 'setcart' this will not work at all if they aren't of a
+class which can ride a mount.
- - GrandPeco (Crusader series class)
+The accompanying function will return 0 if the invoking character is not on a
+mount, and a non-zero value (according to the above constants) if they are.
+Note: in case of dragons, the returned value will always be MOUNT_DRAGON,
+regardless of color.
- - Dragon (Rune Knight)
- The color of the dragon can be passed through the flag value using
- either values 1 ~ 5 or the following constants:
- DRAGON_GREEN
- DRAGON_BROWN
- DRAGON_GRAY
- DRAGON_BLUE
- DRAGON_RED
+ if (checkmount())
+ mes "Leave your mount outside! No riding mounts on the floor here!";
- - Gryphon (Royal Guard)
+ if (checkmount() == MOUNT_DRAGON)
+ mes "Wow, your dragon is cool! Can I pet it?";
- - Warg (Ranger)
-
- - Mado Gear (Mechanic)
+---------------------------------------
-Unlike 'setfalcon' and 'setcart' this will not work at all if they aren't of a
-class which can ride a mount.
+*setriding {<flag>};
+*checkriding()
-Note: The character needs to have the specific skill for their mount.
+[ DEPRECATED - Please use setmount / checkmount]
+
+If <flag> is 0 this command will remove the mount from the character.
+Otherwise it gives the invoking character a PecoPeco (if they are a Knight
+series class), a GrandPeco (if they are a Crusader series class), or
+a Gryphon (if they are a Royal Guard). Unlike 'setfalcon' and 'setcart'
+this will not work at all if they aren't of a class which can ride.
+Note: the character needs to have the skill KN_RIDING to gain a mount.
The accompanying function will return 1 if the invoking character is
-on a mount and 0 if they aren't.
+riding a bird and 0 if they aren't.
- if (checkriding())
- mes "Leave your mount outside! No riding mounts on the floor here!";
+ if (checkriding()) mes "PLEASE leave your bird outside! No riding birds on the floor here!";
---------------------------------------
*setdragon {<color>};
*checkdragon()
-[ DEPRECATED - Please use setriding]
+[ DEPRECATED - Please use setmount / checkmount]
The 'setdragon' function toggles mounting a dragon for the invoking
character. It will return 1 if successful, 0 otherwise.
@@ -3885,7 +3921,7 @@ riding a dragon and 0 if they aren't.
*setmadogear {<flag>};
*checkmadogear()
-[ DEPRECATED - Please use setriding]
+[ DEPRECATED - Please use setmount / checkmount]
If <flag> is 0 this command will remove the mount from the character.
Otherwise it gives the invoking character a Mado (if they are a Mechanic).
@@ -3895,10 +3931,10 @@ Mado and 0 if they don't.
---------------------------------------
-*setmounting;
-*ismounting()
+*setcashmount;
+*hascashmount()
-The 'setmounting' function toggles cash mount for the invoking character.
+The 'setcashmount' function toggles cash mount for the invoking character.
It will return 1 if successful, 0 otherwise.
Note: Character must not be mounting a non-cash mount (eg. dragon, peco,
@@ -7284,12 +7320,16 @@ when not provided, "group level char" defaults to 99.
(1 = log, 0 = no log), default is to not log.
The following variables are set upon execution:
- .@atcmd_command$ = The name of the @command used.
- .@atcmd_parameters$[] = Array containing the given parameters,
- starting from an index of 0.
- .@atcmd_numparameters = The number of parameters defined.
+ .@atcmd_command$ = The name of the @command used.
+ .@atcmd_parameters$[] = Array containing the given parameters,
+ starting from an index of 0.
+ .@atcmd_numparameters = The number of parameters defined.
-Example:
+Parameters are split on spaces. Multiple spaces aren't grouped together, and
+will create multiple (empty) arguments.
+Any leading spaces before the first parameter will be omitted.
+
+Usage example:
When a user types the command "@test", an angel effect will be shown.
@@ -7302,6 +7342,50 @@ OnAtcommand:
end;
}
+Parameter splitting example:
+ @mycommand
+ .@atcmd_numparameters -> 0
+ .@atcmd_parameters$ -> { }
+ @mycommand<space><space>
+ .@atcmd_numparameters -> 0
+ .@atcmd_parameters$ -> { }
+ @mycommand<space>foo
+ .@atcmd_numparameters -> 1
+ .@atcmd_parameters$ -> { "foo" }
+ @mycommand<space><space>foo
+ .@atcmd_numparameters -> 1
+ .@atcmd_parameters$ -> { "foo" }
+ @mycommand<space>foo<space>bar
+ .@atcmd_numparameters -> 2
+ .@atcmd_parameters$ -> { "foo", "bar" }
+ @mycommand<space>foo<space><space>bar
+ .@atcmd_numparameters -> 3
+ .@atcmd_parameters$ -> { "foo", "", "bar" }
+ @mycommand<space>foo<space>
+ .@atcmd_numparameters -> 2
+ .@atcmd_parameters$ -> { "foo", "" }
+ @mycommand<space>foo<space><space>
+ .@atcmd_numparameters -> 3
+ .@atcmd_parameters$ -> { "foo", "", "" }
+
+The called event label needs to take care of joining arguments together, in
+case it expects spaces. For example:
+
+- script atcmd_example -1,{
+OnInit:
+ bindatcmd "test",strnpcinfo(3)+"::OnAtcommand";
+ end;
+OnAtcommand:
+ // This command expects a character name (that may contain spaces) as
+ // the only parameter.
+ .@name$ = "";
+ for (.@i = 0; .@i < .@atcmd_numparameters; ++.@i) {
+ .@name$ += (.@i > 0 ? " " : "") + .@atcmd_parameters$[.@i];
+ }
+ dispbottom("The specified name is: '" + .@name$ + "'");
+ end;
+}
+
---------------------------------------
*unbindatcmd "command";
@@ -7887,17 +7971,24 @@ reached or when pet performance is activated.
*petskillsupport <skill id>,<skill level>,<delay>,<percent hp>,<percent sp>;
*petskillsupport "<skill name>",<skill level>,<delay>,<percent hp>,<percent sp>;
-*petheal <level>,<delay>,<percent hp>,<percent sp>;
This will make the pet use a specified support skill on the owner whenever
the HP and SP are below the given percent values, with a specified delay
time between activations. The skill numbers are as per
'db/(pre-)re/skill_db.txt'.
-'petheal' works the same as 'petskillsupport' but has the skill ID
-hard-coded to 28 (Heal). This command is deprecated.
It's not quite certain who's stats will be used for the skills cast, the
character's or the pets. Probably, Skotlex can answer that question.
+*petheal <level>,<delay>,<percent hp>,<percent sp>;
+
+ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+ @ /!\ This command is deprecated @
+ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+
+The petheal command is deprecated and it should not be used in new scripts, as
+it is scheduled to be removed after November 27th, 2014. Please consider using
+petskillsupport by specifying the AL_HEAL skill id instead.
+
*petskillattack <skill id>,<skill level>,<rate>,<bonusrate>;
*petskillattack "<skill name>",<skill level>,<rate>,<bonusrate>;
*petskillattack2 <skill id>,<damage>,<number of attacks>,<rate>,<bonusrate>;
@@ -8346,7 +8437,13 @@ Add quest of the <ID2> to the the quest log, and the state is "active".
*checkquest(<ID>{,PLAYTIME|HUNTING})
-DEPRECATED - use questprogress instead.
+ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+ @ /!\ This command is deprecated @
+ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+
+This command is deprecated and it should not be used in new scripts, as it
+is scheduled to be removed on or after November 28th, 2014. Please consider
+using questprogress() instead. Or, in special cases, questactive().
If no additional argument supplied, return the state of the quest:
-1 = Quest not started (not in quest log)
@@ -8373,23 +8470,32 @@ If parameter "HUNTING" is supplied:
*questprogress(<ID>{,PLAYTIME|HUNTING})
-If no additional argument supplied, return the state of the quest:
+If no additional argument supplied, return the state of the quest:
0 = Quest not started (not in quest log)
1 = Quest has been given
2 = Quest completed
-If parameter "PLAYTIME" is supplied:
+If parameter 'PLAYTIME' is supplied:
0 = Quest not started (not in quest log)
1 = The time limit has not yet been reached
2 = The time limit has been reached
-If parameter "HUNTING" is supplied:
+If parameter 'HUNTING' is supplied:
0 = Quest not started (not in quest log)
1 = Player hasn't killed all of the target monsters
2 = Player has killed all of the target monsters
---------------------------------------
+*questactive(<ID>)
+
+Check whether the given quest is in its active state.
+
+Returns true if the quest is active, false otherwise (quest not started,
+inactive or completed)
+
+---------------------------------------
+
*showevent <icon>{,<mark color>}
Show an emotion on top of a NPC, and optionally,
diff --git a/npc/battleground/flavius/flavius01.txt b/npc/battleground/flavius/flavius01.txt
index 18f153d87..a02752d52 100644
--- a/npc/battleground/flavius/flavius01.txt
+++ b/npc/battleground/flavius/flavius01.txt
@@ -377,14 +377,14 @@ OnTouch:
bat_b01,87,76,0 script A_CODE#bat_b01 -1,5,5,{
OnTouch:
- if (checkquest(2070) < 0)
+ if (!questprogress(2070))
setquest 2070;
end;
}
bat_b01,312,224,0 script B_CODE#bat_b01 -1,5,5,{
OnTouch:
- if (checkquest(2070) < 0)
+ if (!questprogress(2070))
setquest 2070;
end;
}
diff --git a/npc/battleground/flavius/flavius02.txt b/npc/battleground/flavius/flavius02.txt
index 0a88b9919..79b7b5168 100644
--- a/npc/battleground/flavius/flavius02.txt
+++ b/npc/battleground/flavius/flavius02.txt
@@ -378,15 +378,15 @@ OnTouch:
bat_b02,87,76,0 script A_CODE#bat_b02 -1,5,5,{
OnTouch:
- if (checkquest(2070) < 0)
- //setquest 2070;
+ //if (!questprogress(2070))
+ // setquest 2070;
end;
}
bat_b02,312,224,0 script B_CODE#bat_b02 -1,5,5,{
OnTouch:
- if (checkquest(2070) < 0)
- //setquest 2070;
+ //if (!questprogress(2070))
+ // setquest 2070;
end;
}
diff --git a/npc/battleground/flavius/flavius_enter.txt b/npc/battleground/flavius/flavius_enter.txt
index d63130007..315eff2cb 100644
--- a/npc/battleground/flavius/flavius_enter.txt
+++ b/npc/battleground/flavius/flavius_enter.txt
@@ -30,48 +30,41 @@ bat_room,133,178,5 script Flavius Officer#01a 4_M_KY_KNT,{
if ((Class == Job_Novice) || (BaseClass == Job_SuperNovice)) {
mes "[Guillaume Army Officer]";
mes "I'm very pleased that you want to join us and fight the Croix Army, but I'm sorry: I can't send a rookie like you to die on the cruel battlefield.";
+ break;
}
- else {
- if (BaseLevel < 80) {
- mes "[Guillaume Army Officer]";
- mes "I'm very pleased that you want to join us and fight the Croix Army, but I'm sorry: I can't send a rookie like you to die on the cruel battlefield.";
- }
- else {
- set .@chk_urtime,checkquest(2070,PLAYTIME);
- if ((.@chk_urtime == 0)|| (.@chk_urtime == 1)) {
- mes "[Guillaume Army Officer]";
- mes "You seem to have just returned from the battlefield.";
- mes "It's too early for you to go back. Go rest, and leave the enemies to us!";
- }
- else {
- if (.@chk_urtime == 2)
- erasequest 2070;
- set .@mapcount2,getmapusers("bat_b01");
- if (.@mapcount2 > 0) {
- mes "[Guillaume Army Officer]";
- mes "I've received a report informing me that an elite corps has been dispatched to the battlefield fighting the Croixs already.";
- mes "Why don't you go wait for a while? I suggest you sharpen your weapons and prepare your supplies until then.";
- }
- else {
- if ($@FlaviusBG1 > 0) {
- mes "[Guillaume Army Officer]";
- mes "An elite corps is already standing by to be dispatched to the battlefield.";
- mes "Why don't you go wait for a while? I suggest you sharpen your weapons and prepare your supplies until then.";
- }
- else {
- mes "[Guillaume Army Officer]";
- mes "You definitely seem to be ready for battle!";
- mes "Go show the Croixs what fear truly means!";
- mes "Today, our cry of victory shall echo all over the battlefield!";
- close2;
- warp "bat_room",85,223;
- end;
- }
- }
- }
- }
+ if (BaseLevel < 80) {
+ mes "[Guillaume Army Officer]";
+ mes "I'm very pleased that you want to join us and fight the Croix Army, but I'm sorry: I can't send a rookie like you to die on the cruel battlefield.";
+ break;
}
- break;
+ .@chk_urtime = questprogress(2070, PLAYTIME);
+ if (.@chk_urtime == 1) {
+ mes "[Guillaume Army Officer]";
+ mes "You seem to have just returned from the battlefield.";
+ mes "It's too early for you to go back. Go rest, and leave the enemies to us!";
+ break;
+ }
+ if (.@chk_urtime == 2)
+ erasequest 2070;
+ if (getmapusers("bat_b01") > 0) {
+ mes "[Guillaume Army Officer]";
+ mes "I've received a report informing me that an elite corps has been dispatched to the battlefield fighting the Croixs already.";
+ mes "Why don't you go wait for a while? I suggest you sharpen your weapons and prepare your supplies until then.";
+ break;
+ }
+ if ($@FlaviusBG1 > 0) {
+ mes "[Guillaume Army Officer]";
+ mes "An elite corps is already standing by to be dispatched to the battlefield.";
+ mes "Why don't you go wait for a while? I suggest you sharpen your weapons and prepare your supplies until then.";
+ break;
+ }
+ mes "[Guillaume Army Officer]";
+ mes "You definitely seem to be ready for battle!";
+ mes "Go show the Croixs what fear truly means!";
+ mes "Today, our cry of victory shall echo all over the battlefield!";
+ close2;
+ warp "bat_room",85,223;
+ end;
case 2:
mes "[Guillaume Army Officer]";
mes "Today, we shall be victorious!";
@@ -97,48 +90,41 @@ bat_room,133,121,1 script Flavius Officer#01b 4_M_CRU_KNT,{
if ((Class == Job_Novice) || (BaseClass == Job_SuperNovice)) {
mes "[Croix Army Officer]";
mes "I'm very pleased that you want to join us and fight the Guillaume Army, but I'm sorry: I can't send a rookie like you to die on the cruel battlefield.";
+ break;
}
- else {
- if (BaseLevel < 80) {
- mes "[Croix Army Officer]";
- mes "I'm very pleased that you want to join us and fight the Guillaume Army, but I'm sorry: I can't send a rookie like you to die on the cruel battlefield.";
- }
- else {
- set .@chk_urtime,checkquest(2070,PLAYTIME);
- if ((.@chk_urtime == 0)|| (.@chk_urtime == 1)) {
- mes "[Croix Army Officer]";
- mes "You seem to have just returned from the battlefield.";
- mes "It's too early for you to go back. Go rest, and leave the enemies to us!";
- }
- else {
- if (.@chk_urtime == 2)
- erasequest 2070;
- set .@mapcount2,getmapusers("bat_b01");
- if (.@mapcount2 > 0) {
- mes "[Croix Army Officer]";
- mes "I've received a report informing me that an elite corps has been dispatched to the battlefield fighting the Guillaume already.";
- mes "Why don't you go wait for a while? I suggest you sharpen your weapons and prepare your supplies until then.";
- }
- else {
- if ($@FlaviusBG1 > 0) {
- mes "[Croix Army Officer]";
- mes "An elite corps is already standing by to be dispatched to the battlefield.";
- mes "Why don't you go wait for a while? I suggest you sharpen your weapons and prepare your supplies until then.";
- }
- else {
- mes "[Croix Army Officer]";
- mes "You definitely seem to be ready for battle!";
- mes "Go show the Guillaumes what fear truly means!";
- mes "Today, our cry of victory shall echo all over the battlefield!";
- close2;
- warp "bat_room",85,207;
- end;
- }
- }
- }
- }
+ if (BaseLevel < 80) {
+ mes "[Croix Army Officer]";
+ mes "I'm very pleased that you want to join us and fight the Guillaume Army, but I'm sorry: I can't send a rookie like you to die on the cruel battlefield.";
+ break;
}
- break;
+ .@chk_urtime = questprogress(2070,PLAYTIME);
+ if (.@chk_urtime == 1) {
+ mes "[Croix Army Officer]";
+ mes "You seem to have just returned from the battlefield.";
+ mes "It's too early for you to go back. Go rest, and leave the enemies to us!";
+ break;
+ }
+ if (.@chk_urtime == 2)
+ erasequest 2070;
+ if (getmapusers("bat_b01") > 0) {
+ mes "[Croix Army Officer]";
+ mes "I've received a report informing me that an elite corps has been dispatched to the battlefield fighting the Guillaume already.";
+ mes "Why don't you go wait for a while? I suggest you sharpen your weapons and prepare your supplies until then.";
+ break;
+ }
+ if ($@FlaviusBG1 > 0) {
+ mes "[Croix Army Officer]";
+ mes "An elite corps is already standing by to be dispatched to the battlefield.";
+ mes "Why don't you go wait for a while? I suggest you sharpen your weapons and prepare your supplies until then.";
+ break;
+ }
+ mes "[Croix Army Officer]";
+ mes "You definitely seem to be ready for battle!";
+ mes "Go show the Guillaumes what fear truly means!";
+ mes "Today, our cry of victory shall echo all over the battlefield!";
+ close2;
+ warp "bat_room",85,207;
+ end;
case 2:
mes "[Croix Army Officer]";
mes "Today, we shall be victorious!";
@@ -254,48 +240,41 @@ bat_room,148,178,5 script Flavius Officer#02a 4_M_KY_KNT,{
if ((Class == Job_Novice) || (BaseClass == Job_SuperNovice)) {
mes "[Guillaume Army Officer]";
mes "I'm very pleased that you want to join us and fight the Croix Army, but I'm sorry: I can't send a rookie like you to die on the cruel battlefield.";
+ break;
}
- else {
- if (BaseLevel < 80) {
- mes "[Guillaume Army Officer]";
- mes "I'm very pleased that you want to join us and fight the Croix Army, but I'm sorry: I can't send a rookie like you to die on the cruel battlefield.";
- }
- else {
- set .@chk_urtime,checkquest(2070,PLAYTIME);
- if ((.@chk_urtime == 0)|| (.@chk_urtime == 1)) {
- mes "[Guillaume Army Officer]";
- mes "You seem to have just returned from the battlefield.";
- mes "It's too early for you to go back. Go rest, and leave the enemies to us!";
- }
- else {
- if (.@chk_urtime == 2)
- erasequest 2070;
- set .@mapcount2,getmapusers("bat_b02");
- if (.@mapcount2 > 0) {
- mes "[Guillaume Army Officer]";
- mes "I've received a report informing me that an elite corps has been dispatched to the battlefield fighting the Croixs already.";
- mes "Why don't you go wait for a while? I suggest you sharpen your weapons and prepare your supplies until then.";
- }
- else {
- if ($@FlaviusBG2 > 0) {
- mes "[Guillaume Army Officer]";
- mes "An elite corps is already standing by to be dispatched to the battlefield.";
- mes "Why don't you go wait for a while? I suggest you sharpen your weapons and prepare your supplies until then.";
- }
- else {
- mes "[Guillaume Army Officer]";
- mes "You definitely seem to be ready for battle!";
- mes "Go show the Croixs what fear truly means!";
- mes "Today, our cry of victory shall echo all over the battlefield!";
- close2;
- warp "bat_room",141,224;
- end;
- }
- }
- }
- }
+ if (BaseLevel < 80) {
+ mes "[Guillaume Army Officer]";
+ mes "I'm very pleased that you want to join us and fight the Croix Army, but I'm sorry: I can't send a rookie like you to die on the cruel battlefield.";
+ break;
}
- break;
+ .@chk_urtime = questprogress(2070, PLAYTIME);
+ if (.@chk_urtime == 1) {
+ mes "[Guillaume Army Officer]";
+ mes "You seem to have just returned from the battlefield.";
+ mes "It's too early for you to go back. Go rest, and leave the enemies to us!";
+ break;
+ }
+ if (.@chk_urtime == 2)
+ erasequest 2070;
+ if (getmapusers("bat_b02") > 0) {
+ mes "[Guillaume Army Officer]";
+ mes "I've received a report informing me that an elite corps has been dispatched to the battlefield fighting the Croixs already.";
+ mes "Why don't you go wait for a while? I suggest you sharpen your weapons and prepare your supplies until then.";
+ break;
+ }
+ if ($@FlaviusBG2 > 0) {
+ mes "[Guillaume Army Officer]";
+ mes "An elite corps is already standing by to be dispatched to the battlefield.";
+ mes "Why don't you go wait for a while? I suggest you sharpen your weapons and prepare your supplies until then.";
+ break;
+ }
+ mes "[Guillaume Army Officer]";
+ mes "You definitely seem to be ready for battle!";
+ mes "Go show the Croixs what fear truly means!";
+ mes "Today, our cry of victory shall echo all over the battlefield!";
+ close2;
+ warp "bat_room",141,224;
+ end;
case 2:
mes "[Guillaume Army Officer]";
mes "Today, we shall be victorious!";
@@ -321,48 +300,41 @@ bat_room,148,121,1 script Flavius Officer#02b 4_M_CRU_KNT,{
if ((Class == Job_Novice) || (BaseClass == Job_SuperNovice)) {
mes "[Croix Army Officer]";
mes "I'm very pleased that you want to join us and fight the Guillaume Army, but I'm sorry: I can't send a rookie like you to die on the cruel battlefield.";
+ break;
}
- else {
- if (BaseLevel < 80) {
- mes "[Croix Army Officer]";
- mes "I'm very pleased that you want to join us and fight the Guillaume Army, but I'm sorry: I can't send a rookie like you to die on the cruel battlefield.";
- }
- else {
- set .@chk_urtime,checkquest(2070,PLAYTIME);
- if ((.@chk_urtime == 0)|| (.@chk_urtime == 1)) {
- mes "[Croix Army Officer]";
- mes "You seem to have just returned from the battlefield.";
- mes "It's too early for you to go back. Go rest, and leave the enemies to us!";
- }
- else {
- if (.@chk_urtime == 2)
- erasequest 2070;
- set .@mapcount2,getmapusers("bat_b02");
- if (.@mapcount2 > 0) {
- mes "[Croix Army Officer]";
- mes "I've received a report informing me that an elite corps has been dispatched to the battlefield fighting the Guillaume already.";
- mes "Why don't you go wait for a while? I suggest you sharpen your weapons and prepare your supplies until then.";
- }
- else {
- if ($@FlaviusBG2 > 0) {
- mes "[Croix Army Officer]";
- mes "An elite corps is already standing by to be dispatched to the battlefield.";
- mes "Why don't you go wait for a while? I suggest you sharpen your weapons and prepare your supplies until then.";
- }
- else {
- mes "[Croix Army Officer]";
- mes "You definitely seem to be ready for battle!";
- mes "Go show the Guillaumes what fear truly means!";
- mes "Today, our cry of victory shall echo all over the battlefield!";
- close2;
- warp "bat_room",141,207;
- end;
- }
- }
- }
- }
+ if (BaseLevel < 80) {
+ mes "[Croix Army Officer]";
+ mes "I'm very pleased that you want to join us and fight the Guillaume Army, but I'm sorry: I can't send a rookie like you to die on the cruel battlefield.";
+ break;
}
- break;
+ .@chk_urtime = questprogress(2070,PLAYTIME);
+ if (.@chk_urtime == 1) {
+ mes "[Croix Army Officer]";
+ mes "You seem to have just returned from the battlefield.";
+ mes "It's too early for you to go back. Go rest, and leave the enemies to us!";
+ break;
+ }
+ if (.@chk_urtime == 2)
+ erasequest 2070;
+ if (getmapusers("bat_b02") > 0) {
+ mes "[Croix Army Officer]";
+ mes "I've received a report informing me that an elite corps has been dispatched to the battlefield fighting the Guillaume already.";
+ mes "Why don't you go wait for a while? I suggest you sharpen your weapons and prepare your supplies until then.";
+ break;
+ }
+ if ($@FlaviusBG2 > 0) {
+ mes "[Croix Army Officer]";
+ mes "An elite corps is already standing by to be dispatched to the battlefield.";
+ mes "Why don't you go wait for a while? I suggest you sharpen your weapons and prepare your supplies until then.";
+ break;
+ }
+ mes "[Croix Army Officer]";
+ mes "You definitely seem to be ready for battle!";
+ mes "Go show the Guillaumes what fear truly means!";
+ mes "Today, our cry of victory shall echo all over the battlefield!";
+ close2;
+ warp "bat_room",141,207;
+ end;
case 2:
mes "[Croix Army Officer]";
mes "Today, we shall be victorious!";
diff --git a/npc/battleground/kvm/kvm_enter.txt b/npc/battleground/kvm/kvm_enter.txt
index 1b5e9062c..8f9f40e2b 100644
--- a/npc/battleground/kvm/kvm_enter.txt
+++ b/npc/battleground/kvm/kvm_enter.txt
@@ -19,16 +19,16 @@
//============================================================
bat_room,164,178,5 script KVM Mercenary Officer#1 4_M_KY_KNT,{
/*
- set .@kvm,checkquest(6026,PLAYTIME);
- if ((.@kvm == 0) || (.@kvm == 1)) {
+ .@kvm = questprogress(6026,PLAYTIME);
+ if (.@kvm == 1) {
mes "[Croix Mercenary Officer]";
mes "I know that you've already signed with the Croix. Go back and join their team. We will not accept traitors to fight for us.";
close;
}
else if (.@kvm == 2) erasequest 6026;
*/
- set .@permit,checkquest(6025,PLAYTIME);
- if ((.@permit == 0) || (.@permit == 1)) {
+ .@permit = questprogress(6025,PLAYTIME);
+ if (.@permit == 1) {
mes "[Guillaume Mercenary Officer]";
mes "It seems you have recently participated in a KVM battle. You must wait 5 minutes before signing up again.";
close;
@@ -119,16 +119,16 @@ bat_room,167,178,5 script Guillaume Knight#kvm 4_M_KY_SOLD,{
//============================================================
bat_room,164,121,1 script KVM Mercenary Officer#2 4_M_CRU_KNT,{
/*
- set .@kvm,checkquest(6025,PLAYTIME);
- if ((.@kvm == 0) || (.@kvm == 1)) {
+ .@kvm = questprogress(6025,PLAYTIME);
+ if (.@kvm == 1) {
mes "[Croix Mercenary Officer]";
mes "I know that you've already signed with the Guillaume. Go back and join their team. We will not accept traitors to fight for us.";
close;
}
else if (.@kvm == 2) erasequest 6025;
*/
- set .@permit,checkquest(6025,PLAYTIME);
- if ((.@permit == 0) || (.@permit == 1)) {
+ .@permit = questprogress(6025,PLAYTIME);
+ if (.@permit == 1) {
mes "[Croix Mercenary Officer]";
mes "It seems you have recently participated in a KVM battle. You must wait 5 minutes before signing up again.";
close;
diff --git a/npc/battleground/tierra/tierra01.txt b/npc/battleground/tierra/tierra01.txt
index 10e2bfc85..2a6d5991a 100644
--- a/npc/battleground/tierra/tierra01.txt
+++ b/npc/battleground/tierra/tierra01.txt
@@ -73,7 +73,7 @@ bat_a01,352,342,0 script #bat_a01_quest_a -1,5,5,{
end;
OnTouch:
- if (checkquest(2069) < 0)
+ if (!questprogress(2069))
setquest 2069;
end;
}
@@ -82,7 +82,7 @@ bat_a01,353,52,0 script #bat_a01_quest_b -1,5,5,{
end;
OnTouch:
- if (checkquest(2069) < 0)
+ if (!questprogress(2069))
setquest 2069;
end;
}
@@ -634,16 +634,14 @@ OnTouch:
bat_a01,352,342,0 script A_CODE#bat_a01 -1,5,5,{
OnTouch:
- set .@chk_bfquest,checkquest(2069);
- if ((.@chk_bfquest == 0) || (.@chk_bfquest == 1))
+ if (questprogress(2069) == 1)
setquest 2069;
end;
}
bat_a01,353,52,0 script B_CODE#bat_a01 -1,5,5,{
OnTouch:
- set .@chk_bfquest,checkquest(2069);
- if ((.@chk_bfquest == 0) || (.@chk_bfquest == 1))
+ if (questprogress(2069) == 1)
setquest 2069;
end;
}
diff --git a/npc/battleground/tierra/tierra02.txt b/npc/battleground/tierra/tierra02.txt
index 0e7cc773d..129d0ee3e 100644
--- a/npc/battleground/tierra/tierra02.txt
+++ b/npc/battleground/tierra/tierra02.txt
@@ -72,7 +72,7 @@ bat_a02,352,342,0 script #bat_a02_quest_a -1,5,5,{
end;
OnTouch:
- if (checkquest(2069) < 0)
+ if (!questprogress(2069))
setquest 2069;
end;
}
@@ -81,7 +81,7 @@ bat_a02,353,52,0 script #bat_a02_quest_b -1,5,5,{
end;
OnTouch:
- if (checkquest(2069) < 0)
+ if (!questprogress(2069))
setquest 2069;
end;
}
@@ -633,16 +633,14 @@ OnTouch:
bat_a02,352,342,0 script A_CODE#bat_a02 -1,5,5,{
OnTouch:
- set .@chk_bfquest,checkquest(2069);
- if ((.@chk_bfquest == 0) || (.@chk_bfquest == 1))
+ if (questprogress(2069) == 1)
setquest 2069;
end;
}
bat_a02,353,52,0 script B_CODE#bat_a02 -1,5,5,{
OnTouch:
- set .@chk_bfquest,checkquest(2069);
- if ((.@chk_bfquest == 0) || (.@chk_bfquest == 1))
+ if (questprogress(2069) == 1)
setquest 2069;
end;
}
diff --git a/npc/battleground/tierra/tierra_enter.txt b/npc/battleground/tierra/tierra_enter.txt
index e68058247..19ceb732e 100644
--- a/npc/battleground/tierra/tierra_enter.txt
+++ b/npc/battleground/tierra/tierra_enter.txt
@@ -31,48 +31,41 @@ bat_room,124,178,5 script Tierra Gorge Officer#01a 4_M_KY_KNT,{
if ((Class == Job_Novice) || (BaseClass == Job_SuperNovice)) {
mes "[Guillaume Army Officer]";
mes "I'm very pleased that you want to join us and fight the Croix Army, but I'm sorry: I can't send a rookie like you to die on the cruel battlefield.";
+ break;
}
- else {
- if (BaseLevel < 80) {
- mes "[Guillaume Army Officer]";
- mes "I'm very pleased that you want to join us and fight the Croix Army, but I'm sorry: I can't send a rookie like you to die on the cruel battlefield.";
- }
- else {
- set .@chk_urtime,checkquest(2069,PLAYTIME);
- if ((.@chk_urtime == 0)|| (.@chk_urtime == 1)) {
- mes "[Guillaume Army Officer]";
- mes "You seem to have just returned from the battlefield.";
- mes "It's too early for you to go back. Go rest, and leave the enemies to us!";
- }
- else {
- if (.@chk_urtime == 2)
- erasequest 2069;
- set .@mapcount,getmapusers("bat_a01");
- if (.@mapcount > 0) {
- mes "[Guillaume Army Officer]";
- mes "I've received a report informing me that an elite corps has been dispatched to the battlefield fighting the Croixs already.";
- mes "Why don't you go wait for a while? I suggest you sharpen your weapons and prepare your supplies until then.";
- }
- else {
- if ($@TierraBG1) {
- mes "[Guillaume Army Officer]";
- mes "An elite corps is already standing by to be dispatched to the battlefield.";
- mes "Why don't you go wait for a while? I suggest you sharpen your weapons and prepare your supplies until then.";
- }
- else {
- mes "[Guillaume Army Officer]";
- mes "You definitely seem to be ready for battle!";
- mes "Go show the Croixs what fear truly means!";
- mes "Today, our cry of victory shall echo all over the battlefield!";
- close2;
- warp "bat_room",57,223;
- end;
- }
- }
- }
- }
+ if (BaseLevel < 80) {
+ mes "[Guillaume Army Officer]";
+ mes "I'm very pleased that you want to join us and fight the Croix Army, but I'm sorry: I can't send a rookie like you to die on the cruel battlefield.";
+ break;
}
- break;
+ .@chk_urtime = questprogress(2069,PLAYTIME);
+ if (.@chk_urtime == 1) {
+ mes "[Guillaume Army Officer]";
+ mes "You seem to have just returned from the battlefield.";
+ mes "It's too early for you to go back. Go rest, and leave the enemies to us!";
+ break;
+ }
+ if (.@chk_urtime == 2)
+ erasequest 2069;
+ if (getmapusers("bat_a01") > 0) {
+ mes "[Guillaume Army Officer]";
+ mes "I've received a report informing me that an elite corps has been dispatched to the battlefield fighting the Croixs already.";
+ mes "Why don't you go wait for a while? I suggest you sharpen your weapons and prepare your supplies until then.";
+ break;
+ }
+ if ($@TierraBG1) {
+ mes "[Guillaume Army Officer]";
+ mes "An elite corps is already standing by to be dispatched to the battlefield.";
+ mes "Why don't you go wait for a while? I suggest you sharpen your weapons and prepare your supplies until then.";
+ break;
+ }
+ mes "[Guillaume Army Officer]";
+ mes "You definitely seem to be ready for battle!";
+ mes "Go show the Croixs what fear truly means!";
+ mes "Today, our cry of victory shall echo all over the battlefield!";
+ close2;
+ warp "bat_room",57,223;
+ end;
case 2:
mes "[Guillaume Army Officer]";
mes "Today, we shall be victorious!";
@@ -98,48 +91,41 @@ bat_room,140,178,5 script Tierra Gorge Officer#02a 4_M_KY_KNT,{
if ((Class == Job_Novice) || (BaseClass == Job_SuperNovice)) {
mes "[Guillaume Army Officer]";
mes "I'm very pleased that you want to join us and fight the Croix Army, but I'm sorry: I can't send a rookie like you to die on the cruel battlefield.";
+ break;
}
- else {
- if (BaseLevel < 80) {
- mes "[Guillaume Army Officer]";
- mes "I'm very pleased that you want to join us and fight the Croix Army, but I'm sorry: I can't send a rookie like you to die on the cruel battlefield.";
- }
- else {
- set .@chk_urtime,checkquest(2069,PLAYTIME);
- if (.@chk_urtime == 1) {
- mes "[Guillaume Army Officer]";
- mes "You seem to have just returned from the battlefield.";
- mes "It's too early for you to go back. Go rest, and leave the enemies to us!";
- }
- else {
- if (.@chk_urtime == 2)
- erasequest 2069;
- set .@mapcount,getmapusers("bat_a02");
- if (.@mapcount > 0) {
- mes "[Guillaume Army Officer]";
- mes "I've received a report informing me that an elite corps has been dispatched to the battlefield fighting the Croixs already.";
- mes "Why don't you go wait for a while? I suggest you sharpen your weapons and prepare your supplies until then.";
- }
- else {
- if ($@TierraBG2) {
- mes "[Guillaume Army Officer]";
- mes "An elite corps is already standing by to be dispatched to the battlefield.";
- mes "Why don't you go wait for a while? I suggest you sharpen your weapons and prepare your supplies until then.";
- }
- else {
- mes "[Guillaume Army Officer]";
- mes "You definitely seem to be ready for battle!";
- mes "Go show the Croixs what fear truly means!";
- mes "Today, our cry of victory shall echo all over the battlefield!";
- close2;
- warp "bat_room",114,223;
- end;
- }
- }
- }
- }
+ if (BaseLevel < 80) {
+ mes "[Guillaume Army Officer]";
+ mes "I'm very pleased that you want to join us and fight the Croix Army, but I'm sorry: I can't send a rookie like you to die on the cruel battlefield.";
+ break;
}
- break;
+ .@chk_urtime = questprogress(2069,PLAYTIME);
+ if (.@chk_urtime == 1) {
+ mes "[Guillaume Army Officer]";
+ mes "You seem to have just returned from the battlefield.";
+ mes "It's too early for you to go back. Go rest, and leave the enemies to us!";
+ break;
+ }
+ if (.@chk_urtime == 2)
+ erasequest 2069;
+ if (getmapusers("bat_a02") > 0) {
+ mes "[Guillaume Army Officer]";
+ mes "I've received a report informing me that an elite corps has been dispatched to the battlefield fighting the Croixs already.";
+ mes "Why don't you go wait for a while? I suggest you sharpen your weapons and prepare your supplies until then.";
+ break;
+ }
+ if ($@TierraBG2) {
+ mes "[Guillaume Army Officer]";
+ mes "An elite corps is already standing by to be dispatched to the battlefield.";
+ mes "Why don't you go wait for a while? I suggest you sharpen your weapons and prepare your supplies until then.";
+ break;
+ }
+ mes "[Guillaume Army Officer]";
+ mes "You definitely seem to be ready for battle!";
+ mes "Go show the Croixs what fear truly means!";
+ mes "Today, our cry of victory shall echo all over the battlefield!";
+ close2;
+ warp "bat_room",114,223;
+ end;
case 2:
mes "[Guillaume Army Officer]";
mes "Today, we shall be victorious!";
@@ -263,48 +249,41 @@ bat_room,125,121,1 script Tierra Gorge Officer#01b 4_M_CRU_KNT,{
if ((Class == Job_Novice) || (BaseClass == Job_SuperNovice)) {
mes "[Croix Army Officer]";
mes "I'm very pleased that you want to join us and fight the Guillaume Army, but I'm sorry: I can't send a rookie like you to die on the cruel battlefield.";
+ break;
}
- else {
- if (BaseLevel < 80) {
- mes "[Croix Army Officer]";
- mes "I'm very pleased that you want to join us and fight the Guillaume Army, but I'm sorry: I can't send a rookie like you to die on the cruel battlefield.";
- }
- else {
- set .@chk_urtime,checkquest(2069,PLAYTIME);
- if ((.@chk_urtime == 0)|| (.@chk_urtime == 1)) {
- mes "[Croix Army Officer]";
- mes "You seem to have just returned from the battlefield.";
- mes "It's too early for you to go back. Go rest, and leave the enemies to us!";
- }
- else {
- if (.@chk_urtime == 2)
- erasequest 2069;
- set .@mapcount,getmapusers("bat_a02");
- if (.@mapcount > 0) {
- mes "[Croix Army Officer]";
- mes "I've received a report informing me that an elite corps has been dispatched to the battlefield fighting the Guillaume already.";
- mes "Why don't you go wait for a while? I suggest you sharpen your weapons and prepare your supplies until then.";
- }
- else {
- if ($@TierraBG1) {
- mes "[Croix Army Officer]";
- mes "An elite corps is already standing by to be dispatched to the battlefield.";
- mes "Why don't you go wait for a while? I suggest you sharpen your weapons and prepare your supplies until then.";
- }
- else {
- mes "[Croix Army Officer]";
- mes "You definitely seem to be ready for battle!";
- mes "Go show the Guillaumes what fear truly means!";
- mes "Today, our cry of victory shall echo all over the battlefield!";
- close2;
- warp "bat_room",57,207;
- end;
- }
- }
- }
- }
+ if (BaseLevel < 80) {
+ mes "[Croix Army Officer]";
+ mes "I'm very pleased that you want to join us and fight the Guillaume Army, but I'm sorry: I can't send a rookie like you to die on the cruel battlefield.";
+ break;
}
- break;
+ .@chk_urtime = questprogress(2069,PLAYTIME);
+ if (.@chk_urtime == 1) {
+ mes "[Croix Army Officer]";
+ mes "You seem to have just returned from the battlefield.";
+ mes "It's too early for you to go back. Go rest, and leave the enemies to us!";
+ break;
+ }
+ if (.@chk_urtime == 2)
+ erasequest 2069;
+ if (getmapusers("bat_a02") > 0) {
+ mes "[Croix Army Officer]";
+ mes "I've received a report informing me that an elite corps has been dispatched to the battlefield fighting the Guillaume already.";
+ mes "Why don't you go wait for a while? I suggest you sharpen your weapons and prepare your supplies until then.";
+ break;
+ }
+ if ($@TierraBG1) {
+ mes "[Croix Army Officer]";
+ mes "An elite corps is already standing by to be dispatched to the battlefield.";
+ mes "Why don't you go wait for a while? I suggest you sharpen your weapons and prepare your supplies until then.";
+ break;
+ }
+ mes "[Croix Army Officer]";
+ mes "You definitely seem to be ready for battle!";
+ mes "Go show the Guillaumes what fear truly means!";
+ mes "Today, our cry of victory shall echo all over the battlefield!";
+ close2;
+ warp "bat_room",57,207;
+ end;
case 2:
mes "[Croix Army Officer]";
mes "Today, we shall be victorious!";
@@ -330,48 +309,41 @@ bat_room,140,121,1 script Tierra Gorge Officer#02b 4_M_CRU_KNT,{
if ((Class == Job_Novice) || (BaseClass == Job_SuperNovice)) {
mes "[Croix Army Officer]";
mes "I'm very pleased that you want to join us and fight the Guillaume Army, but I'm sorry: I can't send a rookie like you to die on the cruel battlefield.";
+ break;
}
- else {
- if (BaseLevel < 80) {
- mes "[Croix Army Officer]";
- mes "I'm very pleased that you want to join us and fight the Guillaume Army, but I'm sorry: I can't send a rookie like you to die on the cruel battlefield.";
- }
- else {
- set .@chk_urtime,checkquest(2069,PLAYTIME);
- if (.@chk_urtime == 1) {
- mes "[Croix Army Officer]";
- mes "You seem to have just returned from the battlefield.";
- mes "It's too early for you to go back. Go rest, and leave the enemies to us!";
- }
- else {
- if (.@chk_urtime == 2)
- erasequest 2069;
- set .@mapcount,getmapusers("bat_a02");
- if (.@mapcount > 0) {
- mes "[Croix Army Officer]";
- mes "I've received a report informing me that an elite corps has been dispatched to the battlefield fighting the Guillaume already.";
- mes "Why don't you go wait for a while? I suggest you sharpen your weapons and prepare your supplies until then.";
- }
- else {
- if ($@TierraBG2) {
- mes "[Croix Army Officer]";
- mes "An elite corps is already standing by to be dispatched to the battlefield.";
- mes "Why don't you go wait for a while? I suggest you sharpen your weapons and prepare your supplies until then.";
- }
- else {
- mes "[Croix Army Officer]";
- mes "You definitely seem to be ready for battle!";
- mes "Go show the Guillaumes what fear truly means!";
- mes "Today, our cry of victory shall echo all over the battlefield!";
- close2;
- warp "bat_room",114,207;
- end;
- }
- }
- }
- }
+ if (BaseLevel < 80) {
+ mes "[Croix Army Officer]";
+ mes "I'm very pleased that you want to join us and fight the Guillaume Army, but I'm sorry: I can't send a rookie like you to die on the cruel battlefield.";
+ break;
}
- break;
+ .@chk_urtime = questprogress(2069,PLAYTIME);
+ if (.@chk_urtime == 1) {
+ mes "[Croix Army Officer]";
+ mes "You seem to have just returned from the battlefield.";
+ mes "It's too early for you to go back. Go rest, and leave the enemies to us!";
+ break;
+ }
+ if (.@chk_urtime == 2)
+ erasequest 2069;
+ if (getmapusers("bat_a02") > 0) {
+ mes "[Croix Army Officer]";
+ mes "I've received a report informing me that an elite corps has been dispatched to the battlefield fighting the Guillaume already.";
+ mes "Why don't you go wait for a while? I suggest you sharpen your weapons and prepare your supplies until then.";
+ break;
+ }
+ if ($@TierraBG2) {
+ mes "[Croix Army Officer]";
+ mes "An elite corps is already standing by to be dispatched to the battlefield.";
+ mes "Why don't you go wait for a while? I suggest you sharpen your weapons and prepare your supplies until then.";
+ break;
+ }
+ mes "[Croix Army Officer]";
+ mes "You definitely seem to be ready for battle!";
+ mes "Go show the Guillaumes what fear truly means!";
+ mes "Today, our cry of victory shall echo all over the battlefield!";
+ close2;
+ warp "bat_room",114,207;
+ end;
case 2:
mes "[Croix Army Officer]";
mes "Today, we shall be victorious!";
diff --git a/npc/cities/aldebaran.txt b/npc/cities/aldebaran.txt
index 33acb60c2..f4b3662fc 100644
--- a/npc/cities/aldebaran.txt
+++ b/npc/cities/aldebaran.txt
@@ -1058,180 +1058,77 @@ aldeba_in,79,161,6 script Kafra#04 4_F_KAFRA3,{
next;
mes "[Kafra]";
mes "The amount of special reserve points that you have is: ^FF0000"+RESRVPTS+"^000000 pts. Please make a choice based on your point total.";
-M_Menu:
- next;
- menu "100- Potato 7 ea",M_1a, "200- Potato 15 ea",M_1b, "300- Potato 25 ea",M_1c, "400- Potato 35 ea",M_1d,
- "500- Potato 50 ea",M_1e, "600- Potato 60 ea",M_1f, "700- Potato 75 ea",M_1g, "800- Potato 85 ea",M_1h,
- "900- Potato 100 ea",M_1i, "1000- 1st Lottery Chance!",M_1j, "Next items",M_2, "Cancel",M_End;
-
- M_1a:
- if(RESRVPTS < 100) goto sL_LowPts1;
- mes "[Kafra]";
- mes "Here you are.";
- getitem 516, 7;
- set RESRVPTS, RESRVPTS - 100;
- close;
- M_1b:
- if(RESRVPTS < 200) goto sL_LowPts1;
- mes "[Kafra]";
- mes "Here you are.";
- getitem 516, 15;
- set RESRVPTS, RESRVPTS - 200;
- close;
- M_1c:
- if(RESRVPTS < 300) goto sL_LowPts1;
- mes "[Kafra]";
- mes "Here you are.";
- getitem 516, 25;
- set RESRVPTS, RESRVPTS - 300;
- close;
- M_1d:
- if(RESRVPTS < 400) goto sL_LowPts1;
- mes "[Kafra]";
- mes "Here you are.";
- getitem 516, 35;
- set RESRVPTS, RESRVPTS - 400;
- close;
- M_1e:
- if(RESRVPTS < 500) goto sL_LowPts1;
- mes "[Kafra]";
- mes "Here you are.";
- getitem 516, 50;
- set RESRVPTS, RESRVPTS - 500;
- close;
- M_1f:
- if(RESRVPTS < 600) goto sL_LowPts1;
- mes "[Kafra]";
- mes "Here you are.";
- getitem 516, 60;
- set RESRVPTS, RESRVPTS - 600;
- close;
- M_1g:
- if(RESRVPTS < 700) goto sL_LowPts1;
- mes "[Kafra]";
- mes "Here you are.";
- getitem 516, 75;
- set RESRVPTS, RESRVPTS - 700;
- close;
- M_1h:
- if(RESRVPTS < 800) goto sL_LowPts1;
- mes "[Kafra]";
- mes "Here you are.";
- getitem 516, 85;
- set RESRVPTS, RESRVPTS - 800;
- close;
- M_1i:
- if(RESRVPTS < 900) goto sL_LowPts1;
- mes "[Kafra]";
- mes "Here you are.";
- getitem 516, 100;
- set RESRVPTS, RESRVPTS - 900;
- close;
- M_1j:
- if(RESRVPTS < 1000) goto sL_LowPts1;
- set RESRVPTS, RESRVPTS - 1000;
- mes "[Kafra]";
- mes "^0000FF1st Lottery Opportunity!!^000000";
- set @Lotto, 1;
+ .@page = 1;
+ while (true) {
+ if (.@page == 1) {
+ // Points, Item ID, amount
+ setarray .@choices, 100, Sweet_Potato, 7,
+ 200, Sweet_Potato, 15,
+ 300, Sweet_Potato, 25,
+ 400, Sweet_Potato, 35,
+ 500, Sweet_Potato, 50,
+ 600, Sweet_Potato, 60,
+ 700, Sweet_Potato, 75,
+ 800, Sweet_Potato, 85,
+ 900, Sweet_Potato, 100,
+ 1000, null, 0;
+ .@ordinal$ = "1st";
+ .@changepage$ = "Next items";
+ } else { // .@page == 2
+ setarray .@choices, 1100, Sweet_Potato, 7,
+ 1300, Sweet_Potato, 15,
+ 1500, Sweet_Potato, 25,
+ 1700, Sweet_Potato, 35,
+ 1900, Sweet_Potato, 50,
+ 2100, Sweet_Potato, 60,
+ 2300, Sweet_Potato, 75,
+ 2500, Sweet_Potato, 85,
+ 2800, Sweet_Potato, 100,
+ 3000, null, 0;
+ .@ordinal$ = "2nd";
+ .@changepage$ = "Previous List";
+ }
+ .@list$ = "";
+ .@numitemchoices = 0;
+ for (.@i = 0; .@i < getarraysize(.@choices) - 3; .@i += 3) { // Skip the last entry as it's handled separately
+ .@list$ += .@choices[i] + "- " + getitemname(.@choices[.@i+1]) + " " + .@choices[.@i+2] + " ea:";
+ ++.@numitemchoices;
+ }
+ .@list$ += .@choices[.@i] + "- " + .@ordinal$ + " Lottery Chance!:" + .@changepage$ +":Cancel";
next;
- callfunc "F_Lottery";
- goto M_End;
-
- sL_LowPts1:
- mes "[Kafra]";
- mes "I'm sorry but you do not have enough reserve points for that selection.";
- goto M_Menu;
-
- M_2:
- menu "1100- Red Potion 7 ea",M_2a, "1300- Red Potion 15 ea",M_2b, "1500- Red Potion 25 ea",M_2c,
- "1700- Red Potion 35 ea",M_2d, "1900- Red Potion 50 ea",M_2e, "2100- Red Potion 60 ea",M_2f,
- "2300- Red Potion 75 ea",M_2g, "2500- Red Potion 85 ea",M_2h, "2800- Red Potion 100 ea",M_2i,
- "3000- 2nd Lotery Chance!",M_2j, "Previous List",M_Menu, "Cancel",M_End;
-
- M_2a:
- if(RESRVPTS < 1100) goto sL_LowPts2;
- mes "[Kafra]";
- mes "Here you are.";
- getitem 501, 7;
- set RESRVPTS, RESRVPTS - 1100;
- close;
- M_2b:
- if(RESRVPTS < 1300) goto sL_LowPts2;
- mes "[Kafra]";
- mes "Here you are.";
- getitem 501, 15;
- set RESRVPTS, RESRVPTS - 1300;
- close;
- M_2c:
- if(RESRVPTS < 1500) goto sL_LowPts2;
- mes "[Kafra]";
- mes "Here you are.";
- getitem 501, 25;
- set RESRVPTS, RESRVPTS - 1500;
- close;
- M_2d:
- if(RESRVPTS < 1700) goto sL_LowPts2;
- mes "[Kafra]";
- mes "Here you are.";
- getitem 501, 35;
- set RESRVPTS, RESRVPTS - 1700;
- close;
- M_2e:
- if(RESRVPTS < 1900) goto sL_LowPts2;
- mes "[Kafra]";
- mes "Here you are.";
- getitem 501, 50;
- set RESRVPTS, RESRVPTS - 1900;
- close;
- M_2f:
- if(RESRVPTS < 2100) goto sL_LowPts2;
- mes "[Kafra]";
- mes "Here you are.";
- getitem 501, 60;
- set RESRVPTS, RESRVPTS - 2100;
- close;
- M_2g:
- if(RESRVPTS < 2300) goto sL_LowPts2;
- mes "[Kafra]";
- mes "Here you are.";
- getitem 501, 75;
- set RESRVPTS, RESRVPTS - 2300;
- close;
- M_2h:
- if(RESRVPTS < 2500) goto sL_LowPts2;
- mes "[Kafra]";
- mes "Here you are.";
- getitem 501, 85;
- set RESRVPTS, RESRVPTS - 2500;
- close;
- M_2i:
- if(RESRVPTS < 2800) goto sL_LowPts2;
- mes "[Kafra]";
- mes "Here you are.";
- getitem 501, 100;
- set RESRVPTS, RESRVPTS - 2800;
- close;
- M_2j:
- if(RESRVPTS < 3000) goto sL_LowPts2;
- set RESRVPTS, RESRVPTS - 3000;
- mes "[Kafra]";
- mes "^0000FF2nd Lottery Opportunity!!^000000";
- set @Lotto, 2;
+ .@chosen = select(.@list$) - 1;
+ if (.@chosen <= .@numitemchoices) {
+ if (RESRVPTS < .@choices[.@chosen*3]) {
+ mes "[Kafra]";
+ mes "I'm sorry but you do not have enough reserve points for that selection.";
+ continue;
+ }
+ RESRVPTS -= .@choices[.@chosen * 3];
+ if (.@chosen < .@numitemchances) {
+ // Item
+ mes "[Kafra]";
+ mes "Here you are.";
+ getitem .@choices[.@chosen*3 + 1], .@choices[.@chosen*3 + 2];
+ close;
+ }
+ // Lottery chance
+ mes "^0000FF"+ .@ordinal$ + " Lottery Opportunity!!^000000";
+ @Lotto = .@page;
next;
callfunc "F_Lottery";
- goto M_End;
-
- sL_LowPts2:
- mes "[Kafra]";
- mes "I'm sorry but you do not have enough reserve points for that selection.";
- next;
- goto M_2;
+ break;
+ } else if (.@chosen == .@numitemchoices + 1) { // next/previous items
+ .@page = (.@page == 1 ? 2 : 1);
+ continue;
+ } else { // Cancel
+ break;
+ }
+ }
- M_End:
- mes "[Kafra]";
- mes "Please come back anytime when you have more reserve points.";
- cutin "",255;
- close;
+ mes "[Kafra]";
+ mes "Please come back anytime when you have more reserve points.";
+ cutin "",255;
+ close;
}
// Special Reserve 2 ----------------------------------------------
@@ -1244,44 +1141,45 @@ aldeba_in,88,161,3 script Kafra#05 4_F_KAFRA3,{
mes "[Kafra]";
mes "Would you like to use your points?";
next;
- menu "Yes I would.",-, "Maybe next time.",M_End;
-
+ if (select("Yes I would.","Maybe next time.") == 1) {
mes "[Kafra]";
mes "You have the following amount of special reserve points: ^5544FF"+RESRVPTS+"^000000.";
mes "Make a choice and test your luck!";
next;
- menu "5000pts = 1st Lottery Chance!",sM_1st, "7000pts = 2nd Lottery Chance!",sM_2nd, "10000pts = 3rd Lottery Chance!",sM_3rd, "Cancel",M_End;
-
- sM_1st:
- if(RESRVPTS < 5000) goto sL_NotEnuf;
- set RESRVPTS, RESRVPTS - 5000;
- set @Lotto, 3;
- callfunc "F_Lottery";
- goto M_End;
- sM_2nd:
- if(RESRVPTS < 7000) goto sL_NotEnuf;
- set RESRVPTS, RESRVPTS - 7000;
- set @Lotto, 4;
- callfunc "F_Lottery";
- goto M_End;
- sM_3rd:
- if(RESRVPTS < 10000) goto sL_NotEnuf;
- set RESRVPTS, RESRVPTS - 10000;
- set @Lotto, 5;
- callfunc "F_Lottery";
- goto M_End;
+ switch (select("5000pts = 1st Lottery Chance!","7000pts = 2nd Lottery Chance!","10000pts = 3rd Lottery Chance!","Cancel")) {
+ case 1: // 5000
+ .@points = 5000;
+ @Lotto = 3;
+ break;
+ case 2: // 7000
+ .@points = 7000;
+ @Lotto = 4;
+ break;
+ case 3: // 10000
+ .@points = 10000;
+ @Lotto = 5;
+ break;
+ case 4: // Cancel
+ .@points = 0;
+ break;
+ }
- sL_NotEnuf:
+ if (.@points) {
+ if (RESRVPTS < .@points) {
mes "[Kafra]";
mes "I'm sorry dear but you do not have enough points for this selection.";
cutin "",255;
close;
- M_End:
- mes "[Kafra]";
- mes "No problem. Collect more and more special reserve points by using the Kafra Services found throughout Rune Midgard.";
- mes "Thank you for using Kafra Corp. services.";
- cutin "",255;
- close;
+ }
+ RESRVPTS -= .@points;
+ callfunc "F_Lottery";
+ }
+ }
+ mes "[Kafra]";
+ mes "No problem. Collect more and more special reserve points by using the Kafra Services found throughout Rune Midgard.";
+ mes "Thank you for using Kafra Corp. services.";
+ cutin "",255;
+ close;
}
// Function F_Lottery ------------------------------------------------------------------------------------------
diff --git a/npc/custom/battleground/bg_common.txt b/npc/custom/battleground/bg_common.txt
index 895191961..8b99deb39 100644
--- a/npc/custom/battleground/bg_common.txt
+++ b/npc/custom/battleground/bg_common.txt
@@ -217,9 +217,9 @@ bat_room,156,178,5 script Tierra Valley Officer#1 4_M_KY_KNT,{
close;
}
- if( checkquest(2069,PLAYTIME) == 2 ) erasequest 2069;
- if( checkquest(2069,PLAYTIME) != -1 )
- {
+ if (questprogress(2069,PLAYTIME) == 2)
+ erasequest 2069;
+ if (questprogress(2069,PLAYTIME)) {
mes "You have received an indicator showing that you've participated in the Battle at Tierra Gorge. I can't let you participate in any other battles until the indicator goes off.";
next;
mes "[Tierra Officer]";
@@ -287,9 +287,9 @@ bat_room,156,121,1 script Tierra Valley Officer#2 4_M_CRU_KNT,{
close;
}
- if( checkquest(2069,PLAYTIME) == 2 ) erasequest 2069;
- if( checkquest(2069,PLAYTIME) != -1 )
- {
+ if (questprogress(2069,PLAYTIME) == 2)
+ erasequest 2069;
+ if (questprogress(2069,PLAYTIME)) {
mes "You have received an indicator showing that you've participated in the Battle at Tierra Gorge. I can't let you participate in any other battles until the indicator goes off.";
next;
mes "[Tierra Officer]";
@@ -357,9 +357,9 @@ bat_room,164,178,5 script Tierra Valley Officer#3 4_M_KY_KNT,{
close;
}
- if( checkquest(2069,PLAYTIME) == 2 ) erasequest 2069;
- if( checkquest(2069,PLAYTIME) != -1 )
- {
+ if (questprogress(2069,PLAYTIME) == 2)
+ erasequest 2069;
+ if (questprogress(2069,PLAYTIME)) {
mes "You have received an indicator showing that you've participated in the Battle at Tierra Gorge. I can't let you participate in any other battles until the indicator goes off.";
next;
mes "[Tierra Officer]";
@@ -427,9 +427,9 @@ bat_room,164,121,1 script Tierra Valley Officer#4 4_M_CRU_KNT,{
close;
}
- if( checkquest(2069,PLAYTIME) == 2 ) erasequest 2069;
- if( checkquest(2069,PLAYTIME) != -1 )
- {
+ if (questprogress(2069,PLAYTIME) == 2)
+ erasequest 2069;
+ if (questprogress(2069,PLAYTIME)) {
mes "You have received an indicator showing that you've participated in the Battle at Tierra Gorge. I can't let you participate in any other battles until the indicator goes off.";
next;
mes "[Tierra Officer]";
@@ -498,9 +498,9 @@ bat_room,172,178,5 script Flavius Officer#1 4_M_KY_KNT,{
close;
}
- if( checkquest(2070,PLAYTIME) == 2 ) erasequest 2070;
- if( checkquest(2070,PLAYTIME) != -1 )
- {
+ if (questprogress(2070,PLAYTIME) == 2)
+ erasequest 2070;
+ if (questprogress(2070,PLAYTIME)) {
mes "You have received an indicator showing that you've participated in the Battle at Flavius. I can't let you participate in any other battles until the indicator goes off.";
next;
mes "[Flavius Officer]";
@@ -569,9 +569,9 @@ bat_room,172,121,1 script Flavius Officer#2 4_M_CRU_KNT,{
close;
}
- if( checkquest(2070,PLAYTIME) == 2 ) erasequest 2070;
- if( checkquest(2070,PLAYTIME) != -1 )
- {
+ if (questprogress(2070,PLAYTIME) == 2)
+ erasequest 2070;
+ if (questprogress(2070,PLAYTIME)) {
mes "You have received an indicator showing that you've participated in the Battle at Flavius. I can't let you participate in any other battles until the indicator goes off.";
next;
mes "[Flavius Officer]";
@@ -640,9 +640,9 @@ bat_room,148,178,5 script Flavius Officer#3 4_M_KY_KNT,{
close;
}
- if( checkquest(2070,PLAYTIME) == 2 ) erasequest 2070;
- if( checkquest(2070,PLAYTIME) != -1 )
- {
+ if (questprogress(2070,PLAYTIME) == 2)
+ erasequest 2070;
+ if (questprogress(2070,PLAYTIME)) {
mes "You have received an indicator showing that you've participated in the Battle at Flavius. I can't let you participate in any other battles until the indicator goes off.";
next;
mes "[Flavius Officer]";
@@ -711,9 +711,9 @@ bat_room,148,121,1 script Flavius Officer#4 4_M_CRU_KNT,{
close;
}
- if( checkquest(2070,PLAYTIME) == 2 ) erasequest 2070;
- if( checkquest(2070,PLAYTIME) != -1 )
- {
+ if (questprogress(2070,PLAYTIME) == 2)
+ erasequest 2070;
+ if (questprogress(2070,PLAYTIME)) {
mes "You have received an indicator showing that you've participated in the Battle at Flavius. I can't let you participate in any other battles until the indicator goes off.";
next;
mes "[Flavius Officer]";
@@ -779,9 +779,9 @@ bat_room,140,178,5 script KVM [80-99] Officer#1 4_M_KY_KNT,{
close;
}
- if( checkquest(6025,PLAYTIME) == 2 ) erasequest 6025;
- if( checkquest(6025,PLAYTIME) != -1 )
- {
+ if (questprogress(6025,PLAYTIME) == 2)
+ erasequest 6025;
+ if (questprogress(6025,PLAYTIME)) {
mes "You have received an indicator showing that you've participated in the Battle at KvM. I can't let you participate in any other battles until the indicator goes off.";
next;
mes "[KVM Officer]";
@@ -847,9 +847,9 @@ bat_room,140,121,1 script KVM [80-99] Officer#2 4_M_CRU_KNT,{
close;
}
- if( checkquest(6025,PLAYTIME) == 2 ) erasequest 6025;
- if( checkquest(6025,PLAYTIME) != -1 )
- {
+ if (questprogress(6025,PLAYTIME) == 2)
+ erasequest 6025;
+ if (questprogress(6025,PLAYTIME)) {
mes "You have received an indicator showing that you've participated in the Battle at KvM. I can't let you participate in any other battles until the indicator goes off.";
next;
mes "[KVM Officer]";
@@ -915,9 +915,9 @@ bat_room,132,178,5 script KVM [60-79] Officer#1 4_M_KY_KNT,{
close;
}
- if( checkquest(6025,PLAYTIME) == 2 ) erasequest 6025;
- if( checkquest(6025,PLAYTIME) != -1 )
- {
+ if (questprogress(6025,PLAYTIME) == 2)
+ erasequest 6025;
+ if (questprogress(6025,PLAYTIME)) {
mes "You have received an indicator showing that you've participated in the Battle at KvM. I can't let you participate in any other battles until the indicator goes off.";
next;
mes "[KVM Officer]";
@@ -983,9 +983,9 @@ bat_room,132,121,1 script KVM [60-79] Officer#2 4_M_CRU_KNT,{
close;
}
- if( checkquest(6025,PLAYTIME) == 2 ) erasequest 6025;
- if( checkquest(6025,PLAYTIME) != -1 )
- {
+ if (questprogress(6025,PLAYTIME) == 2)
+ erasequest 6025;
+ if (questprogress(6025,PLAYTIME)) {
mes "You have received an indicator showing that you've participated in the Battle at KvM. I can't let you participate in any other battles until the indicator goes off.";
next;
mes "[KVM Officer]";
@@ -1051,9 +1051,9 @@ bat_room,124,178,5 script KVM [1-59] Officer#1 4_M_KY_KNT,{
close;
}
- if( checkquest(6025,PLAYTIME) == 2 ) erasequest 6025;
- if( checkquest(6025,PLAYTIME) != -1 )
- {
+ if (questprogress(6025,PLAYTIME) == 2)
+ erasequest 6025;
+ if (questprogress(6025,PLAYTIME)) {
mes "You have received an indicator showing that you've participated in the Battle at KvM. I can't let you participate in any other battles until the indicator goes off.";
next;
mes "[KVM Officer]";
@@ -1119,9 +1119,9 @@ bat_room,124,121,1 script KVM [1-59] Officer#2 4_M_CRU_KNT,{
close;
}
- if( checkquest(6025,PLAYTIME) == 2 ) erasequest 6025;
- if( checkquest(6025,PLAYTIME) != -1 )
- {
+ if (questprogress(6025,PLAYTIME) == 2)
+ erasequest 6025;
+ if (questprogress(6025,PLAYTIME)) {
mes "You have received an indicator showing that you've participated in the Battle at KvM. I can't let you participate in any other battles until the indicator goes off.";
next;
mes "[KVM Officer]";
diff --git a/npc/custom/bgqueue/flavius.txt b/npc/custom/bgqueue/flavius.txt
index 36e02e86d..8112be12e 100644
--- a/npc/custom/bgqueue/flavius.txt
+++ b/npc/custom/bgqueue/flavius.txt
@@ -426,14 +426,14 @@ OnTouch:
bat_b01,87,76,0 script A_CODE#bat_b01 -1,5,5,{
OnTouch:
- if (checkquest(2070) < 0)
+ if (!questprogress(2070))
setquest 2070;
end;
}
bat_b01,312,224,0 script B_CODE#bat_b01 -1,5,5,{
OnTouch:
- if (checkquest(2070) < 0)
+ if (!questprogress(2070))
setquest 2070;
end;
}
diff --git a/npc/custom/breeder.txt b/npc/custom/breeder.txt
index 0222f5b3a..af4a740b4 100644
--- a/npc/custom/breeder.txt
+++ b/npc/custom/breeder.txt
@@ -11,7 +11,7 @@
//============================================================
prontera,124,201,1 script Universal Rental NPC 4_F_JOB_BLACKSMITH,{
- if (ismounting()) {
+ if (hascashmount()) {
message strcharinfo(0),"You must first remove your mount.";
end;
}
diff --git a/npc/custom/jobmaster.txt b/npc/custom/jobmaster.txt
index 88a1897da..e476ce2df 100644
--- a/npc/custom/jobmaster.txt
+++ b/npc/custom/jobmaster.txt
@@ -24,8 +24,8 @@ prontera,153,193,6 script Job Master 2_F_MAGICMASTER,{
mes "No more jobs are available.";
close;
}
- if (checkfalcon() || checkcart() || checkriding() || ismounting()) {
- mes "Please remove your "+((checkfalcon())?"falcon":"")+((checkcart())?"cart":"")+((checkriding())?"Peco":"")+((ismounting())?"mount":"")
+ if (checkfalcon() || checkcart() || checkriding() || hascashmount()) {
+ mes "Please remove your "+((checkfalcon())?"falcon":"")+((checkcart())?"cart":"")+((checkriding())?"Peco":"")+((hascashmount())?"mount":"")
+" before proceeding.";
close;
}
diff --git a/npc/events/RWC_2011.txt b/npc/events/RWC_2011.txt
index 992bd7bd3..4f0a05b86 100644
--- a/npc/events/RWC_2011.txt
+++ b/npc/events/RWC_2011.txt
@@ -207,8 +207,8 @@ prontera,114,81,5 script RWC2011 Agent#2 4_M_ATEIL,{
close;
}
} else if (oversea_event == 2) {
- set .@playtime, checkquest(13001,PLAYTIME);
- if (.@playtime == 0 || .@playtime == 1) {
+ .@playtime = questprogress(13001,PLAYTIME);
+ if (.@playtime == 1) {
mes "[RWC2011 Agent]";
mes "First, I will start attaching cards you found... I'll take the rest of cards tomorrow.";
mes "Please come back tomorrow.";
diff --git a/npc/events/christmas_2005.txt b/npc/events/christmas_2005.txt
index 5236e5a54..eb80e6be1 100644
--- a/npc/events/christmas_2005.txt
+++ b/npc/events/christmas_2005.txt
@@ -1026,7 +1026,7 @@ prontera,156,242,0 script Oholy#pron::OholyDup 1_F_PRIEST,{
mes "I feel so sad for disappointed";
mes "kids who didn't hear the carols.";
next;
- menu "...can I help you?",-;
+ select("...can I help you?");
mes "[Oholy]";
mes "Good gracious! Are you for real?";
mes "Oh? Shee... Can you hear it?";
diff --git a/npc/events/dumplingfestival.txt b/npc/events/dumplingfestival.txt
index 6c5a3b6b5..23a085eb8 100644
--- a/npc/events/dumplingfestival.txt
+++ b/npc/events/dumplingfestival.txt
@@ -21,60 +21,48 @@ payon,93,81,4 script Exorcist Master Fahae 4_M_BUDDHIST,{
mes "I feel it is time I let another warrior try to complete";
mes "my quest. I have some items to assist you in my quest.";
next;
- menu "I wish to buy",-, "No thanks",M_FIN;
-
+ if (select("I wish to buy","No thanks") != 1) {
+ mes "[Exorcist Master Fahae]";
+ mes "The path of fully venquishing evil is far, help me in the way of God.";
+ close;
+ }
mes "[Exorcist Master Fahae]";
mes "I have 2 items which might become useful to you.";
next;
- menu "Realgar Wine",-, "Exorcize Herb",M_HERB;
-
+ switch (select("Realgar Wine","Exorcize Herb")) {
+ case 1:
+ .@itemid = Realgar_Wine; // 682
+ .@price = 20000;
+ break;
+ case 2:
+ .@itemid = Exorcize_Herb; // 683
+ .@price = 10000;
+ break;
+ }
mes "[Exorcist Master Fahae]";
mes "How many do you require?";
mes "You may only buy 5 at one time.";
- mes "Each costs 20000z.";
+ mes "Each costs "+ .@price +"z.";
mes "(Type in 0 to cancel)";
next;
input @input;
- if(@input==0) close;
- if(@input>5) goto L_SORRY;
- if(Zeny< @input*20000) goto L_NoZeny;
- Zeny -= 20000*@input;
- getitem 682,@input;
+ if (@input == 0)
+ close;
+ if (@input > 5) {
+ mes "[Exorcist Master Fahae]";
+ mes "You must not be stingy, it is the path of God to be honest.";
+ close;
+ }
+ if (Zeny < @input * .@price) {
+ mes "[Exorcist Master Fahae]";
+ mes "Money doesn't bring joy to everyone, but we need it to support the temple and myself. Please, try to kill some monsters and take their drops.";
+ close;
+ }
+ Zeny -= @input * .@price;
+ getitem .@itemid, @input;
mes "[Exorcist Master Fahae]";
mes "Here you go, I hope you may succeed in my quest.";
close;
-
-L_SORRY:
- mes "[Exorcist Master Fahae]";
- mes "You must not be stingy, it is the path of God to be honest.";
- close;
-
-M_FIN:
- mes "[Exorcist Master Fahae]";
- mes "The path of fully venquishing evil is far, help me in the way of God.";
- close;
-
-M_HERB:
- mes "[Exorcist Master Fahae]";
- mes "How many do you require?";
- mes "You may only buy 5 at one time.";
- mes "Each costs 10000z.";
- mes "(Type in 0 to cancel)";
- next;
- input @input;
- if(@input==0) close;
- if(@input>5) goto L_SORRY;
- if(Zeny< @input*10000) goto L_NoZeny;
- Zeny -= 10000*@input;
- getitem 683,@input;
- mes "[Exorcist Master Fahae]";
- mes "Here you go, I hope you may succeed in my quest.";
- close;
-
-L_NoZeny:
- mes "[Exorcist Master Fahae]";
- mes "Money doesn't bring joy to everyone, but we need it to support the temple and myself. Please, try to kill some monsters and take their drops.";
- close;
}
// Monsters
diff --git a/npc/events/easter_2010.txt b/npc/events/easter_2010.txt
index 292b91948..8276e0774 100644
--- a/npc/events/easter_2010.txt
+++ b/npc/events/easter_2010.txt
@@ -36,8 +36,8 @@ prontera,202,297,3 script Rina#Easter 4_F_JOB_HUNTER,{
mes "Take care~!";
close;
}
- set .@quest1, checkquest(9117);
- if (.@quest1 == -1) {
+ .@quest1 = questprogress(9117);
+ if (!.@quest1) {
playbgm "30.mp3"; // One Step Closer
mes "[Rina]";
mes "Hi~!";
@@ -96,7 +96,7 @@ prontera,202,297,3 script Rina#Easter 4_F_JOB_HUNTER,{
mes "Let me know when you are ready.";
setquest 9117;
close;
- } else if (.@quest1 == 0 || .@quest1 == 1) {
+ } else if (.@quest1 == 1) {
L_HuntingInfo:
mes "[Rina]";
mes "What you need to do is";
@@ -123,8 +123,8 @@ prontera,202,297,3 script Rina#Easter 4_F_JOB_HUNTER,{
npcskill "AL_BLESSING",1,0,0;
end;
} else if (.@quest1 == 2) {
- if (checkquest(9118) < 2 || checkquest(9119) < 2 || checkquest(9120) < 2 || checkquest(9121) < 2) {
- if (checkquest(9118,HUNTING) == 2 || checkquest(9119,HUNTING) == 2 || checkquest(9120,HUNTING) == 2 || checkquest(9121,HUNTING) == 2) {
+ if (questprogress(9118) != 2 || questprogress(9119) != 2 || questprogress(9120) != 2 || questprogress(9121) != 2) {
+ if (questprogress(9118,HUNTING) == 2 || questprogress(9119,HUNTING) == 2 || questprogress(9120,HUNTING) == 2 || questprogress(9121,HUNTING) == 2) {
mes "[Rina]";
mes "You did it.";
mes "I can feel that my body is recovering.";
@@ -144,8 +144,7 @@ prontera,202,297,3 script Rina#Easter 4_F_JOB_HUNTER,{
end;
}
}
- set .@quest2, checkquest(9122);
- if (.@quest2 == 0 || .@quest2 == 1) {
+ if (questprogress(9122) == 1) {
mes "[Rina]";
mes "I will check one thing.";
mes "For this task,";
@@ -215,87 +214,84 @@ prontera,202,297,3 script Rina#Easter 4_F_JOB_HUNTER,{
close2;
emotion e_sigh;
end;
- } else {
- set .@quest3, checkquest(9123);
- if (.@quest3 == 0 || .@quest3 == 1) {
- emotion e_kis;
+ }
+ if (questprogress(9123) == 1) {
+ emotion e_kis;
+ mes "[Rina]";
+ mes "You're back~!";
+ mes "My curse has been released.";
+ mes "Thank you so much.";
+ next;
+ if (checkweight(5852,1) == 0) {
mes "[Rina]";
- mes "You're back~!";
- mes "My curse has been released.";
- mes "Thank you so much.";
- next;
- if (checkweight(5852,1) == 0) {
- mes "[Rina]";
- mes "Your bag is too full.";
- mes "I have a present for you";
- mes "so make your bag lighter.";
- mes "I'll wait for you.";
- close;
- }
- completequest 9123;
- getitem 5852,1; //Easter_Egg_Shell
- set .@BaseExp, (BaseLevel * (BaseLevel / 4)) * ((BaseLevel / 29) + (BaseLevel / 6)) + (5 * BaseLevel / 2);
- if (ADVJOB == 0) {
- if (BaseLevel < 40) set .@nBaseExp, .@BaseExp;
- else if (BaseLevel < 50) set .@nBaseExp, .@BaseExp + (BaseLevel * BaseLevel);
- else if (BaseLevel < 60) set .@nBaseExp, .@BaseExp + (BaseLevel * BaseLevel * (BaseLevel / 20));
- else if (BaseLevel < 70) set .@nBaseExp, .@BaseExp + (BaseLevel * BaseLevel * (BaseLevel / 10));
- else if (BaseLevel < 80) set .@nBaseExp, .@BaseExp + (BaseLevel * BaseLevel * (BaseLevel / 5));
- else if (BaseLevel < 90) set .@nBaseExp, .@BaseExp + (BaseLevel * BaseLevel * (BaseLevel / 3));
- else if (BaseLevel < 99) set .@nBaseExp, .@BaseExp + (BaseLevel * BaseLevel * (BaseLevel / 2));
- else set .@nBaseExp, .@BaseExp + (BaseLevel * BaseLevel * (BaseLevel / 2) * 2);
-
- set .@nJobExp, (JobLevel * (JobLevel - 3) * (JobLevel / 25 + 1) + (16 - (JobLevel * 2))) * 2;
- } else {
- if (BaseLevel < 30) set .@nBaseExp, .@BaseExp;
- else if (BaseLevel < 40) set .@nBaseExp, .@BaseExp + (BaseLevel * 10);
- else if (BaseLevel < 50) set .@nBaseExp, .@BaseExp + (BaseLevel * BaseLevel * 2);
- else if (BaseLevel < 60) set .@nBaseExp, .@BaseExp + (BaseLevel * BaseLevel * (BaseLevel / 10));
- else if (BaseLevel < 70) set .@nBaseExp, .@BaseExp + (BaseLevel * BaseLevel * (BaseLevel / 5));
- else if (BaseLevel < 80) set .@nBaseExp, .@BaseExp + (BaseLevel * BaseLevel * (BaseLevel / 3));
- else if (BaseLevel < 90) set .@nBaseExp, .@BaseExp + (BaseLevel * BaseLevel * (BaseLevel / 2));
- else if (BaseLevel < 98) set .@nBaseExp, .@BaseExp + (BaseLevel * BaseLevel * BaseLevel);
- else set .@nBaseExp, .@BaseExp + (BaseLevel * BaseLevel * BaseLevel * 2);
+ mes "Your bag is too full.";
+ mes "I have a present for you";
+ mes "so make your bag lighter.";
+ mes "I'll wait for you.";
+ close;
+ }
+ completequest 9123;
+ getitem 5852,1; //Easter_Egg_Shell
+ .@BaseExp = (BaseLevel * (BaseLevel / 4)) * ((BaseLevel / 29) + (BaseLevel / 6)) + (5 * BaseLevel / 2);
+ if (ADVJOB == 0) {
+ if (BaseLevel < 40) set .@nBaseExp, .@BaseExp;
+ else if (BaseLevel < 50) set .@nBaseExp, .@BaseExp + (BaseLevel * BaseLevel);
+ else if (BaseLevel < 60) set .@nBaseExp, .@BaseExp + (BaseLevel * BaseLevel * (BaseLevel / 20));
+ else if (BaseLevel < 70) set .@nBaseExp, .@BaseExp + (BaseLevel * BaseLevel * (BaseLevel / 10));
+ else if (BaseLevel < 80) set .@nBaseExp, .@BaseExp + (BaseLevel * BaseLevel * (BaseLevel / 5));
+ else if (BaseLevel < 90) set .@nBaseExp, .@BaseExp + (BaseLevel * BaseLevel * (BaseLevel / 3));
+ else if (BaseLevel < 99) set .@nBaseExp, .@BaseExp + (BaseLevel * BaseLevel * (BaseLevel / 2));
+ else set .@nBaseExp, .@BaseExp + (BaseLevel * BaseLevel * (BaseLevel / 2) * 2);
- set .@nJobExp, (JobLevel * JobLevel * (JobLevel / 5 + 2) + (20 - JobLevel)) * 3;
- }
- getexp .@nBaseExp,.@nJobExp;
- mes "[Rina]";
- mes "This is the present for you.";
- mes "It's not a big one";
- mes "but please take it";
- mes "as a token of my gratitude.";
- next;
- mes "[Rina]";
- mes "I'll take a rest for a few days";
- mes "and then I'll go on an adventure.";
- mes "See you again.";
- close2;
- consumeitem 607; //Yggdrasilberry
- consumeitem 12068; //Luk_Dish03
- consumeitem 12063; //Dex_Dish03
- consumeitem 12053; //Vit_Dish03
- npcskill "AL_INCAGI",1,0,0;
- npcskill "AL_BLESSING",1,0,0;
- end;
+ set .@nJobExp, (JobLevel * (JobLevel - 3) * (JobLevel / 25 + 1) + (16 - (JobLevel * 2))) * 2;
} else {
- mes "[Rina]";
- mes "Thank you for releasing my curse.";
- mes "I'll take a rest for a few days";
- mes "and then go on an adventure again.";
- mes "Have a happy day~!";
- close2;
- consumeitem 607; //Yggdrasilberry
- npcskill "AL_INCAGI",1,0,0;
- npcskill "AL_BLESSING",1,0,0;
- end;
+ if (BaseLevel < 30) set .@nBaseExp, .@BaseExp;
+ else if (BaseLevel < 40) set .@nBaseExp, .@BaseExp + (BaseLevel * 10);
+ else if (BaseLevel < 50) set .@nBaseExp, .@BaseExp + (BaseLevel * BaseLevel * 2);
+ else if (BaseLevel < 60) set .@nBaseExp, .@BaseExp + (BaseLevel * BaseLevel * (BaseLevel / 10));
+ else if (BaseLevel < 70) set .@nBaseExp, .@BaseExp + (BaseLevel * BaseLevel * (BaseLevel / 5));
+ else if (BaseLevel < 80) set .@nBaseExp, .@BaseExp + (BaseLevel * BaseLevel * (BaseLevel / 3));
+ else if (BaseLevel < 90) set .@nBaseExp, .@BaseExp + (BaseLevel * BaseLevel * (BaseLevel / 2));
+ else if (BaseLevel < 98) set .@nBaseExp, .@BaseExp + (BaseLevel * BaseLevel * BaseLevel);
+ else set .@nBaseExp, .@BaseExp + (BaseLevel * BaseLevel * BaseLevel * 2);
+
+ set .@nJobExp, (JobLevel * JobLevel * (JobLevel / 5 + 2) + (20 - JobLevel)) * 3;
}
+ getexp .@nBaseExp,.@nJobExp;
+ mes "[Rina]";
+ mes "This is the present for you.";
+ mes "It's not a big one";
+ mes "but please take it";
+ mes "as a token of my gratitude.";
+ next;
+ mes "[Rina]";
+ mes "I'll take a rest for a few days";
+ mes "and then I'll go on an adventure.";
+ mes "See you again.";
+ close2;
+ consumeitem 607; //Yggdrasilberry
+ consumeitem 12068; //Luk_Dish03
+ consumeitem 12063; //Dex_Dish03
+ consumeitem 12053; //Vit_Dish03
+ npcskill "AL_INCAGI",1,0,0;
+ npcskill "AL_BLESSING",1,0,0;
+ end;
}
+ mes "[Rina]";
+ mes "Thank you for releasing my curse.";
+ mes "I'll take a rest for a few days";
+ mes "and then go on an adventure again.";
+ mes "Have a happy day~!";
+ close2;
+ consumeitem 607; //Yggdrasilberry
+ npcskill "AL_INCAGI",1,0,0;
+ npcskill "AL_BLESSING",1,0,0;
+ end;
}
geffen,207,114,4 script #Hiddne01Easter CLEAR_NPC,{
if (oversea_event2 > 519) {
- OnRelease:
+OnRelease:
specialeffect EF_PATTACK;
mes "- I found ^0000FFthe strange mark^000000. -";
next;
@@ -304,7 +300,7 @@ geffen,207,114,4 script #Hiddne01Easter CLEAR_NPC,{
mes "- ^0000FFRina^000000 has been released";
mes "- from the curse.";
mes "- ^006400Let's go back to Rina!^000000";
- if (checkquest(9122) < 2) {
+ if (questprogress(9122) != 2) {
completequest 9122;
setquest 9123;
}
@@ -333,7 +329,7 @@ rachel,36,132,4 script #Hiddne04Easter CLEAR_NPC,{
prontera,204,297,3 script Rina's Little Friend 4_DRAGON_EGG,{
disable_items;
- if (checkquest(9117) == -1) {
+ if (!questprogress(9117)) {
emotion e_swt2;
mes "[Rina's Little Friend]";
mes ".......";
@@ -341,7 +337,7 @@ prontera,204,297,3 script Rina's Little Friend 4_DRAGON_EGG,{
mes "^787878( No response. )^000000";
close;
}
- if (checkquest(9123) == 2) {
+ if (questprogress(9123) == 2) {
emotion e_meh;
mes "[Rina's Little Friend]";
mes "Hi.";
diff --git a/npc/events/event_skill_reset.txt b/npc/events/event_skill_reset.txt
index 718fe2e0e..15d781bff 100644
--- a/npc/events/event_skill_reset.txt
+++ b/npc/events/event_skill_reset.txt
@@ -54,54 +54,53 @@ yuno,138,187,4 script Hypnotist Teacher 4_F_TELEPORTER,{
mes "Your name is ^0080FF"+strcharinfo(0)+"^000000.";
mes "How can I help you?";
next;
- menu "^009500Information about Reset skills.^000000",L_Info,"^00B6FFReset skills.^000000",L_Reset,"^000088Nevermind^000000",-;
-
- mes @npcname$;
- mes "You know where to find me,";
- mes "if you ever want a reset!!";
- close;
-
-L_Info:
- mes @npcname$;
- mes "This skill reset is not FREE OF CHARGE!!";
- mes "Expense for the reset of skill is ^D5A50020000 Zeny x BaseLv^000000.";
- mes "Yeah ...each One BaseLv costs 20000 Zeny to reset skill.";
- next;
- mes @npcname$;
- mes "Oh yeah, one more thing!";
- mes "Any carts, falcons or pecos you have equiped";
- mes "will be removed if you reset your skills.";
- next;
- mes @npcname$;
- mes "Just one time does again to shake the skill point";
- mes "Careful with your skills from here on.";
- close;
-
-L_Reset:
- mes @npcname$;
- mes "Before skill reset in starting.";
- mes "You shall have to first tell me your Base Level.";
- next;
- mes "^D5A500[" + strcharinfo(0) + "]^000000";
- mes "My Base level is ^AA00AALevel " + BaseLevel + "BaseLv.^000000";
- next;
- set @zeny,BaseLevel*20000;
- mes @npcname$;
- mes "Total zeny to the reset of skill amount ^529DFF" + @zeny + "Zeny^000000 for the skill reset service.";
- next;
- if(Zeny < @zeny) {
+ switch (select("^009500Information about Reset skills.^000000","^00B6FFReset skills.^000000","^000088Nevermind^000000")) {
+ case 1: // Information
mes @npcname$;
- mes "It seems that you don't have enough money.";
- mes "In addition we wait for the opportunity.";
- emotion e_hmm;
+ mes "This skill reset is not FREE OF CHARGE!!";
+ mes "Expense for the reset of skill is ^D5A50020000 Zeny x BaseLv^000000.";
+ mes "Yeah ...each One BaseLv costs 20000 Zeny to reset skill.";
+ next;
+ mes @npcname$;
+ mes "Oh yeah, one more thing!";
+ mes "Any carts, falcons or pecos you have equiped";
+ mes "will be removed if you reset your skills.";
+ next;
+ mes @npcname$;
+ mes "Just one time does again to shake the skill point";
+ mes "Careful with your skills from here on.";
+ close;
+ case 2: // Reset
+ mes @npcname$;
+ mes "Before skill reset in starting.";
+ mes "You shall have to first tell me your Base Level.";
+ next;
+ mes "^D5A500[" + strcharinfo(0) + "]^000000";
+ mes "My Base level is ^AA00AALevel " + BaseLevel + "BaseLv.^000000";
+ next;
+ @zeny = BaseLevel*20000;
+ mes @npcname$;
+ mes "Total zeny to the reset of skill amount ^529DFF" + @zeny + "Zeny^000000 for the skill reset service.";
+ next;
+ if (Zeny < @zeny) {
+ mes @npcname$;
+ mes "It seems that you don't have enough money.";
+ mes "In addition we wait for the opportunity.";
+ emotion e_hmm;
+ close;
+ }
+ Zeny -= @zeny;
+ MISC_QUEST |= 1024;
+ resetskill;
+ mes @npcname$;
+ mes "Thank you.";
+ emotion e_thx;
+ logmes "SKILL RESET EVENT";
+ close;
+ case 3: // Nevermind
+ mes @npcname$;
+ mes "You know where to find me,";
+ mes "if you ever want a reset!!";
close;
}
- Zeny -= @zeny;
- set MISC_QUEST,MISC_QUEST | 1024;
- resetskill;
- mes @npcname$;
- mes "Thank you.";
- emotion e_thx;
- logmes "SKILL RESET EVENT";
- close;
}
diff --git a/npc/events/gdevent_aru.txt b/npc/events/gdevent_aru.txt
index 22d30e12c..1a69fea76 100644
--- a/npc/events/gdevent_aru.txt
+++ b/npc/events/gdevent_aru.txt
@@ -63,8 +63,8 @@ arug_dun01,199,195,5 script Dwarf#aru_gd 4_M_DWARF,{
mes "Hey did you see an ugly Goblin come by? He stole something from me!";
close;
}
- set .@chk_urquest,checkquest(2143,PLAYTIME);
- set .@chk_yourgdname$,getguildname(getcharid(2));
+ .@chk_urquest = questprogress(2143,PLAYTIME);
+ .@chk_yourgdname$ = getguildname(getcharid(2));
if ($@gdeventv_a1 == 0) {
if ($@gdevents_a$ == "") {
set $@gdeventv_a1,1;
@@ -178,8 +178,7 @@ arug_dun01,199,195,5 script Dwarf#aru_gd 4_M_DWARF,{
}
}
else if ($@gdevents_a$ == .@chk_yourgdname$) {
- set .@chk_urquest1,checkquest(2144);
- if ((.@chk_urquest1 == 0) || (.@chk_urquest1 == 1)) {
+ if (questprogress(2144) == 1) {
mes "[Morestone]";
mes "I, Morestone, have made an alliance with the "+$@gdevents_a$+" guild.";
mes "Oh, you are a member.";
@@ -321,8 +320,7 @@ arug_dun01,199,195,5 script Dwarf#aru_gd 4_M_DWARF,{
}
else {
if ($@gdevents_a$ == .@chk_yourgdname$) {
- set .@chk_urquest1,checkquest(2144);
- if ((.@chk_urquest1 == 0) || (.@chk_urquest1 == 1)) {
+ if (questprogress(2144) == 1) {
mes "[Morestone]";
mes "[Morestone]";
mes "I, Morestone, have made an alliance with the "+$@gdevents_a$+" guild.";
@@ -504,8 +502,8 @@ arug_que01,100,81,3 script Pierrot Pier#aru_gd 4_M_PIERROT,{
}
if (strcharinfo(0) == getguildmaster(getcharid(2))) {
if ($@gdeventv_a2 == 0) {
- set .@que_2143,checkquest(2143,PLAYTIME);
- if (.@que_2143 == -1) {
+ set .@que_2143,questprogress(2143,PLAYTIME);
+ if (!.@que_2143) {
setnpcdisplay "Pierrot Pier#aru_gd", 4_M_PIERROT;
mes "A lonely clown is juggling.";
next;
@@ -589,7 +587,7 @@ arug_que01,100,81,3 script Pierrot Pier#aru_gd 4_M_PIERROT,{
donpcevent "Gergath#aru_gd::OnEnable";
close;
}
- else if ((.@que_2143 == 0) || (.@que_2143 == 1)) {
+ else if (.@que_2143 == 1) {
mes "[Pierrot Pier]";
mes "Let's talk after I finished reading my master's message. Beep beep.";
close;
@@ -767,8 +765,7 @@ arug_que01,100,81,3 script Pierrot Pier#aru_gd 4_M_PIERROT,{
}
}
else if ($@gdeventv_a2 == 3) {
- set .@que_2143,checkquest(2143);
- if (.@que_2143 == 3) {
+ if (questprogress(2143) == 2) {
erasequest 2143;
}
mes "[Pierrot Pier]";
diff --git a/npc/events/gdevent_sch.txt b/npc/events/gdevent_sch.txt
index 31537763e..a6df13889 100644
--- a/npc/events/gdevent_sch.txt
+++ b/npc/events/gdevent_sch.txt
@@ -63,8 +63,8 @@ schg_dun01,194,148,5 script Dwarf#sch_gd 4_M_DWARF,{
mes "Hey did you see an ugly Goblin come by? He stole something from me!";
close;
}
- set .@chk_urquest,checkquest(2143,PLAYTIME);
- set .@chk_yourgdname$,getguildname(getcharid(2));
+ .@chk_urquest = questprogress(2143,PLAYTIME);
+ .@chk_yourgdname$ = getguildname(getcharid(2));
if ($@gdeventv_s1 == 0) {
if ($@gdevents_s$ == "") {
set $@gdeventv_s1,1;
@@ -178,8 +178,7 @@ schg_dun01,194,148,5 script Dwarf#sch_gd 4_M_DWARF,{
}
}
else if ($@gdevents_s$ == .@chk_yourgdname$) {
- set .@chk_urquest1,checkquest(2144);
- if ((.@chk_urquest1 == 0) || (.@chk_urquest1 == 1)) {
+ if (questprogress(2144) == 1) {
mes "[Morestone]";
mes "I, Morestone, have made an alliance with the "+$@gdevents_s$+" guild.";
mes "Oh, you are a member.";
@@ -321,8 +320,7 @@ schg_dun01,194,148,5 script Dwarf#sch_gd 4_M_DWARF,{
}
else {
if ($@gdevents_s$ == .@chk_yourgdname$) {
- set .@chk_urquest1,checkquest(2144);
- if ((.@chk_urquest1 == 0) || (.@chk_urquest1 == 1)) {
+ if (questprogress(2144) == 1) {
mes "[Morestone]";
mes "I, Morestone, have made an alliance with the "+$@gdevents_s$+" guild.";
mes "Oh, you are a member.";
@@ -503,8 +501,8 @@ schg_que01,100,81,3 script Pierrot Pier#sch_gd 4_M_PIERROT,{
}
if (strcharinfo(0) == getguildmaster(getcharid(2))) {
if ($@gdeventv_s2 == 0) {
- set .@que_2143,checkquest(2143,PLAYTIME);
- if (.@que_2143 == -1) {
+ .@que_2143 = questprogress(2143,PLAYTIME);
+ if (!.@que_2143) {
setnpcdisplay "Pierrot Pier#sch_gd", 4_M_PIERROT;
mes "A lonely clown is juggling.";
next;
@@ -588,7 +586,7 @@ schg_que01,100,81,3 script Pierrot Pier#sch_gd 4_M_PIERROT,{
donpcevent "Gergath#sch_gd::OnEnable";
close;
}
- else if ((.@que_2143 == 0) || (.@que_2143 == 1)) {
+ else if (.@que_2143 == 1) {
mes "[Pierrot Pier]";
mes "Let's talk after I finished reading my master's message. Beep beep.";
close;
@@ -766,8 +764,7 @@ schg_que01,100,81,3 script Pierrot Pier#sch_gd 4_M_PIERROT,{
}
}
else if ($@gdeventv_s2 == 3) {
- set .@que_2143,checkquest(2143);
- if (.@que_2143 == 3) {
+ if (questprogress(2143) == 2) {
erasequest 2143;
}
mes "[Pierrot Pier]";
diff --git a/npc/events/halloween_2008.txt b/npc/events/halloween_2008.txt
index 6aad72358..aa2780716 100644
--- a/npc/events/halloween_2008.txt
+++ b/npc/events/halloween_2008.txt
@@ -27,7 +27,8 @@ payon,162,176,4 script Halloween Magician#iRO08 4_M_BIBI,{
mes "If you collect enough tickets you can get good prizes!";
mes "So what do you say?";
next;
- goto MainMenu;
+ callsub(S_MainMenu);
+ end;
}
if (Hallow08Kill == 1) {
mes "[Halloween Magician]";
@@ -35,11 +36,13 @@ payon,162,176,4 script Halloween Magician#iRO08 4_M_BIBI,{
mes "You know you want to try again...";
mes "Do you know the rules?";
next;
- set Hallow08Kill,0;
+ Hallow08Kill = 0;
if(select("Yes, I know.:No, I don't know.") == 2) {
- goto Rules;
+ callsub(S_Rules);
+ callsub(S_MainMenu);
+ end;
}
- goto Participate;
+ callsub(S_Participate);
}
if (Hallow08Kill == 2) {
mes "[Halloween Magician]";
@@ -49,8 +52,8 @@ payon,162,176,4 script Halloween Magician#iRO08 4_M_BIBI,{
mes "Ha!";
mes "Kkkkkkk.";
next;
- getitem 7941,1;
- set Hallow08Kill,0;
+ getitem Halloween_Ticket, 1;
+ Hallow08Kill = 0;
mes "[Halloween Magician]";
mes "As I promised";
mes "You can get Halloween tickets for cool items.";
@@ -60,182 +63,183 @@ payon,162,176,4 script Halloween Magician#iRO08 4_M_BIBI,{
mes "[Halloween Magician]";
mes "Well, do you want to hear the rules again or, just get back to it...";
next;
- goto MainMenu2;
- }
-
- Rules:
- mes "[Halloween Magician]";
- mes "This village is like a virtual Payon.";
- mes "There are zombies and ghouls roaming around and three southern exits, but only one works.";
- mes "That's up to you to find out.";
- next;
- mes "[Halloween Magician]";
- mes "You can't use any skills to kill the ghouls or zombies.";
- mes "And one more thing...";
- mes "you shouldn't forget...";
- next;
- mes "[Halloween Magician]";
- mes "All participants should be wearing nothing.";
- mes "Put all belongings in your storage and come back here when your weight is '0'.";
- next;
- mes "[Halloween Magician]";
- mes "Oh and one more thing!";
- mes "You can't be riding a PecoPeco or have a Cart.";
- mes "If you are, then I will remove them before you enter.";
- mes "Got it?";
- next;
- mes "[Halloween Magician]";
- mes "Remember, there are three exits but only one works randomly, the zombies and ghouls roaming around there can't be killed and you can't be wearing anything.";
- next;
- if (Hallow08 > 0) {
- mes "[Halloween Magician]";
- mes "Hey...";
- mes "Come back once you're ready.";
- close;
- } else {
- goto MainMenu;
- }
-
- Participate:
- mes "[Halloween Magician]";
- mes "Ok, you are ready.";
- mes "Let me check your weight.";
- next;
- if (Weight > 0) {
- mes "[Halloween Magician]";
- mes "Gosh!";
- mes "There's always a black sheep anywhere.";
- next;
- mes "[Halloween Magician]";
- mes "You think I wouldn't notice that your weight is above '0'?";
- mes "You're overweight...";
- close;
- } else {
- mes "[Halloween Magician]";
- mes "You seem good to go, and your weight is just right.";
- next;
- mes "[Halloween Magician]";
- mes "I was quite swamped with my work, so I'm exhausted.";
- next;
- mes "[Halloween Magician]";
- mes "I sometimes forget to send you there...";
- next;
- mes "[Halloween Magician]";
- mes "I hope you come back well.";
- close2;
- if (Hallow08 < 1) {
- set Hallow08,1;
- }
- set Hallow08Kill,1;
- set @Hallow08Warp, rand(1,3);
- percentheal -98,0;
- setriding 0;
- setcart 0;
- warp "evt_zombie",155,246;
+ while (true) {
+ switch (select("Get me back there now!","Please, tell me the rules","I want to exchange tickets for prizes.","I'll come back next time.")) {
+ case 1: // Participate
+ callsub(S_Participate);
+ case 2: // Rules
+ callsub(S_Rules);
+ continue;
+ case 3: // TicketExchange
+ callsub(S_TicketExchange);
+ continue;
+ default: // NextTime
+ callsub(S_NextTime);
end;
}
+ }
+ }
- TicketExchange:
- mes "[Halloween Magician]";
- mes "You want to exchange tickets for prizes?";
- mes "Good job! Kkkkkk!";
- next;
- mes "[Halloween Magician]";
- mes "Lemme tell you what items you can exchange for.";
- next;
- mes "[Halloween Magician]";
- mes "5 tickets for Pumpkin Pie.";
- mes "20 tickets for Pumpkin-Head.";
- mes "50 tickets for Old Blue Box.";
- mes "70 tickets for Old Purple Box.";
- mes "200 tickets for Old Card Album.";
- next;
- mes "[Halloween Magician]";
- mes "What would you like to exchange for?";
- next;
- switch(select("Pumpkin Pie:Pumpkin-Head:Old Blue Box:Old Purple Box:Old Card Album")) {
- case 1:
- if (countitem(7941) < 5) {
- goto NotEnough;
- } else {
- delitem 7941,5;
- getitem 12192,1;
- goto Enough;
- }
- break;
- case 2:
- if (countitem(7941) < 20) {
- goto NotEnough;
- } else {
- delitem 7941,20;
- getitem 5134,1;
- goto Enough;
- }
- break;
- case 3:
- if (countitem(7941) < 50) {
- goto NotEnough;
- } else {
- delitem 7941,50;
- getitem 603,1;
- goto Enough;
- }
- break;
- case 4:
- if (countitem(7941) < 70) {
- goto NotEnough;
- } else {
- delitem 7941,70;
- getitem 617,1;
- goto Enough;
- }
- break;
- case 5:
- if (countitem(7941) < 200) {
- goto NotEnough;
- } else {
- delitem 7941,200;
- getitem 616,1;
- goto Enough;
- }
- }
+ callsub(S_Rules);
+ callsub(S_MainMenu);
+ end;
- NextTime:
- mes "[Halloween Magician]";
- mes "Ok, see you then.";
- mes "Kkkkkkkk.";
- close;
+S_MainMenu:
+ while (true) {
+ switch (select("Explain it to me.","I want to participate.","I want to exchange tickets for prizes.","I'll come back next time.")) {
+ case 1: // Rules
+ callsub(S_Rules);
+ continue;
+ case 2: // Participate
+ callsub(S_Participate);
+ case 3: // TicketExchange
+ callsub(S_TicketExchange);
+ continue;
+ default: // NextTime
+ callsub(S_NextTime);
+ end;
+ }
+ }
- MainMenu:
- menu "Explain it to me.",Rules,"I want to participate.",Participate,"I want to exchange tickets for prizes.",TicketExchange,"I'll come back next time.",NextTime;
+S_Participate:
+ mes "[Halloween Magician]";
+ mes "Ok, you are ready.";
+ mes "Let me check your weight.";
+ next;
+ if (Weight > 0) {
+ mes "[Halloween Magician]";
+ mes "Gosh!";
+ mes "There's always a black sheep anywhere.";
+ next;
+ mes "[Halloween Magician]";
+ mes "You think I wouldn't notice that your weight is above '0'?";
+ mes "You're overweight...";
+ close;
+ }
+ mes "[Halloween Magician]";
+ mes "You seem good to go, and your weight is just right.";
+ next;
+ mes "[Halloween Magician]";
+ mes "I was quite swamped with my work, so I'm exhausted.";
+ next;
+ mes "[Halloween Magician]";
+ mes "I sometimes forget to send you there...";
+ next;
+ mes "[Halloween Magician]";
+ mes "I hope you come back well.";
+ close2;
+ if (Hallow08 < 1) {
+ Hallow08 = 1;
+ }
+ Hallow08Kill = 1;
+ @Hallow08Warp = rand(1,3);
+ percentheal -98,0;
+ setriding 0;
+ setcart 0;
+ warp "evt_zombie",155,246;
+ end;
+
+S_Rules:
+ mes "[Halloween Magician]";
+ mes "This village is like a virtual Payon.";
+ mes "There are zombies and ghouls roaming around and three southern exits, but only one works.";
+ mes "That's up to you to find out.";
+ next;
+ mes "[Halloween Magician]";
+ mes "You can't use any skills to kill the ghouls or zombies.";
+ mes "And one more thing...";
+ mes "you shouldn't forget...";
+ next;
+ mes "[Halloween Magician]";
+ mes "All participants should be wearing nothing.";
+ mes "Put all belongings in your storage and come back here when your weight is '0'.";
+ next;
+ mes "[Halloween Magician]";
+ mes "Oh and one more thing!";
+ mes "You can't be riding a PecoPeco or have a Cart.";
+ mes "If you are, then I will remove them before you enter.";
+ mes "Got it?";
+ next;
+ mes "[Halloween Magician]";
+ mes "Remember, there are three exits but only one works randomly, the zombies and ghouls roaming around there can't be killed and you can't be wearing anything.";
+ next;
+ if (Hallow08 > 0) {
+ mes "[Halloween Magician]";
+ mes "Hey...";
+ mes "Come back once you're ready.";
+ close;
+ }
+ return;
- MainMenu2:
- menu "Get me back there now!",Participate,"Please, tell me the rules",Rules,"I want to exchange tickets for prizes.",TicketExchange,"I'll come back next time.",NextTime;
+S_NextTime:
+ mes "[Halloween Magician]";
+ mes "Ok, see you then.";
+ mes "Kkkkkkkk.";
+ close;
- NotEnough:
+S_TicketExchange:
+ mes "[Halloween Magician]";
+ mes "You want to exchange tickets for prizes?";
+ mes "Good job! Kkkkkk!";
+ next;
+ mes "[Halloween Magician]";
+ mes "Lemme tell you what items you can exchange for.";
+ next;
+ mes "[Halloween Magician]";
+ mes "5 tickets for Pumpkin Pie.";
+ mes "20 tickets for Pumpkin-Head.";
+ mes "50 tickets for Old Blue Box.";
+ mes "70 tickets for Old Purple Box.";
+ mes "200 tickets for Old Card Album.";
+ next;
+ mes "[Halloween Magician]";
+ mes "What would you like to exchange for?";
+ next;
+ .@item_id = null;
+ .@amount = 0;
+ switch(select("Pumpkin Pie:Pumpkin-Head:Old Blue Box:Old Purple Box:Old Card Album")) {
+ case 1:
+ .@amount = 5;
+ .@item_id = Pumpkin_Pie;
+ break;
+ case 2:
+ .@amount = 20;
+ .@item_id = Pumpkin_Hat;
+ break;
+ case 3:
+ .@amount = 50;
+ .@item_id = Old_Blue_Box;
+ break;
+ case 4:
+ .@amount = 70;
+ .@item_id = Old_Violet_Box;
+ break;
+ case 5:
+ .@amount = 200;
+ .@amount = Old_Card_Album;
+ break;
+ }
+ if (countitem(Halloween_Ticket) < .@amount) {
mes "[Halloween Magician]";
mes "You don't have enough tickets!";
mes "Can't you even count?";
mes "Please come here with the right number of tickets.";
close;
-
- Enough:
- mes "[Halloween Magician]";
- mes "Here it is.";
- mes "Do you need...";
- mes "anything else?";
- next;
- if (Hallow08 == 1) {
- goto MainMenu2;
- } else {
- goto MainMenu;
- }
+ }
+ delitem Halloween_Ticket, .@amount;
+ getitem .@item_id, 1;
+ mes "[Halloween Magician]";
+ mes "Here it is.";
+ mes "Do you need...";
+ mes "anything else?";
+ next;
+ return;
}
evt_zombie,16,142,1 script zombiewarp001 WARPNPC,2,2,{
OnTouch:
if (@Hallow08Warp == 1) {
- set Hallow08Kill,2;
+ Hallow08Kill = 2;
specialeffect EF_BASH;
warp "payon",28,142;
}
@@ -245,7 +249,7 @@ OnTouch:
evt_zombie,122,27,1 script zombiewarp002 WARPNPC,2,2,{
OnTouch:
if (@Hallow08Warp == 2) {
- set Hallow08Kill,2;
+ Hallow08Kill = 2;
specialeffect EF_BASH;
warp "payon",121,40;
}
@@ -255,7 +259,7 @@ OnTouch:
evt_zombie,267,89,1 script zombiewarp003 WARPNPC,2,2,{
OnTouch:
if (@Hallow08Warp == 3) {
- set Hallow08Kill,2;
+ Hallow08Kill = 2;
specialeffect EF_BASH;
warp "payon",253,95;
}
diff --git a/npc/events/nguild/nguild_managers.txt b/npc/events/nguild/nguild_managers.txt
index d6ecfbf2f..039ba9ee1 100644
--- a/npc/events/nguild/nguild_managers.txt
+++ b/npc/events/nguild/nguild_managers.txt
@@ -42,11 +42,8 @@ function script F_GldManager {
mes "Welcome Master ^5533FF" + getguildmaster(@GID) + "^000000 ! I will assist you in any way I can!";
next;
- menu "Kafra Staff Employment / Dismissal",M_Kaf, "Enter Treasure Room",M_Treas, "Cancel",M_End;
-
- //===========================
- M_Kaf:
- //======
+ switch (select("Kafra Staff Employment / Dismissal","Enter Treasure Room","Cancel")) {
+ case 1: // Employment / Dismissal
mes "[ "+getarg(0)+" ]";
if (getcastledata(getarg(1),9) == 1) goto L_Dismiss;
if (getgdskilllv(@GID,10001) == 0){
@@ -58,90 +55,78 @@ function script F_GldManager {
L_Hire:
mes "Would you like to employ the services of a Kafra? You will need ^5533FF10,000 Zeny^000000 to do so... ";
next;
- menu "Employ Kafra.",-,"Cancel",sM_KafEnd;
-
- mes "[ "+getarg(0)+" ]";
- if (Zeny < 10000){
- mes "Master, you do not have enough money to employ a Kafra. Employment has been cancelled.";
- return;
- }
- Zeny -= 10000;
- enablenpc "Kafra Staff#"+getarg(4);
- setcastledata getarg(1),9,1;
- mes "You have created a contract with the Kafra Staff Company.";
- next;
- cutin "kafra_01",2;
- mes "[ Kafra Staff ]";
- mes "How do you do? I'm here to provide you with helpful service! I'll do the best I can to serve you.";
- next;
- cutin "kafra_01",255;
- mes "[ "+getarg(0)+" ]";
- //mes "Your employment contract lasts ^5533FF1 month^000000. After this term is over you will have to create a new contract.";
- mes "I think the Kafra Staff will benefit our guild members.";
- return;
-
- sM_KafEnd:
+ if (select("Employ Kafra.","Cancel") != 1) {
mes "[ "+getarg(0)+" ]";
mes "As you wish Master. But I suggest we get a Kafra as soon as possible!";
return;
-
+ }
+ mes "[ "+getarg(0)+" ]";
+ if (Zeny < 10000) {
+ mes "Master, you do not have enough money to employ a Kafra. Employment has been cancelled.";
+ return;
+ }
+ Zeny -= 10000;
+ enablenpc "Kafra Staff#"+getarg(4);
+ setcastledata getarg(1),9,1;
+ mes "You have created a contract with the Kafra Staff Company.";
+ next;
+ cutin "kafra_01",2;
+ mes "[ Kafra Staff ]";
+ mes "How do you do? I'm here to provide you with helpful service! I'll do the best I can to serve you.";
+ next;
+ cutin "kafra_01",255;
+ mes "[ "+getarg(0)+" ]";
+ //mes "Your employment contract lasts ^5533FF1 month^000000. After this term is over you will have to create a new contract.";
+ mes "I think the Kafra Staff will benefit our guild members.";
+ return;
L_Dismiss:
mes "Would you like to dismiss the current Kafra?";
next;
- menu "Dismissal",-,"Cancel",sM_KafEnd2;
-
- cutin "kafra_01",2;
- mes "[ Kafra Staff ]";
- mes "Have I done anything wrong? If I did, will you please forgive me?";
- next;
- menu "Dismiss",-,"Cancel",ssM_KafEnd2;
-
- mes "[ Kafra Staff ]";
- mes "It's unfortunate that I won't be able to serve your guild anymore....";
- next;
- disablenpc "Kafra Staff#"+getarg(4);
- setcastledata getarg(1),9,0;
- cutin "kafra_01",255;
- mes "[ "+getarg(0)+" ]";
- mes "The Kafra has been dismissed. But... we should really get a Kafra as soon as possible!";
- return;
- ssM_KafEnd2:
- mes "[ Kafra Staff ]";
- mes "Thank you master, I'll do my best! ^^.";
- cutin "kafra_01",255;
- return;
- sM_KafEnd2:
+ if (select("Dismissal","Cancel") != 1) {
mes "[ "+getarg(0)+" ]";
mes "Master, I think you should keep the current Kafra Staff because she is already trying her best to serve us";
return;
-
- //=========================
- M_Treas:
- //========
+ }
+ cutin "kafra_01",2;
+ mes "[ Kafra Staff ]";
+ mes "Have I done anything wrong? If I did, will you please forgive me?";
+ next;
+ if (select("Dismiss","Cancel") != 1) {
+ mes "[ Kafra Staff ]";
+ mes "Thank you master, I'll do my best! ^^.";
+ cutin "kafra_01",255;
+ return;
+ }
+ mes "[ Kafra Staff ]";
+ mes "It's unfortunate that I won't be able to serve your guild anymore....";
+ next;
+ disablenpc "Kafra Staff#"+getarg(4);
+ setcastledata getarg(1),9,0;
+ cutin "kafra_01",255;
+ mes "[ "+getarg(0)+" ]";
+ mes "The Kafra has been dismissed. But... we should really get a Kafra as soon as possible!";
+ return;
+ case 2: // Enter Treasure Room
mes "[ "+getarg(0)+" ]";
mes "Would you to go to our Treasure Room? Only you, the Guild Master, are allowed to enter this room.";
next;
- menu "Enter Treasure room.",-,"Cancel",sM_TresEnd;
-
+ if (select("Enter Treasure room.","Cancel") == 1) {
mes "[ "+getarg(0)+" ]";
mes "Please follow me through the secret passage way.";
mes "You must pull down on the secret switch in order to get out.";
next;
warp getarg(1),getarg(2),getarg(3);
return;
- sM_TresEnd:
- mes "[ "+getarg(0)+" ]";
- mes "The goods are produced everyday.";
- mes "You should get them whenever you can because they might dissapear if you take them at the wrong time.";
- return;
-
-
- //==========================
- M_End:
- //=======
+ }
+ mes "[ "+getarg(0)+" ]";
+ mes "The goods are produced everyday.";
+ mes "You should get them whenever you can because they might dissapear if you take them at the wrong time.";
+ return;
+ default: // Cancel
mes "[ "+getarg(0)+" ]";
mes "As you wish, master.";
return;
+ }
}
// Castle 1 ==================================================================================
diff --git a/npc/events/twintowers.txt b/npc/events/twintowers.txt
index 524351661..8013b85b7 100644
--- a/npc/events/twintowers.txt
+++ b/npc/events/twintowers.txt
@@ -29,24 +29,22 @@ prontera,146,92,4 script Twin Towers#tt1::Twin-Towers TW_TOWER,{
mes "For this reason, we are here at your service with our special magic.";
mes "Kindly let us know.";
next;
- menu "I shall accept your offer.",YES,"I'll ask for your service next time.",NO;
-
- NO:
- mes "[Twin Towers]";
- mes "Er, what a pity. Traveling by yourself is still the best evidence of adventure.";
- mes "Isn't this proving that you are still young?";
- mes "We respect brave hearts like this";
- next;
- mes "[Twin Towers]";
- mes "There are good and bad times in life, moreover, adventure isn't an easy task in the first place.";
- mes "Isn't this true?";
- mes "Feel free to come to us when you have time, we will always be there to serve you.";
- next;
- mes "[Twin Towers]";
- mes "Forget all your troubles, and create a splendid legend in this wonderful world.";
- mes "This is such a wonderful world, and you'll always be a great adventurer!";
- close;
- YES:
+ if (select("I shall accept your offer.","I'll ask for your service next time.") != 1) {
+ mes "[Twin Towers]";
+ mes "Er, what a pity. Traveling by yourself is still the best evidence of adventure.";
+ mes "Isn't this proving that you are still young?";
+ mes "We respect brave hearts like this";
+ next;
+ mes "[Twin Towers]";
+ mes "There are good and bad times in life, moreover, adventure isn't an easy task in the first place.";
+ mes "Isn't this true?";
+ mes "Feel free to come to us when you have time, we will always be there to serve you.";
+ next;
+ mes "[Twin Towers]";
+ mes "Forget all your troubles, and create a splendid legend in this wonderful world.";
+ mes "This is such a wonderful world, and you'll always be a great adventurer!";
+ close;
+ }
mes "[Twin Towers]";
mes "The flaming passion of an adventurer,";
mes "The desire to explore the unknown realms,";
@@ -60,28 +58,29 @@ prontera,146,92,4 script Twin Towers#tt1::Twin-Towers TW_TOWER,{
mes "[Twin Towers]";
mes "Come on! Where do you wish to go?";
mes "Just let us know you desired destination and we will send your there!";
- menu "Hidden Temple", HiddenTemple,"Orc Dungeon",OrcDungeon,"Ant Hell",AntHell,"Mjolnir Waste Pit",MjolnirWastePit,"Sphinx",Sphinx,"Glast Heim",GlastHeim,"Comodo",Comodo;
- HiddenTemple:
- warp "prt_fild01",136,368;
- close;
- OrcDungeon:
- warp "gef_fild10",67,334;
- close;
- AntHell:
- warp "moc_fild04",210,329;
- close;
- MjolnirWastePit:
- warp "mjolnir_02",79,361;
- close;
- Sphinx:
- warp "moc_fild19",105,99;
- close;
- GlastHeim:
- warp "gef_fild06",45,304;
- close;
- Comodo:
- warp "cmd_fild01",30,317;
- close;
+ switch (select("Hidden Temple","Orc Dungeon","Ant Hell","Mjolnir Waste Pit","Sphinx","Glast Heim","Comodo")) {
+ case 1: // HiddenTemple
+ warp "prt_fild01",136,368;
+ close;
+ case 2: // OrcDungeon
+ warp "gef_fild10",67,334;
+ close;
+ case 3: // AntHell
+ warp "moc_fild04",210,329;
+ close;
+ case 4: // MjolnirWastePit
+ warp "mjolnir_02",79,361;
+ close;
+ case 5: // Sphinx
+ warp "moc_fild19",105,99;
+ close;
+ case 6: // GlastHeim
+ warp "gef_fild06",45,304;
+ close;
+ case 7: // Comodo
+ warp "cmd_fild01",30,317;
+ close;
+ }
}
morocc,160,97,4 duplicate(Twin-Towers) Twin Towers#tt2 TW_TOWER
diff --git a/npc/events/whiteday.txt b/npc/events/whiteday.txt
index ac76c52a5..d90f7c491 100644
--- a/npc/events/whiteday.txt
+++ b/npc/events/whiteday.txt
@@ -12,10 +12,6 @@
//============================================================
alberta,188,64,4 script Sugar 4_F_02,{
- set @maplenum,0;
- set @mapleItemID,0;
- set @maplePrice,0;
- set @maplePriceT,0;
mes "[Sugar]";
mes "Welcome!";
mes "How delicious are sweets?";
@@ -29,51 +25,102 @@ alberta,188,64,4 script Sugar 4_F_02,{
mes "heartfelt like";
mes "the sweetness of the present some how.";
next;
- menu "Please give me!",-,"I don't need it.",M_End,"The teacher.",M_L1;
-
- mes "[Sugar]";
- mes "Yes!";
- mes "Select from menu here.";
- mes "Since there is a limitation in numbers";
- mes "Not more than ^ff0000 5 pieces^000000.";
- mes "are allowed to carry out?";
- next;
- menu "Candy",-,"Candy Cane",L0_2,"Well baked cookie",L0_3;
-
- set @maplePrice,3000;
- set @mapleItemID,529;
- mes "[Sugar]";
- mes "It is a candy, and the price is";
- mes "3000 Zeny each.";
- mes "How many do you like to purchase?";
- next;
- goto L_INPUT;
-L0_2:
- set @maplePrice,4000;
- set @mapleItemID,530;
- mes "[Sugar]";
- mes "It is a candy cane, and the price is";
- mes "4000 Zeny each.";
- mes "How many do you like to purchase?";
- next;
- goto L_INPUT;
-L0_3:
- set @maplePrice,2000;
- set @mapleItemID,538;
+ switch (select("Please give me!","I don't need it.","The teacher.")) {
+ case 1: // Please give me
+ mes "[Sugar]";
+ mes "Yes!";
+ mes "Select from menu here.";
+ mes "Since there is a limitation in numbers";
+ mes "Not more than ^ff0000 5 pieces^000000.";
+ mes "are allowed to carry out?";
+ next;
+ switch (select("Candy","Candy Cane","Well baked cookie")) {
+ case 1: // Candy
+ mes "[Sugar]";
+ mes "It is a candy, and the price is";
+ mes "3000 Zeny each.";
+ mes "How many do you like to purchase?";
+ next;
+ callsub(S_Purchase, 3000, Candy);
+ break;
+ case 2: // Candy Cane
+ mes "[Sugar]";
+ mes "It is a candy cane, and the price is";
+ mes "4000 Zeny each.";
+ mes "How many do you like to purchase?";
+ next;
+ callsub(S_Purchase, 4000, Candy_Striper);
+ break;
+ case 3: // Well baked cookie
+ mes "[Sugar]";
+ mes "It is a well baked cookie, and the price is";
+ mes "2000 Zeny each.";
+ mes "How many do you like to purchase?";
+ next;
+ callsub(S_Purchase, 2000, Well_Baked_Cookie);
+ break;
+ }
+ break;
+ case 3: // The teacher
+ mes "[Sugar]";
+ mes "Yes";
+ mes "The teacher of mine";
+ mes "is Mr. Kuberu, a sweets craftsman.";
+ mes "Making sweets under two persons.";
+ mes "which is allowed to self-train.";
+ next;
+ mes "[Sugar]";
+ mes "Although selling is seemingly to carried out ....";
+ mes "Where he is now?";
+ mes "Which I don't know.";
+ close;
+ case 2: // I don't need it
+ break;
+ }
mes "[Sugar]";
- mes "It is a well baked cookie, and the price is";
- mes "2000 Zeny each.";
- mes "How many do you like to purchase?";
- next;
+ mes "Really .... You might regret it..";
+ mes "If you change your mind.";
+ mes "I am just here ok.";
+ mes "Have a nice day!";
+ close;
-L_INPUT:
- input @maplenum;
- if (@maplenum > 5) goto L_ERROR;
- if (@maplenum == 0) goto M_End;
- set @maplePriceT,@maplePrice*@maplenum;
- if (Zeny < @maplePriceT) goto L_ERROR2;
- Zeny -= @maplePriceT;
- getitem @mapleItemID,@maplenum;
+/**
+ * Attempts to purchase an item, after asking the desired quantity.
+ *
+ * Arguments:
+ * 0 : price
+ * 1 : item ID
+ *
+ * Returns on user cancel. Closes on successful purchase or error.
+ */
+S_Purchase:
+ .@price = getarg(0);
+ .@item_id = getarg(1);
+ while (true) {
+ input .@amount;
+ if (.@amount <= 5)
+ break;
+ mes "[Sugar]";
+ mes "???";
+ mes "You seem to have a failure on hearing.";
+ mes "I will tell you once again?";
+ mes "You can only purchase";
+ mes "^ff0000 5 pieces^000000 at once.";
+ next;
+ }
+ if (.@amount == 0) // Cancel
+ return;
+ .@totalPrice = .@price * .@amount;
+ if (Zeny < .@totalPrice) {
+ mes "[Sugar]";
+ mes "???";
+ mes "Hmmm it seems you don't have enough money";
+ mes "to make that purchase.";
+ mes "I will ask you to check your money first.";
+ close;
+ }
+ Zeny -= .@totalPrice;
+ getitem .@item_id, .@amount;
mes "[Sugar]";
mes "Thank you!!!";
mes "These sweets are really delicious.";
@@ -82,44 +129,4 @@ L_INPUT:
mes "don't eat so much or you'll grow fat.";
mes "Please take care!!!";
close;
-
-M_L1:
- mes "[Sugar]";
- mes "Yes";
- mes "The teacher of mine";
- mes "is Mr. Kuberu, a sweets craftsman.";
- mes "Making sweets under two persons.";
- mes "which is allowed to self-train.";
- next;
- mes "[Sugar]";
- mes "Although selling is seemingly to carried out ....";
- mes "Where he is now?";
- mes "Which I don't know.";
- close;
-
-L_ERROR:
- mes "[Sugar]";
- mes "???";
- mes "You seem to have a failure on hearing.";
- mes "I will tell you once again?";
- mes "You can only purchase";
- mes "^ff0000 5 pieces^000000 at once.";
- next;
- goto L_INPUT;
-
-L_ERROR2:
- mes "[Sugar]";
- mes "???";
- mes "Hmmm it seems you don't have enough money";
- mes "to make that purchase.";
- mes "I will ask you to check your money first.";
- close;
-
-M_End:
- mes "[Sugar]";
- mes "Really .... You might regret it..";
- mes "If you change your mind.";
- mes "I am just here ok.";
- mes "Have a nice day!";
- close;
}
diff --git a/npc/events/xmas.txt b/npc/events/xmas.txt
index d8423dda7..72048985d 100644
--- a/npc/events/xmas.txt
+++ b/npc/events/xmas.txt
@@ -35,9 +35,8 @@ L_Start:
mes "I'm having a bit of a problem...";
mes "Do you care to listen?";
next;
- menu "Listen to Santa Claus.",M_0, "Give Santa Claus proof.",M_1, "Cancel.",M_End;
-
- M_0:
+ switch (select("Listen to Santa Claus.","Give Santa Claus proof.","Cancel.")) {
+ case 1: // Listen
mes "[Santa Claus]";
mes "My problem is this.";
mes "There seems to be a man out there";
@@ -76,7 +75,7 @@ L_Start:
mes "lab. It spits out random presents";
mes "and saves me a ton of work.";
close;
- M_1:
+ case 2: // Give proof
mes "[Santa Claus]";
if(countitem(7034) < 3) goto L_NotEnuf;
delitem 7034,3;
@@ -97,11 +96,12 @@ L_Start:
mes "Go take down those evil Santas";
mes "and get more for me and I'll reward you.";
close;
- M_End:
+ default: // Cancel
mes "[Santa Claus]";
mes "I see. Well, at the very least";
mes "we shall meet again on Christmas morning.";
close;
+ }
OnInit:
disablenpc "Santa Claus";
diff --git a/npc/instances/EndlessTower.txt b/npc/instances/EndlessTower.txt
index 2da7c8719..8da1d93c7 100644
--- a/npc/instances/EndlessTower.txt
+++ b/npc/instances/EndlessTower.txt
@@ -213,14 +213,14 @@ e_tower,81,105,0 script Tower Protection Stone 2_MONEMUS,{
set .@p_name$,getpartyname(.@party_id);
set .@md_name$,"Endless Tower";
- set .@etower_timer,checkquest(60200,PLAYTIME); // 1 week
- set .@etower_timer2,checkquest(60201,PLAYTIME); // 4 hours
+ .@etower_timer = questprogress(60200,PLAYTIME); // 1 week
+ .@etower_timer2 = questprogress(60201,PLAYTIME); // 4 hours
if (!instance_check_party(.@party_id,2)) {
mes "Make or join a party with more than 1 member and try again.";
close;
}
- if (.@etower_timer == -1) {
+ if (!.@etower_timer) {
if (getcharid(0) == getpartyleader(.@party_id,2)) {
mes "Confirmed the party has been made. Would you like to reserve entrance to the Endless Tower?";
next;
@@ -267,7 +267,7 @@ e_tower,81,105,0 script Tower Protection Stone 2_MONEMUS,{
case 3:
end;
}
- } else if ((.@etower_timer >= 0) && (.@etower_timer2 < 2)) {
+ } else if (.@etower_timer == 1) {
mes "If you have the dungeon generated already, you can enter it. ";
next;
switch(select("Enter the "+.@md_name$+":Return to Alberta:Cancel")) {
@@ -282,7 +282,7 @@ e_tower,81,105,0 script Tower Protection Stone 2_MONEMUS,{
break;
}
close;
- } else if ((.@etower_timer >= 0) && (.@etower_timer < 2) && (.@etower_timer2 == 2)) {
+ } else if (.@etower_timer == 1 && .@etower_timer2 == 2) {
set .@dun_lim_time,etower_timer+604800; // 1 week
set .@dun_lim_time2,etower_timer+14400; // 4 hours
diff --git a/npc/instances/NydhoggsNest.txt b/npc/instances/NydhoggsNest.txt
index 9ccdade10..ada2bde55 100644
--- a/npc/instances/NydhoggsNest.txt
+++ b/npc/instances/NydhoggsNest.txt
@@ -92,12 +92,12 @@ nyd_dun02,100,201,3 script Yggdrasil Gatekeeper HIDDEN_NPC,8,8,{
set .@party_id,getcharid(1);
set .@md_name$,"Nidhoggur's Nest";
- set .@ins_nyd_check,checkquest(3135,PLAYTIME); // 3 Day cooldown
- set .@ins_nyd_check2,checkquest(3136,PLAYTIME); // 4 Hour play limit
+ .@ins_nyd_check = questprogress(3135,PLAYTIME); // 3 Day cooldown
+ .@ins_nyd_check2 = questprogress(3136,PLAYTIME); // 4 Hour play limit
mes "As I put my hands on the stone gate, a voice sounded from the depth of my heart.";
next;
- if (.@ins_nyd_check == -1 && .@ins_nyd_check2 == -1) {
+ if (!.@ins_nyd_check && !.@ins_nyd_check2) {
if (!instance_check_party(.@party_id,2,70)) {
mes "[Yggdrasil Gatekeeper]";
mes "Where are the other servants, so you can work together? Each servant cannot be admitted here individually...";
@@ -150,7 +150,7 @@ nyd_dun02,100,201,3 script Yggdrasil Gatekeeper HIDDEN_NPC,8,8,{
close;
goto L_Enter;
} else {
- if (.@ins_nyd_check == 0 || .@ins_nyd_check == 1) {
+ if (.@ins_nyd_check == 1) {
if ('ins_nyd2 == 3 || 'ins_nyd2 == 4) {
mes "[Yggdrasil Gatekeeper]";
mes "With the defeat of Nidhoggur's Shadow, the roots of the World Tree Yggdrasil are also affected.";
@@ -166,7 +166,7 @@ nyd_dun02,100,201,3 script Yggdrasil Gatekeeper HIDDEN_NPC,8,8,{
close;
goto L_Enter;
} else if (.@ins_nyd_check == 2) {
- if (.@ins_nyd_check2 == 0 || .@ins_nyd_check2 == 1) {
+ if (.@ins_nyd_check2 == 1) {
mes "[Yggdrasil Gatekeeper]";
mes "The time limit to enter the dungeon has expired. You must wait for the World Tree to stabilize its power before trying to re-enter.";
close;
@@ -210,8 +210,8 @@ L_Enter:
close;
} else {
mapannounce "nyd_dun02", getpartyname(getcharid(1))+"'s party member "+strcharinfo(0)+" has entered Nidhoggur's Nest.",bc_map,"0x00ff99";
- if (checkquest(3135) == -1) setquest 3135;
- if (checkquest(3136) == -1) setquest 3136;
+ if (!questprogress(3135)) setquest 3135;
+ if (!questprogress(3136)) setquest 3136;
warp "1@nyd",32,37;
close;
}
diff --git a/npc/instances/OrcsMemory.txt b/npc/instances/OrcsMemory.txt
index 55f88f99d..4ed546b1e 100644
--- a/npc/instances/OrcsMemory.txt
+++ b/npc/instances/OrcsMemory.txt
@@ -51,8 +51,8 @@ gef_fild10,242,202,0 script Dimensional Gorge Piece 2_MONEMUS,{
close;
}
- set .@orctime,checkquest(12059,PLAYTIME);
- if (.@orctime == -1) {
+ .@orctime = questprogress(12059,PLAYTIME);
+ if (!.@orctime) {
if (getcharid(0) == getpartyleader(.@party_id,2)) {
mes "Party status confirmed. Would you like to book entrance to the "+.@md_name$+"?";
next;
@@ -87,7 +87,7 @@ gef_fild10,242,202,0 script Dimensional Gorge Piece 2_MONEMUS,{
if(select(.@md_name$ + " Enter the Memorial Dungeon:Cancel") == 2)
end;
callsub L_Enter,1;
- } else if (.@orctime == 0 || .@orctime == 1) {
+ } else if (.@orctime == 1) {
mes "You can enter the Dungeon if it has been generated.";
next;
if(select("Enter the Dungeon "+.@md_name$+":Cancel") == 2)
@@ -110,7 +110,7 @@ L_Enter:
close;
} else {
mapannounce "gef_fild10", .@p_leader$ + " of the party, " + .@p_name$ + " is entering the "+.@md_name$+".",bc_map,"0x00ff99";
- if (checkquest(12059)== -1) setquest 12059;
+ if (!questprogress(12059)) setquest 12059;
warp "1@orcs",179,15;
end;
}
diff --git a/npc/instances/SealedShrine.txt b/npc/instances/SealedShrine.txt
index 215ceffeb..d85e8a4e4 100644
--- a/npc/instances/SealedShrine.txt
+++ b/npc/instances/SealedShrine.txt
@@ -106,11 +106,11 @@ monk_test,309,146,3 script Friar Patrick#edq 4_M_OLDFRIAR,{
next;
// 12 hour cooldown
- set .@ins_bapho_check,checkquest(3040,PLAYTIME);
+ .@ins_bapho_check = questprogress(3040,PLAYTIME);
// Two hour play limit
- //set .@ins_bapho_check2,checkquest(3045,PLAYTIME);
+ //.@ins_bapho_check2 = questprogress(3045,PLAYTIME);
- if (.@ins_bapho_check == -1) {
+ if (!.@ins_bapho_check) {
if (getpartyleader(.@party_id,2) == getcharid(0) && instance_check_party(.@party_id,2,75)) {
mes "[Friar Patrick]";
mes "Party name is "+getpartyname(.@party_id)+"...";
@@ -158,7 +158,7 @@ monk_test,309,146,3 script Friar Patrick#edq 4_M_OLDFRIAR,{
mes "Once the party leader is permitted, the rest of the party can enter. This is a rule of this monastery, so please understand.";
}
}
- else if (.@ins_bapho_check == 0 || .@ins_bapho_check == 1) {
+ else if (.@ins_bapho_check == 1) {
mes "[Friar Patrick]";
mes "It seems you have entered this shrine recently... You cannot reenter because Baphomet's Curse still remains. Baphomet's Curse disappears only after a certain amount of time has passed.";
}
@@ -170,8 +170,8 @@ monk_test,309,146,3 script Friar Patrick#edq 4_M_OLDFRIAR,{
mes "Haaaaaaap... Hocus Pocus Wingardium Abracadabra!!!!!";
next;
erasequest 3040;
- if (checkquest(3041)>=0) erasequest 3041;
- if (checkquest(3045)>=0) erasequest 3045;
+ if (questprogress(3041)) erasequest 3041;
+ if (questprogress(3045)) erasequest 3045;
mes "[Friar Patrick]";
mes "Huu... It's over. Now that I've released Baphomet's Curse, you can enter again.";
}
@@ -224,11 +224,11 @@ monk_test,306,151,3 script Grave of Baphomet#edq HIDDEN_NPC,{
close;
// 12 hour cooldown
- set .@ins_bapho_check,checkquest(3040,PLAYTIME);
+ .@ins_bapho_check = questprogress(3040,PLAYTIME);
// Two hour play limit
- //set .@ins_bapho_check2,checkquest(3045,PLAYTIME);
+ //.@ins_bapho_check2 = questprogress(3045,PLAYTIME);
- if (.@ins_bapho_check == -1) {
+ if (!.@ins_bapho_check) {
if (has_instance("1@cata") == "") {
mes "It's cold to the touch. It doesn't respond.";
close;
@@ -238,7 +238,7 @@ monk_test,306,151,3 script Grave of Baphomet#edq HIDDEN_NPC,{
warp "1@cata",100,224;
end;
}
- } else if (.@ins_bapho_check == 0 || .@ins_bapho_check == 1) {
+ } else if (.@ins_bapho_check == 1) {
mes "[Friar Patrick]";
mes "It seems you have entered this shrine recently... You cannot reenter because the curse of Baphomet still remains.";
mes "The curse of Baphomet disappears after a certain amount of time after you entered.";
@@ -251,8 +251,8 @@ monk_test,306,151,3 script Grave of Baphomet#edq HIDDEN_NPC,{
mes "Haaaaaaap... Wingardium Leviosa Expecto Patronum !!!!!";
specialeffect2 EF_HOLYHIT;
erasequest 3040;
- if (checkquest(3041)>=0) erasequest 3041;
- if (checkquest(3045)>=0) erasequest 3045;
+ if (questprogress(3041)) erasequest 3041;
+ if (questprogress(3045)) erasequest 3045;
next;
mes "[Friar Patrick]";
mes "Huu... It's over. Now I released all of the curses on you. You can enter again.";
@@ -261,14 +261,14 @@ monk_test,306,151,3 script Grave of Baphomet#edq HIDDEN_NPC,{
}
prt_monk,261,91,3 script Rust Blackhand#edq 4_M_DWARF,{
- set .@new_maje,checkquest(3043);
+ .@new_maje = questprogress(3043);
mes "[Rust Blackhand]";
mes "Who are you? What do you want me for?";
next;
mes "[Rust Blackhand]";
mes "You're not a monk, then what do you want?";
next;
- if (.@new_maje == 0 || .@new_maje == 1) {
+ if (.@new_maje == 1) {
mes "[Rust Blackhand]";
mes "Did you bring all of the ingredients?";
next;
@@ -311,7 +311,7 @@ prt_monk,261,91,3 script Rust Blackhand#edq 4_M_DWARF,{
close;
}
}
- else if ((.@new_maje == -1) && (countitem(6004) > 0)) {
+ else if (!.@new_maje && countitem(6004) > 0) {
switch(select("About the Cursed Baphomet Doll:Stop talking.")) {
case 1:
mes "[Rust Blackhand]";
@@ -364,12 +364,12 @@ prt_monk,261,91,3 script Rust Blackhand#edq 4_M_DWARF,{
close;
}
}
- else if ((.@new_maje == -1) && (countitem(6004) == 0)) {
+ else if (!.@new_maje && countitem(6004) == 0) {
mes "[Rust Blackhand]";
mes "If you don't have business with me, go away! As you see, I make equipment for the Brothers at the monastery, not for adventurers like you. Do you understand?";
close;
}
- else if ((.@new_maje == 2) && (countitem(6004) > 0)) {
+ else if (.@new_maje == 2 && countitem(6004) > 0) {
switch(select("About the Cursed Baphomet Doll:Stop talking.")) {
case 1:
mes "[Rust Blackhand]";
@@ -420,7 +420,7 @@ prt_monk,261,91,3 script Rust Blackhand#edq 4_M_DWARF,{
close;
}
}
- else if ((.@new_maje == 2) && (countitem(6004) == 0)) {
+ else if (.@new_maje == 2 && countitem(6004) == 0) {
mes "[Rust Blackhand]";
mes "Why are you hanging around here? If you don't want a ^4d4dffGigantic Magestic Goat^000000, go away.";
close;
@@ -1084,8 +1084,8 @@ OnTouch:
// Magical Seals
//============================================================
- script Magical Seal#SS -1,{
- set .@seal_check,checkquest(3041,PLAYTIME);
- if (.@seal_check == 0 || .@seal_check == 1) {
+ .@seal_check = questprogress(3041,PLAYTIME);
+ if (.@seal_check == 1) {
specialeffect2 EF_SILENCEATTACK;
percentheal -50,0;
sc_start Eff_Stone,30000,0;
@@ -1149,7 +1149,7 @@ OnInstanceInit:
2@cata,80,63,4 script Ancient Hero's Soul#2F 4_M_CHAMPSOUL,{
cutin "ins_cata_champ_s",2;
- if (checkquest(3041)>=0) erasequest 3041;
+ if (questprogress(3041)) erasequest 3041;
mes "[Ancient Hero's Soul]";
mes "Good job, my descendants... You've finished the long-cherished task that me and my bretheren could not complete.";
next;
diff --git a/npc/jobs/2-1/assassin.txt b/npc/jobs/2-1/assassin.txt
index d778d789a..4292e86b8 100644
--- a/npc/jobs/2-1/assassin.txt
+++ b/npc/jobs/2-1/assassin.txt
@@ -254,7 +254,7 @@ in_moc_16,19,33,1 script Guildsman#asn 1_M_JOBTESTER,{
mes "you to the office.";
close2;
set ASSIN_Q,0;
- if (checkquest(8000) != -1) {
+ if (questprogress(8000)) {
changequest 8000,8001;
} else {
setquest 8001;
diff --git a/npc/jobs/2-1/blacksmith.txt b/npc/jobs/2-1/blacksmith.txt
index c466925e1..b05c9c897 100644
--- a/npc/jobs/2-1/blacksmith.txt
+++ b/npc/jobs/2-1/blacksmith.txt
@@ -1,4 +1,4 @@
-//===== HerculesScript =======================================
+//===== Hercules Script =======================================
//= Blacksmith Job Quest
//===== By: ==================================================
//= EREMES THE CANIVALIZER(Aegis)
@@ -248,7 +248,7 @@ ein_in01,18,28,4 script Guildsman#BLS 4_M_JOB_BLACKSMITH,{
else if (BSMITH_Q == 17 && countitem(1005) > 0 && JobLevel > 39) {
mes "[Altiregen]";
mes "Excellent, I can tell by the twinkle in your eye that you were successful. I can now bestow upon you the gift of the smithing, the art of the Blacksmith.";
- if (checkquest(2015) != -1) {
+ if (questprogress(2015)) {
changequest 2015,2016;
}
next;
@@ -483,7 +483,7 @@ ein_in01,201,27,3 script Guildsman#alberta 1_M_SMITH,{
mes "Let's see...your score is..." + .@black_q + " points.";
if (.@black_q == 100) {
set BSMITH_Q,3;
- if (checkquest(2001) != -1) {
+ if (questprogress(2001)) {
changequest 2001,2002;
} else {
changequest 2000,2002;
@@ -500,7 +500,7 @@ ein_in01,201,27,3 script Guildsman#alberta 1_M_SMITH,{
close;
}
set BSMITH_Q,2;
- if (checkquest(2001) == -1) {
+ if (!questprogress(2001)) {
changequest 2000,2001;
}
mes ".............";
@@ -653,7 +653,7 @@ ein_in01,201,27,3 script Guildsman#alberta 1_M_SMITH,{
case 9:
mes "Okay, now take this to ^8E6B23Baisulist^000000 in Geffen of Rune-Midgarts Kingdom. Simply deliver it and bring me the receipt.";
getitem 1610,1; //Arc_Wand
- if (checkquest(2003) != -1) {
+ if (questprogress(2003)) {
changequest 2003,2008;
}
next;
@@ -678,7 +678,7 @@ ein_in01,201,27,3 script Guildsman#alberta 1_M_SMITH,{
case 10:
mes "Okay, now take this to ^8E6B23Wickebine^000000 in Morroc of Rune-Midgarts Kingdom. Simply deliver it and bring me the receipt.";
getitem 1219,1; //Gladius
- if (checkquest(2004) != -1) {
+ if (questprogress(2004)) {
changequest 2004,2009;
}
next;
@@ -703,7 +703,7 @@ ein_in01,201,27,3 script Guildsman#alberta 1_M_SMITH,{
case 11:
mes "Okay, now take this to ^8E6B23Krongast^000000 in Lighthalzen. Simply deliver it and bring me the receipt.";
getitem 1119,1; //Tsurugi
- if (checkquest(2005) != -1) {
+ if (questprogress(2005)) {
changequest 2005,2010;
}
next;
@@ -729,7 +729,7 @@ ein_in01,201,27,3 script Guildsman#alberta 1_M_SMITH,{
case 12:
mes "Okay, now take this to ^8E6B23Talpiz^000000 in Payon of Rune-Midgarts Kingdom. Simply deliver this and bring me the receipt.";
getitem 1713,1; //Arbalest
- if (checkquest(2006) != -1) {
+ if (questprogress(2006)) {
changequest 2006,2011;
}
next;
@@ -753,7 +753,7 @@ ein_in01,201,27,3 script Guildsman#alberta 1_M_SMITH,{
case 13:
mes "Okay, now take this to ^8E6B23Bismarc^000000 in Hugel. Simply deliver this and bring back the receipt.";
getitem 1122,1; //Ring_Pommel_Saber
- if (checkquest(2007) != -1) {
+ if (questprogress(2007)) {
changequest 2007,2012;
}
next;
@@ -850,16 +850,16 @@ ein_in01,201,27,3 script Guildsman#alberta 1_M_SMITH,{
if (countitem(1073) > 0) {
set BSMITH_Q,15;
delitem 1073,1; //Merchant_Voucher_1
- if (checkquest(2008) != -1) {
+ if (questprogress(2008)) {
changequest 2008,2013;
}
- else if (checkquest(2009) != -1) {
+ else if (questprogress(2009)) {
changequest 2009,2013;
}
- else if (checkquest(2010) != -1) {
+ else if (questprogress(2010)) {
changequest 2010,2013;
}
- else if (checkquest(2011) != -1) {
+ else if (questprogress(2011)) {
changequest 2011,2013;
}
else {
diff --git a/npc/jobs/2-1/hunter.txt b/npc/jobs/2-1/hunter.txt
index b1f1f518b..ab163860f 100644
--- a/npc/jobs/2-1/hunter.txt
+++ b/npc/jobs/2-1/hunter.txt
@@ -223,7 +223,7 @@ hu_in01,386,373,4 script Hunter Guildsman#hnt 4_F_JOB_HUNTER,{
mes "shall we begin?";
next;
if (select("Yes~ Let's start now.:No, I'll be back later.") == 1) {
- if(checkquest(4000) == -1) {
+ if (!questprogress(4000)) {
setquest 4000;
}
mes "[Hunter Sherin]";
@@ -556,22 +556,22 @@ hu_in01,382,382,4 script Guild Receptionist#hnt 4_M_JOB_HUNTER,{
mes "[Demon Hunter]";
mes "You brought all of the necessary materials... You can get directions to the testing area from our Guildmaster who is currently in the Payon Central Palace.";
set HNTR_Q,.@items[6];
- if(checkquest(4002) != -1) {
+ if (questprogress(4002)) {
changequest 4002,4009;
}
- else if(checkquest(4003) != -1) {
+ else if (questprogress(4003)) {
changequest 4003,4009;
}
- else if(checkquest(4004) != -1) {
+ else if (questprogress(4004)) {
changequest 4004,4009;
}
- else if(checkquest(4005) != -1) {
+ else if (questprogress(4005)) {
changequest 4005,4009;
}
- else if(checkquest(4006) != -1) {
+ else if (questprogress(4006)) {
changequest 4006,4010;
}
- else if(checkquest(4007) != -1) {
+ else if (questprogress(4007)) {
changequest 4007,4010;
}
else {
diff --git a/npc/jobs/2-1/knight.txt b/npc/jobs/2-1/knight.txt
index da1d8a8e4..62fd03aaf 100644
--- a/npc/jobs/2-1/knight.txt
+++ b/npc/jobs/2-1/knight.txt
@@ -1109,7 +1109,7 @@ prt_in,79,94,4 script Sir Windsor#knt 4_M_JOB_KNIGHT1,{
mes "...";
next;
set KNIGHT_Q,7;
- if (checkquest(9004) != -1) {
+ if (questprogress(9004)) {
changequest 9004,9005;
}
mes "[Sir Windsor]";
@@ -1126,7 +1126,8 @@ prt_in,79,94,4 script Sir Windsor#knt 4_M_JOB_KNIGHT1,{
mes "...This way.";
}
close2;
- if(checkquest(9006) == -1) changequest 9005,9006;
+ if (!questprogress(9006))
+ changequest 9005,9006;
warp "job_knt",89,101;
end;
}
@@ -1416,7 +1417,7 @@ OnMyMobDead:
mes "Amy Beatrice now.";
close2;
set KNIGHT_Q,8;
- if(checkquest(9007) == -1) {
+ if (!questprogress(9007)) {
changequest 9006,9007;
}
warp "prt_in",80,100;
@@ -1544,7 +1545,8 @@ prt_in,69,107,6 script Lady Amy#knt 4_F_JOB_KNIGHT,{
mes "come to Amy?";
next;
if (select("Sir Windsor told me to--:Oh, nothing.") == 1) {
- if(checkquest(9008) == -1) changequest 9007,9008;
+ if (!questprogress(9008))
+ changequest 9007,9008;
mes "[Lady Amy]";
mes "Oh!";
mes "No need to say";
diff --git a/npc/jobs/2-1/priest.txt b/npc/jobs/2-1/priest.txt
index 57f6a2647..76fb03cad 100644
--- a/npc/jobs/2-1/priest.txt
+++ b/npc/jobs/2-1/priest.txt
@@ -690,7 +690,7 @@ prt_church,27,24,1 script Sister Cecilia 1_F_PRIEST,{
}
else if (PRIEST_Q == 7 || PRIEST_Q == 8) {
if (PRIEST_Q == 7) {
- if(checkquest(8014) == -1) {
+ if (!questprogress(8014)) {
changequest 8013,8014;
}
mes "Welcome! I'm so glad to see you've come back! Now, there is one last trial left for you to complete.";
@@ -990,7 +990,7 @@ job_prist,24,187,4 script Peter S. Alberto 4_M_MINISTER,{
mes "Kill those";
mes "misbegotten creatures!";
close2;
- if(checkquest(8012) == -1) {
+ if (!questprogress(8012)) {
changequest 8011,8012;
}
warp "job_prist",24,44;
@@ -1712,7 +1712,7 @@ OnTouch:
}
else if (BaseClass == Job_Acolyte) {
set PRIEST_Q,7;
- if(checkquest(8012) != -1) {
+ if (questprogress(8012)) {
changequest 8012,8013;
}
warp "prt_church",16,37;
diff --git a/npc/jobs/2-1/wizard.txt b/npc/jobs/2-1/wizard.txt
index b62685c6b..86c245f94 100644
--- a/npc/jobs/2-1/wizard.txt
+++ b/npc/jobs/2-1/wizard.txt
@@ -547,7 +547,7 @@ gef_tower,102,24,2 script Gloomy Wizard 4_M_JOB_WIZARD,{
mes "[Raulel]";
mes "I'll give you 10 questions so give me the right answers.";
mes "If you get something wrong, I won't tell you what it is!";
- if(checkquest(9016) == -1) {
+ if (!questprogress(9016)) {
changequest 9015,9016;
}
next;
diff --git a/npc/jobs/2-2/alchemist.txt b/npc/jobs/2-2/alchemist.txt
index 7e5ca7e33..b30defc48 100644
--- a/npc/jobs/2-2/alchemist.txt
+++ b/npc/jobs/2-2/alchemist.txt
@@ -234,10 +234,10 @@ alde_alche,27,185,5 script Alchemist Guildsman#am 4_F_ALCHE,{
mes "Okay, now you need to learn";
mes "the basics to being an Alchemist and learn the procedures for mixing chemicals and medicines.";
set ALCH_Q,4;
- if(checkquest(2028) != -1) {
+ if (questprogress(2028)) {
changequest 2028,2031;
}
- else if(checkquest(2029) != -1) {
+ else if (questprogress(2029)) {
changequest 2029,2031;
}
else {
@@ -267,10 +267,10 @@ alde_alche,27,185,5 script Alchemist Guildsman#am 4_F_ALCHE,{
mes "Okay, now you need to learn";
mes "the basics to being an Alchemist and learn the procedures for mixing chemicals and medicines.";
set ALCH_Q,4;
- if(checkquest(2028) != -1) {
+ if (questprogress(2028)) {
changequest 2028,2031;
}
- else if(checkquest(2029) != -1) {
+ else if (questprogress(2029)) {
changequest 2029,2031;
}
else {
@@ -1687,10 +1687,10 @@ alde_alche,101,184,4 script Master Alchemist#am 2_M_DYEINGER,{
cutin "",255;
end;
}
- if(checkquest(2039) != -1) {
+ if (questprogress(2039)) {
changequest 2039,2040;
}
- if(checkquest(2034) != -1) {
+ if (questprogress(2034)) {
changequest 2034,2040;
}
mes "Ah, well done.";
diff --git a/npc/jobs/2-2/bard.txt b/npc/jobs/2-2/bard.txt
index 24d49cbce..55b7401a1 100644
--- a/npc/jobs/2-2/bard.txt
+++ b/npc/jobs/2-2/bard.txt
@@ -433,7 +433,7 @@ comodo,226,123,5 script Wandering Bard 2_M_BARD_ORIENT,{
mes "Then, do you want to try singing...?";
mes "I'll sing a short melody...";
mes "and you try after.";
- if(checkquest(3003) == -1) {
+ if (!questprogress(3003)) {
changequest 3002,3003;
}
next;
diff --git a/npc/jobs/2-2/crusader.txt b/npc/jobs/2-2/crusader.txt
index d5bcd70ea..232e6c85e 100644
--- a/npc/jobs/2-2/crusader.txt
+++ b/npc/jobs/2-2/crusader.txt
@@ -245,10 +245,10 @@ prt_castle,45,169,5 script Senior Crusader 4_M_CRU_OLD,{
delitem .@item3, 10;
delitem .@item4, 10;
set CRUS_Q, 4;
- if(checkquest(3006) != -1) {
+ if (questprogress(3006)) {
changequest 3006,3009;
}
- else if(checkquest(3007) != -1) {
+ else if (questprogress(3007)) {
changequest 3007,3009;
}
else {
@@ -759,7 +759,7 @@ prt_church,95,127,3 script Crusader 4_F_CRU,{
close;
}
set CRUS_Q,7;
- if(checkquest(3011) != -1) {
+ if (questprogress(3011)) {
changequest 3011,3012;
}
mes "Hmmm... What a pity.";
@@ -866,7 +866,7 @@ prt_castle,35,151,5 script Patron Knight 4_M_CRU,{
mes "[Bliant Piyord]";
mes "To take the battle test, bring";
mes "1 ^3355FFHoly Water^000000. This will be used to purify you prior to taking the test.";
- if(checkquest(3013) != -1) {
+ if (questprogress(3013)) {
changequest 3013,3014;
}
next;
diff --git a/npc/jobs/2-2/dancer.txt b/npc/jobs/2-2/dancer.txt
index 6b4ddf5b0..a34bf0540 100644
--- a/npc/jobs/2-2/dancer.txt
+++ b/npc/jobs/2-2/dancer.txt
@@ -320,10 +320,10 @@ job_duncer,43,93,4 script Aile#da 4_F_07,{
mes "[Aile]";
mes "Next, go to ^CD6889Bijou^000000, who is in charge of the interviewing process. She will have a couple of things she'll need to ask you.";
set DANC_Q,5;
- if(checkquest(7001) != -1) {
+ if (questprogress(7001)) {
changequest 7001,7004;
}
- else if(checkquest(7002) != -1) {
+ else if (questprogress(7002)) {
changequest 7002,7004;
}
else {
diff --git a/npc/jobs/2-2/rogue.txt b/npc/jobs/2-2/rogue.txt
index cf20d5203..d0b2ba95f 100644
--- a/npc/jobs/2-2/rogue.txt
+++ b/npc/jobs/2-2/rogue.txt
@@ -757,10 +757,10 @@ in_rogue,376,23,1 script Mr. Smith#rg 1_M_LIBRARYMASTER,{
switch(rand(1,3)) {
case 1:
set ROGUE_Q,9;
- if(checkquest(2018) != -1) {
+ if (questprogress(2018)) {
changequest 2018,2022;
}
- else if(checkquest(2019) != -1) {
+ else if (questprogress(2019)) {
changequest 2019,2022;
}
else {
@@ -794,10 +794,10 @@ in_rogue,376,23,1 script Mr. Smith#rg 1_M_LIBRARYMASTER,{
close;
case 2:
set ROGUE_Q,10;
- if(checkquest(2018) != -1) {
+ if (questprogress(2018)) {
changequest 2018,2023;
}
- else if(checkquest(2019) != -1) {
+ else if (questprogress(2019)) {
changequest 2019,2023;
}
else {
@@ -830,10 +830,10 @@ in_rogue,376,23,1 script Mr. Smith#rg 1_M_LIBRARYMASTER,{
close;
case 3:
set ROGUE_Q,11;
- if(checkquest(2018) != -1) {
+ if (questprogress(2018)) {
changequest 2018,2024;
}
- else if(checkquest(2019) != -1) {
+ else if (questprogress(2019)) {
changequest 2019,2024;
}
else {
diff --git a/npc/jobs/2-2/sage.txt b/npc/jobs/2-2/sage.txt
index 72bacfaf1..4f0db7888 100644
--- a/npc/jobs/2-2/sage.txt
+++ b/npc/jobs/2-2/sage.txt
@@ -595,13 +595,13 @@ yuno_in03,154,35,4 script Staff of the Academy#a 2_M_SAGE_B,{
mes "Ah yes, everything is in readiness.";
mes "Next, you will take an entrance test.";
set SAGE_Q,4;
- if(checkquest(2043) != -1) {
+ if (questprogress(2043)) {
changequest 2043,2041;
}
- else if(checkquest(2044) != -1) {
+ else if (questprogress(2044)) {
changequest 2044,2041;
}
- else if(checkquest(2045) != -1) {
+ else if (questprogress(2045)) {
changequest 2045,2041;
}
else {
@@ -1881,10 +1881,10 @@ yuno_in03,32,102,1 script Biology Professor#sa 4_M_SAGE_C,{
switch(rand(1,4)) {
case 1:
set SAGE_Q2,4;
- if(checkquest(2053) != -1) {
+ if (questprogress(2053)) {
changequest 2053,2056;
}
- else if(checkquest(2054) != -1) {
+ else if (questprogress(2054)) {
changequest 2054,2056;
}
else {
@@ -1896,10 +1896,10 @@ yuno_in03,32,102,1 script Biology Professor#sa 4_M_SAGE_C,{
break;
case 2:
set SAGE_Q2,5;
- if(checkquest(2053) != -1) {
+ if (questprogress(2053)) {
changequest 2053,2057;
}
- else if(checkquest(2054) != -1) {
+ else if (questprogress(2054)) {
changequest 2054,2057;
}
else {
@@ -1911,10 +1911,10 @@ yuno_in03,32,102,1 script Biology Professor#sa 4_M_SAGE_C,{
break;
case 3:
set SAGE_Q2,6;
- if(checkquest(2053) != -1) {
+ if (questprogress(2053)) {
changequest 2053,2058;
}
- else if(checkquest(2054) != -1) {
+ else if (questprogress(2054)) {
changequest 2054,2058;
}
else {
@@ -1926,10 +1926,10 @@ yuno_in03,32,102,1 script Biology Professor#sa 4_M_SAGE_C,{
break;
case 4:
set SAGE_Q2,7;
- if(checkquest(2053) != -1) {
+ if (questprogress(2053)) {
changequest 2053,2059;
}
- else if(checkquest(2054) != -1) {
+ else if (questprogress(2054)) {
changequest 2054,2059;
}
else {
@@ -2002,13 +2002,13 @@ yuno_in03,32,102,1 script Biology Professor#sa 4_M_SAGE_C,{
next;
set SAGE_Q2,0;
set SAGE_Q,12;
- if(checkquest(2056) != -1) {
+ if (questprogress(2056)) {
changequest 2056,2051;
}
- else if(checkquest(2057) != -1) {
+ else if (questprogress(2057)) {
changequest 2057,2051;
}
- else if(checkquest(2058) != -1) {
+ else if (questprogress(2058)) {
changequest 2058,2051;
}
else {
diff --git a/npc/jobs/2-2e/SoulLinker.txt b/npc/jobs/2-2e/SoulLinker.txt
index 38fb47131..597407909 100644
--- a/npc/jobs/2-2e/SoulLinker.txt
+++ b/npc/jobs/2-2e/SoulLinker.txt
@@ -398,7 +398,7 @@ OnTouch:
mes "if you talk to me later...";
close;
}
- if (ismounting()) {
+ if (hascashmount()) {
mes "[Maia]";
mes "You are on a riding pet,";
mes "so you cannot change your job.";
@@ -520,7 +520,7 @@ job_soul,30,35,6 script Monk Spirit#link4 4_M_GRANDMONK,{
mes "possibly have to do this.";
next;
set SOUL_Q,4;
- if(checkquest(6008) == -1) {
+ if (!questprogress(6008)) {
changequest 6007,6008;
}
mes "[Monk Spirit]";
@@ -569,7 +569,7 @@ job_soul,30,25,7 script Sage Spirit#link5 4_M_SAGE_A,{
mes "require your help. I beg you,";
mes "let me become your spirit ally.";
set SOUL_Q,4;
- if(checkquest(6008) == -1) {
+ if (!questprogress(6008)) {
changequest 6007,6008;
}
next;
@@ -613,7 +613,7 @@ job_soul,25,30,5 script Alchemist Spirit#link7 4_F_ALCHE,{
mes "on to the next world until I've";
mes "passed on my techniques...";
set SOUL_Q,4;
- if(checkquest(6008) == -1) {
+ if (!questprogress(6008)) {
changequest 6007,6008;
}
next;
diff --git a/npc/jobs/valkyrie.txt b/npc/jobs/valkyrie.txt
index 0aa4c4e3f..ad6d5f795 100644
--- a/npc/jobs/valkyrie.txt
+++ b/npc/jobs/valkyrie.txt
@@ -325,7 +325,7 @@ yuno_in02,93,207,1 script Book of Ymir HIDDEN_NPC,{
mes "can confirm that Valkyrie and Valhalla actually exist...";
next;
set valkyrie_Q,2;
- if(checkquest(1000) == -1) {
+ if(!questprogress(1000)) {
setquest 1000;
}
mes "[The Book of Ymir]";
diff --git a/npc/merchants/renters.txt b/npc/merchants/renters.txt
index 5944932e9..cac757f85 100644
--- a/npc/merchants/renters.txt
+++ b/npc/merchants/renters.txt
@@ -62,8 +62,7 @@ prontera,55,350,5 script Peco Peco Breeder#knt 8W_SOLDIER,{
mes "mounted on a";
mes "Peco Peco.";
close;
- }
- else if(ismounting()) {
+ } else if(hascashmount()) {
mes "[Peco Peco Breeder]";
mes "Please remove your cash mount.";
close;
@@ -125,8 +124,7 @@ prontera,232,318,3 script Peco Peco Breeder#cru 8W_SOLDIER,{
mes "You are already";
mes "mounted on a Peco Peco.";
close;
- }
- else if(ismounting()) {
+ } else if(hascashmount()) {
mes "[Peco Peco Breeder]";
mes "Please remove your cash mount.";
close;
diff --git a/npc/other/CashShop_Functions.txt b/npc/other/CashShop_Functions.txt
index 76056cb52..1a2627d02 100644
--- a/npc/other/CashShop_Functions.txt
+++ b/npc/other/CashShop_Functions.txt
@@ -59,7 +59,7 @@ function script F_CashPartyCall {
// - Reset players skills. Weight must be 0, options must be off.
// - No arguments.
function script F_CashReset {
- if (Class != Job_Novice && Weight == 0 && !checkriding() && !checkfalcon() && !checkcart() && !ismounting()) {
+ if (Class != Job_Novice && Weight == 0 && !checkriding() && !checkfalcon() && !checkcart() && !hascashmount()) {
resetskill;
sc_end SC_ALL;
if (countitem(12213)) delitem 12213,1;
diff --git a/npc/other/turbo_track.txt b/npc/other/turbo_track.txt
index 2d9b967d8..5cc10d624 100644
--- a/npc/other/turbo_track.txt
+++ b/npc/other/turbo_track.txt
@@ -4691,7 +4691,7 @@ alde_gld,186,199,3 script Turbo Track Guide#Entran 4_F_RACING,{
- script ::MountManager_turbo -1,{
set .@n$, "["+strnpcinfo(1)+"]";
mes .@n$;
- if (ismounting()) {
+ if (hascashmount()) {
mes "Please get off of that creature you're riding on.";
mes "Then talk to me again.";
close;
diff --git a/npc/pre-re/jobs/1-1/acolyte.txt b/npc/pre-re/jobs/1-1/acolyte.txt
index 2faef7c87..49bb33c9b 100644
--- a/npc/pre-re/jobs/1-1/acolyte.txt
+++ b/npc/pre-re/jobs/1-1/acolyte.txt
@@ -182,10 +182,10 @@ prt_church,184,41,4 script Cleric#aco 1_M_PASTOR,{
skill 143,0,0;
callfunc "Job_Change",Job_Acolyte;
callfunc "F_ClearJobVar";
- if(checkquest(1001) != -1) {
+ if (questprogress(1001)) {
completequest 1001;
}
- else if(checkquest(1002) != -1) {
+ else if (questprogress(1002)) {
completequest 1002;
}
else {
diff --git a/npc/pre-re/jobs/1-1/mage.txt b/npc/pre-re/jobs/1-1/mage.txt
index 2e03ce410..b2c6b346d 100644
--- a/npc/pre-re/jobs/1-1/mage.txt
+++ b/npc/pre-re/jobs/1-1/mage.txt
@@ -208,13 +208,13 @@ geffen_in,164,124,4 script Mage Guildsman 2_F_MAGICMASTER,{
callfunc "Job_Change",Job_Mage;
callfunc "F_ClearJobVar";
Zeny += 50;
- if(checkquest(1005) != -1) {
+ if (questprogress(1005)) {
completequest 1005;
}
- else if(checkquest(1006) != -1) {
+ else if (questprogress(1006)) {
completequest 1006;
}
- else if(checkquest(1007) != -1) {
+ else if (questprogress(1007)) {
completequest 1007;
}
else {
diff --git a/npc/pre-re/jobs/1-1/merchant.txt b/npc/pre-re/jobs/1-1/merchant.txt
index 47c1e3242..4162bf0b1 100644
--- a/npc/pre-re/jobs/1-1/merchant.txt
+++ b/npc/pre-re/jobs/1-1/merchant.txt
@@ -151,13 +151,13 @@ alberta_in,53,43,6 script Merchant#mer 4_M_04,{
mes "Congratulations!";
callfunc "Job_Change",Job_Merchant;
callfunc "F_ClearJobVar";
- if(checkquest(1009) != -1) {
+ if (questprogress(1009)) {
completequest 1009;
}
- else if(checkquest(1010) != -1) {
+ else if (questprogress(1010)) {
completequest 1010;
}
- else if(checkquest(1011) != -1) {
+ else if (questprogress(1011)) {
completequest 1011;
}
else {
diff --git a/npc/pre-re/quests/collection/quest_alligator.txt b/npc/pre-re/quests/collection/quest_alligator.txt
index 79c121ba5..327216667 100644
--- a/npc/pre-re/quests/collection/quest_alligator.txt
+++ b/npc/pre-re/quests/collection/quest_alligator.txt
@@ -13,8 +13,8 @@
//============================================================
cmd_fild01,362,256,3 script Cuir#Gator_Hunt 1_M_MOC_LORD,{
- if (checkquest(60119) != -1) {
- if (checkquest(60119,HUNTING) != 2 ) {
+ if (questprogress(60119)) {
+ if (questprogress(60119,HUNTING) != 2) {
mes "[Cuir]";
mes "Have you finished hunting the 50 Alligators?";
next;
@@ -53,8 +53,8 @@ cmd_fild01,362,256,3 script Cuir#Gator_Hunt 1_M_MOC_LORD,{
close;
}
}
- if (checkquest(60120) != -1) {
- if (checkquest(60120,HUNTING) != 2 ) {
+ if (questprogress(60120)) {
+ if (questprogress(60120,HUNTING) != 2) {
mes "[Cuir]";
mes "Have you finished hunting the 50 Alligators?";
next;
@@ -94,8 +94,8 @@ cmd_fild01,362,256,3 script Cuir#Gator_Hunt 1_M_MOC_LORD,{
close;
}
}
- if (checkquest(60121) != -1) {
- if (checkquest(60121,HUNTING) != 2 ) {
+ if (questprogress(60121)) {
+ if (questprogress(60121,HUNTING)) {
mes "[Cuir]";
mes "Have you finished hunting the 150 Alligators?";
next;
diff --git a/npc/pre-re/quests/collection/quest_caramel.txt b/npc/pre-re/quests/collection/quest_caramel.txt
index 6815c62e1..5474939ff 100644
--- a/npc/pre-re/quests/collection/quest_caramel.txt
+++ b/npc/pre-re/quests/collection/quest_caramel.txt
@@ -13,8 +13,8 @@
//============================================================
mjolnir_01,296,29,6 script Yullo#Caramel_Hunt 4_F_SISTER,{
- if (checkquest(60116) != -1) {
- if (checkquest(60116,HUNTING) != 2 ) {
+ if (questprogress(60116)) {
+ if (questprogress(60116,HUNTING) != 2) {
mes "[Yullo]";
mes "Have you finished hunting the 50 Caramels?";
next;
@@ -53,8 +53,8 @@ mjolnir_01,296,29,6 script Yullo#Caramel_Hunt 4_F_SISTER,{
close;
}
}
- if (checkquest(60117) != -1) {
- if (checkquest(60117,HUNTING) != 2 ) {
+ if (questprogress(60117)) {
+ if (questprogress(60117,HUNTING) != 2) {
mes "[Yullo]";
mes "Have you finished hunting the 50 Caramels?";
next;
@@ -94,8 +94,8 @@ mjolnir_01,296,29,6 script Yullo#Caramel_Hunt 4_F_SISTER,{
close;
}
}
- if (checkquest(60118) != -1) {
- if (checkquest(60118,HUNTING) != 2 ) {
+ if (questprogress(60118)) {
+ if (questprogress(60118,HUNTING) != 2) {
mes "[Yullo]";
mes "Have you finished hunting the 150 Caramels?";
next;
diff --git a/npc/pre-re/quests/collection/quest_coco.txt b/npc/pre-re/quests/collection/quest_coco.txt
index 7ba4cab02..541259954 100644
--- a/npc/pre-re/quests/collection/quest_coco.txt
+++ b/npc/pre-re/quests/collection/quest_coco.txt
@@ -13,8 +13,8 @@
//============================================================
mjolnir_01,293,20,3 script Nutters#Coco_Hunt 4_M_YOYOROGUE,{
- if (checkquest(60113) != -1) {
- if (checkquest(60113,HUNTING) != 2 ) {
+ if (questprogress(60113)) {
+ if (questprogress(60113,HUNTING) != 2) {
mes "[Nutters]";
mes "Have you finished hunting the 50 Cocos?";
next;
@@ -53,8 +53,8 @@ mjolnir_01,293,20,3 script Nutters#Coco_Hunt 4_M_YOYOROGUE,{
close;
}
}
- if (checkquest(60114) != -1) {
- if (checkquest(60114,HUNTING) != 2 ) {
+ if (questprogress(60114)) {
+ if (questprogress(60114,HUNTING) != 2) {
mes "[Nutters]";
mes "Have you finished hunting the 50 Cocos?";
next;
@@ -94,8 +94,8 @@ mjolnir_01,293,20,3 script Nutters#Coco_Hunt 4_M_YOYOROGUE,{
close;
}
}
- if (checkquest(60115) != -1) {
- if (checkquest(60115,HUNTING) != 2 ) {
+ if (questprogress(60115)) {
+ if (questprogress(60115,HUNTING) != 2) {
mes "[Nutters]";
mes "Have you finished hunting the 150 Cocos?";
next;
diff --git a/npc/pre-re/quests/collection/quest_creamy.txt b/npc/pre-re/quests/collection/quest_creamy.txt
index ecdb6b0fb..7de8c7cf9 100644
--- a/npc/pre-re/quests/collection/quest_creamy.txt
+++ b/npc/pre-re/quests/collection/quest_creamy.txt
@@ -13,8 +13,8 @@
//============================================================
prt_fild04,356,148,3 script Laertes#Creamy_Hunt 4_M_NFMAN,{
- if (checkquest(60122) != -1) {
- if (checkquest(60122,HUNTING) != 2 ) {
+ if (questprogress(60122)) {
+ if (questprogress(60122,HUNTING) != 2) {
mes "[Laertes]";
mes "Have you finished hunting the 50 Creamys?";
next;
@@ -53,8 +53,8 @@ prt_fild04,356,148,3 script Laertes#Creamy_Hunt 4_M_NFMAN,{
close;
}
}
- if (checkquest(60123) != -1) {
- if (checkquest(60123,HUNTING) != 2 ) {
+ if (questprogress(60123)) {
+ if (questprogress(60123,HUNTING) != 2) {
mes "[Laertes]";
mes "Have you finished hunting the 50 Creamys?";
next;
@@ -94,8 +94,8 @@ prt_fild04,356,148,3 script Laertes#Creamy_Hunt 4_M_NFMAN,{
close;
}
}
- if (checkquest(60124) != -1) {
- if (checkquest(60124,HUNTING) != 2 ) {
+ if (questprogress(60124)) {
+ if (questprogress(60124,HUNTING) != 2) {
mes "[Laertes]";
mes "Have you finished hunting the 150 Creamys?";
next;
diff --git a/npc/pre-re/quests/collection/quest_demonpungus.txt b/npc/pre-re/quests/collection/quest_demonpungus.txt
index 242e7bca2..d72e3f816 100644
--- a/npc/pre-re/quests/collection/quest_demonpungus.txt
+++ b/npc/pre-re/quests/collection/quest_demonpungus.txt
@@ -13,8 +13,8 @@
//============================================================
ein_fild01,43,249,0 script Local Villager#hunt 4_M_HUMAN_01,{
- if (checkquest(60125) != -1) {
- if (checkquest(60125,HUNTING) != 2 ) {
+ if (questprogress(60125)) {
+ if (questprogress(60125,HUNTING) != 2) {
mes "[Local Villager]";
mes "Have you finished hunting the 50 Demon Pungus?";
next;
@@ -53,8 +53,8 @@ ein_fild01,43,249,0 script Local Villager#hunt 4_M_HUMAN_01,{
close;
}
}
- if (checkquest(60126) != -1) {
- if (checkquest(60126,HUNTING) != 2 ) {
+ if (questprogress(60126)) {
+ if (questprogress(60126,HUNTING) != 2) {
mes "[Local Villager]";
mes "Have you finished hunting the 50 Demon Pungus?";
next;
@@ -94,8 +94,8 @@ ein_fild01,43,249,0 script Local Villager#hunt 4_M_HUMAN_01,{
close;
}
}
- if (checkquest(60127) != -1) {
- if (checkquest(60127,HUNTING) != 2 ) {
+ if (questprogress(60127)) {
+ if (questprogress(60127,HUNTING) != 2) {
mes "[Local Villager]";
mes "Have you finished hunting the 150 Demon Pungus?";
next;
diff --git a/npc/pre-re/quests/collection/quest_disguiseloliruri.txt b/npc/pre-re/quests/collection/quest_disguiseloliruri.txt
index 35d48aef7..8ff2ebce3 100644
--- a/npc/pre-re/quests/collection/quest_disguiseloliruri.txt
+++ b/npc/pre-re/quests/collection/quest_disguiseloliruri.txt
@@ -13,8 +13,8 @@
nif_fild02,332,327,4 script Deadman 4_M_NFDEADMAN,{
- if (checkquest(60173) != -1) {
- if (checkquest(60173,HUNTING) != 2 ) {
+ if (questprogress(60173)) {
+ if (questprogress(60173,HUNTING) != 2) {
mes "[Deadman]";
mes "Have you finished hunting the 50 Disguise?";
next;
@@ -51,8 +51,8 @@ nif_fild02,332,327,4 script Deadman 4_M_NFDEADMAN,{
erasequest 60173;
close;
}
- if (checkquest(60176) != -1) {
- if (checkquest(60176,HUNTING) != 2 ) {
+ if (questprogress(60176)) {
+ if (questprogress(60176,HUNTING) != 2) {
mes "[Deadman]";
mes "Have you finished hunting the 50 Loli Ruri?";
next;
diff --git a/npc/pre-re/quests/collection/quest_dokebi.txt b/npc/pre-re/quests/collection/quest_dokebi.txt
index 62f0ed45d..898c353cb 100644
--- a/npc/pre-re/quests/collection/quest_dokebi.txt
+++ b/npc/pre-re/quests/collection/quest_dokebi.txt
@@ -13,8 +13,8 @@
//============================================================
pay_fild10,108,357,5 script Li#Dokebi_Hunt 4_F_01,{
- if (checkquest(60128) != -1) {
- if (checkquest(60128,HUNTING) != 2 ) {
+ if (questprogress(60128)) {
+ if (questprogress(60128,HUNTING) != 2) {
mes "[Li]";
mes "Have you finished hunting the 50 Dokebis?";
next;
@@ -53,8 +53,8 @@ pay_fild10,108,357,5 script Li#Dokebi_Hunt 4_F_01,{
close;
}
}
- if (checkquest(60129) != -1) {
- if (checkquest(60129,HUNTING) != 2 ) {
+ if (questprogress(60129)) {
+ if (questprogress(60129,HUNTING) != 2) {
mes "[Li]";
mes "Have you finished hunting the 50 Dokebis?";
next;
@@ -94,8 +94,8 @@ pay_fild10,108,357,5 script Li#Dokebi_Hunt 4_F_01,{
close;
}
}
- if (checkquest(60130) != -1) {
- if (checkquest(60130,HUNTING) != 2 ) {
+ if (questprogress(60130)) {
+ if (questprogress(60130,HUNTING) != 2) {
mes "[Li]";
mes "Have you finished hunting the 150 Dokebis?";
next;
diff --git a/npc/pre-re/quests/collection/quest_dryad.txt b/npc/pre-re/quests/collection/quest_dryad.txt
index 552a1096f..1b14307de 100644
--- a/npc/pre-re/quests/collection/quest_dryad.txt
+++ b/npc/pre-re/quests/collection/quest_dryad.txt
@@ -13,8 +13,8 @@
//============================================================
um_fild01,34,281,5 script Lilla#Dryad_Hunt 4_F_07,{
- if (checkquest(60131) != -1) {
- if (checkquest(60131,HUNTING) != 2 ) {
+ if (questprogress(60131)) {
+ if (questprogress(60131,HUNTING) != 2) {
mes "[Lilla]";
mes "Have you finished hunting the 50 Dryads?";
next;
@@ -53,8 +53,8 @@ um_fild01,34,281,5 script Lilla#Dryad_Hunt 4_F_07,{
close;
}
}
- if (checkquest(60132) != -1) {
- if (checkquest(60132,HUNTING) != 2 ) {
+ if (questprogress(60132)) {
+ if (questprogress(60132,HUNTING) != 2) {
mes "[Lilla]";
mes "Have you finished hunting the 50 Dryads?";
next;
@@ -94,8 +94,8 @@ um_fild01,34,281,5 script Lilla#Dryad_Hunt 4_F_07,{
close;
}
}
- if (checkquest(60133) != -1) {
- if (checkquest(60133,HUNTING) != 2 ) {
+ if (questprogress(60133)) {
+ if (questprogress(60133,HUNTING) != 2) {
mes "[Lilla]";
mes "Have you finished hunting the 150 Dryads?";
next;
diff --git a/npc/pre-re/quests/collection/quest_fabre.txt b/npc/pre-re/quests/collection/quest_fabre.txt
index bd11cf8ae..5de7e74fd 100644
--- a/npc/pre-re/quests/collection/quest_fabre.txt
+++ b/npc/pre-re/quests/collection/quest_fabre.txt
@@ -13,8 +13,8 @@
//============================================================
gef_fild07,321,193,4 script Langry#Fabre_Hunt 4_M_SAGE_A,{
- if (checkquest(60107) != -1) {
- if (checkquest(60107,HUNTING) != 2 ) {
+ if (questprogress(60107)) {
+ if (questprogress(60107,HUNTING) != 2) {
mes "[Langry]";
mes "Have you finished hunting the 50 Fabres?";
next;
@@ -53,8 +53,8 @@ gef_fild07,321,193,4 script Langry#Fabre_Hunt 4_M_SAGE_A,{
close;
}
}
- if (checkquest(60108) != -1) {
- if (checkquest(60108,HUNTING) != 2 ) {
+ if (questprogress(60108)) {
+ if (questprogress(60108,HUNTING) != 2) {
mes "[Langry]";
mes "Have you finished hunting the 50 Fabres?";
next;
@@ -94,8 +94,8 @@ gef_fild07,321,193,4 script Langry#Fabre_Hunt 4_M_SAGE_A,{
close;
}
}
- if (checkquest(60109) != -1) {
- if (checkquest(60109,HUNTING) != 2 ) {
+ if (questprogress(60109)) {
+ if (questprogress(60109,HUNTING) != 2) {
mes "[Langry]";
mes "Have you finished hunting the 150 Fabres?";
next;
diff --git a/npc/pre-re/quests/collection/quest_frilldora.txt b/npc/pre-re/quests/collection/quest_frilldora.txt
index 5c9321aa6..95ee22d3c 100644
--- a/npc/pre-re/quests/collection/quest_frilldora.txt
+++ b/npc/pre-re/quests/collection/quest_frilldora.txt
@@ -13,8 +13,8 @@
//============================================================
moc_fild17,66,273,5 script Lemly#Frilldora_Hunt 4_F_JOB_ASSASSIN,{
- if (checkquest(60134) != -1) {
- if (checkquest(60134,HUNTING) != 2 ) {
+ if (questprogress(60134)) {
+ if (questprogress(60134,HUNTING) != 2) {
mes "[Lemly]";
mes "Have you finished hunting the 50 Frilldora?";
next;
@@ -53,8 +53,8 @@ moc_fild17,66,273,5 script Lemly#Frilldora_Hunt 4_F_JOB_ASSASSIN,{
close;
}
}
- if (checkquest(60135) != -1) {
- if (checkquest(60135,HUNTING) != 2 ) {
+ if (questprogress(60135)) {
+ if (questprogress(60135,HUNTING) != 2) {
mes "[Lemly]";
mes "Have you finished hunting the 50 Frilldora?";
next;
@@ -94,8 +94,8 @@ moc_fild17,66,273,5 script Lemly#Frilldora_Hunt 4_F_JOB_ASSASSIN,{
close;
}
}
- if (checkquest(60136) != -1) {
- if (checkquest(60136,HUNTING) != 2 ) {
+ if (questprogress(60136)) {
+ if (questprogress(60136,HUNTING) != 2) {
mes "[Lemly]";
mes "Have you finished hunting the 150 Frilldora?";
next;
diff --git a/npc/pre-re/quests/collection/quest_goat.txt b/npc/pre-re/quests/collection/quest_goat.txt
index 292a38459..ee5c33f54 100644
--- a/npc/pre-re/quests/collection/quest_goat.txt
+++ b/npc/pre-re/quests/collection/quest_goat.txt
@@ -13,8 +13,8 @@
//============================================================
ein_fild06,82,171,0 script Vegetable Farmer#Goat 4_F_SHABBY,{
- if (checkquest(60137) != -1) {
- if (checkquest(60137,HUNTING) != 2 ) {
+ if (questprogress(60137)) {
+ if (questprogress(60137,HUNTING) != 2) {
mes "[Vegetable Farmer]";
mes "Have you finished hunting the 50 Goats?";
next;
@@ -53,8 +53,8 @@ ein_fild06,82,171,0 script Vegetable Farmer#Goat 4_F_SHABBY,{
close;
}
}
- if (checkquest(60138) != -1) {
- if (checkquest(60138,HUNTING) != 2) {
+ if (questprogress(60138)) {
+ if (questprogress(60138,HUNTING) != 2) {
mes "[Vegetable Farmer]";
mes "Have you finished hunting the 100 Goats?";
next;
@@ -94,8 +94,8 @@ ein_fild06,82,171,0 script Vegetable Farmer#Goat 4_F_SHABBY,{
close;
}
}
- if (checkquest(60139) != -1) {
- if (checkquest(60139,HUNTING) != 2) {
+ if (questprogress(60139)) {
+ if (questprogress(60139,HUNTING) != 2) {
mes "[Vegetable Farmer]";
mes "Have you finished hunting the 150 Goats?";
next;
diff --git a/npc/pre-re/quests/collection/quest_golem.txt b/npc/pre-re/quests/collection/quest_golem.txt
index 2c927ea40..8ad2d47b2 100644
--- a/npc/pre-re/quests/collection/quest_golem.txt
+++ b/npc/pre-re/quests/collection/quest_golem.txt
@@ -13,8 +13,8 @@
//============================================================
moc_fild11,57,138,0 script Private Jeremy#hunt 4_M_MOC_SOLDIER,{
- if (checkquest(60140) != -1) {
- if (checkquest(60140,HUNTING) != 2 ) {
+ if (questprogress(60140)) {
+ if (questprogress(60140,HUNTING) != 2) {
mes "[Private Jeremy]";
mes "Have you finished hunting the 50 Golems?";
next;
@@ -53,8 +53,8 @@ moc_fild11,57,138,0 script Private Jeremy#hunt 4_M_MOC_SOLDIER,{
close;
}
}
- if (checkquest(60141) != -1) {
- if (checkquest(60141,HUNTING) != 2 ) {
+ if (questprogress(60141)) {
+ if (questprogress(60141,HUNTING) != 2) {
mes "[Private Jeremy]";
mes "Have you finished hunting the 50 Golems?";
next;
@@ -94,8 +94,8 @@ moc_fild11,57,138,0 script Private Jeremy#hunt 4_M_MOC_SOLDIER,{
close;
}
}
- if (checkquest(60142) != -1) {
- if (checkquest(60142,HUNTING) != 2 ) {
+ if (questprogress(60142)) {
+ if (questprogress(60142,HUNTING) != 2) {
mes "[Private Jeremy]";
mes "Have you finished hunting the 150 Golems?";
next;
diff --git a/npc/pre-re/quests/collection/quest_hode.txt b/npc/pre-re/quests/collection/quest_hode.txt
index c534448d4..050387859 100644
--- a/npc/pre-re/quests/collection/quest_hode.txt
+++ b/npc/pre-re/quests/collection/quest_hode.txt
@@ -13,8 +13,8 @@
//============================================================
moc_fild17,208,346,5 script Shone#Hode_Hunt 4_M_MOC_SOLDIER,{
- if (checkquest(60104) != -1) {
- if (checkquest(60104,HUNTING) != 2 ) {
+ if (questprogress(60104)) {
+ if (questprogress(60104,HUNTING) != 2) {
mes "[Shone]";
mes "Have you finished hunting the 50 Hodes?";
next;
@@ -53,8 +53,8 @@ moc_fild17,208,346,5 script Shone#Hode_Hunt 4_M_MOC_SOLDIER,{
close;
}
}
- if (checkquest(60105) != -1) {
- if (checkquest(60105,HUNTING) != 2 ) {
+ if (questprogress(60105)) {
+ if (questprogress(60105,HUNTING) != 2) {
mes "[Shone]";
mes "Have you finished hunting the 50 Hodes?";
next;
@@ -94,8 +94,8 @@ moc_fild17,208,346,5 script Shone#Hode_Hunt 4_M_MOC_SOLDIER,{
close;
}
}
- if (checkquest(60106) != -1) {
- if (checkquest(60106,HUNTING) != 2 ) {
+ if (questprogress(60106)) {
+ if (questprogress(60106,HUNTING) != 2) {
mes "[Shone]";
mes "Have you finished hunting the 150 Hodes?";
next;
diff --git a/npc/pre-re/quests/collection/quest_leafcat.txt b/npc/pre-re/quests/collection/quest_leafcat.txt
index 185ff2067..04b816322 100644
--- a/npc/pre-re/quests/collection/quest_leafcat.txt
+++ b/npc/pre-re/quests/collection/quest_leafcat.txt
@@ -13,8 +13,8 @@
//============================================================
ayo_fild01,44,241,5 script Lella#LeafCat_Hunt 4_F_YUNYANG,{
- if (checkquest(60143) != -1) {
- if (checkquest(60143,HUNTING) != 2 ) {
+ if (questprogress(60143)) {
+ if (questprogress(60143,HUNTING) != 2) {
mes "[Lella]";
mes "Have you finished hunting the 50 Leaf Cats?";
next;
@@ -53,8 +53,8 @@ ayo_fild01,44,241,5 script Lella#LeafCat_Hunt 4_F_YUNYANG,{
close;
}
}
- if (checkquest(60144) != -1) {
- if (checkquest(60144,HUNTING) != 2 ) {
+ if (questprogress(60144)) {
+ if (questprogress(60144,HUNTING) != 2) {
mes "[Lella]";
mes "Have you finished hunting the 50 Leaf Cats?";
next;
@@ -94,8 +94,8 @@ ayo_fild01,44,241,5 script Lella#LeafCat_Hunt 4_F_YUNYANG,{
close;
}
}
- if (checkquest(60145) != -1) {
- if (checkquest(60145,HUNTING) != 2 ) {
+ if (questprogress(60145)) {
+ if (questprogress(60145,HUNTING) != 2) {
mes "[Lella]";
mes "Have you finished hunting the 150 Leaf Cats?";
next;
diff --git a/npc/pre-re/quests/collection/quest_mantis.txt b/npc/pre-re/quests/collection/quest_mantis.txt
index 3eb18ca4f..622f49538 100644
--- a/npc/pre-re/quests/collection/quest_mantis.txt
+++ b/npc/pre-re/quests/collection/quest_mantis.txt
@@ -13,8 +13,8 @@
lou_fild01,240,354,4 script Mantis Researcher 4_M_OILMAN,{
- if (checkquest(60179) != -1) {
- if (checkquest(60179,HUNTING) != 2 ) {
+ if (questprogress(60179)) {
+ if (questprogress(60179,HUNTING) != 2) {
mes "[Mantis Researcher]";
mes "Have you finished hunting the 50 Mantis?";
next;
diff --git a/npc/pre-re/quests/collection/quest_pecopeco.txt b/npc/pre-re/quests/collection/quest_pecopeco.txt
index 3460320ce..60f888f00 100644
--- a/npc/pre-re/quests/collection/quest_pecopeco.txt
+++ b/npc/pre-re/quests/collection/quest_pecopeco.txt
@@ -13,8 +13,8 @@
//============================================================
moc_fild02,74,329,3 script Gregor#PecoPeco_Hunt 4W_M_01,{
- if (checkquest(60101) != -1) {
- if (checkquest(60101,HUNTING) != 2 ) {
+ if (questprogress(60101)) {
+ if (questprogress(60101,HUNTING) != 2) {
mes "[Gregor]";
mes "Have you finished hunting the 50 Peco Pecos?";
next;
@@ -54,8 +54,8 @@ moc_fild02,74,329,3 script Gregor#PecoPeco_Hunt 4W_M_01,{
close;
}
}
- if (checkquest(60102) != -1) {
- if (checkquest(60102,HUNTING) != 2 ) {
+ if (questprogress(60102)) {
+ if (questprogress(60102,HUNTING) != 2) {
mes "[Gregor]";
mes "Have you finished hunting the 50 Peco Pecos?";
next;
@@ -96,8 +96,8 @@ moc_fild02,74,329,3 script Gregor#PecoPeco_Hunt 4W_M_01,{
close;
}
}
- if (checkquest(60103) != -1) {
- if (checkquest(60103,HUNTING) != 2 ) {
+ if (questprogress(60103)) {
+ if (questprogress(60103,HUNTING) != 2) {
mes "[Gregor]";
mes "Have you finished hunting the 150 Peco Pecos?";
next;
diff --git a/npc/pre-re/quests/collection/quest_pupa.txt b/npc/pre-re/quests/collection/quest_pupa.txt
index 64aafe42f..ec38c275a 100644
--- a/npc/pre-re/quests/collection/quest_pupa.txt
+++ b/npc/pre-re/quests/collection/quest_pupa.txt
@@ -13,8 +13,8 @@
//============================================================
gef_fild04,191,54,3 script Halgus#Pupa_Hunt 2_F_MAGICMASTER,{
- if (checkquest(60110) != -1) {
- if (checkquest(60110,HUNTING) != 2 ) {
+ if (questprogress(60110)) {
+ if (questprogress(60110,HUNTING) != 2) {
mes "[Halgus]";
mes "Have you gotten rid of the Pupa?";
next;
@@ -54,8 +54,8 @@ gef_fild04,191,54,3 script Halgus#Pupa_Hunt 2_F_MAGICMASTER,{
close;
}
}
- if (checkquest(60111) != -1) {
- if (checkquest(60111,HUNTING) != 2 ) {
+ if (questprogress(60111)) {
+ if (questprogress(60111,HUNTING) != 2) {
mes "[Halgus]";
mes "Have you gotten rid of the Pupa?";
next;
@@ -96,8 +96,8 @@ gef_fild04,191,54,3 script Halgus#Pupa_Hunt 2_F_MAGICMASTER,{
close;
}
}
- if (checkquest(60112) != -1) {
- if (checkquest(60112,HUNTING) != 2 ) {
+ if (questprogress(60112)) {
+ if (questprogress(60112,HUNTING) != 2) {
mes "[Halgus]";
mes "Have you gotten rid of the Pupa?";
next;
diff --git a/npc/pre-re/quests/collection/quest_zhupolong.txt b/npc/pre-re/quests/collection/quest_zhupolong.txt
index a167ec3e5..3d908c398 100644
--- a/npc/pre-re/quests/collection/quest_zhupolong.txt
+++ b/npc/pre-re/quests/collection/quest_zhupolong.txt
@@ -13,8 +13,8 @@
lou_dun02,161,264,4 script Dragon Hunter 4_M_JOB_HUNTER,{
- if (checkquest(60182) != -1) {
- if (checkquest(60182,HUNTING) != 2 ) {
+ if (questprogress(60182)) {
+ if (questprogress(60182,HUNTING) != 2) {
mes "[Dragon Hunter]";
mes "Have you finished hunting the 50 Zhu Po Long?";
next;
diff --git a/npc/quests/newgears/2008_headgears.txt b/npc/quests/newgears/2008_headgears.txt
index f45664f3b..e215b982a 100644
--- a/npc/quests/newgears/2008_headgears.txt
+++ b/npc/quests/newgears/2008_headgears.txt
@@ -103,7 +103,7 @@ gef_fild05,80,149,3 script Myu#08_hat 4_F_YUNYANG,{
}
}
} else if(hatcat2008 == 1) {
- if(checkquest(7055,HUNTING) == 2) {
+ if (questprogress(7055,HUNTING) == 2) {
mes "[Myu]";
mes "Did you think I didn't know what you have done?";
mes "Huh?";
@@ -120,7 +120,7 @@ gef_fild05,80,149,3 script Myu#08_hat 4_F_YUNYANG,{
erasequest 7054;
erasequest 7055;
close;
- } else if(checkquest(7054,HUNTING) == 2) {
+ } else if (questprogress(7054,HUNTING) == 2) {
mes "[Myu]";
mes "Oh..wow unbelievable!";
mes "Now, those Kobolds should have learned a lesson, haven't they?";
diff --git a/npc/quests/ninja_quests.txt b/npc/quests/ninja_quests.txt
index dfcc7d172..6e7531e0e 100644
--- a/npc/quests/ninja_quests.txt
+++ b/npc/quests/ninja_quests.txt
@@ -1148,217 +1148,214 @@ que_ng,22,62,3 script Tetsu 4_M_SEAMAN,{
mes "I may not look it, but if it's about any items related to Fuuma, there's none who come close to my craftsmenship.";
mes "Well, look around, look around.";
next;
- menu "Fuuma Shuriken Beneki",M_BENEKI,"Fuuma Shuriken Daisharin",M_DAIS,
- "Fuuma Shuriken Daisharin[4]",M_DAIS4,"Fuuma Shuriken Rekka",M_REKKA,"Cancel",M_CANCEL;
-
-//=====================BENEKI========================
-M_BENEKI:
- mes "[Tetsu]";
- mes "Hmm~ You've chose the ^ff0000Fuuma Beneki^000000.";
- mes "In order to make the Fuuma Beneki, I need";
- mes "50 Steel, 20 Harpy Feather";
- mes "5 Oridecon, and 90,000 Zeny.";
- mes "Do you want me to create this item for you?";
- next;
- menu "Well .. erm .. it's kind of pricey.",M_NOPE,"Yes! Make it for me!",-;
-
- if(countitem(999)<50 || countitem(7115)<20 || countitem(984)<5){
+ switch (select("Fuuma Shuriken Beneki","Fuuma Shuriken Daisharin","Fuuma Shuriken Daisharin[4]","Fuuma Shuriken Rekka","Cancel")) {
+ case 1: // Beneki
mes "[Tetsu]";
- mes "It looks like you haven't brought me enough materials to make you a Fuuma Shuriken Beneki.";
+ mes "Hmm~ You've chose the ^ff0000Fuuma Beneki^000000.";
+ mes "In order to make the Fuuma Beneki, I need";
+ mes "50 Steel, 20 Harpy Feather";
+ mes "5 Oridecon, and 90,000 Zeny.";
+ mes "Do you want me to create this item for you?";
next;
+ if (select("Well .. erm .. it's kind of pricey.","Yes! Make it for me!") != 2) {
+ break;
+ }
+
+ if(countitem(999)<50 || countitem(7115)<20 || countitem(984)<5){
+ mes "[Tetsu]";
+ mes "It looks like you haven't brought me enough materials to make you a Fuuma Shuriken Beneki.";
+ next;
+ mes "[Tetsu]";
+ mes "In order to create a Fuuma shuriken Beneki, I require...";
+ mes "^ff000050 Steel,^000000";
+ mes "^ff000020 Harpy Feathers^000000,";
+ mes "^ff00005 Oridecons^000000,";
+ mes "and ^ff000090,000 Zeny^000000.";
+ mes "Remember these needed materials, and come back after you're positive you have them all.";
+ close;
+ }
+ if(Zeny < 90000){
+ mes "[Tetsu]";
+ mes "Hmm.. You brought plenty of materials, but you're short on zeny.";
+ next;
+ mes "[Tetsu]";
+ mes "In order to create a Fuuma Shuriken Beneki, I require...";
+ mes "^ff000050 Steel,^000000";
+ mes "^ff000020 Harpy Feathers^000000,";
+ mes "^ff00005 Oridecons^000000,";
+ mes "and ^ff000090,000 Zeny^000000.";
+ mes "Remember these needed materials, and come back after you're positive you have them all.";
+ close;
+ }
+ delitem 999,50;
+ delitem 7115,20;
+ delitem 984,5;
+ Zeny -= 90000;
+ getitem 13300,1;
mes "[Tetsu]";
- mes "In order to create a Fuuma shuriken Beneki, I require...";
- mes "^ff000050 Steel,^000000";
- mes "^ff000020 Harpy Feathers^000000,";
- mes "^ff00005 Oridecons^000000,";
- mes "and ^ff000090,000 Zeny^000000.";
- mes "Remember these needed materials, and come back after you're positive you have them all.";
+ mes "Hmm, very well.";
+ mes "Looks like you've brought me the correct amount of materials and Zeny";
+ mes "Here is your completed Fuuma Shuriken Beneki";
close;
- }
- if(Zeny < 90000){
+ case 2: // Daisharin
mes "[Tetsu]";
- mes "Hmm.. You brought plenty of materials, but you're short on zeny.";
+ mes "Hmm~ I see you've chose the ^ff0000Fuuma Shuriken Daisharin^000000.";
+ mes "In order to create Fuuma Shuriken Daisharin, I require...";
+ mes "30 Steel, 100 Tassels";
+ mes "2 Oridecons, and 40,000 Zeny.";
+ mes "Do you want me to create this item for you?";
next;
- mes "[Tetsu]";
- mes "In order to create a Fuuma Shuriken Beneki, I require...";
- mes "^ff000050 Steel,^000000";
- mes "^ff000020 Harpy Feathers^000000,";
- mes "^ff00005 Oridecons^000000,";
- mes "and ^ff000090,000 Zeny^000000.";
- mes "Remember these needed materials, and come back after you're positive you have them all.";
- close;
- }
- delitem 999,50;
- delitem 7115,20;
- delitem 984,5;
- Zeny -= 90000;
- getitem 13300,1;
- mes "[Tetsu]";
- mes "Hmm, very well.";
- mes "Looks like you've brought me the correct amount of materials and Zeny";
- mes "Here is your completed Fuuma Shuriken Beneki";
- close;
-
-//=====================DAISHARIN========================
-M_DAIS:
- mes "[Tetsu]";
- mes "Hmm~ I see you've chose the ^ff0000Fuuma Shuriken Daisharin^000000.";
- mes "Fuuma Shuriken Daisharin In order to create Fuuma Shuriken Daisharin, I require...";
- mes "30 Steel, 100 Tassels";
- mes "2 Oridecons, and 40,000 Zeny.";
- mes "Do you want me to create this item for you?";
- next;
- menu "Well .. erm .. it's kind of pricey.",M_NOPE,"Yes! Make it for me!",-;
+ if (select("Well .. erm .. it's kind of pricey.","Yes! Make it for me!") != 2) {
+ break;
+ }
- if(countitem(999)<30 || countitem(7301)<100 || countitem(984)<2){
- mes "[Tetsu]";
- mes "It looks like you haven't brought me enough materials to make you a Fuuma Shuriken Daisharin.";
- next;
+ if(countitem(999)<30 || countitem(7301)<100 || countitem(984)<2){
+ mes "[Tetsu]";
+ mes "It looks like you haven't brought me enough materials to make you a Fuuma Shuriken Daisharin.";
+ next;
+ mes "[Tetsu]";
+ mes "Fuuma Shuriken Daisharin, I require...";
+ mes "^ff000030 Steel^000000, ";
+ mes "^ff0000100 Tassels^000000,";
+ mes "^ff00002 Oridecons^000000,";
+ mes "and ^ff000040,000 Zeny^000000.";
+ mes "Remember these needed materials, and come back after you're positive you have them all.";
+ close;
+ }
+ if(Zeny < 40000){
+ mes "[Tetsu]";
+ mes "Hmm.. You brought plenty of materials, but you're short on zeny.";
+ next;
+ mes "[Tetsu]";
+ mes "Fuuma Shuriken Daisharin, I require...";
+ mes "^ff000030 Steel^000000, ";
+ mes "^ff0000100 Tassels^000000,";
+ mes "^ff00002 Oridecons^000000,";
+ mes "and ^ff000040,000 Zeny^000000.";
+ mes "Remember these needed materials, and come back after you're positive you have them all.";
+ close;
+ }
+ delitem 999,30;
+ delitem 7301,100;
+ delitem 984,2;
+ Zeny -= 40000;
+ getitem 13301,1;
mes "[Tetsu]";
- mes "Fuuma Shuriken Daisharin, I require...";
- mes "^ff000030 Steel^000000, ";
- mes "^ff0000100 Tassels^000000,";
- mes "^ff00002 Oridecons^000000,";
- mes "and ^ff000040,000 Zeny^000000.";
- mes "Remember these needed materials, and come back after you're positive you have them all.";
+ mes "Hmm, very well.";
+ mes "Looks like you've brought me the correct amount of materials and Zeny";
+ mes "Here is your completed Fuuma Shuriken Daisharin";
close;
- }
- if(Zeny < 40000){
+ case 3: // Daisharin[4]
mes "[Tetsu]";
- mes "Hmm.. You brought plenty of materials, but you're short on zeny.";
+ mes "Hmm~ I see you've chose the ^ff0000Fuuma Shuriken Daisharin[4]^000000.";
+ mes "In order to create Fuuma Shuriken Daisharin[4], I require...";
+ mes "20 Cracked Diamonds, 1 Fuuma Shuriken Daisharin";
+ mes "3 Oridecons, and 40,000 Zeny.";
+ mes "Do you want me to create this item for you?";
next;
mes "[Tetsu]";
- mes "Fuuma Shuriken Daisharin, I require...";
- mes "^ff000030 Steel^000000, ";
- mes "^ff0000100 Tassels^000000,";
- mes "^ff00002 Oridecons^000000,";
- mes "and ^ff000040,000 Zeny^000000.";
- mes "Remember these needed materials, and come back after you're positive you have them all.";
- close;
- }
- delitem 999,30;
- delitem 7301,100;
- delitem 984,2;
- Zeny -= 40000;
- getitem 13301,1;
- mes "[Tetsu]";
- mes "Hmm, very well.";
- mes "Looks like you've brought me the correct amount of materials and Zeny";
- mes "Here is your completed Fuuma Shuriken Daisharin";
- close;
-
-//=====================DAISHARIN4========================
-M_DAIS4:
- mes "[Tetsu]";
- mes "Hmm~ I see you've chose the ^ff0000Fuuma Shuriken Daisharin[4]^000000.";
- mes "In order to create Fuuma Shuriken Daisharin[4], I require...";
- mes "20 Cracked Diamonds, 1 Fuuma Shuriken Daisharin";
- mes "3 Oridecons, and 40,000 Zeny.";
- mes "Do you want me to create this item for you?";
- next;
- mes "[Tetsu]";
- mes "And in case you don't know...";
- mes "In the process of slotting a weapon, your weapon will lose any refine points and slotted cards, if any.";
- mes "Think this over with caution, and then decide if you really want to do this or not.";
- next;
- menu "No thanks.. It's a little pricey..",M_NOPE,"Yes! Make it for me!",-;
-
- if(countitem(733)<20 || countitem(13301)<1 || countitem(984)<3){
- mes "[Tetsu]";
- mes "It looks like you haven't brought me enough materials to make you a Fuuma Shuriken Daisharin[4].";
+ mes "And in case you don't know...";
+ mes "In the process of slotting a weapon, your weapon will lose any refine points and slotted cards, if any.";
+ mes "Think this over with caution, and then decide if you really want to do this or not.";
next;
+ if (select("No thanks.. It's a little pricey..","Yes! Make it for me!") != 2) {
+ break;
+ }
+
+ if(countitem(733)<20 || countitem(13301)<1 || countitem(984)<3){
+ mes "[Tetsu]";
+ mes "It looks like you haven't brought me enough materials to make you a Fuuma Shuriken Daisharin[4].";
+ next;
+ mes "[Tetsu]";
+ mes "In order to create a Fuuma Shuriken Daisharin[4], I require...";
+ mes "^ff000020 Cracked Diamonds^000000,";
+ mes "^ff00003 Oridecons^000000,";
+ mes "1 Fuuma Shuriken Daisharin, and";
+ mes "^ff000040,000 Zeny^000000.";
+ mes "Remember these needed materials, and come back after you're positive you have them all.";
+ close;
+ }
+ if(Zeny < 40000){
+ mes "[Tetsu]";
+ mes "Hmm.. You brought plenty of materials, but you're short on zeny.";
+ next;
+ mes "[Tetsu]";
+ mes "In order to create a Fuuma Shuriken Daisharin[4], I require...";
+ mes "^ff000020 Cracked Diamonds^000000,";
+ mes "^ff00003 Oridecons^000000,";
+ mes "1 Fuuma Shuriken Daisharin, and";
+ mes "^ff000040,000 Zeny^000000.";
+ mes "Remember these needed materials, and come back after you're positive you have them all.";
+ close;
+ }
+ delitem 733,20;
+ delitem 984,3;
+ Zeny -= 40000;
+ delitem 13301,1;
+ getitem 13302,1;
mes "[Tetsu]";
- mes "In order to create a Fuuma Shuriken Daisharin[4], I require...";
- mes "^ff000020 Cracked Diamonds^000000,";
- mes "^ff00003 Oridecons^000000,";
- mes "1 Fuuma Shuriken Daisharin, and";
- mes "^ff000040,000 Zeny^000000.";
- mes "Remember these needed materials, and come back after you're positive you have them all.";
+ mes "Hmm, very well.";
+ mes "Looks like you've brought me the correct amount of materials and Zeny";
+ mes "Here is your completed Fuuma Shuriken Daisharin[4].";
close;
- }
- if(Zeny < 40000){
- mes "[Tetsu]";
- mes "Hmm.. You brought plenty of materials, but you're short on zeny.";
- next;
+ case 4: // Rekka
mes "[Tetsu]";
- mes "In order to create a Fuuma Shuriken Daisharin[4], I require...";
- mes "^ff000020 Cracked Diamonds^000000,";
- mes "^ff00003 Oridecons^000000,";
- mes "1 Fuuma Shuriken Daisharin, and";
- mes "^ff000040,000 Zeny^000000.";
- mes "Remember these needed materials, and come back after you're positive you have them all.";
- close;
- }
- delitem 733,20;
- delitem 984,3;
- Zeny -= 40000;
- delitem 13301,1;
- getitem 13302,1;
- mes "[Tetsu]";
- mes "Hmm, very well.";
- mes "Looks like you've brought me the correct amount of materials and Zeny";
- mes "Here is your completed Fuuma Shuriken Daisharin[4].";
- close;
-
-//=====================REKKA========================
-M_REKKA:
- mes "[Tetsu]";
- mes "Hmm~ I see you've chose the ^ff0000Fuuma Shuriken Rekka^000000.";
- mes "In order to create a Fuuma Shuriken Rekka, I require";
- mes "50 Steel, 100 Live Coal";
- mes "100 Burning Hearts, 50 Burning Stones";
- mes "and 78,000 Zeny.";
- mes "Do you want me to create this item for you?";
- next;
- menu "Well .. erm .. it's kind of pricey",M_NOPE,"Yes! Make it for me!",-;
+ mes "Hmm~ I see you've chose the ^ff0000Fuuma Shuriken Rekka^000000.";
+ mes "In order to create a Fuuma Shuriken Rekka, I require";
+ mes "50 Steel, 100 Live Coal";
+ mes "100 Burning Hearts, 50 Burning Stones";
+ mes "and 78,000 Zeny.";
+ mes "Do you want me to create this item for you?";
+ next;
+ if (select("Well .. erm .. it's kind of pricey","Yes! Make it for me!") != 2) {
+ break;
+ }
- if(countitem(999)<50 || countitem(7098)<100 || countitem(7097)<100 || countitem(7521)<50){
- mes "[Tetsu]";
- mes "It looks like you haven't brought me enough materials to make you a Fuuma Shuriken Rekka.";
- next;
+ if(countitem(999)<50 || countitem(7098)<100 || countitem(7097)<100 || countitem(7521)<50){
+ mes "[Tetsu]";
+ mes "It looks like you haven't brought me enough materials to make you a Fuuma Shuriken Rekka.";
+ next;
+ mes "[Tetsu]";
+ mes "In order to create a Fuuma Shuriken Rekka, I require...";
+ mes "^ff000050 Steel^000000,^ff000050 Burning Stones^000000,";
+ mes "^ff0000100 Burning Hearts^000000,^ff0000100 Live Coal^000000,";
+ mes "and ^ff000078,000 Zeny^000000";
+ mes "Remember these needed materials, and come back after you're positive you have them all.";
+ close;
+ }
+ if(Zeny < 78000){
+ mes "[Tetsu]";
+ mes "Hmm.. You brought plenty of materials, but you're short on zeny.";
+ next;
+ mes "[Tetsu]";
+ mes "In order to create a Fuuma Shuriken Rekka, I require...";
+ mes "^ff000050 Steel^000000,^ff000050 Burning Stones^000000,";
+ mes "^ff0000100 Burning Hearts^000000,^ff0000100 Live Coal^000000,";
+ mes "and ^ff000078,000 Zeny^000000";
+ mes "Remember these needed materials, and come back after you're positive you have them all.";
+ close;
+ }
+ delitem 999,50;
+ delitem 7098,100;
+ delitem 7097,100;
+ delitem 7521,50;
+ Zeny -= 78000;
+ getitem 13303,1;
mes "[Tetsu]";
- mes "In order to create a Fuuma Shuriken Rekka, I require...";
- mes "^ff000050 Steel^000000,^ff000050 Burning Stones^000000,";
- mes "^ff0000100 Burning Hearts^000000,^ff0000100 Live Coal^000000,";
- mes "and ^ff000078,000 Zeny^000000";
- mes "Remember these needed materials, and come back after you're positive you have them all.";
+ mes "Hmm, very well.";
+ mes "Looks like you've brought me the correct amount of materials and Zeny";
+ mes "Here is your completed Fuuma Shuriken Rekka.";
close;
- }
- if(Zeny < 78000){
+ default: // Cancel
mes "[Tetsu]";
- mes "Hmm.. You brought plenty of materials, but you're short on zeny.";
- next;
- mes "[Tetsu]";
- mes "In order to create a Fuuma Shuriken Rekka, I require...";
- mes "^ff000050 Steel^000000,^ff000050 Burning Stones^000000,";
- mes "^ff0000100 Burning Hearts^000000,^ff0000100 Live Coal^000000,";
- mes "and ^ff000078,000 Zeny^000000";
- mes "Remember these needed materials, and come back after you're positive you have them all.";
+ mes "What a shame.";
+ mes "I wanted to show you the weapons I put my heart and soul into making them.";
+ mes "If you ever have second thoughts, it's never too late to come back and ask.";
close;
}
- delitem 999,50;
- delitem 7098,100;
- delitem 7097,100;
- delitem 7521,50;
- Zeny -= 78000;
- getitem 13303,1;
- mes "[Tetsu]";
- mes "Hmm, very well.";
- mes "Looks like you've brought me the correct amount of materials and Zeny";
- mes "Here is your completed Fuuma Shuriken Rekka.";
- close;
-
-//=====================I'M SORRY========================
-M_NOPE:
+ // It's kind of pricey
mes "[Tetsu]";
mes "Hmm. The cost to create this item is kind of expensive...";
mes "All right. If you do gather all the required materials one day, come back and see me.";
close;
-
-M_CANCEL:
- mes "[Tetsu]";
- mes "What a shame.";
- mes "I wanted to show you the weapons I put my heart and soul into making them.";
- mes "If you ever have second thoughts, it's never too late to come back and ask.";
- close;
}
diff --git a/npc/quests/quests_13_1.txt b/npc/quests/quests_13_1.txt
index 16860ddf2..a66038181 100644
--- a/npc/quests/quests_13_1.txt
+++ b/npc/quests/quests_13_1.txt
@@ -4145,7 +4145,7 @@ mid_camp,188,254,3 script Monster Scholar#ep13 4_M_ALCHE_D,{
close;
}
else if (ep13_animal == 14) {
- if (checkquest(2157,HUNTING) == 2) {
+ if (questprogress(2157,HUNTING) == 2) {
mes "[Rumis Block]";
mes "Welcome back. Did you find out about them?";
next;
@@ -4498,7 +4498,7 @@ mid_camp,240,270,3 script Botanist#ep13 4_M_ALCHE_C,{
close;
}
else if (ep13_animal == 5) {
- if (checkquest(2150,HUNTING) == 2) {
+ if (questprogress(2150,HUNTING) == 2) {
mes "[Botanist]";
mes "Welcome back! How was it?";
mes "It was amazing, wasn't it?";
@@ -4561,7 +4561,7 @@ mid_camp,240,270,3 script Botanist#ep13 4_M_ALCHE_C,{
}
}
else if (ep13_animal == 6) {
- if (checkquest(2151,HUNTING) == 2) {
+ if (questprogress(2151,HUNTING) == 2) {
mes "[Botanist]";
mes "Hopefully the Cornuses have learned their lesson, and won't touch my special environmental meters anymore.";
next;
@@ -4843,7 +4843,7 @@ man_fild01,92,230,3 script Frozen Tree#evt_lumis HIDDEN_NPC,1,1,{
//============================================================
spl_fild02,34,223,5 script Small Fairy#spl 4_M_FAIRYKID,{
if (BaseLevel > 69) {
- if (checkquest(2158) == -1) {
+ if (!questprogress(2158)) {
mes "You find a little creature flying in the bushes.";
mes "It has tiny wings on the back...";
mes "It's a fairy!";
@@ -4881,7 +4881,7 @@ spl_fild02,34,223,5 script Small Fairy#spl 4_M_FAIRYKID,{
man_fild03,236,105,3 script Tree Giant#man 4_MAN_PIOM,{
if (BaseLevel > 69) {
- if (checkquest(2159) == -1) {
+ if (!questprogress(2159)) {
mes "You have found something moving between dry branches.";
mes "It appears to be a tree at first glance, but it turns out to be a giant that is half tree and half man.";
next;
@@ -4923,14 +4923,14 @@ mid_camp,212,237,5 script Camp Guard Captain#man1 4_M_EIN_SOLDIER,{
mes "working for United Midgard.";
mes "How may I help you?";
next;
- if ((checkquest(2158) == 2) && (checkquest(2159) == 2)) {
+ if (questprogress(2158) == 2 && questprogress(2159) == 2) {
mes "["+strcharinfo(0)+"]";
mes "Oh, nothing.";
mes "Sorry to bother you.";
close;
}
else {
- if (checkquest(2158) == 1) {
+ if (questprogress(2158) == 1) {
mes "- You report your encounter with a small fairy in the Splandid area to the guard captain. -";
next;
mes "[Captain]";
@@ -4944,14 +4944,14 @@ mid_camp,212,237,5 script Camp Guard Captain#man1 4_M_EIN_SOLDIER,{
getexp (checkre(3))?90000:900000,0;
close;
}
- else if (checkquest(2158) == -1) {
+ else if (!questprogress(2158)) {
mes "["+strcharinfo(0)+"]";
mes "Oh, nothing.";
mes "Sorry to bother you.";
close;
}
else {
- if (checkquest(2159) == 1) {
+ if (questprogress(2159) == 1) {
mes "- You report your encounter with a tree giant in the Manuk area to the guard captain. -";
next;
mes "[Captain]";
@@ -7393,8 +7393,8 @@ mid_camp,143,306,5 script Breeder Taab#ep13_alba 4_M_DST_MASTER,{
}
}
else if (ep13_alba == 6) {
- set .@alba_check,checkquest(7047,PLAYTIME);
- if (.@alba_check == -1) {
+ .@alba_check = questprogress(7047,PLAYTIME);
+ if (!.@alba_check) {
mes "[Taab]";
mes "Thank you for";
mes "helping me last time.";
@@ -7406,7 +7406,7 @@ mid_camp,143,306,5 script Breeder Taab#ep13_alba 4_M_DST_MASTER,{
set ep13_alba,0;
close;
}
- else if ((.@alba_check == 0) || (.@alba_check == 1)) {
+ else if (.@alba_check == 1) {
mes "[Taab]";
mes "I've got enough feed";
mes "and supplies to last a while.";
@@ -8084,7 +8084,7 @@ mid_camp,72,94,4 script Fluffy Gyaruk 4_M_BOSSCAT,{
}
mid_camp,69,144,0 script Ferocious Gorurug 4_M_BOSSCAT,{
- if (checkquest(12060,PLAYTIME) == -1) {
+ if (!questprogress(12060,PLAYTIME)) {
if (ep13_yong1 < 4) {
mes "[Ferocious Gorurug]";
mes "Grrr....";
@@ -8233,7 +8233,7 @@ mid_camp,69,144,0 script Ferocious Gorurug 4_M_BOSSCAT,{
close;
}
}
- else if ((checkquest(12060,PLAYTIME) == 0) || (checkquest(12060,PLAYTIME) == 1)) {
+ else if (questprogress(12060,PLAYTIME) == 1) {
mes "[Ferocious Gorurug]";
mes "*Yawn*";
mes "I'm sorry, but I'm off-duty.";
@@ -8252,7 +8252,7 @@ mid_camp,69,144,0 script Ferocious Gorurug 4_M_BOSSCAT,{
}
spl_fild02,314,165,0 script School of Fish#1::Fishinghole CLEAR_NPC,{
- if ((checkquest(12060,PLAYTIME) == -1) && (countitem(6039) < 20)) {
+ if (!questprogress(12060,PLAYTIME) && countitem(6039) < 20) {
specialeffect2 EF_BUBBLE;
specialeffect2 EF_INVENOM;
set .@fcast,15;
@@ -8368,7 +8368,7 @@ mid_camp,66,122,55 script Henry Clifford 4_M_05,{
}
mid_camp,88,100,55 script Cat Hand Mining Agent 4_CAT,{
- if (checkquest(12062,PLAYTIME) == -1) {
+ if (!questprogress(12062,PLAYTIME) == -1) {
if ((countitem(6048) > 2) && (ep13_yong1 > 9)) {
mes "[Cat Hand Mining Agent]";
mes "Oh, wow~";
@@ -8403,7 +8403,7 @@ mid_camp,88,100,55 script Cat Hand Mining Agent 4_CAT,{
close;
}
}
- else if ((checkquest(12062,PLAYTIME) == 0) || (checkquest(12062,PLAYTIME) == 1)) {
+ else if (questprogress(12062,PLAYTIME) == 1) {
mes "[Cat Hand Mining Agent]";
mes "I hope you'll bring me minerals again tomorrow...";
mes "If you can. It's much better to wait for you to do it than go there on my own.";
@@ -8419,7 +8419,7 @@ mid_camp,88,100,55 script Cat Hand Mining Agent 4_CAT,{
}
- script Mysterious Rock#0::manukrock -1,{
- if ((countitem(6048) < 3) && (checkquest(12062,PLAYTIME) == -1)) {
+ if (countitem(6048) < 3 && !questprogress(12062,PLAYTIME)) {
specialeffect2 EF_REPAIRWEAPON;
progressbar "ffff00",10;
set .@rhea_ran,rand(1,20);
@@ -10078,7 +10078,7 @@ man_fild01,315,95,3 script Expedition Scout#1 4_M_MOC_SOLDIER,{
next;
mes "[Expedition Scout]";
mes "I've been ordered by Instructor Igrid to conduct a search for something.";
- set .@playtime,checkquest(3091,PLAYTIME);
+ .@playtime = questprogress(3091,PLAYTIME);
next;
switch(select("Ask about search results.:Chitchat.:Quit.")) {
case 1:
@@ -10086,7 +10086,7 @@ man_fild01,315,95,3 script Expedition Scout#1 4_M_MOC_SOLDIER,{
mes "[Expedition Scout]";
mes "Oh, you must be"+strcharinfo(0)+". I heard that you'll be delivering the report.";
next;
- if (.@playtime == 0 || .@playtime == 1) {
+ if (.@playtime == 1) {
mes "[Expedition Scout]";
mes "Searching for lost pages was tougher then I expected. Please come back later when I'm finished making one round.";
close;
@@ -10116,7 +10116,7 @@ man_fild01,315,95,3 script Expedition Scout#1 4_M_MOC_SOLDIER,{
mes "I'm doing my best, but I haven't found any pages yet.";
next;
}
- if (.@playtime == -1) {
+ if (!.@playtime) {
changequest 3090,3091;
erasequest 3090;
} else
diff --git a/npc/quests/quests_13_2.txt b/npc/quests/quests_13_2.txt
index f024c5285..45a35b73e 100644
--- a/npc/quests/quests_13_2.txt
+++ b/npc/quests/quests_13_2.txt
@@ -416,7 +416,7 @@ function Catwarp {
man_fild02,132,47,4 duplicate(Cat Hand Agent#spl) Cat Hand Agent#man 4_M_BOSSCAT
- script Mysterious Rock#30::manukrock2 -1,{
- if ((countitem(6048) < 3) && (checkquest(12062,PLAYTIME) == -1)) {
+ if (countitem(6048) < 3 && !questprogress(12062,PLAYTIME)) {
specialeffect2 EF_REPAIRWEAPON;
progressbar "ffff00",10;
set .@rhea_ran,rand(1,20);
@@ -456,7 +456,7 @@ man_fild02,358,174,0 duplicate(manukrock2) Mysterious Rock#39 CLEAR_NPC
man_fild02,241,227,0 duplicate(manukrock2) Mysterious Rock#40 CLEAR_NPC
spl_fild03,226,151,0 script School of Fish#5::FishingHole_spl3 CLEAR_NPC,{
- if ((checkquest(12060,PLAYTIME) == -1) && (countitem(6039) < 20)) {
+ if (!questprogress(12060,PLAYTIME) && countitem(6039) < 20) {
specialeffect2 EF_BUBBLE;
specialeffect2 EF_INVENOM;
set .@fcast,15;
@@ -2767,9 +2767,7 @@ manuk,252,116,3 script Manuk Galtun#ep13_2day 4_MAN_GALTUN,{
}
}
else if (ep13_2_days01 == 1) {
- set .@qst_cpl01,checkquest(7074,HUNTING);
- set .@qst_cpl02,checkquest(7075,HUNTING);
- if ((.@qst_cpl01 == 2) & (.@qst_cpl02 == 2)) {
+ if (questprogress(7074,HUNTING) == 2 && questprogress(7075,HUNTING) == 2) {
mes "[Strom]";
mes "Sure enough... I, the Sapha Galtun, Strom, apologize to you. I should not have been so quick to despise you.";
mes "I admit that you are a brave soldier, please feel free to visit Manuk.";
@@ -2829,10 +2827,8 @@ man_in01,378,276,3 script Manuk Engineer#ep13_2 4_MAN_NITT,{
close;
}
if ((isequipped(2782) == 1) && (ep13_2_rhea > 99)) {
- set .@alba,checkquest(7080);
- if ((.@alba == 0) || (.@alba == 1)) {
- set .@time_chek,checkquest(7080,PLAYTIME);
- if (.@time_chek != 2) {
+ if (questprogress(7080) == 1) {
+ if (questprogress(7080,PLAYTIME) != 2) {
mes "[Manuk Engineer]";
mes "Thank you for collecting the Enriched Bradium for me, it was very helpful.";
mes "We've got more than enough for now though.";
@@ -2847,8 +2843,7 @@ man_in01,378,276,3 script Manuk Engineer#ep13_2 4_MAN_NITT,{
}
}
else {
- set .@alba2,checkquest(7079);
- if ((.@alba2 == 0) || (.@alba2 == 1)) {
+ if (questprogress(7079) == 1) {
if (countitem(6090) > 19) {
mes "[Manuk Engineer]";
mes "Oh, that will do very well.";
@@ -2937,10 +2932,8 @@ spl_in01,97,313,3 script Laphine Craftsman#ep13 4_M_FAIRYKID5,{
}
if ((isequipped(2782) == 1) && (ep13_2_rhea > 99)) {
if (ep13_mdrama > 5) {
- set .@alba,checkquest(7082);
- if (.@alba == 1) {
- set .@time_chek,checkquest(7082,PLAYTIME);
- if ((.@time_chek == 0) || (.@time_chek == 1)) {
+ if (questprogress(7082) == 1) {
+ if (questprogress(7082,PLAYTIME) == 1) {
mes "[Laphine craftsman]";
mes "Thank you for collecting those items for me.";
mes "That should be sufficient for the time being.";
@@ -2952,8 +2945,7 @@ spl_in01,97,313,3 script Laphine Craftsman#ep13 4_M_FAIRYKID5,{
erasequest 7082;
close;
}
- set .@alba2,checkquest(7081);
- if ((.@alba2 == 0) || (.@alba2 == 1)) {
+ if (questprogress(7081) == 1) {
if ((countitem(7326) > 14) && (countitem(6075) > 14)) {
mes "[Laphine craftsman]";
mes "Oh, fantastic.";
@@ -3102,7 +3094,7 @@ mid_camp,146,306,3 script Pet Breeder#ep13_eden01 4_F_SCIENCE,{
next;
if (select("Notice for criminal report:Cute pet investigation.") == 1) {
if (ep13_2_wanted == 1) {
- if (checkquest(7076,HUNTING) == 2) {
+ if (questprogress(7076,HUNTING) == 2) {
mes "[Pinedel]";
mes "Have you hunted the Runaway Dandelion?";
mes "Ok, I accept you.";
@@ -3165,14 +3157,14 @@ mid_camp,146,306,3 script Pet Breeder#ep13_eden01 4_F_SCIENCE,{
mes "[Pinedel]";
mes "Those eggs are about to hatch now.";
mes "I will investigate those back home.";
- set .@alba_check,checkquest(7078,PLAYTIME);
- if (.@alba_check == -1) {
+ .@alba_check = questprogress(7078,PLAYTIME);
+ if (!.@alba_check) {
close2;
erasequest 7078;
set ep13_2_dayegg,3;
end;
}
- else if ((.@alba_check == 0) || (.@alba_check == 1)) {
+ else if (.@alba_check == 1) {
mes "For now I still need more time.";
next;
mes "[Pinedel]";
@@ -3638,8 +3630,7 @@ mid_camp,197,237,3 script Schwartzvalt Mechanic#1 4_M_LGTMAN,{
close;
}
else if (ep13_2_rhea == 12) {
- set .@trs_time01,checkquest(8253,PLAYTIME);
- if (.@trs_time01 == 2) {
+ if (questprogress(8253,PLAYTIME) == 2) {
mes "[Mechanic Engineer Dorance]";
mes "Sigh, What should I do now?!";
next;
@@ -3814,9 +3805,7 @@ mid_campin,168,82,3 script Arunafeltz Linguist#1 4_M_TRAINEE,{
mes "[Linguist Dictionary]";
mes "Have you met the other world's people by any chance?";
next;
- set .@check_splque00,checkquest(2158);
- set .@check_manque00,checkquest(2159);
- if ((.@check_splque00 == 0) && (.@check_manque00 == 0)) {
+ if (!questprogress(2158) && !questprogress(2159)) {
// custom translation
mes "[Linguist Dictionary]";
mes "Looks like you haven't encountered them yet.";
@@ -3871,9 +3860,7 @@ mid_campin,168,82,3 script Arunafeltz Linguist#1 4_M_TRAINEE,{
}
}
else if (ep13_2_rhea == 2) {
- set .@check_splque00,checkquest(2158);
- set .@check_manque00,checkquest(2159);
- if ((.@check_splque00 > 0) && (.@check_manque00 > 0)) {
+ if (questprogress(2158) && questprogress(2159)) {
mes "[Linguist Dictionary]";
mes "You are back!";
next;
@@ -4256,9 +4243,7 @@ mid_camp,147,256,3 script Rune Midgarts Magician#1 4_M_JOB_WIZARD,{
close;
}
else if (ep13_2_rhea == 5) {
- set .@check_spljew00,checkquest(8241);
- set .@check_manjew00,checkquest(8242);
- if ((.@check_spljew00 > 0) && (.@check_manjew00 > 0)) {
+ if (questprogress(8241) && questprogress(8242)) {
if (countitem(7575) > 0) && (countitem(7576) > 0) {
mes "[Magician Whisper]";
mes "Wow, You are back already!";
@@ -4475,7 +4460,7 @@ function script jewel_13_2 {
close;
}
else if (ep13_2_rhea == 5) {
- if (checkquest(8240+getarg(1)) == -1) {
+ if (!questprogress(8240+getarg(1))) {
mes "- Under a round pile of earth, -";
mes "- there's a "+getarg(0)+" Gem -";
mes "- half-buried. -";
@@ -4716,8 +4701,7 @@ man_in01,372,221,5 script Scientist#lifeguard 4_MAN_BENKUNI,{
mes "Why not put some of your items in storage and come back?";
close;
}
- set .@dayq_chk,checkquest(2182,PLAYTIME);
- if ((.@dayq_chk == 0) || (.@dayq_chk == 1)) {
+ if (questprogress(2182,PLAYTIME) == 1) {
mes "The future of the Sapha is up to you.";
mes "I do not have any need of your help right now.";
close;
@@ -5465,8 +5449,8 @@ spl_in01,30,324,3 script High Laphine#grenouille 4_M_FAIRYKID5,{
mes "Why not put some of your items in storage and come back?";
close;
}
- set .@dayq_chk,checkquest(2186,PLAYTIME);
- if ((.@dayq_chk == -1) || (.@dayq_chk == 2)) {
+ .@dayq_chk = questprogress(2186,PLAYTIME);
+ if (!.@dayq_chk || .@dayq_chk == 2) {
if ((ep13_2_tre1 < 1) || (ep13_2_tre1 == 6)) {
erasequest 2186;
set ep13_2_tre1,0;
diff --git a/npc/quests/quests_alberta.txt b/npc/quests/quests_alberta.txt
index 1d2e61da3..a26c9c5f0 100644
--- a/npc/quests/quests_alberta.txt
+++ b/npc/quests/quests_alberta.txt
@@ -2493,8 +2493,7 @@ alberta_in,131,95,5 script Iromo#ep3_2 4_M_KID1,{
close;
}
if (ep13_2_hiki == 10) {
- set .@cooltime,checkquest(10087,PLAYTIME);
- if (.@cooltime == 2) {
+ if (questprogress(10087,PLAYTIME) == 2) {
mes "[Iromo]";
mes "...You really are annoying...";
mes "What exactly do you want from me...?";
@@ -2581,8 +2580,7 @@ alberta_in,131,95,5 script Iromo#ep3_2 4_M_KID1,{
close;
}
if ((ep13_2_hiki == 8) || (ep13_2_hiki == 9)) {
- set .@cooltime,checkquest(10085,PLAYTIME);
- if (.@cooltime == 2) {
+ if (questprogress(10085,PLAYTIME) == 2) {
mes "[Iromo]";
mes "You never give up, don't you?";
mes "What are you trying to say?";
@@ -2620,8 +2618,7 @@ alberta_in,131,95,5 script Iromo#ep3_2 4_M_KID1,{
close;
}
if (ep13_2_hiki == 7) {
- set .@goyang,checkquest(10084,HUNTING);
- if (.@goyang == 2) {
+ if (questprogress(10084,HUNTING) == 2) {
mes "[Iromo]";
mes "Oh, you made the furious cat";
mes "go away from the village?";
@@ -2831,7 +2828,7 @@ alberta_in,120,93,3 script Iromo's Mother#ep3_2 1_M_INNKEEPER,{
mes "But, somehow...";
mes "he doesn't go out anymore.";
next;
- if (BaseLevel > 40 && checkquest(10079) == -1) {
+ if (BaseLevel > 40 && !questprogress(10079)) {
set ep13_2_hiki,1;
setquest 10079;
}
diff --git a/npc/quests/quests_ayothaya.txt b/npc/quests/quests_ayothaya.txt
index 5a30866f7..2c3225ce2 100644
--- a/npc/quests/quests_ayothaya.txt
+++ b/npc/quests/quests_ayothaya.txt
@@ -160,7 +160,7 @@ ayothaya,233,105,3 script Powerful-Looking Woman 4_F_THAIAYO,2,2,{
mes "my ring. I'll be waiting";
mes "here for the good news.";
mes "Oho ho ho ho ho~!";
- if (checkquest(12029) == -1)
+ if (!questprogress(12029))
setquest 12029;
close;
}
@@ -386,7 +386,7 @@ ayothaya,233,105,3 script Powerful-Looking Woman 4_F_THAIAYO,2,2,{
next;
mes "[Shuda]";
mes "So go and look under the water! There's no water current, so I'm sure it's still there! What are you waiting for, it's should be an easy swim for you! Oho ho ho ho ho!";
- if (checkquest(12029) == -1)
+ if (!questprogress(12029))
setquest 12029;
set thai_find,1;
close;
diff --git a/npc/quests/quests_hugel.txt b/npc/quests/quests_hugel.txt
index 453a0e8fc..bab833ac0 100644
--- a/npc/quests/quests_hugel.txt
+++ b/npc/quests/quests_hugel.txt
@@ -5781,8 +5781,8 @@ hu_in01,15,372,3 script Cellette Lavit 1_F_MERCHANT_02,{
mes "is your Fish Cake Soup. Thank";
mes "you so much for your help~";
set hg_odeng,0;
- for(set .@i,8072; .@i<= 8075; set .@i,.@i+1) {
- if (checkquest(.@i) > -1)
+ for (.@i = 8072; .@i <= 8075; ++.@i) {
+ if (questprogress(.@i))
erasequest .@i;
}
getitem 584,3; //Fish_Ball_Soup
@@ -5833,8 +5833,8 @@ hugel,76,134,3 script Neha 4W_F_01,{
mes "^FF00001 Whip^000000 so that I can spank you";
mes "for your impertinence, girl!";
}
- for(set .@i,8064; .@i<= 8067; set .@i,.@i+1) {
- if (checkquest(.@i) > -1 && checkquest(.@i) < 2)
+ for (.@i = 8064; .@i <= 8067; ++.@i) {
+ if (questprogress(.@i) && questprogress(.@i) != 2)
completequest .@i;
}
setquest 8068;
@@ -7499,7 +7499,8 @@ hugel,72,101,0 script Burupu's Instructions HIDDEN_NPC,{
break;
}
close2;
- if (checkquest(12042) > -1) erasequest 12042;
+ if (questprogress(12042))
+ erasequest 12042;
end;
}
@@ -8710,8 +8711,8 @@ hu_in01,14,11,4 script Laura 1_F_GYPSY,{
next;
select("Yeah, yeah, whatever.:Sure thing.:I s-s-s-suppose...!:Yes, Ma'am!");
set hg_odin,17;
- for(set .@i,11002; .@i<=11005; set .@i,.@i+1) {
- if (checkquest(.@i) > -1 && checkquest(.@i) < 2)
+ for(.@i = 11002; .@i <= 11005; ++.@i) {
+ if (questprogress(.@i) && questprogress(.@i) != 2)
completequest .@i;
}
setquest 11006;
diff --git a/npc/quests/quests_lighthalzen.txt b/npc/quests/quests_lighthalzen.txt
index 6f9a4c0d2..6ed364ed5 100644
--- a/npc/quests/quests_lighthalzen.txt
+++ b/npc/quests/quests_lighthalzen.txt
@@ -8491,8 +8491,8 @@ L_Mission:
mes "[Karl]";
mes ".........";
mes "............";
- for(set .@i,12015; .@i<=12028; set .@i,.@i+1) {
- if (checkquest(.@i) > 0 && checkquest(.@i) < 2)
+ for (.@i = 12015; .@i <= 12028; ++.@i) {
+ if (questprogress(.@i) && questprogress(.@i) != 2)
completequest .@i;
}
close;
diff --git a/npc/quests/quests_louyang.txt b/npc/quests/quests_louyang.txt
index d928aefd6..e15780c5e 100644
--- a/npc/quests/quests_louyang.txt
+++ b/npc/quests/quests_louyang.txt
@@ -2126,8 +2126,8 @@ lou_in02,156,38,0 script Studying Officer#lou 4_M_CHNMAN,{
mes "Here it is. A few days ago, someone asked me for the same document,";
mes "so I was able to find it again pretty easily. I hope it's useful to you.";
set ch_par,15;
- for(set .@i,11051; .@i<=11054; set .@i,.@i+1) {
- if (checkquest(.@i) > -1 && checkquest(.@i < 2))
+ for (.@i = 11051; .@i <= 11054; ++.@i) {
+ if (questprogress(.@i) && questprogress(.@i) != 2)
completequest .@i;
}
setquest 11055;
diff --git a/npc/quests/quests_morocc.txt b/npc/quests/quests_morocc.txt
index 45ed535f8..b4e788568 100644
--- a/npc/quests/quests_morocc.txt
+++ b/npc/quests/quests_morocc.txt
@@ -4453,7 +4453,7 @@ prontera,153,353,4 script Messenger#prince1 8W_SOLDIER,{
}
prt_castle,117,163,5 script Inspector#prince 4_M_SAGE_C,{
- if (checkquest(10004) == 0 || checkquest(10004) == 1) {
+ if (questprogress(10004) == 1) {
mes "[Inspector]";
mes "Judge!";
mes "How goes it? I don't think it is easy to meet seven candidates and appraise them.";
@@ -5243,7 +5243,7 @@ prt_castle,117,163,5 script Inspector#prince 4_M_SAGE_C,{
mes "How is it going?";
mes "Grading someone is not a piece of cake. It's real hard work indeed. You do the hard work for our country.";
next;
- if ((nkprince_eisen == 15) && (checkquest(10025) == 0 || checkquest(10025) == 1)) {
+ if (nkprince_eisen == 15 && questprogress(10025) == 1) {
mes "-I tell him about the Ahrum and Ernst accident.-";
next;
mes "[Inspector]";
@@ -5308,14 +5308,8 @@ prt_castle,117,163,5 script Inspector#prince 4_M_SAGE_C,{
next;
switch(select("Yes.:No.")) {
case 1:
- set .@prin1,checkquest(10005);
- set .@prin2,checkquest(10006);
- set .@prin3,checkquest(10007);
- set .@prin4,checkquest(10008);
- set .@prin5,checkquest(10009);
- set .@prin6,checkquest(10010);
- set .@prin7,checkquest(10011);
- if (.@prin1 + .@prin2 + .@prin3 + .@prin4 + .@prin5 + .@prin6 + .@prin7 == 14) {
+ if (questprogress(10005) == 2 && questprogress(10006) == 2 && questprogress(10007) == 2 && questprogress(10008) == 2
+ && questprogress(10009) == 2 && questprogress(10010) == 2 && questprogress(10011) == 2) {
mes "[Inspector]";
mes "Very well.";
mes "I like hearing about the princes.";
@@ -5328,14 +5322,8 @@ prt_castle,117,163,5 script Inspector#prince 4_M_SAGE_C,{
}
close;
case 2:
- set .@prin1,checkquest(10005);
- set .@prin2,checkquest(10006);
- set .@prin3,checkquest(10007);
- set .@prin4,checkquest(10008);
- set .@prin5,checkquest(10009);
- set .@prin6,checkquest(10010);
- set .@prin7,checkquest(10011);
- if (.@prin1 + .@prin2 + .@prin3 + .@prin4 + .@prin5 + .@prin6 + .@prin7 == 14) {
+ if (questprogress(10005) == 2 && questprogress(10006) == 2 && questprogress(10007) == 2 && questprogress(10008) == 2
+ && questprogress(10009) == 2 && questprogress(10010) == 2 && questprogress(10011) == 2) {
mes "[Inspector]";
mes "Don't be coy. I'm sure you have done it already.";
completequest 10004;
@@ -5355,13 +5343,13 @@ prt_castle,272,375,4 script Prince 4_M_SITDOWN,{
mes "lock and key.-";
close;
}
- if (checkquest(10020) == 2) {
+ if (questprogress(10020) == 2) {
mes "[Erich]";
mes "...What bad luck I have!";
mes "But he insists me to be corrupted, knowing how it would be...";
close;
}
- else if (checkquest(10020) == 0 || checkquest(10020) == 1) {
+ else if (questprogress(10020) == 1) {
mes "[Erich]";
mes "These days, I have bad luck... Only harrassments happen to me...";
close;
@@ -5394,14 +5382,8 @@ prt_castle,272,375,4 script Prince 4_M_SITDOWN,{
mes "You can ask information about me to my servant. I will take a rest.";
set nk_prince,6;
completequest 10011;
- set .@prin1,checkquest(10005);
- set .@prin2,checkquest(10006);
- set .@prin3,checkquest(10007);
- set .@prin4,checkquest(10008);
- set .@prin5,checkquest(10009);
- set .@prin6,checkquest(10010);
- set .@prin7,checkquest(10011);
- if ((.@prin1 + .@prin2 + .@prin3 + .@prin4 + .@prin5 + .@prin6 + .@prin7) == 14) {
+ if (questprogress(10005) == 2 && questprogress(10006) == 2 && questprogress(10007) == 2 && questprogress(10008) == 2
+ && questprogress(10009) == 2 && questprogress(10010) == 2 && questprogress(10011) == 2) {
setquest 10012;
}
close;
@@ -5417,7 +5399,7 @@ prt_castle,272,375,4 script Prince 4_M_SITDOWN,{
}
prt_castle,274,372,4 script Servant#hans 1_M_02,{
- if (checkquest(10020) == 2) {
+ if (questprogress(10020) == 2) {
mes "[Hans]";
mes "Ahh... mmm... I...";
mes "I... am so, sorry!";
@@ -5427,7 +5409,7 @@ prt_castle,274,372,4 script Servant#hans 1_M_02,{
mes "My prince didn't do anything wrong but, anyways, I apologize for anything to you!";
close;
}
- else if (checkquest(10020) == 0 || checkquest(10020) == 1) {
+ else if (questprogress(10020) == 1) {
mes "Incessantly...-";
mes "-He has jitters whenever I react to him. His actions give me a feeling of pity.-";
close;
@@ -5507,7 +5489,7 @@ prt_castle,339,202,3 script Prince#urgen 4_M_4THPRIN1,{
mes "It discomforts me...";
close;
}
- if (checkquest(10021) == 2) {
+ if (questprogress(10021) == 2) {
mes "[Urugen]";
mes " feel very much displeased. Hey, what are you looking at? Get out!";
next;
@@ -5515,7 +5497,7 @@ prt_castle,339,202,3 script Prince#urgen 4_M_4THPRIN1,{
mes "My beautiful body isn't in perfect condition right now. I don't want to show it to anyone today.";
close;
}
- else if (checkquest(10021) == 0 || checkquest(10021) == 1) {
+ else if (questprogress(10021) == 1) {
mes "[Urugen]";
mes "...What? What did you...";
mes "just say to me?... Huh?";
@@ -5587,14 +5569,8 @@ prt_castle,339,202,3 script Prince#urgen 4_M_4THPRIN1,{
completequest 10009;
}
completequest 10011;
- set .@prin1,checkquest(10005);
- set .@prin2,checkquest(10006);
- set .@prin3,checkquest(10007);
- set .@prin4,checkquest(10008);
- set .@prin5,checkquest(10009);
- set .@prin6,checkquest(10010);
- set .@prin7,checkquest(10011);
- if ((.@prin1 + .@prin2 + .@prin3 + .@prin4 + .@prin5 + .@prin6 + .@prin7) == 14) {
+ if (questprogress(10005) == 2 && questprogress(10006) == 2 && questprogress(10007) == 2 && questprogress(10008) == 2
+ && questprogress(10009) == 2 && questprogress(10010) == 2 && questprogress(10011) == 2) {
setquest 10012;
}
close;
@@ -5609,14 +5585,14 @@ prt_castle,289,201,3 script Prince#helmut 4_M_5THPRIN1,{
mes "Such an idiot. I should have killed him earlier. Now I feel relieved.";
close;
}
- if (checkquest(10022) == 2) {
+ if (questprogress(10022) == 2) {
mes "[Helmut]";
mes "Damn... Damn it!";
mes "Novice of Walter!!";
mes "How can I deal with this stress? Damn! Hell!";
close;
}
- else if (checkquest(10022) == 0 || checkquest(10022) == 1) {
+ else if (questprogress(10022) == 1) {
mes "-He is so blushed,";
mes "evidently shown on his face.-";
close;
@@ -5668,14 +5644,8 @@ prt_castle,289,201,3 script Prince#helmut 4_M_5THPRIN1,{
mes "[" + strcharinfo(0) + "]";
mes "......";
completequest 10010;
- set .@prin1,checkquest(10005);
- set .@prin2,checkquest(10006);
- set .@prin3,checkquest(10007);
- set .@prin4,checkquest(10008);
- set .@prin5,checkquest(10009);
- set .@prin6,checkquest(10010);
- set .@prin7,checkquest(10011);
- if ((.@prin1 + .@prin2 + .@prin3 + .@prin4 + .@prin5 + .@prin6 + .@prin7) == 14) {
+ if (questprogress(10005) == 2 && questprogress(10006) == 2 && questprogress(10007) == 2 && questprogress(10008) == 2
+ && questprogress(10009) == 2 && questprogress(10010) == 2 && questprogress(10011) == 2) {
setquest 10012;
}
close;
@@ -5713,14 +5683,8 @@ prt_castle,289,201,3 script Prince#helmut 4_M_5THPRIN1,{
mes "[" + strcharinfo(0) + "]";
mes "......";
completequest 10010;
- set .@prin1,checkquest(10005);
- set .@prin2,checkquest(10006);
- set .@prin3,checkquest(10007);
- set .@prin4,checkquest(10008);
- set .@prin5,checkquest(10009);
- set .@prin6,checkquest(10010);
- set .@prin7,checkquest(10011);
- if ((.@prin1 + .@prin2 + .@prin3 + .@prin4 + .@prin5 + .@prin6 + .@prin7) == 14) {
+ if (questprogress(10005) == 2 && questprogress(10006) == 2 && questprogress(10007) == 2 && questprogress(10008) == 2
+ && questprogress(10009) == 2 && questprogress(10010) == 2 && questprogress(10011) == 2) {
setquest 10012;
}
close;
@@ -5758,14 +5722,8 @@ prt_castle,289,201,3 script Prince#helmut 4_M_5THPRIN1,{
mes "[" + strcharinfo(0) + "]";
mes "......";
completequest 10010;
- set .@prin1,checkquest(10005);
- set .@prin2,checkquest(10006);
- set .@prin3,checkquest(10007);
- set .@prin4,checkquest(10008);
- set .@prin5,checkquest(10009);
- set .@prin6,checkquest(10010);
- set .@prin7,checkquest(10011);
- if ((.@prin1 + .@prin2 + .@prin3 + .@prin4 + .@prin5 + .@prin6 + .@prin7) == 14) {
+ if (questprogress(10005) == 2 && questprogress(10006) == 2 && questprogress(10007) == 2 && questprogress(10008) == 2
+ && questprogress(10009) == 2 && questprogress(10010) == 2 && questprogress(10011) == 2) {
setquest 10012;
}
close;
@@ -5806,12 +5764,12 @@ prt_castle,391,205,3 script Prince#poe 4_M_6THPRIN1,{
mes "Whatever the condition is, he is just a loser in the match of life.";
close;
}
- if (checkquest(10018) == 2) {
+ if (questprogress(10018) == 2) {
mes "[Poe]";
mes "He gave up without any challenge. That's not what the man has to do. He is not as good as me. But okay. I am disappointed in him. Eigen Ahrum.";
close;
}
- else if (checkquest(10018) == 0 || checkquest(10018) == 1) {
+ else if (questprogress(10018) == 1) {
mes "[Poe]";
mes "......";
close;
@@ -6008,14 +5966,8 @@ prt_castle,391,205,3 script Prince#poe 4_M_6THPRIN1,{
if (.@p_a + .@p_b + .@p_c == 3) {
completequest 10007;
}
- set .@prin1,checkquest(10005);
- set .@prin2,checkquest(10006);
- set .@prin3,checkquest(10007);
- set .@prin4,checkquest(10008);
- set .@prin5,checkquest(10009);
- set .@prin6,checkquest(10010);
- set .@prin7,checkquest(10011);
- if ((.@prin1 + .@prin2 + .@prin3 + .@prin4 + .@prin5 + .@prin6 + .@prin7) == 14) {
+ if (questprogress(10005) == 2 && questprogress(10006) == 2 && questprogress(10007) == 2 && questprogress(10008) == 2
+ && questprogress(10009) == 2 && questprogress(10010) == 2 && questprogress(10011) == 2) {
setquest 10012;
}
close;
@@ -6032,7 +5984,7 @@ prt_castle,364,375,4 script Prince#peter 4_M_3RDPRIN1,{
next;
switch(select("Yes, I saw her for you.:No, I don't want to.")) {
case 1:
- if (checkquest(10014) == 0 || checkquest(10014) == 1) {
+ if (questprogress(10014) == 1) {
mes "[Peter]";
mes "I am glad that the girl liked it. Once I got cured, I wanted to go meet with her.";
next;
@@ -6046,7 +5998,7 @@ prt_castle,364,375,4 script Prince#peter 4_M_3RDPRIN1,{
mes "Thinking about the little girl calms me. I still can't believe my eyes. My prince Ahrum who just passed away...~";
close;
case 2:
- if (checkquest(10014) == 0 || checkquest(10014) == 1) {
+ if (questprogress(10014) == 1) {
mes "[Peter]";
mes "As you said.";
mes "I've heard that her life is like a flower when I lost it.";
@@ -6064,25 +6016,25 @@ prt_castle,364,375,4 script Prince#peter 4_M_3RDPRIN1,{
close;
}
}
- if (checkquest(10019) == 2) {
+ if (questprogress(10019) == 2) {
mes "[Peter]";
mes "Child... What the heck happened to you?...";
close;
}
- else if (checkquest(10019) == 0 || checkquest(10019) == 1) {
+ else if (questprogress(10019) == 1) {
mes "[Peter]";
mes "......";
close;
}
- if (checkquest(10008) == 2) {
- set .@quest, checkquest(10014);
+ if (questprogress(10008) == 2) {
+ .@quest = questprogress(10014);
if (.@quest == 2) {
mes "[Peter]";
mes "I really appreciate it.";
mes "You are so kind.";
close;
}
- else if (.@quest == 0 || .@quest == 1) {
+ else if (.@quest == 1) {
mes "[Peter]";
mes "I am glad that the girl liked it. Once I got cured, I wanted to go meet with her.";
next;
@@ -6172,14 +6124,8 @@ prt_castle,364,375,4 script Prince#peter 4_M_3RDPRIN1,{
mes "Please take care.";
getitem 744,1; //Bunch_Of_Flowers
setquest 10013;
- set .@prin1,checkquest(10005);
- set .@prin2,checkquest(10006);
- set .@prin3,checkquest(10007);
- set .@prin4,checkquest(10008);
- set .@prin5,checkquest(10009);
- set .@prin6,checkquest(10010);
- set .@prin7,checkquest(10011);
- if ((.@prin1 + .@prin2 + .@prin3 + .@prin4 + .@prin5 + .@prin6 + .@prin7) == 14) {
+ if (questprogress(10005) == 2 && questprogress(10006) == 2 && questprogress(10007) == 2 && questprogress(10008) == 2
+ && questprogress(10009) == 2 && questprogress(10010) == 2 && questprogress(10011) == 2) {
setquest 10012;
}
close;
@@ -6189,14 +6135,8 @@ prt_castle,364,375,4 script Prince#peter 4_M_3RDPRIN1,{
mes "I know you have your";
mes "own business.";
setquest 10013;
- set .@prin1,checkquest(10005);
- set .@prin2,checkquest(10006);
- set .@prin3,checkquest(10007);
- set .@prin4,checkquest(10008);
- set .@prin5,checkquest(10009);
- set .@prin6,checkquest(10010);
- set .@prin7,checkquest(10011);
- if ((.@prin1 + .@prin2 + .@prin3 + .@prin4 + .@prin5 + .@prin6 + .@prin7) == 14) {
+ if (questprogress(10005) == 2 && questprogress(10006) == 2 && questprogress(10007) == 2 && questprogress(10008) == 2
+ && questprogress(10009) == 2 && questprogress(10010) == 2 && questprogress(10011) == 2) {
setquest 10012;
}
close;
@@ -6208,7 +6148,7 @@ prt_castle,364,375,4 script Prince#peter 4_M_3RDPRIN1,{
}
aldebaran,132,184,3 script Girl#prince 4W_KID,{
- if (checkquest(10013) == 0 || checkquest(10013) == 1) {
+ if (questprogress(10013) == 1) {
if (countitem(744) > 0) {
mes "[Girl]";
mes "Wooah, Uncle Peter sent these flowers";
@@ -6681,14 +6621,8 @@ prt_castle,314,373,4 script Prince#eisen 4_M_1STPRIN1,{
set nkprince_eisen,1;
}
completequest 10005;
- set .@prin1,checkquest(10005);
- set .@prin2,checkquest(10006);
- set .@prin3,checkquest(10007);
- set .@prin4,checkquest(10008);
- set .@prin5,checkquest(10009);
- set .@prin6,checkquest(10010);
- set .@prin7,checkquest(10011);
- if ((.@prin1 + .@prin2 + .@prin3 + .@prin4 + .@prin5 + .@prin6 + .@prin7) == 14) {
+ if (questprogress(10005) == 2 && questprogress(10006) == 2 && questprogress(10007) == 2 && questprogress(10008) == 2
+ && questprogress(10009) == 2 && questprogress(10010) == 2 && questprogress(10011) == 2) {
setquest 10012;
}
close;
@@ -6698,14 +6632,14 @@ prt_castle,314,373,4 script Prince#eisen 4_M_1STPRIN1,{
}
prt_castle,368,312,4 script Prince#ern 4_M_2NDPRIN1,{
- if (checkquest(10024) == 2) {
+ if (questprogress(10024) == 2) {
mes "[Ernst]";
mes "...brother, if you want...";
mes "...Ah, please leave here.";
mes "I don't want to see anyone.";
close;
}
- else if (checkquest(10024) == 0 || checkquest(10024) == 1) {
+ else if (questprogress(10024) == 1) {
mes "[Ernst]";
mes "...Brother Ahrum...";
close;
@@ -6874,14 +6808,8 @@ prt_castle,368,312,4 script Prince#ern 4_M_2NDPRIN1,{
set nkprince_eisen,2;
}
completequest 10006;
- set .@prin1,checkquest(10005);
- set .@prin2,checkquest(10006);
- set .@prin3,checkquest(10007);
- set .@prin4,checkquest(10008);
- set .@prin5,checkquest(10009);
- set .@prin6,checkquest(10010);
- set .@prin7,checkquest(10011);
- if ((.@prin1 + .@prin2 + .@prin3 + .@prin4 + .@prin5 + .@prin6 + .@prin7) == 14) {
+ if (questprogress(10005) == 2 && questprogress(10006) == 2 && questprogress(10007) == 2 && questprogress(10008) == 2
+ && questprogress(10009) == 2 && questprogress(10010) == 2 && questprogress(10011) == 2) {
setquest 10012;
}
close;
@@ -7290,12 +7218,8 @@ prt_castle,272,372,1 script Prince#eisen1 4_M_1STPRIN1,{
mes "[Erich]";
mes "...Nuts.";
completequest 10020;
- set .@er1,checkquest(10018);
- set .@er2,checkquest(10019);
- set .@er3,checkquest(10020);
- set .@er4,checkquest(10021);
- set .@er5,checkquest(10022);
- if ((.@er1 + .@er2 + .@er3 + .@er4 + .@er5) == 10) {
+ if (questprogress(10018) == 2 && questprogress(10019) == 2 && questprogress(10020) == 2
+ && questprogress(10021) == 2 && questprogress(10022) == 2) {
setquest 10023;
set nkprince_eisen,11;
}
@@ -7348,12 +7272,8 @@ prt_castle,336,202,7 script Prince#eisen2 4_M_1STPRIN1,{
mes "[Urugen]";
mes "...You are so low. I misjudged you. You are not of the few that have an artistic view. I totally saw you the wrong way.";
completequest 10021;
- set .@er1,checkquest(10018);
- set .@er2,checkquest(10019);
- set .@er3,checkquest(10020);
- set .@er4,checkquest(10021);
- set .@er5,checkquest(10022);
- if ((.@er1 + .@er2 + .@er3 + .@er4 + .@er5) == 10) {
+ if (questprogress(10018) == 2 && questprogress(10019) == 2 && questprogress(10020) == 2
+ && questprogress(10021) == 2 && questprogress(10022) == 2) {
setquest 10023;
set nkprince_eisen,11;
}
@@ -7403,12 +7323,8 @@ prt_castle,286,201,7 script Prince#eisen3 4_M_1STPRIN1,{
mes "[Helmut]";
mes "That is... such a villain!!!";
completequest 10022;
- set .@er1,checkquest(10018);
- set .@er2,checkquest(10019);
- set .@er3,checkquest(10020);
- set .@er4,checkquest(10021);
- set .@er5,checkquest(10022);
- if ((.@er1 + .@er2 + .@er3 + .@er4 + .@er5) == 10) {
+ if (questprogress(10018) == 2 && questprogress(10019) == 2 && questprogress(10020) == 2
+ && questprogress(10021) == 2 && questprogress(10022) == 2) {
setquest 10023;
set nkprince_eisen,11;
}
@@ -7467,12 +7383,8 @@ prt_castle,388,205,6 script Prince#eisen4 4_M_1STPRIN1,{
mes "What... What. It's not fun.";
mes "I totally couldn't get him.";
completequest 10018;
- set .@er1,checkquest(10018);
- set .@er2,checkquest(10019);
- set .@er3,checkquest(10020);
- set .@er4,checkquest(10021);
- set .@er5,checkquest(10022);
- if ((.@er1 + .@er2 + .@er3 + .@er4 + .@er5) == 10) {
+ if (questprogress(10018) == 2 && questprogress(10019) == 2 && questprogress(10020) == 2
+ && questprogress(10021) == 2 && questprogress(10022) == 2) {
setquest 10023;
set nkprince_eisen,11;
}
@@ -7531,12 +7443,8 @@ prt_castle,364,372,1 script Prince#eisen5 4_M_1STPRIN1,{
mes "[Peter]";
mes "......";
completequest 10019;
- set .@er1,checkquest(10018);
- set .@er2,checkquest(10019);
- set .@er3,checkquest(10020);
- set .@er4,checkquest(10021);
- set .@er5,checkquest(10022);
- if ((.@er1 + .@er2 + .@er3 + .@er4 + .@er5) == 10) {
+ if (questprogress(10018) == 2 && questprogress(10019) == 2 && questprogress(10020) == 2
+ && questprogress(10021) == 2 && questprogress(10022) == 2) {
setquest 10023;
set nkprince_eisen,11;
}
@@ -7737,7 +7645,7 @@ OnTouch:
prt_castle,336,276,0 script #ern WARPNPC,1,1,{
OnTouch:
- if (checkquest(10023) == 0 || checkquest(10023) == 1) {
+ if (questprogress(10023) == 1) {
donpcevent "Prince#eisen6::OnEnable";
}
warp "prt_castle",368,308;
@@ -7746,7 +7654,7 @@ OnTouch:
prt_castle,300,276,0 script #erich WARPNPC,1,1,{
OnTouch:
- if (checkquest(10020) == 0 || checkquest(10020) == 1) {
+ if (questprogress(10020) == 1) {
donpcevent "Prince#eisen1::OnEnable";
}
warp "prt_castle",274,368;
@@ -7755,7 +7663,7 @@ OnTouch:
prt_castle,330,271,0 script #helmut WARPNPC,1,1,{
OnTouch:
- if (checkquest(10022) == 0 || checkquest(10022) == 1) {
+ if (questprogress(10022) == 1) {
donpcevent "Prince#eisen3::OnEnable";
}
warp "prt_castle",290,208;
@@ -7764,7 +7672,7 @@ OnTouch:
prt_castle,348,271,0 script #poe WARPNPC,1,1,{
OnTouch:
- if (checkquest(10018) == 0 || checkquest(10018) == 1) {
+ if (questprogress(10018) == 1) {
donpcevent "Prince#eisen4::OnEnable";
}
warp "prt_castle",390,208;
@@ -7773,7 +7681,7 @@ OnTouch:
prt_castle,354,276,0 script #peter WARPNPC,1,1,{
OnTouch:
- if (checkquest(10019) == 0 || checkquest(10019) == 1) {
+ if (questprogress(10019) == 1) {
donpcevent "Prince#eisen5::OnEnable";
}
warp "prt_castle",366,368;
@@ -7782,7 +7690,7 @@ OnTouch:
prt_castle,310,271,0 script #urgen WARPNPC,1,1,{
OnTouch:
- if (checkquest(10021) == 0 || checkquest(10021) == 1) {
+ if (questprogress(10021) == 1) {
donpcevent "Prince#eisen2::OnEnable";
}
warp "prt_castle",340,208;
diff --git a/npc/re/cities/malangdo.txt b/npc/re/cities/malangdo.txt
index e8cfdb615..5a651c090 100644
--- a/npc/re/cities/malangdo.txt
+++ b/npc/re/cities/malangdo.txt
@@ -19,7 +19,7 @@
// Malangdo Transportation :: malangdo_go
//============================================================
- script Dolangmal -1,{
- if (checkquest(5091) == -1) {
+ if (!questprogress(5091)) {
mes "[Dolangmal]";
mes "Hey~! Hi human~ This is Mr. Dolangmal. kakaka~";
next;
diff --git a/npc/re/cities/malaya.txt b/npc/re/cities/malaya.txt
index da19e67c5..54064d8a5 100644
--- a/npc/re/cities/malaya.txt
+++ b/npc/re/cities/malaya.txt
@@ -222,7 +222,7 @@ OnTouch:
if (getcharid(0) == getpartyleader(getcharid(1),2))
set .@pass,1;
} else if (.@i%4 == 3) {
- if (checkquest(4229,PLAYTIME) > -1 && checkquest(9223,PLAYTIME) > -1 && checkquest(12278,PLAYTIME) > -1)
+ if (questprogress(4229,PLAYTIME) && questprogress(9223,PLAYTIME) && questprogress(12278,PLAYTIME))
set .@pass,1;
} else if (.@i%4 == 0) {
if (rand(1,100)%10 == 7)
diff --git a/npc/re/guild/invest_main.txt b/npc/re/guild/invest_main.txt
index 50a4e7d35..6661de45f 100644
--- a/npc/re/guild/invest_main.txt
+++ b/npc/re/guild/invest_main.txt
@@ -561,8 +561,8 @@ prt_gld,164,98,3 script Revoting Manager#Invest2 4_M_BOSSCAT,{
disablenpc "Revoting Manager#Invest2";
end;
}
- set .@playtime, checkquest(7349,PLAYTIME);
- if (.@playtime == 0 || .@playtime == 1) {
+ .@playtime = questprogress(7349,PLAYTIME);
+ if (.@playtime == 1) {
mes "[Revoting Manager]";
mes "You've already participated in the vote.";
mes "Please relax and wait for the results.";
diff --git a/npc/re/instances/BakonawaLake.txt b/npc/re/instances/BakonawaLake.txt
index 89ce64ac4..584044b13 100644
--- a/npc/re/instances/BakonawaLake.txt
+++ b/npc/re/instances/BakonawaLake.txt
@@ -39,16 +39,16 @@ ma_scene01,174,179,4 script Taho 4_M_DEWZATIMAN,{
set .@party_id,getcharid(1);
set .@md_name$, "Bakonawa Lake";
- set .@baku_time, checkquest(12278,PLAYTIME);
- if (.@baku_time == -1) {
- if (checkquest(12279) == -1) setquest 12279;
+ .@baku_time = questprogress(12278,PLAYTIME);
+ if (!.@baku_time) {
+ if (!questprogress(12279)) setquest 12279;
}
if (!.@party_id) {
mes "[Taho]";
mes "Isn't there any company who can go with you? Or even if you wanna go alone, come after organizing a party.";
close;
}
- if (.@baku_time == -1) {
+ if (!.@baku_time) {
if (getcharid(0) == getpartyleader(.@party_id,2)) {
mes "[Taho]";
mes "Are you the leader of the Bakonawa slayers? The road is not well so we have to go down the cliff with a rope, is that OK?";
@@ -92,7 +92,7 @@ ma_scene01,174,179,4 script Taho 4_M_DEWZATIMAN,{
case 3:
close;
}
- } else if (.@baku_time == 0 || .@baku_time == 1) {
+ } else if (.@baku_time == 1) {
mes "[Taho]";
mes "The rope used for getting to the Lake is already broken. We are now cleaning up the surroundings so come back after some time.";
close;
@@ -469,7 +469,7 @@ OnMobSpawn:
mes "It seems you are already carrying items of too much weight. Please try again after reducing the weight.";
close;
}
- if (checkquest(12279,HUNTING) == 2) {
+ if (questprogress(12279,HUNTING) == 2) {
erasequest 12279;
mes "[Taho]";
mes "This was found from Bakonawa's corpse. It would be better if you take this.";
diff --git a/npc/re/instances/BangungotHospital.txt b/npc/re/instances/BangungotHospital.txt
index b995092a1..d4ac3f9b0 100644
--- a/npc/re/instances/BangungotHospital.txt
+++ b/npc/re/instances/BangungotHospital.txt
@@ -23,9 +23,9 @@ ma_dun01,147,10,5 script Nurse#ma_dun01 4_F_NURSE,{
set .@party_id,getcharid(1);
cutin "malaya_nurseB",2;
- if (checkquest(9223) == -1) {
- set .@quest, checkquest(9222);
- if (.@quest == -1) {
+ if (!questprogress(9223)) {
+ .@quest = questprogress(9222);
+ if (!.@quest) {
if (!.@party_id) {
if (malaya_bang == 30)
callsub L_Closed,1;
@@ -34,9 +34,9 @@ ma_dun01,147,10,5 script Nurse#ma_dun01 4_F_NURSE,{
else
goto L_NoParty;
}
- if (checkquest(11309,HUNTING) < 2) {
- set .@playtime, checkquest(9224,PLAYTIME);
- if (.@playtime == -1) {
+ if (questprogress(11309,HUNTING) != 2) {
+ .@playtime = questprogress(9224,PLAYTIME);
+ if (!.@playtime) {
if (malaya_bang == 30)
callsub L_Closed,1;
else if (malaya_bang == 31)
@@ -50,8 +50,8 @@ ma_dun01,147,10,5 script Nurse#ma_dun01 4_F_NURSE,{
cutin "",255;
end;
}
- } else if (.@playtime == 0 || .@playtime == 1) {
- if (checkquest(11309) == -1) {
+ } else if (.@playtime == 1) {
+ if (!questprogress(11309)) {
mes "[Nurse Maenne]";
mes "This is a fatal situation.";
close2;
@@ -73,10 +73,10 @@ ma_dun01,147,10,5 script Nurse#ma_dun01 4_F_NURSE,{
end;
}
} else {
- set .@quest2, checkquest(11309);
- if (.@quest2 == -1) {
+ .@quest2 = questprogress(11309);
+ if (!.@quest2) {
callsub L_Closed,0;
- } else if (.@quest2 == 0 || .@quest2 == 1) {
+ } else if (.@quest2 == 1) {
callsub L_Complete;
completequest 9224;
erasequest 9224;
@@ -105,13 +105,12 @@ ma_dun01,147,10,5 script Nurse#ma_dun01 4_F_NURSE,{
cutin "",255;
end;
}
- } else if (.@quest == 0 || .@quest == 1) {
+ } else if (.@quest == 1) {
if (!.@party_id) goto L_NoParty;
if (malaya_bang > 39) {
- set .@hunting, checkquest(9222,HUNTING);
- if (.@hunting == 0 || .@hunting == 1) {
- set .@playtime, checkquest(9224,PLAYTIME);
- if (.@playtime == 0 || .@playtime == 1) {
+ if (questprogress(9222,HUNTING) == 1) {
+ .@playtime = questprogress(9224,PLAYTIME);
+ if (.@playtime == 1) {
mes "[Nurse Maenne]";
mes "Do you want go up to the second floor again?";
next;
@@ -190,7 +189,7 @@ ma_dun01,147,10,5 script Nurse#ma_dun01 4_F_NURSE,{
end;
}
} else {
- if (checkquest(9223,PLAYTIME) == 0 || checkquest(9223,PLAYTIME) == 1) {
+ if (questprogress(9223,PLAYTIME) == 1) {
callsub L_Complete;
close2;
cutin "",255;
@@ -297,13 +296,13 @@ L_Enter:
} else {
mapannounce "ma_dun01", getpartyname(getcharid(1))+" party's "+strcharinfo(0)+" member entered "+.@md_name$+".",bc_map,"0x00ff99";
if (getarg(1)) {
- if (checkquest(9223) > -1) {
+ if (questprogress(9223)) {
completequest 9223;
erasequest 9223;
}
- if (checkquest(9222) > -1)
+ if (questprogress(9222))
erasequest 9222;
- if (checkquest(9224) > -1)
+ if (questprogress(9224))
erasequest 9224;
setquest 9222;
}
diff --git a/npc/re/instances/BuwayaCave.txt b/npc/re/instances/BuwayaCave.txt
index 0a26dab9c..a24a0ae27 100644
--- a/npc/re/instances/BuwayaCave.txt
+++ b/npc/re/instances/BuwayaCave.txt
@@ -60,10 +60,10 @@ ma_fild02,312,317,5 script Guard#buwaya_cave 4_MAL_SOLDIER,{
next;
break;
case 2:
- set .@playtime, checkquest(4229,PLAYTIME);
- if (.@playtime == -1) {
+ .@playtime = questprogress(4229,PLAYTIME);
+ if (!.@playtime) {
// fall through
- } else if (.@playtime == 0 || .@playtime == 1) {
+ } else if (.@playtime == 1) {
mes "[Guard]";
mes "Buwaya is still hiding.";
mes "Even if you enter now, Buwaya will not come out. ";
@@ -118,10 +118,10 @@ OnTouch:
mes "This place is dangerous. Please go back.";
close;
}
- set .@playtime, checkquest(4229,PLAYTIME);
- if (.@playtime == -1) {
+ .@playtime = questprogress(4229,PLAYTIME);
+ if (!.@playtime) {
// fall through
- } else if (.@playtime == 0 || .@playtime == 1) {
+ } else if (.@playtime == 1) {
mes "[Guard]";
mes "Buwaya is still hiding.";
mes "Even if you enter now, Buwaya will not come out.";
diff --git a/npc/re/instances/HazyForest.txt b/npc/re/instances/HazyForest.txt
index 0c32c73c6..0467f612b 100644
--- a/npc/re/instances/HazyForest.txt
+++ b/npc/re/instances/HazyForest.txt
@@ -32,9 +32,9 @@ bif_fild01,158,340,5 script Laphine Soldier#mist 4_M_FAIRYSOLDIER,{
mes "Why don't you at least organize a party?";
close;
}
- set .@playtime, checkquest(7211,PLAYTIME);
+ .@playtime = questprogress(7211,PLAYTIME);
if (getcharid(0) == getpartyleader(.@party_id,2)) {
- if (.@playtime == 0 || .@playtime == 1) {
+ if (.@playtime == 1) {
mes "[Laphine Soldier]";
mes "...Are you sure you're not doing too much?";
mes "I think you'd better get some rest.";
@@ -89,7 +89,7 @@ bif_fild01,158,340,5 script Laphine Soldier#mist 4_M_FAIRYSOLDIER,{
mes "Hmm...";
next;
mes "[Laphine Soldier]";
- if (.@playtime == -1)
+ if (!.@playtime)
mes "It's dangerous in the forest.";
else
mes "The atmosphere is somewhat tense in the forest.";
@@ -117,7 +117,7 @@ bif_fild01,158,340,5 script Laphine Soldier#mist 4_M_FAIRYSOLDIER,{
case 2:
mes "[Laphine Soldier]";
mes "Well, you've made the right decision.";
- if (.@playtime == -1)
+ if (!.@playtime)
mes "That's what's good for you.";
close;
}
@@ -147,9 +147,8 @@ bif_fild01,161,355,0 script Log Tunnel CLEAR_NPC,{
next;
if(select("Enter the tunnel.:Give up.") == 2)
close;
- set .@playtime, checkquest(7211,PLAYTIME);
if (has_instance("1@mist") == "") {
- if (.@playtime == 0 || .@playtime == 1) {
+ if (questprogress(7211,PLAYTIME) == 1) {
mes "You try to crawl into the log, but some mysterious power pushes you back with a gush of wind.";
mes "It seems like you can't force your way into the forest.";
close;
@@ -158,8 +157,8 @@ bif_fild01,161,355,0 script Log Tunnel CLEAR_NPC,{
mes "Your instinct is screaming that this forest is dangerous.";
close;
} else {
- if (checkquest(7211,PLAYTIME) == 2) erasequest 7211;
- if (checkquest(7211,PLAYTIME) == -1) setquest 7211;
+ if (questprogress(7211,PLAYTIME) == 2) erasequest 7211;
+ if (!questprogress(7211,PLAYTIME)) setquest 7211;
mapannounce "bif_fild01",getpartyname(getcharid(1))+" party's "+strcharinfo(0)+" member is entering the Mistwood Maze.",bc_map,"0x00ff99"; //FW_NORMAL 12 0 0
warp "1@mist",89,29;
close;
@@ -1025,7 +1024,7 @@ bif_fild01,38,374,0 script Mysterious Flower#ep14_1 CLEAR_NPC,{
1@mist,109,70,0 script a1_a2 WARPNPC,1,1,{
end;
OnTouch:
- if (checkquest(7211,PLAYTIME) == -1)
+ if (!questprogress(7211,PLAYTIME))
setquest 7211;
warp instance_mapname("1@mist"),116,40;
end;
diff --git a/npc/re/instances/MalangdoCulvert.txt b/npc/re/instances/MalangdoCulvert.txt
index f209f409b..ef2af8512 100644
--- a/npc/re/instances/MalangdoCulvert.txt
+++ b/npc/re/instances/MalangdoCulvert.txt
@@ -44,7 +44,7 @@ mal_in01,172,28,2 script Albo#mal 4_CAT_SAILOR5,{
"General Culvert Weekly Service","^990000Hard Culvert Weekly Service^000000";
set .@menu$,"Why are doing this job?:";
for(set .@i,0; .@i<4; set .@i,.@i+1) {
- if (checkquest(.@quests[.@i],PLAYTIME) > -1) {
+ if (questprogress(.@quests[.@i],PLAYTIME)) {
set .@status[.@i],2;
set .@menu$, .@menu$+"^aaaaaa- There is no new task -^000000:";
} else if (.@i%2 && BaseLevel < 140) {
@@ -192,7 +192,7 @@ mal_in01,172,26,2 script Madeca#mal 4_CAT_SAILOR1,{
specialeffect2 EF_STEAL;
switch(.@i) {
case 1: // General Culvert Daily Service
- if (checkquest(12271,PLAYTIME) == 2)
+ if (questprogress(12271,PLAYTIME) == 2)
callsub L_EraseQuest,12255,12256,12257,12258,12259,12260,12271;
else {
// Reward: 2x B Grade Coin
@@ -205,7 +205,7 @@ mal_in01,172,26,2 script Madeca#mal 4_CAT_SAILOR1,{
}
break;
case 2: // Hard Culvert Daily Service
- if (checkquest(12272,PLAYTIME) == 2)
+ if (questprogress(12272,PLAYTIME) == 2)
callsub L_EraseQuest,12261,12262,12263,12264,12265,12266,12272;
else {
// Reward: 1x A Grade Coin
@@ -218,7 +218,7 @@ mal_in01,172,26,2 script Madeca#mal 4_CAT_SAILOR1,{
}
break;
case 3: // General Culvert Weekly Service
- if (checkquest(12273,PLAYTIME) == 2)
+ if (questprogress(12273,PLAYTIME) == 2)
callsub L_EraseQuest,12267,12268,12273;
else {
// Reward: 1x Sea God's Wrath
@@ -227,7 +227,7 @@ mal_in01,172,26,2 script Madeca#mal 4_CAT_SAILOR1,{
}
break;
case 4: // Hard Culvert Weekly Service
- if (checkquest(12274,PLAYTIME) == 2)
+ if (questprogress(12274,PLAYTIME) == 2)
callsub L_EraseQuest,12269,12270,12274;
else {
// Reward: 5x Sea God's Wrath
@@ -246,7 +246,7 @@ mal_in01,172,26,2 script Madeca#mal 4_CAT_SAILOR1,{
L_EraseQuest:
for(set .@j,0; .@j<getargcount(); set .@j,.@j+1) {
- if (checkquest(getarg(.@j)) > -1)
+ if (questprogress(getarg(.@j)))
erasequest getarg(.@j);
}
mes "[Madeca]";
@@ -255,7 +255,7 @@ L_EraseQuest:
// callsub L_CheckQuest,<quest ID>,<monster>,<reward item ID>,<reward item amount>;
L_CheckQuest:
- if (checkquest(getarg(0),HUNTING) == 2) {
+ if (questprogress(getarg(0),HUNTING) == 2) {
mes "[Madeca]";
mes "You've punished ^0000ff"+getarg(1)+"^000000!";
mes "Here's your pay!";
@@ -392,8 +392,8 @@ mal_in01,160,34,4 script Missing, the Cleaner 4_CAT_SAILOR2,{
mes "of the party and come back.^000000";
close;
}
- set .@playtime, checkquest(12254,PLAYTIME);
- if (.@playtime == -1) {
+ .@playtime = questprogress(12254,PLAYTIME);
+ if (!.@playtime) {
if (getcharid(0) == getpartyleader(.@party_id,2)) {
mes "[Missing, the Cleaner]";
mes "Ummm? What's up? Tell me the password if you're the leader!";
@@ -430,7 +430,7 @@ mal_in01,160,34,4 script Missing, the Cleaner 4_CAT_SAILOR2,{
if(select("Enter Culvert:Cancel") == 2)
end;
callsub L_Enter,1;
- } else if (.@playtime == 0 || .@playtime == 1) {
+ } else if (.@playtime == 1) {
mes "You can enter the Culvert if the gate is open.";
next;
if(select("Enter Culvert:Cancel") == 2)
@@ -444,7 +444,7 @@ mal_in01,160,34,4 script Missing, the Cleaner 4_CAT_SAILOR2,{
end;
L_Enter:
if (has_instance("1@pump") == "") {
- if (checkquest(12254,PLAYTIME) == 0 || checkquest(12254,PLAYTIME) == 1) {
+ if (questprogress(12254,PLAYTIME) == 1) {
mes "The gate to the Culvert is still closed.";
mes "You must wait until you are able to enter or find a party leader who can create the instance.";
close;
@@ -454,7 +454,7 @@ L_Enter:
close;
}
mapannounce "mal_in01", strcharinfo(0)+" of the party "+getpartyname(.@party_id)+" is entering the Culvert.",bc_map,"0x00ff99";
- if (checkquest(12254) == -1) setquest 12254;
+ if (!questprogress(12254)) setquest 12254;
warp "1@pump",63,98;
end;
}
diff --git a/npc/re/instances/OctopusCave.txt b/npc/re/instances/OctopusCave.txt
index 43c2ac66f..cbf45e5f1 100644
--- a/npc/re/instances/OctopusCave.txt
+++ b/npc/re/instances/OctopusCave.txt
@@ -76,8 +76,8 @@ mal_dun01,151,235,5 script Starfish 4_ASTER,{
next;
break;
case 2:
- set .@playtime, checkquest(4197,PLAYTIME);
- if (.@playtime == 0 || .@playtime == 1) {
+ .@playtime = questprogress(4197,PLAYTIME);
+ if (.@playtime == 1) {
mes "[Starfish]";
mes "Octopus is not around now, hehe.";
mes "Please come back later.";
@@ -130,7 +130,7 @@ mal_dun01,153,237,5 script Weird Entrance CLEAR_NPC,{
case 1:
if (countitem(6442)) {
if (has_instance("1@cash") == "") {
- if (checkquest(4197,PLAYTIME) == 0 || checkquest(4197,PLAYTIME) == 1) {
+ if (questprogress(4197,PLAYTIME) == 1) {
mes "[Starfish]";
mes "Ah, now is not the time...";
mes "Would you come back later? Hehe.";
@@ -143,7 +143,7 @@ mal_dun01,153,237,5 script Weird Entrance CLEAR_NPC,{
close;
}
mapannounce "mal_dun01", getpartyname(getcharid(1))+" party's "+strcharinfo(0)+" member started to hunt the Octopus!",bc_map,"0x00ff99";
- if (checkquest(4197) == -1) setquest 4197;
+ if (!questprogress(4197)) setquest 4197;
warp "1@cash",199,99;
end;
}
diff --git a/npc/re/instances/OldGlastHeim.txt b/npc/re/instances/OldGlastHeim.txt
index 4be3133bc..48f2d6493 100644
--- a/npc/re/instances/OldGlastHeim.txt
+++ b/npc/re/instances/OldGlastHeim.txt
@@ -20,8 +20,8 @@ glast_01,204,273,6 script Hugin#ghinstance 4_M_SAGE_C,{
mes "[Hugin]";
mes "Huh? You feel like you have seen me in different places? I see. What can I say?";
next;
- set .@ghins_time, checkquest(12317,PLAYTIME);
- if (.@ghins_time == -1) {
+ .@ghins_time = questprogress(12317,PLAYTIME);
+ if (!.@ghins_time) {
set .@party_id,getcharid(1);
set .@p_name$,getpartyname(.@party_id);
@@ -72,7 +72,7 @@ glast_01,204,273,6 script Hugin#ghinstance 4_M_SAGE_C,{
case 3:
close;
}
- } else if (.@ghins_time == 0 || .@ghins_time == 1) {
+ } else if (.@ghins_time == 1) {
mes "[Hugin]";
mes "Oh, geez.";
mes "Your body is still under the effects of time travel. In this state, you will not be able to travel again.";
@@ -83,8 +83,8 @@ glast_01,204,273,6 script Hugin#ghinstance 4_M_SAGE_C,{
} else {
mes "^0000ffOld Glast Heim access trail has been cleared. It is now possible to talk to Hugin.^000000";
erasequest 12317;
- if (checkquest(12318) > -1) erasequest 12318;
- if (checkquest(12319) > -1) erasequest 12319;
+ if (questprogress(12318)) erasequest 12318;
+ if (questprogress(12319)) erasequest 12319;
close;
}
}
@@ -1259,8 +1259,8 @@ OnTalk6:
}
1@gl_k,156,259,3 script Varmunt#ghinstance3 4_M_BARMUND,{
- if (checkquest(12318,HUNTING) == 2) {
- if (checkquest(12319,HUNTING) == -1) {
+ if (questprogress(12318,HUNTING) == 2) {
+ if (!questprogress(12319,HUNTING)) {
mes "[Varmunt]";
mes "There's something unusual about this thing's aura. Maybe someday we will be able to understand what is behind all of this.";
cutin "gl_barmund1",2;
@@ -1998,7 +1998,7 @@ OnTimer80000:
}
2@gl_k,158,241,1 script Hugin#ghinstance1 4_M_SAGE_C,{
- if (checkquest(12319,HUNTING) == 2) {
+ if (questprogress(12319,HUNTING) == 2) {
mes "[Hugin]";
mes "Well, you are pretty ridiculous. Beginners shouldn't get the loot Amdarias drops.";
erasequest 12318;
diff --git a/npc/re/instances/WolfchevLaboratory.txt b/npc/re/instances/WolfchevLaboratory.txt
index dc625dca1..dcf726ed3 100644
--- a/npc/re/instances/WolfchevLaboratory.txt
+++ b/npc/re/instances/WolfchevLaboratory.txt
@@ -1690,10 +1690,9 @@ lhz_dun04,151,276,3 script Researcher#memo 4_LGTSCIENCE,{
mes "^FF0000You cannot continue the process due to possessing too many belongings.^000000";
close;
}
- .@quest_time = checkquest(5112, PLAYTIME);
.@killed_bosses = true;
for(.@quest_id = 5113; .@quest_id <= 5125; .@quest_id++) {
- if(checkquest(.@quest_id, HUNTING) <= 1)
+ if(questprogress(.@quest_id, HUNTING) != 2)
.@killed_bosses = false;
}
if (lght_duk01 < 6) {
@@ -1780,14 +1779,15 @@ lhz_dun04,151,276,3 script Researcher#memo 4_LGTSCIENCE,{
mes "And just so you know, please do not touch random things out of curiosity. I don't want you to get hurt.";
close;
case 2:
- if (.@quest_time == 0) {
+ .@quest_time = questprogress(5112, PLAYTIME);
+ if (!.@quest_time) {
mes "[Wolfchev]";
mes "I'm sorry, but it seems you still cannot enter to the laboratory yet. Will you come back later? The system is kind of tricky you know.";
close;
} else {
//if (.@quest_time == 2)
//recall_completequest 5112;
- if (.@quest_time >= 0)
+ if (.@quest_time)
erasequest 5112;
if (!.@killed_bosses) {
if (lght_duk01 == 9) {
@@ -1908,13 +1908,13 @@ lhz_dun04,147,279,0 script Laboratory Entrance#memo CLEAR_NPC,{
mes "^FF0000You cannot continue the process due to possessing too many belongings.^000000";
close;
}
- .@lhz_time = checkquest(5112, PLAYTIME);
+ .@lhz_time = questprogress(5112, PLAYTIME);
if (lght_duk01 < 7) {
mes "It says,";
mes "'^0000FF****'s laboratory member only^000000'";
close;
}
- if (.@lhz_time == -1) {
+ if (!.@lhz_time) {
mes "This is an entrance towards Wolfchev's laboratory. Something is howling over the entrance.";
next;
if(select("Go inside", "Think one more time") == 2) {
@@ -1938,7 +1938,7 @@ lhz_dun04,147,279,0 script Laboratory Entrance#memo CLEAR_NPC,{
warp "1@lhz.gat", 45, 148;
close;
}
- } else if (.@lhz_time == 0) {
+ } else if (.@lhz_time == 1) {
mes "Di Rit- Di- Di- Dit-";
next;
mes ""+ strcharinfo(PC_NAME) +". . .";
@@ -1946,7 +1946,7 @@ lhz_dun04,147,279,0 script Laboratory Entrance#memo CLEAR_NPC,{
next;
mes "The system denied your entrance.";
close;
- } else if (.@lhz_time >= 1) {
+ } else if (.@lhz_time == 2) {
mes "Di Rit- Di- Di- Dit-";
next;
//if (.@lhz_time == 2)
@@ -3113,7 +3113,7 @@ lhz_dun04,147,279,0 script Laboratory Entrance#memo CLEAR_NPC,{
}
.@all_quests_complete = true;
for(.@i = 5113; .@i <= 5125; .@i++) {
- if(checkquest(.@i, HUNTING) != 2)
+ if(questprogress(.@i, HUNTING) != 2)
.@all_quests_complete = false;
}
if (.@all_quests_complete) {
diff --git a/npc/re/jobs/3-1/archbishop.txt b/npc/re/jobs/3-1/archbishop.txt
index 26782eb94..2daf9d7b5 100644
--- a/npc/re/jobs/3-1/archbishop.txt
+++ b/npc/re/jobs/3-1/archbishop.txt
@@ -1188,7 +1188,7 @@ OnTouch:
mes "- and come for the challenge again. -";
close;
}
- if (ismounting()) {
+ if (hascashmount()) {
mes "You are on a riding pet,";
mes "so you cannot change your job.";
mes "Please unequip your riding pet and try again!";
diff --git a/npc/re/jobs/3-1/guillotine_cross.txt b/npc/re/jobs/3-1/guillotine_cross.txt
index df51c3496..63d1b6106 100644
--- a/npc/re/jobs/3-1/guillotine_cross.txt
+++ b/npc/re/jobs/3-1/guillotine_cross.txt
@@ -156,13 +156,13 @@ function script func_3rdgc {
mes .@n$;
mes "Let me collect all the information...";
set .@i,0;
- if (checkquest(7112) == 1) { mes "Madelle saw a person who looked like a priest from Rachel late at night."; set .@i,.@i+1; }
- if (checkquest(7113) == 1) { mes "Crave said that there was a girl who bought lots of things day and night."; set .@i,.@i+1; }
- if (checkquest(7114) == 1) { mes "Trovan said that there was a guy who could be seen often but is not a hotel guest, so he is suspicious."; set .@i,.@i+1; }
+ if (questprogress(7112) == 1) { mes "Madelle saw a person who looked like a priest from Rachel late at night."; set .@i,.@i+1; }
+ if (questprogress(7113) == 1) { mes "Crave said that there was a girl who bought lots of things day and night."; set .@i,.@i+1; }
+ if (questprogress(7114) == 1) { mes "Trovan said that there was a guy who could be seen often but is not a hotel guest, so he is suspicious."; set .@i,.@i+1; }
if (!getarg(0)) {
set .@i,.@i-2;
- if (checkquest(7115) == 1) { mes "A peddler wears shabby clothes, but she buys fresh and expensive things every single day."; set .@i,.@i+1; }
- if (checkquest(7116) == 1) { mes "The old man in village said that there was a girl who showed up in same place at the same time, so maybe moved here."; set .@i,.@i+1; }
+ if (questprogress(7115) == 1) { mes "A peddler wears shabby clothes, but she buys fresh and expensive things every single day."; set .@i,.@i+1; }
+ if (questprogress(7116) == 1) { mes "The old man in village said that there was a girl who showed up in same place at the same time, so maybe moved here."; set .@i,.@i+1; }
}
next;
if (.@i == 3) {
@@ -398,7 +398,7 @@ job3_guil01,82,95,3 script Daora#3rdgc02 4_F_DESERT,{
set job_3rd_gc, 6;
close;
} else if (job_3rd_gc == 6) {
- if (checkquest(7091) == 1) {
+ if (questprogress(7091) == 1) {
mes "You hope that there will be something in the glass?";
mes "Information can't come out of empty glasses.";
close;
@@ -453,7 +453,8 @@ job3_guil01,82,95,3 script Daora#3rdgc02 4_F_DESERT,{
next;
switch(select("Figure out based on information.:Stop the stage.")) {
case 1:
- if (checkquest(7091) == 1) set .@j,1;
+ if (questprogress(7091) == 1)
+ .@j = 1;
callfunc "func_3rdgc",.@j;
close;
case 2:
@@ -461,7 +462,7 @@ job3_guil01,82,95,3 script Daora#3rdgc02 4_F_DESERT,{
close;
}
} else if (job_3rd_gc == 8) {
- if (checkquest(7092) == 1) {
+ if (questprogress(7092) == 1) {
mes "Wait in an alley where she usually shows up to find her, and you will be able to pursue the question.";
next;
mes "[Daora]";
@@ -531,7 +532,7 @@ job3_guil01,82,95,3 script Daora#3rdgc02 4_F_DESERT,{
close;
}
} else if (job_3rd_gc == 9) {
- if (checkquest(7093) == 1) {
+ if (questprogress(7093) == 1) {
mes "So, go to the east of village, you can see a narrow alley directed to the north.";
next;
mes "[Daora]";
@@ -575,7 +576,7 @@ job3_guil01,82,95,3 script Daora#3rdgc02 4_F_DESERT,{
mes "I sent a girl named Estillda to her home.";
mes "Why do we handle worthless things like it?";
next;
- if (checkquest(7094) == 1) {
+ if (questprogress(7094) == 1) {
mes "[Daora]";
mes "I'm not sure if he still lives...";
mes "Anyway, he is a key artisan in Rachel,";
@@ -639,7 +640,7 @@ job3_guil01,82,95,3 script Daora#3rdgc02 4_F_DESERT,{
close;
}
} else if (job_3rd_gc == 15) {
- if (checkquest(7095) == 1) {
+ if (questprogress(7095) == 1) {
mes "The field northwest of Veins.";
mes "You can find that easily with a map.";
mes "There are lots of wolves, so be careful.";
@@ -957,9 +958,11 @@ job3_guil01,16,20,4 script Mayshell#3rdgc03 4_F_KHELLISIA,{
mes "At least you came back alive.";
}
next;
- set .@all_wine,0;
- for(set .@i,0; .@i<5; set .@i,.@i+1)
- if (checkquest(7091+.@i) == 1) set .@all_wine, .@all_wine+1;
+ .@all_wine = 0;
+ for(.@i = 0; .@i < 5; ++.@i)
+ if (questprogress(7091+.@i) == 1) {
+ ++.@all_wine;
+ }
mes "[Mayshell]";
if (.@all_wine < 2) {
mes "You did the job by yourself";
@@ -1037,13 +1040,13 @@ job3_guil01,16,20,4 script Mayshell#3rdgc03 4_F_KHELLISIA,{
erasequest 7091;
erasequest 7092;
erasequest 7093;
- if (checkquest(7094) > -1) erasequest 7094;
- if (checkquest(7095) > -1) erasequest 7095;
+ if (questprogress(7094)) erasequest 7094;
+ if (questprogress(7095)) erasequest 7095;
erasequest 7112;
erasequest 7113;
erasequest 7114;
- if (checkquest(7115) > -1) erasequest 7115;
- if (checkquest(7116) > -1) erasequest 7116;
+ if (questprogress(7115)) erasequest 7115;
+ if (questprogress(7116)) erasequest 7116;
changequest 7111,.@quest;
next;
mes "[Mayshell]";
@@ -1104,8 +1107,8 @@ ve_in,228,108,3 script Waitress#3rdgc04 1_F_PUBGIRL,{
mes "Visit and take a rest~";
close;
} else if (job_3rd_gc == 6) {
- if (checkquest(7091) == 1) {
- if (checkquest(7112) == 1) {
+ if (questprogress(7091) == 1) {
+ if (questprogress(7112) == 1) {
mes "That's all the information that I know.";
mes "After that, I can't remember anything else.";
next;
@@ -1194,7 +1197,7 @@ ve_in,228,108,3 script Waitress#3rdgc04 1_F_PUBGIRL,{
}
}
} else {
- if (checkquest(7112) == 1) {
+ if (questprogress(7112) == 1) {
mes "That's all the information that I know.";
mes "I haven't seen them since.";
next;
@@ -1338,8 +1341,8 @@ ve_in,246,303,3 script Young Merchant#3rdgc05 4_M_RACHMAN2,{
close;
}
else if (job_3rd_gc == 6) {
- if (checkquest(7091) == 1) {
- if (checkquest(7113) == 1) {
+ if (questprogress(7091) == 1) {
+ if (questprogress(7113) == 1) {
mes "[Crave]";
mes "I already gave you all the information I have.";
mes "I'm quick in visual learning.";
@@ -1413,7 +1416,7 @@ ve_in,246,303,3 script Young Merchant#3rdgc05 4_M_RACHMAN2,{
}
}
} else {
- if (checkquest(7113) == 1) {
+ if (questprogress(7113) == 1) {
mes "[Crave]";
mes "I already gave you all the information I have.";
mes "I'm quick in visual learning.";
@@ -1534,8 +1537,8 @@ veins,291,215,3 script Vigilante#3rdgc06 4_DST_SOLDIER,{
close;
}
else if (job_3rd_gc == 6) {
- if (checkquest(7091) == 1) {
- if (checkquest(7114) == 1) {
+ if (questprogress(7091) == 1) {
+ if (questprogress(7114) == 1) {
mes "[Trovan]";
mes "I already gave you all the information I have.";
mes "He's the only suspicious person that's been seen.";
@@ -1616,7 +1619,7 @@ veins,291,215,3 script Vigilante#3rdgc06 4_DST_SOLDIER,{
}
}
} else {
- if (checkquest(7114) == 1) {
+ if (questprogress(7114) == 1) {
mes "[Trovan]";
mes "I already gave you all the information I have.";
mes "He's the only suspicious person that's been seen.";
@@ -1698,12 +1701,12 @@ veins,187,143,5 script Peddler#3rdgc07 4_F_HUGRANMA,{
close;
}
else if (job_3rd_gc == 6) {
- if (checkquest(7091) == 1) {
+ if (questprogress(7091) == 1) {
mes "What a huge sandstorm.";
mes "Are you ok?";
close;
} else {
- if (checkquest(7115) == 1) {
+ if (questprogress(7115) == 1) {
mes "So, did you find that girl?";
mes "If you do, let her know that she has to come and visit me.";
next;
@@ -1799,11 +1802,11 @@ veins,235,126,3 script Old Man#3rdgc07 4_M_DST_GRAND,{
mes "Haha... I can remember my past when I see a young adventurer like you...";
close2;
} else if (job_3rd_gc == 6) {
- if (checkquest(7091) == 1) {
+ if (questprogress(7091) == 1) {
mes "Haha... I can remember my past when I see a young adventurer like you...";
close;
} else {
- if (checkquest(7116) == 1) {
+ if (questprogress(7116) == 1) {
mes "Thanks for talking to me.";
next;
mes "- I can't get anymore information from the Old Man. What information have I collected? -";
@@ -2075,12 +2078,12 @@ veins,337,284,0 script #ghostestilla_3rdgc HIDDEN_WARP_NPC,3,3,{
end;
OnTouch:
if (job_3rd_gc == 9) {
- if ((checkquest(7104,PLAYTIME) == 1) || (checkquest(7105,PLAYTIME) == 1)) {
+ if ((questprogress(7104,PLAYTIME) == 1) || (questprogress(7105,PLAYTIME) == 1)) {
mes ".....?";
mes "There's a sign of somebody present.";
mes "You still have time.";
close;
- } else if ((checkquest(7104,PLAYTIME) == 2) || (checkquest(7105,PLAYTIME) == 2)) {
+ } else if ((questprogress(7104,PLAYTIME) == 2) || (questprogress(7105,PLAYTIME) == 2)) {
mes "The blind alley that Melissa told me about must be this street.";
next;
mes "There's a sign of somebody present.";
@@ -2158,8 +2161,8 @@ OnTouch:
next;
mes "- I demand that she walks as usual and tell her how to get to Daora's pub. -";
donpcevent "Estillda#3rdgc10::OnDisable";
- if (checkquest(7104) > -1) erasequest 7104;
- if (checkquest(7105) > -1) erasequest 7105;
+ if (questprogress(7104)) erasequest 7104;
+ if (questprogress(7105)) erasequest 7105;
set job_3rd_gc, 10;
setquest 7106;
next;
@@ -2168,8 +2171,8 @@ OnTouch:
} else {
mes "- I tried to take her by the wrist, but she already knew and ran away screaming. -";
donpcevent "Estillda#3rdgc10::OnDisable";
- if (checkquest(7104) > -1) erasequest 7104;
- if (checkquest(7105) > -1) erasequest 7105;
+ if (questprogress(7104)) erasequest 7104;
+ if (questprogress(7105)) erasequest 7105;
setquest 7105;
next;
mes "You couldn't catch Estillda.";
@@ -2320,7 +2323,7 @@ OnInit:
end;
OnTouch:
if (job_3rd_gc == 12) {
- if (checkquest(7107,PLAYTIME) == 2) {
+ if (questprogress(7107,PLAYTIME) == 2) {
mes "This must be the place Estillda told me about.";
next;
switch(select("Go inside.:Observe the situation.")) {
@@ -2339,7 +2342,7 @@ OnTouch:
mes "I back up to watch the situation unfold.";
close;
}
- } else if (checkquest(7107,PLAYTIME) == 1) {
+ } else if (questprogress(7107,PLAYTIME) == 1) {
mes "This must be the place Estillda told me about.";
mes "I have enough time for meeting.";
close;
@@ -3540,12 +3543,12 @@ OnTimer61500:
job3_guil03,146,70,3 script Renzak#3rdgc16 4_F_GUILLOTINE,{
mes "[Renzak]";
- if (checkquest(7110,HUNTING) == 2) {
+ if (questprogress(7110,HUNTING) == 2) {
mes "My peers will come here to settle this affair.";
mes "Go to Mayshell for the report.";
next;
mes "[Renzak]";
- if (checkquest(7110,PLAYTIME) == 1) {
+ if (questprogress(7110,PLAYTIME) == 1) {
mes "You finished quickly.";
mes "Good job.";
set job_3rd_gc, 18;
@@ -3624,7 +3627,7 @@ job3_guil01,148,53,3 script Bercasell#3rdgc16 4_M_GUILLOTINE,{
switch(select("Yes, change my job.:I need to rethink it.")) {
case 1:
mes "[Bercasell]";
- if (ismounting()) {
+ if (hascashmount()) {
mes "I cannot perform the job change.";
mes "Please remove your mount and try again.";
close;
@@ -3653,16 +3656,16 @@ job3_guil01,148,53,3 script Bercasell#3rdgc16 4_M_GUILLOTINE,{
mes "A sword of the shadow...";
setlook 7,0;
jobchange roclass(eaclass()|EAJL_THIRD);
- if (checkquest(7096) == 1) {
+ if (questprogress(7096) == 1) {
set job_3rd_gc, 25;
erasequest 7096;
- } else if (checkquest(7097) == 1) {
+ } else if (questprogress(7097) == 1) {
set job_3rd_gc, 26;
erasequest 7097;
- } else if (checkquest(7098) == 1) {
+ } else if (questprogress(7098) == 1) {
set job_3rd_gc, 27;
erasequest 7098;
- } else if (checkquest(7099) == 1) {
+ } else if (questprogress(7099) == 1) {
set job_3rd_gc, 28;
erasequest 7099;
}
diff --git a/npc/re/jobs/3-1/mechanic.txt b/npc/re/jobs/3-1/mechanic.txt
index e34fccc72..73e74983c 100644
--- a/npc/re/jobs/3-1/mechanic.txt
+++ b/npc/re/jobs/3-1/mechanic.txt
@@ -30,7 +30,7 @@ yuno,129,156,3 script Chainheart 4_M_DOCTOR,{
close;
} else if (job__mechanic == 11) {
if (BaseJob == Job_Blacksmith && BaseLevel > 98 && JobLevel > 49 && SkillPoint == 0) {
- if (ismounting()) {
+ if (hascashmount()) {
mes "You are on a riding pet,";
mes "so you cannot change your job.";
mes "Please unequip your riding pet and try again!";
diff --git a/npc/re/jobs/3-1/ranger.txt b/npc/re/jobs/3-1/ranger.txt
index 0b52df91f..6c86be78b 100644
--- a/npc/re/jobs/3-1/ranger.txt
+++ b/npc/re/jobs/3-1/ranger.txt
@@ -384,7 +384,7 @@ tur_dun01,91,169,3 script Test Instructor#jr02 4_M_JOB_HUNTER,{
changequest 8256,8257;
close;
} else if (job_ranger01 == 4) {
- if (checkquest(8257,HUNTING) == 2) {
+ if (questprogress(8257,HUNTING) == 2) {
if (countitem(7064) > 0) {
mes "Oh! Oh! Woooooow!";
mes "You've brought it! Let me see...";
@@ -549,9 +549,10 @@ tur_dun01,91,169,3 script Test Instructor#jr02 4_M_JOB_HUNTER,{
mes "Okay. I'll respect your opinion.";
mes "I'll cancel the job change request from "+strcharinfo(0)+".";
delitem 1703,1; //Bow__
- set job_ranger01,0;
- for(set .@i,8254; .@i<=8262; set .@i,.@i+1)
- if (checkquest(.@i) > -1) erasequest .@i;
+ job_ranger01 = 0;
+ for(.@i = 8254; .@i <= 8262; ++.@i)
+ if (questprogress(.@i))
+ erasequest .@i;
close;
}
mes "[Test Instructor, Teardrop]";
@@ -710,9 +711,10 @@ job3_rang01,30,44,3 script Test Waiting Room#jr_03 4_M_ORIENT01,{
mes "Okay. I'll respect your opinion.";
mes "I'll cancel the job change request from "+strcharinfo(0)+".";
delitem 1703,1; //Bow__
- set job_ranger01,0;
- for(set .@i,8254; .@i<=8262; set .@i,.@i+1)
- if (checkquest(.@i) > -1) erasequest .@i;
+ job_ranger01 = 0;
+ for(.@i = 8254; .@i <= 8262; ++.@i)
+ if (questprogress(.@i))
+ erasequest .@i;
close;
close2;
warp "alberta",117,57;
@@ -1450,7 +1452,7 @@ OnTimer130000:
job3_rang02,251,49,3 script Test Supervisor#jr_13 4_M_JOB_HUNTER,{
mes "[Test Supervisor, Freeze]";
if (job_ranger01 == 6) {
- if (checkquest(8261) == -1) {
+ if (!questprogress(8261)) {
mes "Congrats for passing the 2nd practical test! I am the 3rd practical test supervisor Freeze!";
next;
mes "[Test Supervisor, Freeze]";
@@ -1692,7 +1694,7 @@ job3_rang01,90,43,3 script Ranger Master#jr_29 4_M_REIDIN_KURS,{
close;
}
mes "[Ranger Master, Neveragain]";
- if (ismounting()) {
+ if (hascashmount()) {
mes "You are on a riding pet,";
mes "so you cannot change your job.";
mes "Please unequip your riding pet and try again!";
@@ -1705,9 +1707,10 @@ job3_rang01,90,43,3 script Ranger Master#jr_29 4_M_REIDIN_KURS,{
mes "[Ranger Master, Neveragain]";
mes "What are you doing here?";
mes "You are not supposed to be here. Get out!";
- set job_ranger01,0;
- for(set .@i,8254; .@i<=8262; set .@i,.@i+1)
- if (checkquest(.@i) > -1) erasequest .@i;
+ job_ranger01 = 0;
+ for(.@i = 8254; .@i <= 8262; ++.@i)
+ if (questprogress(.@i))
+ erasequest .@i;
close2;
warp "alberta",117,57;
end;
diff --git a/npc/re/jobs/3-1/rune_knight.txt b/npc/re/jobs/3-1/rune_knight.txt
index ffb395e07..7c38c7c25 100644
--- a/npc/re/jobs/3-1/rune_knight.txt
+++ b/npc/re/jobs/3-1/rune_knight.txt
@@ -518,7 +518,7 @@ job3_rune01,80,60,3 script Rune Knight Captain 4_M_KNIGHT_SILVER,2,2,{
mes "It seems not enough?";
close;
}
- if (ismounting()) {
+ if (hascashmount()) {
mes "[Captain Tigris]";
mes "Please unequip your mount and come back again.";
close;
@@ -622,7 +622,7 @@ job3_rune01,90,50,3 script Rune Knight Lunarea 4_M_KNIGHT_GOLD,2,2,{
next;
switch(select("Move to the test field now.:Please give me time to prepare.")) {
case 1:
- if (checkquest(3220,PLAYTIME) == 1) {
+ if (questprogress(3220,PLAYTIME) == 1) {
mes "[Rune Knight, Lunarea]";
mes "Once someone enters into the test field you cannot enter directly. The test is taken one by one.";
next;
@@ -664,7 +664,7 @@ L_Test:
set job_rune_edq,4;
changequest 3202,3203;
setquest 3220; // ?
- } else if (checkquest(3220) > -1) {
+ } else if (questprogress(3220)) {
erasequest 3220;
setquest 3220;
}
@@ -1346,7 +1346,7 @@ mid_camp,235,250,3 script Sage Serpeone 4_F_FAIRY,2,2,{
mes "[Sage Serpeone]";
mes "Is it so? Then let's check this out.";
next;
- if (checkquest(3209,HUNTING) == 2 && checkquest(3210,HUNTING) == 2 && checkquest(3211,HUNTING) == 2 && checkquest(3212,HUNTING) == 2) {
+ if (questprogress(3209,HUNTING) == 2 && questprogress(3210,HUNTING) == 2 && questprogress(3211,HUNTING) == 2 && questprogress(3212,HUNTING) == 2) {
mes "[Sage Serpeone]";
mes "Umm, this is great. Enough amount of living body magical energy has accumulated in your body.";
next;
@@ -1481,7 +1481,7 @@ job3_rune01,114,50,3 script Rune Knight Velpino 4_M_KNIGHT_BLACK,{
mes "For this test, only a one-hand weapon, a shield or a two-handed weapon can be equipped. Keep your other equipments with the Kafra Employee in the center.";
close;
}
- if (checkquest(3220,PLAYTIME) == 1) {
+ if (questprogress(3220,PLAYTIME) == 1) {
mes "[Rune Knight Velpino]";
mes "Haven't you failed at the test... If you fail once, you cannot enter again for 10 minutes.";
next;
@@ -1495,7 +1495,7 @@ job3_rune01,114,50,3 script Rune Knight Velpino 4_M_KNIGHT_BLACK,{
sc_start SC_INCINT,300000,40;
getitem 12389,30; //Runstone_Storm
getitem 12390,30; //Runstone_Millennium
- if (checkquest(3220) > -1) erasequest 3220;
+ if (questprogress(3220)) erasequest 3220;
setquest 3220;
warp "job3_rune02",38,40;
end;
diff --git a/npc/re/jobs/3-1/warlock.txt b/npc/re/jobs/3-1/warlock.txt
index 671340a03..973dc915f 100644
--- a/npc/re/jobs/3-1/warlock.txt
+++ b/npc/re/jobs/3-1/warlock.txt
@@ -672,7 +672,7 @@ spl_in02,80,108,5 script Guild Master#Warlock 4_F_FAIRY1,{
mes "Unless you like your current job, you should use all your skill points.";
close;
}
- if (ismounting()) {
+ if (hascashmount()) {
mes "You are on a riding pet,";
mes "so you cannot change your job.";
mes "Please unequip your riding pet and try again!";
diff --git a/npc/re/jobs/3-2/genetic.txt b/npc/re/jobs/3-2/genetic.txt
index 92b015bf4..caf2f428d 100644
--- a/npc/re/jobs/3-2/genetic.txt
+++ b/npc/re/jobs/3-2/genetic.txt
@@ -390,12 +390,12 @@ job3_gen01,25,58,3 script Devries#gen 4_LGTSCIENCE,{
mes "You can start from the beginning then?";
mes "Why are you asking me such things?";
set job_gen,7;
- if (checkquest(2209) == 1) erasequest 2209;
- if (checkquest(2210) == 1) erasequest 2210;
- if (checkquest(2211) == 1) erasequest 2211;
- if (checkquest(2212) == 1) erasequest 2212;
- if (checkquest(2213) == 1) erasequest 2213;
- if (checkquest(2214) == 1) erasequest 2214;
+ if (questprogress(2209) == 1) erasequest 2209;
+ if (questprogress(2210) == 1) erasequest 2210;
+ if (questprogress(2211) == 1) erasequest 2211;
+ if (questprogress(2212) == 1) erasequest 2212;
+ if (questprogress(2213) == 1) erasequest 2213;
+ if (questprogress(2214) == 1) erasequest 2214;
close;
}
} else if (job_gen == 60 || job_gen == 61) {
@@ -473,15 +473,15 @@ job3_gen01,25,58,3 script Devries#gen 4_LGTSCIENCE,{
set job_gen,7;
}
}
- if (checkquest(2209) == 1) erasequest 2209;
- if (checkquest(2210) == 1) erasequest 2210;
- if (checkquest(2211) == 1) erasequest 2211;
- if (checkquest(2212) == 1) erasequest 2212;
- if (checkquest(2213) == 1) erasequest 2213;
- if (checkquest(2214) == 1) erasequest 2214;
+ if (questprogress(2209) == 1) erasequest 2209;
+ if (questprogress(2210) == 1) erasequest 2210;
+ if (questprogress(2211) == 1) erasequest 2211;
+ if (questprogress(2212) == 1) erasequest 2212;
+ if (questprogress(2213) == 1) erasequest 2213;
+ if (questprogress(2214) == 1) erasequest 2214;
close;
} else if (job_gen > 61 && job_gen < 76) {
- if (checkquest(2223,HUNTING) == 2) {
+ if (questprogress(2223,HUNTING) == 2) {
mes "[Devries]";
mes "Oh, wait a second.";
mes "It seems that the mail's has arrived.";
@@ -546,7 +546,7 @@ job3_gen01,25,58,3 script Devries#gen 4_LGTSCIENCE,{
mes "<We hope that you yield good fruits in the future as well.>";
next;
mes "[Devries]";
- if (ismounting()) {
+ if (hascashmount()) {
mes "You are on a riding pet,";
mes "so you cannot change your job.";
mes "Please unequip your riding pet and try again!";
@@ -642,7 +642,7 @@ job3_gen01,12,56,3 script Plant Guide#generic HIDDEN_NPC,{
// QuestID,PlantName,Description{,Part?}
function script Genetic_Job_Plant {
if (job_gen == 7) {
- if (checkquest(getarg(0)) == -1 || checkquest(getarg(0)) == 0) {
+ if (!questprogress(getarg(0))) {
mes "- "+getarg(2)+" -";
next;
switch(select("Use it as a material.:Do not use.")) {
@@ -699,12 +699,8 @@ job3_gen01,7,50,3 script Testing Table#gen CLEAR_NPC,{
mes "- It's not the time to start an experiment. -";
close;
}
- if ((checkquest(2209) == -1 || checkquest(2209) == 0) &&
- (checkquest(2210) == -1 || checkquest(2210) == 0) &&
- (checkquest(2211) == -1 || checkquest(2211) == 0) &&
- (checkquest(2212) == -1 || checkquest(2212) == 0) &&
- (checkquest(2213) == -1 || checkquest(2213) == 0) &&
- (checkquest(2214) == -1 || checkquest(2214) == 0)) {
+ if (!questprogress(2209) && !questprogress(2210) && !questprogress(2211) && !questprogress(2212)
+ && !questprogress(2213) && !questprogress(2213) && !questprogress(2214)) {
mes "["+strcharinfo(0)+"]";
mes "Hmm, I need to gather plant materials first.";
close;
@@ -731,16 +727,14 @@ job3_gen01,7,50,3 script Testing Table#gen CLEAR_NPC,{
next;
mes "["+strcharinfo(0)+"]";
mes "Good. Now I can let Miss Devries take a look at this seed!";
- if ((checkquest(2209) == -1 || checkquest(2209) == 0) &&
- (checkquest(2210) == -1 || checkquest(2210) == 0) &&
- (checkquest(2211) == -1 || checkquest(2211) == 0)){
+ if (!questprogress(2209) && !questprogress(2210) && !questprogress(2211)) {
set job_gen,61;
getitem 6272,1; //Experiment_Seed
close;
}
- if (checkquest(2209) == 1) set job_gen,job_gen+10;
- if (checkquest(2210) == 1) set job_gen,job_gen+10;
- if (checkquest(2211) == 1) set job_gen,job_gen+10;
+ if (questprogress(2209) == 1) set job_gen,job_gen+10;
+ if (questprogress(2210) == 1) set job_gen,job_gen+10;
+ if (questprogress(2211) == 1) set job_gen,job_gen+10;
set .@score, job_gen + JobLevel - 20;
if (rand(1,100) < .@score) {
set job_gen,60;
@@ -756,12 +750,12 @@ job3_gen01,7,50,3 script Testing Table#gen CLEAR_NPC,{
set job_gen,7;
if (countitem(6273)) delitem 6273,1; //Altered_Seed
if (countitem(6272)) delitem 6272,1; //Experiment_Seed
- if (checkquest(2209) == 1) erasequest 2209;
- if (checkquest(2210) == 1) erasequest 2210;
- if (checkquest(2211) == 1) erasequest 2211;
- if (checkquest(2212) == 1) erasequest 2212;
- if (checkquest(2213) == 1) erasequest 2213;
- if (checkquest(2214) == 1) erasequest 2214;
+ if (questprogress(2209) == 1) erasequest 2209;
+ if (questprogress(2210) == 1) erasequest 2210;
+ if (questprogress(2211) == 1) erasequest 2211;
+ if (questprogress(2212) == 1) erasequest 2212;
+ if (questprogress(2213) == 1) erasequest 2213;
+ if (questprogress(2214) == 1) erasequest 2214;
close;
} else if (job_gen == 60 || job_gen == 61) {
mes " - It looks like I need to let Miss Devries take a look at this seed! -";
@@ -920,7 +914,7 @@ job3_gen01,91,48,3 script Demi Calberine#gen 4_F_SCIENCE,{
warp "job3_gen01",23,32;
end;
} else if (job_gen == 75) {
- if (checkquest(2223,HUNTING) == 2) {
+ if (questprogress(2223,HUNTING) == 2) {
mes "It seem Miss Devries found out that I put you in her spore pen.";
mes "It's funny when you look at her face. After you've killed all those spores.";
close;
@@ -1017,7 +1011,7 @@ OnTouch:
job3_gen01,24,32,0 script The gaze of Devries HIDDEN_WARP_NPC,2,2,{
OnTouch:
- if (checkquest(2223,HUNTING) == 2) {
+ if (questprogress(2223,HUNTING) == 2) {
mapannounce "job3_gen01","Devries: Whoa? Was there a lost kitty in the spore pen?",bc_map,"0x99CC00"; //FW_NORMAL 12 0 0
emotion e_omg,1;
warp "job3_gen01",21,38;
diff --git a/npc/re/jobs/3-2/minstrel.txt b/npc/re/jobs/3-2/minstrel.txt
index 1435b23fd..be017920e 100644
--- a/npc/re/jobs/3-2/minstrel.txt
+++ b/npc/re/jobs/3-2/minstrel.txt
@@ -954,7 +954,7 @@ yuno,143,170,6 script Mr. Click#job_min 4_M_ALCHE_A,{
lighthalzen,155,119,3 script Little girl#job_min 4_F_HUGIRL,3,3,{
OnTouch:
- if (checkquest(11145,HUNTING) == 2) {
+ if (questprogress(11145,HUNTING) == 2) {
if (job_min == 12) {
mes "[Little Girl]";
mes "Ah!!!!";
@@ -1839,7 +1839,7 @@ prt_in,94,172,4 script Karian#job_min3 4_M_MINSTREL1,{
mes "How did you degrade?";
close;
}
- if (ismounting()) {
+ if (hascashmount()) {
mes "Please unequip your riding pet and try again!";
close;
}
diff --git a/npc/re/jobs/3-2/royal_guard.txt b/npc/re/jobs/3-2/royal_guard.txt
index 82632ed36..bf569118d 100644
--- a/npc/re/jobs/3-2/royal_guard.txt
+++ b/npc/re/jobs/3-2/royal_guard.txt
@@ -340,7 +340,7 @@ glast_01,240,366,5 script Memory of King Schmidtz CLEAR_NPC,{
mes "- and please try again. -";
close;
}
- if (ismounting() || checkriding()) {
+ if (hascashmount() || checkriding()) {
mes " Please unequip your riding pet and try again!";
close;
}
diff --git a/npc/re/jobs/3-2/shadow_chaser.txt b/npc/re/jobs/3-2/shadow_chaser.txt
index 230d5b49c..fc95e1dc4 100644
--- a/npc/re/jobs/3-2/shadow_chaser.txt
+++ b/npc/re/jobs/3-2/shadow_chaser.txt
@@ -1358,7 +1358,7 @@ s_atelier,70,66,4 script Dumk#sc13_lgh 4_M_SHADOWCHASER,{
mes "- You can't continue on in this quest because you are overweight. -";
close;
}
- if (ismounting()) {
+ if (hascashmount()) {
mes "[Dumk]";
mes "Who is this guy? Why should he sit in front of me so high?";
mes "Although I do not know why you riding on it, but here is in door,";
@@ -1719,12 +1719,12 @@ tur_dun03,38,209,1 script Blue Flame#sc_f01 4_NFWISP,{
mes "They seem to be related.";
set job_sha,6;
setquest 7164;
- if (checkquest(7161) >= 0) erasequest 7161;
- if (checkquest(7162) >= 0) erasequest 7162;
- if (checkquest(7163) >= 0) erasequest 7163;
+ if (questprogress(7161)) erasequest 7161;
+ if (questprogress(7162)) erasequest 7162;
+ if (questprogress(7163)) erasequest 7163;
close;
} else if (job_sha == 6) {
- if (checkquest(7164,HUNTING) == 2) {
+ if (questprogress(7164,HUNTING) == 2) {
mes "It looks like the blue flame is under the limitation.";
mes "You can't feel that rolling effect of a spell like before.";
next;
@@ -1787,7 +1787,7 @@ ice_dun02,206,223,1 script Red Flame#sc_f02 4_NFWISP,{
setquest 7171;
close;
} else if (job_sha == 14 || job_sha == 15 || job_sha == 16) {
- if (checkquest(7171,HUNTING) == 2) {
+ if (questprogress(7171,HUNTING) == 2) {
mes "You can't feel the soul from the flame.";
mes "When you go closer, you can't see well because of darkness.";
close2;
@@ -1894,7 +1894,7 @@ niflheim,230,276,1 script Red Flame#sc_f03 4_NFWISP,{
setquest 7175;
close;
} else if (job_sha == 22) {
- if (checkquest(7175,HUNTING) == 2) {
+ if (questprogress(7175,HUNTING) == 2) {
mes "You can't feel the soul from the flame.";
mes "When you go closer, you can't see well because of darkness.";
set job_sha,23;
diff --git a/npc/re/jobs/3-2/sorcerer.txt b/npc/re/jobs/3-2/sorcerer.txt
index 05c568431..5108dbe49 100644
--- a/npc/re/jobs/3-2/sorcerer.txt
+++ b/npc/re/jobs/3-2/sorcerer.txt
@@ -351,7 +351,7 @@ gef_tower,113,161,5 script Karacas 4_M_SAGE_A,{
mes "You must have the etiquette of your job now before you accept the new job! ";
close;
}
- if (ismounting()) {
+ if (hascashmount()) {
mes "Good, before we get started...";
mes "Please unequip your riding pet~";
close;
diff --git a/npc/re/jobs/3-2/sura.txt b/npc/re/jobs/3-2/sura.txt
index 8bbc45cfe..787c42e7a 100644
--- a/npc/re/jobs/3-2/sura.txt
+++ b/npc/re/jobs/3-2/sura.txt
@@ -377,7 +377,7 @@ ve_in,98,159,0 script Fighter#job_shu 4_F_SURA,{
close;
}
} else if (job_shu == 3) {
- if (checkquest(11156,HUNTING) == 2) {
+ if (questprogress(11156,HUNTING) == 2) {
mes "[???]";
mes "Wow~";
mes "Did you really kill all those wolves?";
@@ -794,7 +794,7 @@ sword_1-1,223,167,2 script Master#job_shu 4_M_SURA,{
mes "[Master]";
mes "I hope those days will not come but... I'll willingly be the ghost and kill all enemies.";
next;
- if (ismounting()) {
+ if (hascashmount()) {
mes "[Master]";
mes "So... please get down from your riding pet!";
mes "It is a loss of etiquette on this situation.";
diff --git a/npc/re/jobs/3-2/wanderer.txt b/npc/re/jobs/3-2/wanderer.txt
index 9ce297068..5a3319a62 100644
--- a/npc/re/jobs/3-2/wanderer.txt
+++ b/npc/re/jobs/3-2/wanderer.txt
@@ -770,8 +770,8 @@ hu_fild05,342,130,5 script Dancer Kim#fild 4_F_CAPEGIRL,{
changequest 2220,2221;
close;
} else if (job_wan == 7) {
- if (checkquest(2221,PLAYTIME) == 0 || checkquest(2221,PLAYTIME) == 1) {
- if (checkquest(2221,HUNTING) == 2) {
+ if (questprogress(2221,PLAYTIME) == 1) {
+ if (questprogress(2221,HUNTING) == 2) {
mes "[Dancer Kim]";
mes "Whew!";
mes "Looks like I've lost!";
@@ -816,7 +816,7 @@ hu_fild05,342,130,5 script Dancer Kim#fild 4_F_CAPEGIRL,{
mes "But I'm sure I have a better chance to win.";
close;
}
- } else if (checkquest(2221,PLAYTIME) == 2) {
+ } else if (questprogress(2221,PLAYTIME) == 2) {
mes "[Dancer Kim]";
mes "Oh, you came back to me.";
mes "I'm so tired. I don't give up halfway. It's a good exercise for me. I will have to give up Nollio to another Wanderer, it's all over....";
@@ -898,7 +898,7 @@ xmas,147,135,5 script Dancer Kim#xmas 4_F_WANDERER,{
mes "- You need to empty your inventory if you want to continue the quest. -";
close;
}
- if (ismounting()) {
+ if (hascashmount()) {
mes "[Dancer Kim]";
mes "Please get off of that creature you're riding on.";
mes "Then talk to me again.";
diff --git a/npc/re/jobs/novice/novice.txt b/npc/re/jobs/novice/novice.txt
index b7a4bd492..066f56331 100644
--- a/npc/re/jobs/novice/novice.txt
+++ b/npc/re/jobs/novice/novice.txt
@@ -1178,7 +1178,7 @@ new_5-2,36,176,4 duplicate(NvGuide) Guide#nv5 8W_SOLDIER
close2;
} else if (job_novice_q < 15) {
if (job_novice_q == 13) {
- if (checkquest(7122,HUNTING) == 2) {
+ if (questprogress(7122,HUNTING) == 2) {
mes "[Brade]";
mes "You can see it is not so hard, huh?";
mes "Nice job.";
@@ -1412,8 +1412,8 @@ new_5-3,96,30,4 duplicate(NvBradeB) Brade#nv5b 4_M_JOB_KNIGHT1
end;
}
case 3:
- set .@quest, checkquest(7123);
- if (.@quest == -1) {
+ .@quest = questprogress(7123);
+ if (!.@quest) {
mes "[Swordman Guildsman]";
mes "You want me to give you a quest?";
mes "Umm. Let me see.";
@@ -1432,8 +1432,8 @@ new_5-3,96,30,4 duplicate(NvBradeB) Brade#nv5b 4_M_JOB_KNIGHT1
mes "I'll wait for you here.";
mes "Wish you a good luck.";
close;
- } else if (.@quest == 0 || .@quest == 1) {
- if (checkquest(7123,HUNTING) == 2) {
+ } else if (.@quest == 1) {
+ if (questprogress(7123,HUNTING) == 2) {
mes "[Swordman Guildsman]";
mes "Great.";
mes "I think that you're good enough to be a Swordman.";
@@ -1646,8 +1646,8 @@ new_5-3,101,41,3 duplicate(NvAcolyte) Acolyte Guide#nv5 4_F_SISTER
end;
}
case 3:
- set .@quest, checkquest(7127);
- if (.@quest == -1) {
+ .@quest = questprogress(7127);
+ if (!.@quest) {
mes "[Thief Guild Member]";
mes "Quests?";
mes "Hmm, what will be good for you?";
@@ -1662,8 +1662,8 @@ new_5-3,101,41,3 duplicate(NvAcolyte) Acolyte Guide#nv5 4_F_SISTER
mes "If you equip the Thief manual, you can have the effect of the skill, Double Attack.";
mes "Double Attack and Hide are the main skills of the Thief.";
close;
- } else if (.@quest == 0 || .@quest == 1) {
- if (checkquest(7127,HUNTING) == 2) {
+ } else if (.@quest == 1) {
+ if (questprogress(7127,HUNTING) == 2) {
mes "[Thief Guild Member]";
mes "You are very strong.";
mes "These are not many but let me give you a reward for your effort.";
@@ -1784,8 +1784,8 @@ new_5-3,105,41,3 duplicate(NvThief) Thief Guide#nv5 2_M_THIEFMASTER
end;
}
case 3:
- set .@quest, checkquest(7126);
- if (.@quest == -1) {
+ .@quest = questprogress(7126);
+ if (!.@quest) {
mes "[Merchant Guildsman]";
mes "Huh? Quest??";
mes "Humm... What would be suited for you...?";
@@ -1799,7 +1799,7 @@ new_5-3,105,41,3 duplicate(NvThief) Thief Guide#nv5 2_M_THIEFMASTER
mes "I will wait for you here.";
mes "Good luck!";
close;
- } else if (.@quest == 0 || .@quest == 1) {
+ } else if (.@quest == 1) {
if (Zeny >= 300) {
mes "[Merchant Guildsman]";
mes "Excellent!";
@@ -2046,8 +2046,8 @@ new_5-3,113,41,3 duplicate(NvArcher) Archer Guide#nv5 4_F_JOB_HUNTER
end;
}
case 3:
- set .@quest, checkquest(7124);
- if (.@quest == -1) {
+ .@quest = questprogress(7124);
+ if (!.@quest) {
mes "[Mage Guild Member]";
mes "Huh? Quest?";
mes "Hmm... What would be suited for you...?";
@@ -2062,8 +2062,8 @@ new_5-3,113,41,3 duplicate(NvArcher) Archer Guide#nv5 4_F_JOB_HUNTER
mes "I will wait for you here.";
mes "Good luck!";
close;
- } else if (.@quest == 0 || .@quest == 1) {
- if (checkquest(7124,HUNTING) == 2) {
+ } else if (.@quest == 1) {
+ if (questprogress(7124,HUNTING) == 2) {
mes "[Mage Guild Member]";
mes "You have done an excellent job.";
mes "So, did you find any interests about Mages?";
@@ -2443,10 +2443,10 @@ new_5-2,161,182,5 duplicate(NvEdwin) Instructor#nv5 4_F_03
function script F_NvErase {
if (getarg(0,0)) {
- if (checkquest(7123) > -1) erasequest 7123;
- if (checkquest(7124) > -1) erasequest 7124;
- if (checkquest(7126) > -1) erasequest 7126;
- if (checkquest(7127) > -1) erasequest 7127;
+ if (questprogress(7123)) erasequest 7123;
+ if (questprogress(7124)) erasequest 7124;
+ if (questprogress(7126)) erasequest 7126;
+ if (questprogress(7127)) erasequest 7127;
}
nude;
setarray .@manuals[0],countitem(2819),countitem(2820),countitem(2821),countitem(2822),countitem(2823),countitem(2824);
diff --git a/npc/re/jobs/novice/supernovice_ex.txt b/npc/re/jobs/novice/supernovice_ex.txt
index 044e386fe..62facbdf9 100644
--- a/npc/re/jobs/novice/supernovice_ex.txt
+++ b/npc/re/jobs/novice/supernovice_ex.txt
@@ -58,7 +58,7 @@ function script Esseray_Ex {
}
beach_dun2,119,92,4 script Fishing Novice#sp2 4_M_SIT_NOVICE,{
- if (checkquest(5092) >= 0) {
+ if (questprogress(5092)) {
mes "[Fishing Novice]";
mes "Sh --------- !!";
mes "Be quiet please.";
@@ -165,7 +165,7 @@ beach_dun2,119,92,4 script Fishing Novice#sp2 4_M_SIT_NOVICE,{
mes "- Talk to him again. -";
close;
}
- else if (checkquest(5093) >= 0) {
+ else if (questprogress(5093)) {
mes "[Nodor]";
mes "Emmhmm ----- !!";
next;
@@ -268,7 +268,7 @@ beach_dun2,119,92,4 script Fishing Novice#sp2 4_M_SIT_NOVICE,{
mes "Don't come back until you've hunted 1,000.";
close;
}
- else if (checkquest(5094) >= 0 || checkquest(5095) >= 0 || checkquest(5096) >= 0 || checkquest(5097) >= 0) {
+ else if (questprogress(5094) || questprogress(5095) || questprogress(5096) || questprogress(5097)) {
mes "["+strcharinfo(0)+"]";
mes "Hey, Nodor!";
next;
@@ -277,7 +277,7 @@ beach_dun2,119,92,4 script Fishing Novice#sp2 4_M_SIT_NOVICE,{
mes "Oh my god!";
mes "So frightened... let me see?";
next;
- if (checkquest(5094,HUNTING) != 2 && checkquest(5095,HUNTING) != 2 && checkquest(5096,HUNTING) != 2 && checkquest(5097,HUNTING) != 2) {
+ if (questprogress(5094,HUNTING) != 2 && questprogress(5095,HUNTING) != 2 && questprogress(5096,HUNTING) != 2 && questprogress(5097,HUNTING) != 2) {
mes "[Nodor]";
mes "Hey! Super Novice!";
mes "Didn't I say to hunt 1,000?";
@@ -298,7 +298,7 @@ beach_dun2,119,92,4 script Fishing Novice#sp2 4_M_SIT_NOVICE,{
mes "Don't tell a lie!! I will hit you!!";
close;
}
- if (checkquest(5094+.@i,HUNTING) != 2) {
+ if (questprogress(5094+.@i,HUNTING) != 2) {
mes "[Nodor]";
mes "Don't tell a lie!";
mes "I didn't tell you to hunt this!";
@@ -321,7 +321,7 @@ beach_dun2,119,92,4 script Fishing Novice#sp2 4_M_SIT_NOVICE,{
mes "I will let you know how to overcome your strength deficiencies.";
close;
}
- else if (checkquest(5098) >= 0) {
+ else if (questprogress(5098)) {
if (rand(10) != 1) {
mes "[Nodor]";
mes "Oh! You already came here?";
@@ -377,7 +377,7 @@ beach_dun2,119,92,4 script Fishing Novice#sp2 4_M_SIT_NOVICE,{
mes "You can give some to my bro. He's up in the airship.";
close;
}
- else if (checkquest(5099) >= 0) {
+ else if (questprogress(5099)) {
mes "[Nodor]";
mes "Have you visited already?";
next;
@@ -392,7 +392,7 @@ beach_dun2,119,92,4 script Fishing Novice#sp2 4_M_SIT_NOVICE,{
mes "10,000,000 zeny is okay~";
close;
}
- else if (checkquest(5100) >= 0) {
+ else if (questprogress(5100)) {
if (EXSUPNOV_Q_ == 3) set .@str$,"300,000";
else if (EXSUPNOV_Q_ == 4) set .@str$,"1,000,000";
else set .@str$,"100,000";
@@ -588,7 +588,7 @@ beach_dun2,119,92,4 script Fishing Novice#sp2 4_M_SIT_NOVICE,{
}
airplane,33,47,5 script Nudor#sp2 4_F_NOVICE,{
- if (checkquest(5099) >= 0) {
+ if (questprogress(5099)) {
mes "[Nudor]";
mes "Ahhh~ I have no money to buy any food.";
mes "I'm hungry, but I have no idea when Brother is coming...";
@@ -670,7 +670,7 @@ airplane,33,47,5 script Nudor#sp2 4_F_NOVICE,{
mes "- tricked, so go back to Nodor. -";
close;
}
- else if (checkquest(5100) >= 0) {
+ else if (questprogress(5100)) {
mes "[Nudor]";
mes "I cannot believe that my bro sent me money... I love it~";
next;
diff --git a/npc/re/jobs/repair.txt b/npc/re/jobs/repair.txt
index 184f7071f..58d2489e4 100644
--- a/npc/re/jobs/repair.txt
+++ b/npc/re/jobs/repair.txt
@@ -169,7 +169,7 @@ prt_in,38,104,4 script Valerie 4_F_VALKYRIE,{
L_Second:
if (getd(getarg(0)) != 0) {
setd getarg(0),0;
- if (checkquest(getarg(1)) == 2)
+ if (questprogress(getarg(1)) == 2)
erasequest getarg(1);
mes "[Valerie]";
mes "I will help clear your problems for you that came from your former attempts.";
@@ -184,15 +184,15 @@ L_Third:
if (getd(getarg(0)) != 0) {
setd getarg(0),0;
if (getarg(1)) {
- if (checkquest(getarg(1)) == 2)
+ if (questprogress(getarg(1)) == 2)
erasequest getarg(1);
}
for(set .@i,getarg(2); .@i<=getarg(3); set .@i,.@i+1) {
- if (checkquest(.@i) > -1)
+ if (questprogress(.@i))
erasequest .@i;
}
if (getarg(4,0)) {
- if (checkquest(getarg(4)) > -1)
+ if (questprogress(getarg(4)))
erasequest getarg(4);
}
mes "[Valerie]";
diff --git a/npc/re/merchants/renters.txt b/npc/re/merchants/renters.txt
index 59894c678..781467e20 100644
--- a/npc/re/merchants/renters.txt
+++ b/npc/re/merchants/renters.txt
@@ -31,8 +31,7 @@ job3_rune01,88,62,5 script Dragon Breeder 8W_SOLDIER,{
mes "[Dragon Breeder]";
mes "You already have a Dragon.";
close;
- }
- else if(ismounting()) {
+ } else if(hascashmount()) {
mes "[Dragon Breeder]";
mes "Please remove your cash mount.";
close;
@@ -69,8 +68,7 @@ prontera,130,213,5 script Riding Creature Master 8W_SOLDIER,{
mes "[Riding Creature Master]";
mes "You already have a Dragon.";
close;
- }
- else if(ismounting()) {
+ } else if(hascashmount()) {
mes "[Riding Creature Master]";
mes "Please remove your cash mount.";
close;
@@ -97,8 +95,7 @@ prontera,130,213,5 script Riding Creature Master 8W_SOLDIER,{
mes "[Riding Creature Master]";
mes "You already have a Gryphon.";
close;
- }
- else if(ismounting()) {
+ } else if(hascashmount()) {
mes "[Riding Creature Master]";
mes "Please remove your cash mount.";
close;
@@ -178,8 +175,7 @@ prontera,125,208,5 script Peco Peco Remover 8W_SOLDIER,{
mes "[Magic Gear Master]";
mes "Please learn the skill to get the Magic Gear License first.";
close;
- }
- else if(ismounting()) {
+ } else if(hascashmount()) {
mes "[Magic Gear Master]";
mes "Please remove your cash mount.";
close;
diff --git a/npc/re/quests/eden/11-25.txt b/npc/re/quests/eden/11-25.txt
index 200454e81..17f5edb22 100644
--- a/npc/re/quests/eden/11-25.txt
+++ b/npc/re/quests/eden/11-25.txt
@@ -20,10 +20,10 @@ moc_para01,36,38,3 script Mission [11 - 25]#Tuto 4_BOARD3,{
close;
}
for(set .@i,11124; .@i<11134; set .@i,.@i+1)
- if (checkquest(.@i,PLAYTIME) == 2) erasequest .@i;
+ if (questprogress(.@i,PLAYTIME) == 2) erasequest .@i;
for(set .@i,11114; .@i<11123; set .@i,.@i+1) {
- set .@j, checkquest(.@i,HUNTING);
- if (.@j == 2) {
+ .@state = questprogress(.@i,HUNTING);
+ if (.@state == 2) {
mes " - You must collect your - ";
mes " - reward before starting - ";
mes " - a new mission. - ";
@@ -31,7 +31,7 @@ moc_para01,36,38,3 script Mission [11 - 25]#Tuto 4_BOARD3,{
mes " - Manager : Spike - ";
close;
}
- else if (.@j >= 0) {
+ else if (.@state) {
mes " - You can only request - ";
mes " - one mission at a time. - ";
mes " ";
@@ -71,7 +71,7 @@ moc_para01,36,38,3 script Mission [11 - 25]#Tuto 4_BOARD3,{
}
end;
L_Quest:
- if (checkquest(getarg(0),PLAYTIME) == 1) {
+ if (questprogress(getarg(0),PLAYTIME) == 1) {
mes " - Mission ^4d4dff"+getarg(1)+"^000000 - ";
mes " - is already finished for today. - ";
mes " ";
@@ -91,7 +91,7 @@ L_Quest:
}
for(set .@i,2; .@i<getargcount(); set .@i,.@i+1)
mes getarg(.@i);
- if (getarg(0) == 11123 && checkquest(11123,PLAYTIME) == 2)
+ if (getarg(0) == 11123 && questprogress(11123,PLAYTIME) == 2)
erasequest 11133; // Special case for "Collect Poison Spores"
setquest getarg(0);
close;
@@ -99,8 +99,8 @@ L_Quest:
moc_para01,32,30,6 script Spike 4_F_CHILD,{
for(set .@i,11114; .@i<11124; set .@i,.@i+1) {
- set .@j, checkquest(.@i,HUNTING);
- if (.@j == 2) switch(.@i) {
+ .@state = questprogress(.@i,HUNTING);
+ if (.@state == 2) switch(.@i) {
case 11114: callsub L_Quest,.@i,"Hornet Hunting",900;
case 11115: callsub L_Quest,.@i,"Condor Hunting",1800;
case 11116: callsub L_Quest,.@i,"Grasshopper's Leg",1400,940,10;
@@ -112,7 +112,7 @@ moc_para01,32,30,6 script Spike 4_F_CHILD,{
case 11122: callsub L_Quest,.@i,"Collect Feathers",5400;
case 11123: callsub L_Quest,.@i,"Collect Poison Spores",6000,7033,5;
}
- else if (.@j >= 0) {
+ else if (.@state) {
mes "[Spike]";
mes "You haven't finished your mission yet.";
mes "Keep up the good work. You are almost done.";
@@ -127,7 +127,7 @@ moc_para01,32,30,6 script Spike 4_F_CHILD,{
mes "Why don't you look around and find some interesting tasks?";
close;
L_Quest:
- if (checkquest(getarg(0),HUNTING) == 2) {
+ if (questprogress(getarg(0),HUNTING) == 2) {
if (getarg(3,0))
if (countitem(getarg(3)) < getarg(4)) {
mes "[Spike]";
diff --git a/npc/re/quests/eden/26-40.txt b/npc/re/quests/eden/26-40.txt
index a4f0d5637..3ff9f5213 100644
--- a/npc/re/quests/eden/26-40.txt
+++ b/npc/re/quests/eden/26-40.txt
@@ -84,7 +84,7 @@ L_Quest:
mes "You have declined the "+getarg(2)+" mission.";
close;
}
- if (checkquest(getarg(0)) > -1) mes "You are already doing this mission.";
+ if (questprogress(getarg(0))) mes "You are already doing this mission.";
else {
setquest getarg(0);
mes "You have accepted the "+getarg(2)+" mission.";
@@ -134,8 +134,8 @@ geffen,103,42,5 script Sponiac 4W_M_03,{
end;
L_Quest:
//QuestID,Quest,BExp,JExp,PotionAmt,Desc
- if (checkquest(getarg(0)) == 1) {
- if (checkquest(getarg(0),HUNTING) == 2) {
+ if (questprogress(getarg(0)) == 1) {
+ if (questprogress(getarg(0),HUNTING) == 2) {
mes "[Sponiac]";
mes getarg(1)+"!";
mes "Wow, I didn't expect you would do that mission. I was just about to give up. But you did good job. I appreciate it!";
@@ -209,7 +209,7 @@ moc_ruins,173,55,3 script Dieshin Man 4_M_ORIENT02,{
}
end;
L_Quest:
- if (checkquest(getarg(0)) != 1) {
+ if (questprogress(getarg(0)) != 1) {
mes "[Dieshin Man]";
mes "Huh? Are you sure? Something is wrong...";
next;
@@ -281,7 +281,7 @@ pay_fild07,83,89,7 script Zoologist 4_M_ORIENT02,{
mes "Oh, I need an Insecticide to continue the study.";
close;
}
- if (checkquest(8271) != 1) {
+ if (questprogress(8271) != 1) {
mes "[Zoologist]";
mes "Huh?";
mes "You are not Dieshin's delivery man?";
@@ -346,7 +346,7 @@ prt_fild03,30,254,3 script Entomologist 4_M_01,{
mes "Oh, I need Honey to continue the study.";
close;
}
- if (checkquest(8272) != 1) {
+ if (questprogress(8272) != 1) {
mes "[Entomologist]";
mes "Huh?";
mes "You are not Dieshin's delivery man?";
@@ -411,7 +411,7 @@ xmas_fild01,92,57,3 script Biologist 4W_M_01,{
mes "Huh, whatever. But be careful! It's very slippery here.";
close;
}
- if (checkquest(8273) != 1) {
+ if (questprogress(8273) != 1) {
mes "[Biologist]";
mes "Huh?";
mes "You are not Dieshin's delivery man?";
@@ -645,7 +645,7 @@ payon,179,66,3 script Dashia 4_M_RACHMAN1,{
mes "Anyway, I will be here waiting for you. Please come back when you finish the mission!";
close;
L_Quest:
- if (checkquest(getarg(0)) != 1) {
+ if (questprogress(getarg(0)) != 1) {
mes "[Dashia]";
mes "Huh? Are you sure? Something is wrong...";
next;
diff --git a/npc/re/quests/eden/41-55.txt b/npc/re/quests/eden/41-55.txt
index eb1c22e42..7898060b5 100644
--- a/npc/re/quests/eden/41-55.txt
+++ b/npc/re/quests/eden/41-55.txt
@@ -22,7 +22,7 @@ moc_para01,40,38,3 script Mission [41 - 55] 4_BOARD3,{
mes "You cannot receive any more items because you're carrying too many items. Please try again after you lighten up.^000000";
close;
}
- if (checkquest(12088) == -1) {
+ if (!questprogress(12088)) {
if (BaseLevel < 41 || BaseLevel > 55) {
mes "Mission bulletin board for Lv41~55 adventurers.";
close;
@@ -56,7 +56,7 @@ moc_para01,40,38,3 script Mission [41 - 55] 4_BOARD3,{
}
setarray .@exp[0],9600,7200,15750,7875,11100,8550,17100,9000,12300,9900,20250,10350,13800,11025,22500,11250;
for(set .@i,0; .@i<16; set .@i,.@i+1)
- if (checkquest(12072+.@i,HUNTING) == 2) {
+ if (questprogress(12072+.@i,HUNTING) == 2) {
mes "[Mission Board]";
mes "You have completed the mission.";
mes "Here is your reward.";
@@ -66,7 +66,10 @@ moc_para01,40,38,3 script Mission [41 - 55] 4_BOARD3,{
getexp .@exp[.@i],0;
close;
}
- if ((checkquest(12072,HUNTING) == 0) && (checkquest(12073,HUNTING) == 0) && (checkquest(12074,HUNTING) == 0) && (checkquest(12075,HUNTING) == 0) && (checkquest(12076,HUNTING) == 0) && (checkquest(12077,HUNTING) == 0) && (checkquest(12078,HUNTING) == 0) && (checkquest(12079,HUNTING) == 0) && (checkquest(12080,HUNTING) == 0) && (checkquest(12081,HUNTING) == 0) && (checkquest(12082,HUNTING) == 0) && (checkquest(12083,HUNTING) == 0) && (checkquest(12084,HUNTING) == 0) && (checkquest(12085,HUNTING) == 0) && (checkquest(12086,HUNTING) == 0) && (checkquest(12087,HUNTING) == 0)) {
+ if (!questprogress(12072,HUNTING) && !questprogress(12073,HUNTING) && !questprogress(12074,HUNTING) && !questprogress(12075,HUNTING)
+ && !questprogress(12076,HUNTING) && !questprogress(12077,HUNTING) && !questprogress(12078,HUNTING) && !questprogress(12079,HUNTING)
+ && !questprogress(12080,HUNTING) && !questprogress(12081,HUNTING) && !questprogress(12082,HUNTING) && !questprogress(12083,HUNTING)
+ && !questprogress(12084,HUNTING) && !questprogress(12085,HUNTING) && !questprogress(12086,HUNTING) && !questprogress(12087,HUNTING)) {
mes "You may now view the bulletin board.";
erasequest 12088;
close;
diff --git a/npc/re/quests/eden/56-70.txt b/npc/re/quests/eden/56-70.txt
index c7e5103a8..c014da7d1 100644
--- a/npc/re/quests/eden/56-70.txt
+++ b/npc/re/quests/eden/56-70.txt
@@ -51,7 +51,7 @@ moc_para01,42,38,3 script Mission [56 - 70] 4_BOARD3,{
end;
L_Quest:
- if (checkquest(getarg(0)) == -1) {
+ if (!questprogress(getarg(0))) {
callsub L_Details, getarg(0);
next;
mes "Would you like to accept this mission?";
@@ -74,7 +74,7 @@ L_Quest:
else
set .@items,2; //complete
}
- if (checkquest(getarg(0)) < 2 && (countitem(getarg(3)) < getarg(4) || .@items == 1)) {
+ if (questprogress(getarg(0)) != 2 && (countitem(getarg(3)) < getarg(4) || .@items == 1)) {
mes "You have an on-going mission. Would you like to check the details?";
next;
if(select("Check the details.:Cancel.") == 1)
@@ -96,7 +96,7 @@ L_Quest:
end;
L_HuntingQuest:
- if (checkquest(getarg(0)) == -1) {
+ if (!questprogress(getarg(0))) {
callsub L_Details, getarg(0);
next;
mes "Would you like to accept this mission?";
@@ -119,13 +119,13 @@ L_HuntingQuest:
else
set .@items,2; //complete
}
- if (checkquest(getarg(0),HUNTING) < 2 || .@items == 1) {
+ if (questprogress(getarg(0),HUNTING) != 2 || .@items == 1) {
mes "You have an on-going mission. Would you like to check the details?";
next;
if(select("Check the details.:Cancel.") == 1)
callsub L_Details, getarg(0);
close;
- } else if (checkquest(getarg(0),HUNTING) == 2) {
+ } else if (questprogress(getarg(0),HUNTING) == 2) {
mes "I have done pretty well for the mission. Should I report it now?";
next;
if(select("Report the mission.:Do not report it yet.") == 1) {
diff --git a/npc/re/quests/eden/71-85.txt b/npc/re/quests/eden/71-85.txt
index 57102982c..f2ea5f2a1 100644
--- a/npc/re/quests/eden/71-85.txt
+++ b/npc/re/quests/eden/71-85.txt
@@ -23,9 +23,9 @@ moc_para01,44,38,3 script Mission [71 - 85] 4_BOARD3,{
// Clear the original quest data (no longer used).
if (slv_quest) set slv_quest,0;
- if (checkquest(10102) > -1 || checkquest(10103) > -1 || checkquest(10104) > -1 || checkquest(10105) > -1 || checkquest(10106) > -1) {
+ if (questprogress(10102) || questprogress(10103) || questprogress(10104) || questprogress(10105) || questprogress(10106)) {
for(set .@quest,10102; .@quest<=10106; set .@quest,.@quest+1) {
- if (checkquest(.@quest) > -1)
+ if (questprogress(.@quest))
erasequest .@quest;
}
mes "- Since the client has moved -";
@@ -50,10 +50,10 @@ moc_para01,44,38,3 script Mission [71 - 85] 4_BOARD3,{
10118,10119,10120,
10121,10122,10123,5055,5056;
for(set .@i,0; .@i<getarraysize(.@quests); set .@i,.@i+1) {
- if (checkquest(.@quests[.@i],HUNTING) == 2)
+ if (questprogress(.@quests[.@i],HUNTING) == 2)
set .@complete[getarraysize(.@complete)], .@quests[.@i];
}
- if (checkquest(5057) > -1 && countitem(7187) >= 30)
+ if (questprogress(5057) && countitem(7187) >= 30)
set .@complete[getarraysize(.@complete)],5057;
if (getarraysize(.@complete)) {
mes "You have quests in progress.";
@@ -184,13 +184,14 @@ L_Quest:
} else {
if (.@quest == 5057) {
// Quest 5057 is the only collection quest, so separate conditions are unnecessary.
- if (checkquest(5057) == -1)
- set .@hunting,-1;
+ if (!questprogress(5057))
+ .@hunting = 0;
else if (countitem(7187) >= 30)
- set .@hunting,2;
- } else
- set .@hunting, checkquest(.@quest,HUNTING);
- if (.@hunting == 0 || .@hunting == 1) {
+ .@hunting = 2;
+ } else {
+ .@hunting = questprogress(.@quest,HUNTING);
+ }
+ if (.@hunting == 1) {
mes getarg(1);
mes getarg(2);
next;
diff --git a/npc/re/quests/eden/86-90.txt b/npc/re/quests/eden/86-90.txt
index 01c8fec29..2431670a0 100644
--- a/npc/re/quests/eden/86-90.txt
+++ b/npc/re/quests/eden/86-90.txt
@@ -78,8 +78,8 @@ moc_para01,48,175,3 script 86-90 Mission Board 4_BOARD3,{
72000,72000,72000,86000,80000;
mes "You must be within level 86-90 to accept these missions.";
for(set .@quest,4167; .@quest<=4180; set .@quest,.@quest+1) {
- set .@hunting, checkquest(.@quest,HUNTING);
- if (.@hunting == 0 || .@hunting == 1) {
+ .@hunting = questprogress(.@quest,HUNTING);
+ if (.@hunting == 1) {
next;
mes ":: You cannot proceed in";
mes ":: ^0000FF"+.@names$[.@quest-4167]+" Hunting^000000.";
@@ -152,14 +152,14 @@ moc_para01,48,175,3 script 86-90 Mission Board 4_BOARD3,{
L_Quest:
set .@quest1, getarg(0);
set .@quest2, .@quest1+31;
- set .@playtime, checkquest(.@quest2,PLAYTIME);
- if (.@playtime == 0 || .@playtime == 1) {
+ .@playtime = questprogress(.@quest2,PLAYTIME);
+ if (.@playtime == 1) {
mes "[86-90 Mission Board]";
mes "You need to wait 3 hours before you can take this mission again.";
close;
}
- set .@hunting, checkquest(.@quest1,HUNTING);
- if (.@hunting == 0 || .@hunting == 1) {
+ .@hunting = questprogress(.@quest1,HUNTING);
+ if (.@hunting == 1) {
mes "[86-90 Mission Board]";
mes "Have you finished hunting all 30 "+getarg(1)+getarg(5,"")+" yet?";
close;
@@ -168,7 +168,7 @@ L_Quest:
mes "You have completed the hunting.";
mes "Please accept this reward as a compensation.";
erasequest .@quest1;
- if (.@playtime > -1) erasequest .@quest2;
+ if (.@playtime) erasequest .@quest2;
setquest .@quest2;
getexp getarg(2),0;
close;
@@ -190,7 +190,7 @@ L_Quest:
if(select("I'll hunt them.:No thanks.") == 1) {
mes "[86-90 Mission Board]";
mes "When you have completed the mission, post it on this board and collect your reward.";
- if (.@playtime > -1) erasequest .@quest2;
+ if (.@playtime) erasequest .@quest2;
setquest .@quest1;
}
close;
diff --git a/npc/re/quests/eden/91-99.txt b/npc/re/quests/eden/91-99.txt
index e6744e80f..707cde268 100644
--- a/npc/re/quests/eden/91-99.txt
+++ b/npc/re/quests/eden/91-99.txt
@@ -80,8 +80,8 @@ moc_para01,48,177,3 script 91-99 Mission Board 4_BOARD3,{
110000,138000,118000,96000,134000;
mes "You must be within level 91-99 to accept these missions.";
for(set .@quest,4181; .@quest<=4196; set .@quest,.@quest+1) {
- set .@hunting, checkquest(.@quest,HUNTING);
- if (.@hunting == 0 || .@hunting == 1) {
+ .@hunting = questprogress(.@quest,HUNTING);
+ if (.@hunting == 1) {
next;
mes ":: You cannot proceed in";
mes ":: ^0000FF"+.@names$[.@quest-4181]+" Hunting^000000.";
@@ -161,14 +161,14 @@ moc_para01,48,177,3 script 91-99 Mission Board 4_BOARD3,{
L_Quest:
set .@quest1, getarg(0);
set .@quest2, .@quest1+31;
- set .@playtime, checkquest(.@quest2,PLAYTIME);
- if (.@playtime == 0 || .@playtime == 1) {
+ .@playtime = questprogress(.@quest2,PLAYTIME);
+ if (.@playtime == 1) {
mes "[91-99 Mission Board]";
mes "You need to wait 3 hours before you can take this mission again.";
close;
}
- set .@hunting, checkquest(.@quest1,HUNTING);
- if (.@hunting == 0 || .@hunting == 1) {
+ .@hunting = questprogress(.@quest1,HUNTING);
+ if (.@hunting == 1) {
mes "[91-99 Mission Board]";
mes "Have you finished hunting all 30 "+getarg(1)+getarg(5,"")+" yet?";
close;
@@ -177,7 +177,7 @@ L_Quest:
mes "You have completed the hunting.";
mes "Please accept this reward as a compensation.";
erasequest .@quest1;
- if (.@playtime > -1) erasequest .@quest2;
+ if (.@playtime) erasequest .@quest2;
setquest .@quest2;
// Job Experience calculation.
@@ -207,7 +207,7 @@ L_Quest:
if(select("I'll hunt them.:No thanks.") == 1) {
mes "[91-99 Mission Board]";
mes "When you have completed the mission, post it on this board and collect your reward.";
- if (.@playtime > -1) erasequest .@quest2;
+ if (.@playtime) erasequest .@quest2;
setquest .@quest1;
}
close;
diff --git a/npc/re/quests/eden/eden_quests.txt b/npc/re/quests/eden/eden_quests.txt
index f1b54a9e7..6b98b217e 100644
--- a/npc/re/quests/eden/eden_quests.txt
+++ b/npc/re/quests/eden/eden_quests.txt
@@ -1139,7 +1139,7 @@ moc_fild11,180,253,5 script Talking Dog#para03 4_RUS_DWOLF,{
}
}
if (para_suv01 == 2) {
- if (checkquest(7129,HUNTING) == 2) {
+ if (questprogress(7129,HUNTING) == 2) {
mes "[Talking Dog]";
mes "Woooohh...";
mes "Great!";
@@ -1186,7 +1186,7 @@ moc_fild11,180,253,5 script Talking Dog#para03 4_RUS_DWOLF,{
close;
}
if (para_suv01 == 3) {
- if (checkquest(7130,HUNTING) == 2) {
+ if (questprogress(7130,HUNTING) == 2) {
mes "[Talking Dog]";
mes "You are so perfect.";
next;
@@ -1224,7 +1224,7 @@ moc_fild11,180,253,5 script Talking Dog#para03 4_RUS_DWOLF,{
close;
}
if (para_suv01 == 4) {
- if (checkquest(7131,HUNTING) == 2) {
+ if (questprogress(7131,HUNTING) == 2) {
mes "[Talking Dog]";
mes "Um. Excellent.";
mes "You are awesome!";
@@ -1388,7 +1388,7 @@ prt_sewb1,131,262,3 script Timid Cat#para04 4_M_BABYCAT,{
}
}
if (para_suv01 == 7) {
- if (checkquest(7134,HUNTING) == 2) {
+ if (questprogress(7134,HUNTING) == 2) {
mes "[Timid Cat]";
mes "Now do you understand the dirty and humid underground sewers?";
mes "Eeeh look what's next meow.";
@@ -1426,7 +1426,7 @@ prt_sewb1,131,262,3 script Timid Cat#para04 4_M_BABYCAT,{
close;
}
if (para_suv01 == 8) {
- if (checkquest(7135,HUNTING) == 2) {
+ if (questprogress(7135,HUNTING) == 2) {
mes "[Timid Cat]";
mes "Great job~!";
mes "How'd you get rid of those dirty bugs and Tarou. You are brave.";
@@ -1464,7 +1464,7 @@ prt_sewb1,131,262,3 script Timid Cat#para04 4_M_BABYCAT,{
close;
}
if (para_suv01 == 9) {
- if (checkquest(7136,HUNTING) == 2) {
+ if (questprogress(7136,HUNTING) == 2) {
mes "[Timid Cat]";
mes "You are great meow~";
mes "You killed them so quickly!";
@@ -1572,7 +1572,7 @@ pay_arche,41,136,3 script Eden Member Karl#para05 4_M_KHMAN,{
close;
}
if (para_suv01 == 14) {
- if (checkquest(7139,HUNTING) == 2) {
+ if (questprogress(7139,HUNTING) == 2) {
mes "[Karl]";
mes "Did you get how the undead work?";
mes "As you know undead never die so, blessing of live person it's same as curse to them.";
@@ -1611,7 +1611,7 @@ pay_arche,41,136,3 script Eden Member Karl#para05 4_M_KHMAN,{
close;
}
if (para_suv01 == 15) {
- if (checkquest(7140,HUNTING) == 2) {
+ if (questprogress(7140,HUNTING) == 2) {
mes "[Karl]";
mes "Did you get back what the Poporing stole?";
mes "This cave is really deep and there are lots of precious things that they could have picked up.";
@@ -1734,7 +1734,7 @@ anthell01,29,264,5 script Eden Member Cloud#para06 4_M_HUMAN_02,{
}
}
if (para_suv01 == 18) {
- if (checkquest(7143,HUNTING) == 2) {
+ if (questprogress(7143,HUNTING) == 2) {
mes "[Cloud]";
mes "Hey, what was it?";
mes "Maybe you saw an Andre when you were hunting Pierre.";
@@ -1764,7 +1764,7 @@ anthell01,29,264,5 script Eden Member Cloud#para06 4_M_HUMAN_02,{
close;
}
if (para_suv01 == 19) {
- if (checkquest(7144,HUNTING) == 2) {
+ if (questprogress(7144,HUNTING) == 2) {
mes "[Cloud]";
mes "Great. You seem to have killed all of the Andre.";
mes "How do you think about fighting ants?";
@@ -1803,7 +1803,7 @@ anthell01,29,264,5 script Eden Member Cloud#para06 4_M_HUMAN_02,{
close;
}
if (para_suv01 == 20) {
- if (checkquest(7145,HUNTING) == 2) {
+ if (questprogress(7145,HUNTING) == 2) {
mes "[Cloud]";
mes "Oh... it might have been an anoying fight.";
mes "You finished so fast.";
@@ -1913,7 +1913,7 @@ in_orcs01,38,175,3 script Eden Member Hooksha 1_F_SIGNZISK,{
close;
}
if (para_suv01 == 25) {
- if (checkquest(7148,HUNTING) == 2) {
+ if (questprogress(7148,HUNTING) == 2) {
mes "[Hooksha]";
mes "Great. Awesome.";
mes "It's not very pleasant so let's move on.";
@@ -1946,7 +1946,7 @@ in_orcs01,38,175,3 script Eden Member Hooksha 1_F_SIGNZISK,{
close;
}
if (para_suv01 == 26) {
- if (checkquest(7149,HUNTING) == 2) {
+ if (questprogress(7149,HUNTING) == 2) {
mes "[Hooksha]";
mes "Now you can move on to the next step.";
next;
@@ -1977,7 +1977,7 @@ in_orcs01,38,175,3 script Eden Member Hooksha 1_F_SIGNZISK,{
close;
}
if (para_suv01 == 27) {
- if (checkquest(7150,HUNTING) == 2) {
+ if (questprogress(7150,HUNTING) == 2) {
mes "[Hooksha]";
mes "Great job.";
mes "Now you should understand how the orc tribe works here in Orc Village.";
@@ -2044,7 +2044,7 @@ in_orcs01,38,175,3 script Eden Member Hooksha 1_F_SIGNZISK,{
close;
}
if (para_suv01 == 30) {
- if (checkquest(7153,HUNTING) == 2) {
+ if (questprogress(7153,HUNTING) == 2) {
mes "[Hooksha]";
mes "It's different from what you saw in Payon, right?";
mes "Although you managed to kill the Orc Zombies, you can't be sure you are much stronger..";
@@ -2076,7 +2076,7 @@ in_orcs01,38,175,3 script Eden Member Hooksha 1_F_SIGNZISK,{
close;
}
if (para_suv01 == 31) {
- if (checkquest(7154,HUNTING) == 2) {
+ if (questprogress(7154,HUNTING) == 2) {
mes "[Hooksha]";
mes "Your training mission has been completed.";
mes "Go back to the Eden Group headquarters and report.";
@@ -2172,7 +2172,7 @@ iz_dun04,43,46,3 script Eden Member Callandiva 4_F_CRU,{
close;
}
if (para_suv01 == 34) {
- if (checkquest(7157,HUNTING) == 2) {
+ if (questprogress(7157,HUNTING) == 2) {
mes "[Callandiva]";
mes "Oh, you came back~!";
mes "What did you think of those threatening Mermans?";
@@ -2203,7 +2203,7 @@ iz_dun04,43,46,3 script Eden Member Callandiva 4_F_CRU,{
close;
}
if (para_suv01 == 35) {
- if (checkquest(7158,HUNTING) == 2) {
+ if (questprogress(7158,HUNTING) == 2) {
mes "[Callandiva]";
mes "Did you kill all the Strouf already?";
mes "I wasn't counting that you'd make it.";
@@ -4000,7 +4000,7 @@ comodo,173,354,6 script Romeo#01 1_M_JOBTESTER,{
close;
}
if (romeo == 1) {
- if (checkquest(7215,HUNTING) == 2) {
+ if (questprogress(7215,HUNTING) == 2) {
mes "[Romeo]";
mes "You did it? Thats all the proof I needed.";
next;
@@ -4033,7 +4033,7 @@ comodo,173,354,6 script Romeo#01 1_M_JOBTESTER,{
um_fild01,34,280,6 script Romeo#02 1_M_JOBTESTER,{
if (romeo == 2) {
- if (checkquest(7216,HUNTING) == 2) {
+ if (questprogress(7216,HUNTING) == 2) {
mes "[Romeo]";
mes "Wow, you have arrived sooner than I expected.";
next;
@@ -4098,7 +4098,7 @@ glast_01,195,131,6 script Johan 4_F_SISTER,{
close;
}
if (johan == 1) {
- if (checkquest(7220,HUNTING) == 2) {
+ if (questprogress(7220,HUNTING) == 2) {
mes "[Johan]";
mes "Good.";
next;
@@ -4117,7 +4117,7 @@ glast_01,195,131,6 script Johan 4_F_SISTER,{
close;
}
if (johan == 2) {
- if (checkquest(7221,HUNTING) == 2) {
+ if (questprogress(7221,HUNTING) == 2) {
mes "[Johan]";
mes "Hmmmm, better.";
next;
@@ -4163,7 +4163,7 @@ ein_fild08,172,359,4 script Kiren 4_M_4THPRIN1,{
close;
}
if (kiren == 1) {
- if (checkquest(7224,HUNTING) == 2) {
+ if (questprogress(7224,HUNTING) == 2) {
mes "[Kiren]";
mes "Wow, most people spend twice as long as you did to kill those Porcellios!";
next;
@@ -4183,7 +4183,7 @@ ein_fild08,172,359,4 script Kiren 4_M_4THPRIN1,{
close;
}
if (kiren == 2) {
- if ((checkquest(7226,HUNTING) == 2) && (checkquest(7227,HUNTING) == 2)) {
+ if ((questprogress(7226,HUNTING) == 2) && (questprogress(7227,HUNTING) == 2)) {
mes "[Kiren]";
mes "Incredible, you set a new record!";
next;
@@ -4230,7 +4230,7 @@ ice_dun01,154,13,6 script Naomi 4_F_JOB_BLACKSMITH,{
close;
}
if (naomi == 1) {
- if (checkquest(7230,HUNTING) == 2) {
+ if (questprogress(7230,HUNTING) == 2) {
mes "[Naomi]";
mes "Thank you, but there are still so many Siromas here!";
next;
@@ -4249,7 +4249,7 @@ ice_dun01,154,13,6 script Naomi 4_F_JOB_BLACKSMITH,{
close;
}
if (naomi == 2) {
- if ((checkquest(7231,HUNTING) == 2) && (countitem(7066) >= 30) && (countitem(519) >= 1) && (countitem(7453) >= 1)) {
+ if ((questprogress(7231,HUNTING) == 2) && (countitem(7066) >= 30) && (countitem(519) >= 1) && (countitem(7453) >= 1)) {
mes "[Naomi]";
mes "Yay, you did it!";
next;
@@ -4349,7 +4349,7 @@ man_fild01,43,234,2 script Paradise Dispatch#01 4_DST_SOLDIER,{
close;
}
if (margaret == 2) {
- if (checkquest(7235,HUNTING) == 2) {
+ if (questprogress(7235,HUNTING) == 2) {
mes "[Paradise Dispatch]";
mes "Thanks!";
next;
@@ -4395,7 +4395,7 @@ spl_fild02,377,149,4 script Paradise Dispatch#02 4_M_DST_MASTER,{
close;
}
if (margaret == 5) {
- if (checkquest(7236,HUNTING) == 2) {
+ if (questprogress(7236,HUNTING) == 2) {
mes "[Paradise Dispatch]";
mes "You make it look so easy, but I couldn't even kill 1...";
next;
@@ -4701,12 +4701,12 @@ moc_para01,111,83,3 script Toren 2_M_OLDBLSMITH,{
mes "It is finished! Come back tomorrow if you want to enchant more.";
close;
}
- if ((paragearenchant == 4) && (checkquest(7241,PLAYTIME) != 2)) {
+ if ((paragearenchant == 4) && (questprogress(7241,PLAYTIME) != 2)) {
mes "[Toren]";
mes "Please come back tomorrow if you want to enchant more.";
close;
}
- if ((paragearenchant == 4) && (checkquest(7241,PLAYTIME) == 2)) {
+ if ((paragearenchant == 4) && (questprogress(7241,PLAYTIME) == 2)) {
set paragearenchant,0;
erasequest 7241;
mes "[Toren]";
diff --git a/npc/re/quests/eden/eden_tutorial.txt b/npc/re/quests/eden/eden_tutorial.txt
index 92cfb26fd..408ba83df 100644
--- a/npc/re/quests/eden/eden_tutorial.txt
+++ b/npc/re/quests/eden/eden_tutorial.txt
@@ -14,7 +14,7 @@
moc_para01,34,178,3 script Tutorial Instructor 4_M_KHMAN,{
if (Class == Job_Novice) {
// Fall through
- } else if (checkquest(9167) == -1) {
+ } else if (!questprogress(9167)) {
OnStartQuest:
if (@tutorial_restart) {
set .@tutorial_restart,1;
@@ -85,7 +85,7 @@ moc_para01,34,178,3 script Tutorial Instructor 4_M_KHMAN,{
mes "When you're not so busy, come find me again.";
close;
}
- } else if (checkquest(9167) == 0 || checkquest(9167) == 1) {
+ } else if (questprogress(9167) == 1) {
if (!getmercinfo(1)) {
mes "[Tutorial Instructor]";
mes "You haven't gotten a mercenary yet.";
@@ -146,7 +146,7 @@ moc_para01,34,178,3 script Tutorial Instructor 4_M_KHMAN,{
completequest 9167;
setquest 9168;
close;
- } else if (checkquest(9168) == 0 || checkquest(9168) == 1) {
+ } else if (questprogress(9168) == 1) {
if (checkweight(607,1) == 0) {
if (MaxWeight - Weight < getiteminfo(607,6)) {
mes "[Tutorial Instructor]";
@@ -237,7 +237,7 @@ moc_para01,34,178,3 script Tutorial Instructor 4_M_KHMAN,{
mes "the ^006400Quest Window^000000,";
mes "come find and talk to me again.";
close;
- } else if (checkquest(9169) == 0 || checkquest(9169) == 1) {
+ } else if (questprogress(9169) == 1) {
if (countitem(12580) == 0) {
mes "[Tutorial Instructor]";
mes "Hmm? So I noticed that";
@@ -280,7 +280,7 @@ moc_para01,34,178,3 script Tutorial Instructor 4_M_KHMAN,{
completequest 9169;
setquest 9170;
close;
- } else if (checkquest(9170) == 0 || checkquest(9170) == 1) {
+ } else if (questprogress(9170) == 1) {
if (countitem(12580)) {
mes "[Tutorial Instructor]";
mes "Hmm... It seems that you still have";
@@ -319,7 +319,7 @@ moc_para01,34,178,3 script Tutorial Instructor 4_M_KHMAN,{
completequest 9170;
setquest 9171;
close;
- } else if (checkquest(9171) == 0 || checkquest(9171) == 1) {
+ } else if (questprogress(9171) == 1) {
if (countitem(909) < 10) {
mes "[Tutorial Instructor]";
mes "It seems you didn't bring";
@@ -401,7 +401,7 @@ moc_para01,34,178,3 script Tutorial Instructor 4_M_KHMAN,{
mes "When you're done looking at them,";
mes "give them back to me.";
close;
- } else if (checkquest(9172) == 0 || checkquest(9172) == 1) {
+ } else if (questprogress(9172) == 1) {
if (countitem(15033) == 0 || countitem(15034) == 0) {
mes "[Tutorial Instructor]";
mes "What did you do with the Enchanted";
@@ -438,13 +438,13 @@ moc_para01,34,178,3 script Tutorial Instructor 4_M_KHMAN,{
mes "then bring them back to me.";
close;
}
- } else if (checkquest(9173) == 0 || checkquest(9173) == 1) {
+ } else if (questprogress(9173) == 1) {
mes "[Tutorial Instructor]";
mes "Do you have any questions?";
next;
switch(select("Can I do the same quest again?:About the Quest Window...:About ENCHANT...:About Searching Vends...:About Mercenary and Pets...:End Conversation.")) {
case 1:
- if (checkquest(9173,PLAYTIME) == 0 || checkquest(9173,PLAYTIME) == 1) {
+ if (questprogress(9173,PLAYTIME) == 1) {
mes "[Tutorial Instructor]";
mes "The one method to do the same quests repeatdedly is to do the ^006400Daily Quests^000000.";
next;
@@ -579,32 +579,32 @@ moc_para01,32,179,4 script Tutorial Goal 4_F_KHELLY,{
close;
}
}
- if (checkquest(4161) == 0 || checkquest(4161) == 1) {
+ if (questprogress(4161) == 1) {
mes "[Tutorial Goal]";
mes "Well~ We gotta go challenge the experts right?";
mes "Let's start off by finding the ^006400Siege Expert^000000!";
close;
- } else if (checkquest(4162) == 0 || checkquest(4162) == 1) {
+ } else if (questprogress(4162) == 1) {
mes "[Tutorial Goal]";
mes "You've passed the ^006400Siege Expert^000000's test! Congrats!";
mes "Now, go find the ^006400Party Recruiting Expert^000000!";
close;
- } else if (checkquest(4163) == 0 || checkquest(4163) == 1) {
+ } else if (questprogress(4163) == 1) {
mes "[Tutorial Goal]";
mes "Oh! You've passed the ^006400Party Recruiting Expert^000000's test! Congrats!";
mes "Now, go find the ^006400Battleground Expert^000000!";
close;
- } else if (checkquest(4164) == 0 || checkquest(4164) == 1) {
+ } else if (questprogress(4164) == 1) {
mes "[Tutorial Goal]";
mes "Yay! You passed the test from the ^006400Battleground Expert^000000! Congrats!";
mes "Next, go and find the ^006400Memorial Dungeon Expert^000000!";
close;
- } else if (checkquest(4165) == 0 || checkquest(4165) == 1) {
+ } else if (questprogress(4165) == 1) {
mes "[Tutorial Goal]";
mes "You passed the test from ^006400Memorial Dungeon Expert^000000! That's great!";
mes "Try finding the ^006400Map Expert^000000!";
close;
- } else if (checkquest(4166) == 0 || checkquest(4166) == 1) {
+ } else if (questprogress(4166) == 1) {
mes "[Tutorial Goal]";
mes "You passed ^006400Map Expert^000000's test! Congrats!";
mes "I'm so glad that you were to pass all the Experts' tests! You're better than I expected!!";
@@ -621,7 +621,7 @@ moc_para01,32,179,4 script Tutorial Goal 4_F_KHELLY,{
getitem 504,5; //White_Potion
getitem 608,1; //Seed_Of_Yggdrasil
close;
- } else if (checkquest(4166) == 2) {
+ } else if (questprogress(4166) == 2) {
mes "[Tutorial Goal]";
mes "Now, even you are an ^006400Expert^000000!! Such a fitting nick name for you!";
mes "Thank you so much for your hard work.";
@@ -662,7 +662,7 @@ moc_para01,32,179,4 script Tutorial Goal 4_F_KHELLY,{
}
moc_para01,24,175,4 script Siege Master 4_M_JOB_KNIGHT2,{
- set .@checkquest, checkquest(4161);
+ .@checkquest = questprogress(4161);
if (.@checkquest == 2) {
mes "[Siege Expert]";
mes "Since you've come again, I assume you're curious about ^006400Siege^000000?";
@@ -678,7 +678,7 @@ moc_para01,24,175,4 script Siege Master 4_M_JOB_KNIGHT2,{
mes "If you want to go over anything, just come talk to me.";
close;
}
- } else if (.@checkquest == 0 || .@checkquest == 1) {
+ } else if (.@checkquest == 1) {
mes "[Siege Expert]";
mes "I am someone who has studied War of Emperium for 16 years! So that makes me an expert! Since you came to find me, I assume you want to learn more about ^006400Siege^000000.";
next;
@@ -835,7 +835,7 @@ L_Info:
}
moc_para01,21,172,4 script Party Recruiting Expert 4_M_OILMAN,{
- set .@checkquest, checkquest(4162);
+ .@checkquest = questprogress(4162);
if (.@checkquest == 2) {
mes "[Party Recruiting Expert]";
mes "Since you've come and found me, it seems you're curious about ^006400Party Recruiting^000000?";
@@ -851,7 +851,7 @@ moc_para01,21,172,4 script Party Recruiting Expert 4_M_OILMAN,{
mes "Well, if you have any questions, come find me.";
close;
}
- } else if (.@checkquest == 0 || .@checkquest == 1) {
+ } else if (.@checkquest == 1) {
mes "[Party Recruiting Expert]";
mes "I am the ^006400Party Recruiting^000000 expert because I did research about Party Recruting for 16 years! It seems that the ^006400Siege Expert^000000 sent you my way since you passed his tests, hmm?";
next;
@@ -1017,7 +1017,7 @@ L_Info:
}
moc_para01,12,179,6 script Battleground Master 4_M_KY_HEAD,{
- set .@checkquest, checkquest(4163);
+ .@checkquest = questprogress(4163);
if (.@checkquest == 2) {
mes "[Battleground Expert]";
mes "Seeing that you sought me out, I guess you want to learn about ^006400Battleground^000000s, eh?";
@@ -1033,7 +1033,7 @@ moc_para01,12,179,6 script Battleground Master 4_M_KY_HEAD,{
mes "If you want to go over anything, let me know.";
close;
}
- } else if (.@checkquest == 0 || .@checkquest == 1) {
+ } else if (.@checkquest == 1) {
mes "[Battleground Expert]";
mes "For 16 years, I experienced the intense heat of battle on the ^006400Battleground^000000s... I am the ^006400Battleground^000000 Expert!";
mes "It seems that the ^006400Party Recruiting Expert^000000 sent you to me since you passed his quiz.";
@@ -1197,7 +1197,7 @@ L_Info:
}
moc_para01,28,167,3 script Memorial Dungeon Expert 4_M_LGTGUARD,{
- set .@checkquest, checkquest(4164);
+ .@checkquest = questprogress(4164);
if (.@checkquest == 2) {
mes "[Memorial Dungeon Expert]";
mes "Since you've come here, it seems you want to learn about the ^006400Memorial Dungeon^000000.";
@@ -1213,7 +1213,7 @@ moc_para01,28,167,3 script Memorial Dungeon Expert 4_M_LGTGUARD,{
mes " If you want to hear about it again, come find me.";
close;
}
- } else if (.@checkquest == 0 || .@checkquest == 1) {
+ } else if (.@checkquest == 1) {
mes "[Memorial Dungeon Expert]";
mes "I am the ^006400Memorial Dungeon^000000 Expert! I studied the ^006400Memorial Dungeon^000000 for 16 years!";
mes "Since you've sought me out, I assume that you've passed the ^006400Battleground Expert^000000's quiz.";
@@ -1375,7 +1375,7 @@ L_Info:
}
moc_para01,14,168,6 script Map Expert 2_M_SAGE_OLD,{
- set .@checkquest, checkquest(4165);
+ .@checkquest = questprogress(4165);
if (.@checkquest == 2) {
mes "[Map Expert]";
mes "Seeing that you came to me, I assume you have some questions about ^006400MAP^000000s?";
@@ -1392,7 +1392,7 @@ moc_para01,14,168,6 script Map Expert 2_M_SAGE_OLD,{
mes "If you have any more questions, come find me.";
close;
}
- } else if (.@checkquest == 0 || .@checkquest == 1) {
+ } else if (.@checkquest == 1) {
mes "[Map Expert]";
mes "I have been researching and studying ^006400MAP^000000s for 16 years and so now I am the ^006400MAP^000000 Expert!";
mes "Since you've sought me out, it seems you've passed ^006400Memorial Dungeon Expert^000000's quiz.";
diff --git a/npc/re/quests/homun_s.txt b/npc/re/quests/homun_s.txt
index d5abca9fd..0c8f39b30 100644
--- a/npc/re/quests/homun_s.txt
+++ b/npc/re/quests/homun_s.txt
@@ -20,13 +20,13 @@ job3_gen01,12,44,3 script Viorel#job3_gen01 4_M_ALCHE_E,{
if (countitem(6415)) {
if (Class == Job_Genetic || Class == Job_Genetic_T || Class == Job_Baby_Genetic) {
disable_items;
- if (checkquest(4159) == -1 && checkquest(4160) == -1) {
+ if (!questprogress(4159) && !questprogress(4160)) {
mes "[Viorel]";
mes "Why are you here?";
mes "Shouldn't you be at ^005DFFJeyna^000000's house?";
close2;
- for(set .@i,4154; .@i<=4160; set .@i,.@i+1) {
- if (checkquest(.@i) > -1)
+ for(.@i = 4154; .@i <= 4160; ++.@i) {
+ if (questprogress(.@i))
erasequest .@i;
}
setquest 4154;
@@ -64,8 +64,8 @@ job3_gen01,12,44,3 script Viorel#job3_gen01 4_M_ALCHE_E,{
close;
}
}
- if ((Class == Job_Genetic || Class == Job_Genetic_T || Class == Job_Baby_Genetic) && (checkquest(4154) > -1)) {
- if ((checkquest(4155) > -1) || (checkquest(4160) > -1)) {
+ if ((Class == Job_Genetic || Class == Job_Genetic_T || Class == Job_Baby_Genetic) && questprogress(4154)) {
+ if (questprogress(4155) || questprogress(4160)) {
mes "[Viorel]";
mes "Weather's great.";
next;
@@ -270,7 +270,7 @@ L_CheckHomunculus:
}
que_house_s,24,47,3 script Viorel#homun_s 4_M_ALCHE_E,{
- if (checkquest(4155) > -1) {
+ if (questprogress(4155)) {
emotion e_dum;
mes "[Viorel]";
mes "Good.";
@@ -400,7 +400,7 @@ que_house_s,24,47,3 script Viorel#homun_s 4_M_ALCHE_E,{
end;
}
}
- } else if (checkquest(4160) > -1) {
+ } else if (questprogress(4160)) {
playbgm "33.mp3"; // Yuna Song
mes "[Viorel]";
mes "The ^FF4800Homunculus^000000 I saw before has returned to its ^0000FFembryo^000000 state.";
@@ -592,7 +592,7 @@ que_house_s,24,47,3 script Viorel#homun_s 4_M_ALCHE_E,{
close;
} else {
for(set .@i,4154; .@i<=4160; set .@i,.@i+1) {
- if (checkquest(.@i) > -1)
+ if (questprogress(.@i))
erasequest .@i;
}
mes "[Viorel]";
@@ -605,7 +605,7 @@ que_house_s,24,47,3 script Viorel#homun_s 4_M_ALCHE_E,{
}
que_house_s,80,42,3 script Jeyna#homun_s 4_F_ALCHE_A,{
- if (checkquest(4156) > -1) {
+ if (questprogress(4156)) {
playbgm "28.mp3"; // You're in Ruins
emotion e_gasp;
mes "[Jeyna]";
@@ -661,14 +661,14 @@ que_house_s,80,42,3 script Jeyna#homun_s 4_F_ALCHE_A,{
setquest 4157;
erasequest 4156;
end;
- } else if (checkquest(4157) > -1) {
+ } else if (questprogress(4157)) {
emotion e_what;
mes "[Jeyna]";
mes "Take a look at the board behind me, on the right.";
close2;
emotion e_gasp,0,"Magic Board#homun_s";
end;
- } else if (checkquest(4158) > -1) {
+ } else if (questprogress(4158)) {
playbgm "28.mp3"; // You're in Ruins
disable_items;
mes "[Jeyna]";
@@ -772,7 +772,7 @@ que_house_s,80,42,3 script Jeyna#homun_s 4_F_ALCHE_A,{
mes "Maybe I shouldn't have asked in the first place.";
close;
}
- } else if (checkquest(4159) > -1 || checkquest(4160) > -1) {
+ } else if (questprogress(4159) || questprogress(4160)) {
playbgm "28.mp3"; // You're in Ruins
mes "[Jeyna]";
mes "^005DFFViorel^000000 will finish the mutation process.";
@@ -790,7 +790,7 @@ que_house_s,80,42,3 script Jeyna#homun_s 4_F_ALCHE_A,{
warp "que_house_s",19,42;
end;
} else {
- if (checkquest(4154) > -1)
+ if (questprogress(4154))
erasequest 4154;
mes "[Jeyna]";
mes "Hey, how did you get in here?";
@@ -847,7 +847,7 @@ que_house_s,83,47,3 script Magic Board#homun_s 4_BOARD3,{
mes "--------------------------";
mes "The rest is sealed because it seems to be a private message.";
close2;
- if (checkquest(4157) > -1) {
+ if (questprogress(4157)) {
setquest 4158;
erasequest 4157;
}
diff --git a/npc/re/quests/magic_books.txt b/npc/re/quests/magic_books.txt
index 0fd885d8f..eac06cb83 100644
--- a/npc/re/quests/magic_books.txt
+++ b/npc/re/quests/magic_books.txt
@@ -626,7 +626,7 @@ mid_camp,255,244,4 script Galfos 4_M_JOB_WIZARD,{
mes "Are you kidding me? You already have the book!";
close;
}
- if ((.@i == 1 && checkquest(12218) == 2) || (.@i == 2 && checkquest(12219) == 2 && checkquest(12220) == 2 && checkquest(12221) == 2 && checkquest(12222) == 2)) {
+ if ((.@i == 1 && questprogress(12218) == 2) || (.@i == 2 && questprogress(12219) == 2 && questprogress(12220) == 2 && questprogress(12221) == 2 && questprogress(12222) == 2)) {
mes "Oh my, I sense incredible energy coming from you. This is great! Now we're ready to make the Ultimate Magic Book.";
next;
mes "[Galfos]";
@@ -676,11 +676,11 @@ dic_in01,25,190,0 script Mysterious Documents CLEAR_NPC,{
mes "When you approach the documents, an Evil Giant that looks like the archive manager tries to call Guard Galton. You should get out of here quickly.";
close;
}
- if (checkquest(12165,"PLAYTIME") == 1) {
+ if (questprogress(12165,PLAYTIME) == 1) {
mes "The documents are making you feel nauseous. You should come back later after your stomach settles.";
close;
}
- if (checkquest(12165,"PLAYTIME") == 2) {
+ if (questprogress(12165,PLAYTIME) == 2) {
mes "You don't feel as nauseous anymore. It should be safe to proceed now.";
erasequest 12165;
close;
@@ -703,7 +703,7 @@ dic_in01,25,190,0 script Mysterious Documents CLEAR_NPC,{
if (mac_book == 4) {
if (rand(1,10) == 1) {
if (getskilllv(2213) > 0) {
- if (checkquest(12218) == 1) {
+ if (questprogress(12218) == 1) {
mes "You already own this document.";
close;
}
@@ -721,7 +721,7 @@ dic_in01,25,190,0 script Mysterious Documents CLEAR_NPC,{
}
if (rand(1,10) == 2) {
if (getskilllv(2217) > 0) {
- if (checkquest(12219) == 1) {
+ if (questprogress(12219) == 1) {
mes "You already own this document.";
close;
}
@@ -739,7 +739,7 @@ dic_in01,25,190,0 script Mysterious Documents CLEAR_NPC,{
}
if (rand(1,10) == 3) {
if (getskilllv(2217) > 0) {
- if (checkquest(12220) == 1) {
+ if (questprogress(12220) == 1) {
mes "You already own this document.";
close;
}
@@ -756,7 +756,7 @@ dic_in01,25,190,0 script Mysterious Documents CLEAR_NPC,{
}
if (rand(1,10) == 4) {
if (getskilllv(2217) > 0) {
- if (checkquest(12221) == 1) {
+ if (questprogress(12221) == 1) {
mes "You already own this document.";
close;
}
@@ -774,7 +774,7 @@ dic_in01,25,190,0 script Mysterious Documents CLEAR_NPC,{
}
if (rand(1,10) == 5) {
if (getskilllv(2217) > 0) {
- if (checkquest(12222) == 1) {
+ if (questprogress(12222) == 1) {
mes "You already own this document.";
close;
}
@@ -807,7 +807,7 @@ function script Magic_Book_Essence {
mes "Please lighten your bag.";
close;
}
- if (checkquest(getarg(0)) == 1 && countitem(getarg(1)) >= getarg(2)) {
+ if (questprogress(getarg(0)) == 1 && countitem(getarg(1)) >= getarg(2)) {
specialeffect2 EF_BLIND;
specialeffect2 EF_BEGINSPELL;
progressbar "ffff00",4;
@@ -823,7 +823,7 @@ function script Magic_Book_Essence {
mes "^008888You have failed to refine the essence using "+getarg(2)+" "+getitemname(getarg(1))+"s.^000000";
close;
}
- if (checkquest(getarg(0)) == 2) {
+ if (questprogress(getarg(0)) == 2) {
mes "You've already created "+getarg(3)+" Essence in this area.";
close;
}
diff --git a/npc/re/quests/quests_brasilis.txt b/npc/re/quests/quests_brasilis.txt
index 33758fe9a..e74d14c77 100644
--- a/npc/re/quests/quests_brasilis.txt
+++ b/npc/re/quests/quests_brasilis.txt
@@ -31,22 +31,22 @@ brasilis,297,307,5 script Angelo#br 1_M_04,{
mes "Gosh... what can I do... ?";
close;
}
- if (checkquest(9032,PLAYTIME) == 2) {
+ if (questprogress(9032,PLAYTIME) == 2) {
erasequest 9032;
}
- if (checkquest(9032,PLAYTIME) == 0) {
+ if (questprogress(9032,PLAYTIME) == 1) {
mes "[Angelo]";
mes "The day is not finished yet.";
mes "You can only help once a day. Hehe.";
close;
}
- if (checkquest(9030) == 1) {
+ if (questprogress(9030) == 1) {
mes "[Angelo]";
mes "My pets are in the field outside of the village.";
mes "Why did they leave? Please find them.";
close;
}
- if (checkquest(9031) == 1) {
+ if (questprogress(9031) == 1) {
mes "[Angelo]";
mes "Oh, thank you. You found all of 3 puppies.";
mes "Thanks a lot.";
@@ -89,7 +89,7 @@ OnGo:
}
- script Puppy#bra -1,{
- if (checkquest(9030) == 1) {
+ if (questprogress(9030) == 1) {
if (brazil_kid < 3) {
mes "[Puppy]";
mes "bow wow bow wow!!";
@@ -169,9 +169,8 @@ brasilis,192,133,6 script Lucia#brasilis 4_F_BRZ_WOMAN,{
close;
}
else {
- set .@nQState1,checkquest(9028);
- set .@nQState2,checkquest(9029);
- if (.@nQState1 == -1) {
+ .@nQState = questprogress(9028);
+ if (!.@nQState) {
mes "[Lucia]";
mes "Hello.";
mes "Have you come here to hunt ^FF0000Strange Hydra^000000s?";
@@ -215,7 +214,7 @@ brasilis,192,133,6 script Lucia#brasilis 4_F_BRZ_WOMAN,{
close;
}
}
- else if ((.@nQState1 == 0) || (.@nQState1 == 1)) {
+ else if (.@nQState == 1) {
if (countitem(6221) > 0) {
mes "[Lucia]";
mes "Hello, you really did it!";
@@ -227,7 +226,7 @@ brasilis,192,133,6 script Lucia#brasilis 4_F_BRZ_WOMAN,{
delitem 6221,1; //Mystic_Leaf_Cat_Ball
completequest 9028;
//recall_completequest 9029;
- if (.@nQState2 > -1) erasequest 9029;
+ if (questprogress(9029)) erasequest 9029;
setquest 9029;
consumeitem 607; //Yggdrasilberry
consumeitem 12070; //Luk_Dish05
@@ -290,8 +289,7 @@ brasilis,192,133,6 script Lucia#brasilis 4_F_BRZ_WOMAN,{
else {
mes "[Lucia]";
mes "Oh, ^0000FF"+strcharinfo(0)+"^000000 you're back.";
- set .@nCheckTime,checkquest(9029,PLAYTIME);
- if ((.@nCheckTime == 0) || (.@nCheckTime == 1)) {
+ if (questprogress(9029,PLAYTIME) == 1) {
mes "I'm so grateful for your help.";
mes "Each ^006400Hydra Ball^000000 is provided ^006400every 24 hours^000000";
mes "Please come at the appropriate time.";
@@ -299,7 +297,7 @@ brasilis,192,133,6 script Lucia#brasilis 4_F_BRZ_WOMAN,{
}
else {
//recall_completequest 9028;
- if (.@nQState1 > -1) erasequest 9028;
+ if (.@nQState) erasequest 9028;
completequest 9029;
mes "Did you come here to hunt ^FF0000Strange Hydra^000000s?";
next;
@@ -2849,8 +2847,7 @@ OnInit:
// Iara :: iara.sc
//============================================================
brasilis,315,334,5 script Shaman#nk 4_F_BRZ_INDOLD,{
- set .@iara_re,checkquest(4135,PLAYTIME);
- if ((.@iara_re == 0) || (.@iara_re == 1)) {
+ if (questprogress(4135,PLAYTIME) == 1) {
mes "[Anori]";
mes "I'm still preparing.";
mes "I don't require your help at this time.";
@@ -2858,9 +2855,8 @@ brasilis,315,334,5 script Shaman#nk 4_F_BRZ_INDOLD,{
close;
}
else {
- if (checkquest(4135) > 1) erasequest 4135;
- set .@iara_q,checkquest(4133);
- if ((.@iara_q == 0) || (.@iara_q == 1)) {
+ if (questprogress(4135) == 2) erasequest 4135;
+ if (questprogress(4133) == 1) {
mes "[Anori]";
mes "To block Iara ";
mes "seducing the tribes";
@@ -2914,8 +2910,7 @@ brasilis,315,334,5 script Shaman#nk 4_F_BRZ_INDOLD,{
mes "The tribe is facing a major threat.";
close;
}
- set .@re_q,checkquest(4134);
- if (.@re_q == 2) {
+ if (questprogress(4134) == 2) {
mes "[Anori]";
mes "you are...";
mes "the adventurer who came for the";
@@ -3138,7 +3133,7 @@ bra_fild01,188,301,5 script Native Warrior#nk 4_M_BRZ_INDIAN,{
mes "[Native Warrior]";
mes "When will she come out of the waterfall again...?";
next;
- if ((checkquest(4133) >= 0) || (checkquest(4134) >= 0)) {
+ if (questprogress(4133) || questprogress(4134)) {
mes "[" + strcharinfo(0) + "]";
mes "(Wh...what's this guy?)";
}
diff --git a/npc/re/quests/quests_dewata.txt b/npc/re/quests/quests_dewata.txt
index e3d1a7302..a2424cdfc 100644
--- a/npc/re/quests/quests_dewata.txt
+++ b/npc/re/quests/quests_dewata.txt
@@ -754,7 +754,7 @@ dewata,109,262,4 script Memo#dew_drink 4_M_DEWOLDMAN,{
close;
}
}
- set .@playtime, checkquest(5044,PLAYTIME);
+ .@playtime = questprogress(5044,PLAYTIME);
if (.@playtime == 0) {
mes "[Memo]";
mes "Will you help me again tomorrow?";
@@ -913,14 +913,14 @@ dewata,109,262,4 script Memo#dew_drink 4_M_DEWOLDMAN,{
set dew_drink,8;
close;
} else if (dew_drink == 8) {
- if (checkquest(5043,PLAYTIME) == 0) {
+ if (questprogress(5043,PLAYTIME) == 1) {
mes "[Memo]";
mes "... ... ...";
emotion e_swt2;
next;
mes "- Memo is making an ark. -";
close;
- } else if (checkquest(5043,PLAYTIME) == -1) {
+ } else if (!questprogress(5043,PLAYTIME)) {
mes "- There is error in the quest. -";
close;
}
@@ -968,7 +968,7 @@ dewata,109,262,4 script Memo#dew_drink 4_M_DEWOLDMAN,{
close;
} else if (dew_drink == 10) {
for(set .@i,0; .@i<7; set .@i,.@i+1)
- if (checkquest(5045+.@i) > -1)
+ if (questprogress(5045+.@i))
set .@j, .@j | (1<<.@i);
if (.@j == 0) {
mes "[Memo]";
@@ -1166,14 +1166,14 @@ dew_fild01,114,275,4 script Lero#dew_drink 4_M_DEWMAN,{
mes "Although he is lazy and rather careless, he is the best worker.";
close;
} else if (dew_drink == 4) {
- if (checkquest(5038) > -1) {
+ if (questprogress(5038)) {
mes "[Lero]";
mes "You can ask Poby about the best method of gathering nuts where you met him in the forest. He should be able to teach you the technique.";
next;
mes "[Lero]";
mes "Although he is lazy and rather careless, he is the best worker.";
close;
- } else if (checkquest(5039) > -1) {
+ } else if (questprogress(5039)) {
if (countitem(6402) < 60) {
mes "[Lero]";
mes "Did you gather the nuts already?";
@@ -1226,7 +1226,7 @@ dew_fild01,114,275,4 script Lero#dew_drink 4_M_DEWMAN,{
getitem 6401,30; //Palm_O
close;
} else if (dew_drink == 7) {
- if (checkquest(5042) > -1 && countitem(6401) > 29) {
+ if (questprogress(5042) && countitem(6401) > 29) {
mes "[Lero]";
mes "It is heavier than you might think, so be careful when carrying it.";
next;
@@ -1266,7 +1266,7 @@ dew_fild01,114,275,4 script Lero#dew_drink 4_M_DEWMAN,{
close;
} else if (dew_drink == 10) {
for(set .@i,0; .@i<7; set .@i,.@i+1)
- if (checkquest(5045+.@i) > -1)
+ if (questprogress(5045+.@i))
set .@j, .@j | (1<<.@i);
if (.@j == 0) {
mes "[Lero]";
@@ -1391,7 +1391,7 @@ dew_fild01,259,48,4 script Poby#dew_drink 4_M_DEWBOY,{
emotion e_swt2;
close;
} else if (dew_drink == 4) {
- if (checkquest(5039) > -1) {
+ if (questprogress(5039)) {
if (countitem(6402) > 59) { // Oil_Palm_F
mes "[Poby]";
mes "You got all the fruits. Bring them to Mr. Lero.";
@@ -1440,11 +1440,11 @@ dew_fild01,259,48,4 script Poby#dew_drink 4_M_DEWBOY,{
mes "[Poby]";
mes "Oh! "+strcharinfo(0)+", we meet again. What's going on?";
- if (checkquest(5047) > -1)
+ if (questprogress(5047))
set .@count,10;
- else if (checkquest(5049) > -1)
+ else if (questprogress(5049))
set .@count,15;
- else if (checkquest(5051) > -1)
+ else if (questprogress(5051))
set .@count,20;
if (.@count) {
if (countitem(6401) >= .@count) {
@@ -1501,10 +1501,10 @@ dew_fild01,259,48,4 script Poby#dew_drink 4_M_DEWBOY,{
close;
}
- if (checkquest(5039) > -1) set .@count,60;
- else if (checkquest(5046) > -1) set .@count,20;
- else if (checkquest(5048) > -1) set .@count,30;
- else if (checkquest(5050) > -1) set .@count,40;
+ if (questprogress(5039)) set .@count,60;
+ else if (questprogress(5046)) set .@count,20;
+ else if (questprogress(5048)) set .@count,30;
+ else if (questprogress(5050)) set .@count,40;
if (.@count == 0) {
mes "There's a palm tree";
mes "facing the cool wind.";
diff --git a/npc/re/quests/quests_dicastes.txt b/npc/re/quests/quests_dicastes.txt
index d17b63267..e8d493c9b 100644
--- a/npc/re/quests/quests_dicastes.txt
+++ b/npc/re/quests/quests_dicastes.txt
@@ -443,8 +443,8 @@ sec_in02,10,42,1 script 13.3 Related Reset 4_MAN_BENKUNI,{
mes "[Reset]";
mes "Resets all quest windows including daily and map quests for 13.3.";
freeloop(1);
- for(set .@i,12099; .@i<=12216; set .@i,.@i+1) {
- if (checkquest(.@i) > -1)
+ for(.@i = 12099; .@i <= 12216; ++.@i) {
+ if (questprogress(.@i))
erasequest .@i;
}
freeloop(0);
@@ -455,11 +455,11 @@ sec_in02,10,42,1 script 13.3 Related Reset 4_MAN_BENKUNI,{
//============================================================
function script que_dic {
if (!getarg(0)) {
- if (checkquest(getarg(1),HUNTING) != 2) return;
+ if (questprogress(getarg(1),HUNTING) != 2) return;
mes getarg(3);
}
else if (getarg(0) == 1) {
- if (checkquest(getarg(1)) == -1) return;
+ if (!questprogress(getarg(1))) return;
if (countitem(getarg(3)) < getarg(4)) {
mes "It looks like you are short on the amount.";
close;
@@ -469,8 +469,8 @@ function script que_dic {
delitem getarg(3), getarg(4);
}
else if (getarg(0) == 2) {
- for(set .@i,1; .@i<getargcount(); set .@i,.@i+1) {
- if (checkquest(getarg(.@i)) >= 0)
+ for(.@i = 1; .@i < getargcount(); ++.@i) {
+ if (questprogress(getarg(.@i)))
erasequest getarg(.@i);
}
return;
@@ -507,7 +507,7 @@ dic_in01,48,263,5 script Hunting Dept. 1 Manager 4_MAN_BENKUNI,{
mes "Umm...What are you up to? Anything to do with me?";
close;
}
- if (checkquest(12159,PLAYTIME) == -1) {
+ if (!questprogress(12159,PLAYTIME)) {
mes "[Hunting Dept. 1 Manager]";
mes "So you didn't get";
mes "any requests yet.";
@@ -516,7 +516,7 @@ dic_in01,48,263,5 script Hunting Dept. 1 Manager 4_MAN_BENKUNI,{
mes "you one. Try meeting him.";
close;
}
- else if (checkquest(12159,PLAYTIME) == 2) {
+ else if (questprogress(12159,PLAYTIME) == 2) {
mes "[Hunting Dept. 1 Manager]";
mes "Time limit has expired for the existing request.";
next;
@@ -577,7 +577,7 @@ dic_in01,51,266,6 script Hunting Dept. 2 Manager 4_MAN_BENKUNI,{
mes "Ha ha, you will need to train a little more to work with me.";
close;
}
- if (checkquest(12160,PLAYTIME) == -1) {
+ if (!questprogress(12160,PLAYTIME)) {
mes "[Hunting Dept. 2 Manager]";
mes "So you didn't get";
mes "any requests yet.";
@@ -586,7 +586,7 @@ dic_in01,51,266,6 script Hunting Dept. 2 Manager 4_MAN_BENKUNI,{
mes "you one. Try to find him.";
close;
}
- else if (checkquest(12160,PLAYTIME) == 2) {
+ else if (questprogress(12160,PLAYTIME) == 2) {
mes "[Hunting Dept. 2 Manager]";
mes "Kalipo seems to have another request for you.";
next;
@@ -646,7 +646,7 @@ dic_in01,51,270,7 script Supply Dept. 1 Manager 4_MAN_BENKUNI,{
mes "You gotta be strong enough to deal with Supply Dept. 1.";
close;
}
- if (checkquest(12161,PLAYTIME) == -1) {
+ if (!questprogress(12161,PLAYTIME)) {
mes "[Supply Dept. 1 Manager]";
mes "So you didn't get";
mes "any requests yet.";
@@ -655,7 +655,7 @@ dic_in01,51,270,7 script Supply Dept. 1 Manager 4_MAN_BENKUNI,{
mes "you one. Try meeting him.";
close;
}
- else if (checkquest(12161,PLAYTIME) == 2) {
+ else if (questprogress(12161,PLAYTIME) == 2) {
mes "[Supply Dept. 1 Manager]";
mes "Pura is looking for you.";
next;
@@ -717,7 +717,7 @@ dic_in01,48,273,8 script Supply Dept. 2 Manager 4_MAN_BENKUNI,{
mes "No way, You can't stand the job of Supply Dept. 2 with that weak body.";
close;
}
- if (checkquest(12162,PLAYTIME) == -1) {
+ if (!questprogress(12162,PLAYTIME)) {
mes "[Supply Dept. 2 Manager]";
mes "So you didn't get";
mes "any requests yet.";
@@ -726,7 +726,7 @@ dic_in01,48,273,8 script Supply Dept. 2 Manager 4_MAN_BENKUNI,{
mes "you one. Try meeting him.";
close;
}
- else if (checkquest(12162,PLAYTIME) == 2) {
+ else if (questprogress(12162,PLAYTIME) == 2) {
mes "[Supply Dept. 2 Manager]";
mes "I erased all records related with the previous request. Tragis is looking for you so hurry up to meet him.";
next;
@@ -784,7 +784,7 @@ dic_in01,43,273,1 script Transport Dept. 1 Mgr 4_MAN_BENKUNI,{
mes "You're not qualified. You won't last a day with your strength working here at Transport Dept. 1.";
close;
}
- if (checkquest(12163,PLAYTIME) == -1) {
+ if (!questprogress(12163,PLAYTIME)) {
mes "[Transport Dept. 1 Manager]";
mes "So you didn't get";
mes "any requests yet.";
@@ -793,7 +793,7 @@ dic_in01,43,273,1 script Transport Dept. 1 Mgr 4_MAN_BENKUNI,{
mes "you one. Try meeting him.";
close;
}
- else if (checkquest(12163,PLAYTIME) == 2) {
+ else if (questprogress(12163,PLAYTIME) == 2) {
mes "[Transport Dept. 1 Manager]";
mes "I erased all records related with the previous request. Calyon is looking for you so hurry up to meet him.";
next;
@@ -858,7 +858,7 @@ dic_in01,40,270,2 script Transport Dept. 2 Mgr 4_MAN_BENKUNI,{
mes "You're not qualified. You won't last a day with your strength working here at Transport Dept. 2.";
close;
}
- if (checkquest(12164) == -1) {
+ if (!questprogress(12164)) {
mes "[Transport Dept. 2 Manager]";
mes "So you didn't get";
mes "any requests yet.";
@@ -867,7 +867,7 @@ dic_in01,40,270,2 script Transport Dept. 2 Mgr 4_MAN_BENKUNI,{
mes "you one. Try meeting him.";
close;
}
- else if (checkquest(12164,PLAYTIME) == 2) {
+ else if (questprogress(12164,PLAYTIME) == 2) {
mes "[Transport Dept. 2 Manager]";
mes "I erased all records related with the previous request. Moltuka is looking for you so hurry up to meet him.";
next;
@@ -1026,12 +1026,12 @@ dic_in01,40,193,1 script Papyrus#0001 4_MAN_NITT,{
mes "When you try to open and read a document, a Sapha manager motions to call Guard Galten. Let's get out of here quickly.";
close;
}
- if (checkquest(12165,PLAYTIME) == 2) {
+ if (questprogress(12165,PLAYTIME) == 2) {
mes "Feeling a bit better";
erasequest 12165;
close;
}
- else if (checkquest(12165,PLAYTIME) != -1) {
+ else if (questprogress(12165,PLAYTIME)) {
mes "Ugh... feel dizzy from simply staring at the document. Will come back after cooling down";
close;
}
@@ -1099,7 +1099,7 @@ dic_in01,40,193,1 script Papyrus#0001 4_MAN_NITT,{
close;
function eldicastes_dp {
- if (checkquest(getarg(0)) >= 0) {
+ if (questprogress(getarg(0))) {
mes "You've found a document you already have.";
close;
}
@@ -1120,7 +1120,7 @@ dic_in01,25,187,0 duplicate(Document Package#main) Document Package#0004 CLEAR_N
// Unknown Relics
//============================================================
function script unknown_d {
- if (checkquest(getarg(0)) == -1) {
+ if (!questprogress(getarg(0))) {
mes "You see some traces of digging.";
close;
}
@@ -1465,14 +1465,14 @@ dic_in01,294,276,5 script Secret Adjutant#ep133_2 4_M_CATMAN2,{
}
}
else if (ep13_3_ahtdayq == 2) {
- if (checkquest(7200,PLAYTIME) == 0 || checkquest(7200,PLAYTIME) == 1) {
+ if (questprogress(7200,PLAYTIME) == 1) {
mes "[Cheshire]";
mes "Not just yet.";
mes "We must plan the cleanup near the crack carefully.";
mes "Come back later.";
close2;
}
- else if (checkquest(7200,PLAYTIME) == 2) {
+ else if (questprogress(7200,PLAYTIME) == 2) {
mes "[Cheshire]";
mes "Back to work today.";
mes "Clotted Bloodstain, Piece of Frozen Skin, Strange Magic Stone..";
@@ -1482,7 +1482,7 @@ dic_in01,294,276,5 script Secret Adjutant#ep133_2 4_M_CATMAN2,{
mes "Collect 10 of each as always.";
mes "Got it?";
set ep13_3_ahtdayq, 1;
- if (checkquest(7200,PLAYTIME) >= 0) erasequest 7200;
+ if (questprogress(7200,PLAYTIME)) erasequest 7200;
setquest 7201;
next;
mes "You've received a request from Cheshire to clean up the crack area.";
@@ -2339,10 +2339,10 @@ dicastes01,223,190,1 script Calyon#pa8029 4_MAN_NITT,{
mes "Ha ha, come back again after you are trained more. I have no request that fits you.";
close;
}
- if (checkquest(12163,PLAYTIME) == 2) {
+ if (questprogress(12163,PLAYTIME) == 2) {
mes "Calculate your request activities with the ^800080Transport Dept. 1 Manager^000000 at Operations and then come back.";
close;
- } else if (checkquest(12163,PLAYTIME) != -1) {
+ } else if (questprogress(12163,PLAYTIME)) {
mes "We're done for the day. You can report back to the ^800080Transport Dept. 1 Manager^000000 at Operations. Good luck.";
close;
}
@@ -2512,12 +2512,12 @@ dicastes01,211,178,2 script Moltuka#pa0829 4_MAN_NITT,{
mes "Ha ha, come back again after you are trained more. I have no request that fits you.";
close;
}
- if (checkquest(12164,PLAYTIME) == 2) {
+ if (questprogress(12164,PLAYTIME) == 2) {
mes "[Moltuka]";
mes "Have you met the ^990099Transport Dept. 2 Manager^000000 at Operations? I will give you a new request after you clear your request history.";
close;
}
- else if (checkquest(12164,PLAYTIME) != -1) {
+ else if (questprogress(12164,PLAYTIME)) {
mes "[Moltuka]";
mes "I don't have any requests for you now. Report back to the ^990099Transport Dept. 2 Manager^000000 at Operations after you complete all requests.";
close;
@@ -2736,13 +2736,13 @@ dicastes01,175,217,5 script Kalipo#pa0829 4_MAN_NITT,{
mes "Ha ha ha, many other adventurers are giving a helping hand. I'll see you next time.";
close;
}
- if (checkquest(12160,PLAYTIME) == 2) {
+ if (questprogress(12160,PLAYTIME) == 2) {
mes "[Kalipo]";
mes "Please come back after checking";
mes "previous requests with the ^990099Hunting Dept. 2 Manager^000000.";
close;
}
- else if (checkquest(12160,PLAYTIME) > -1) {
+ else if (questprogress(12160,PLAYTIME)) {
mes "[Kalipo]";
mes "I do not have any additional requests. Please report to the ^990099Hunting Dept. 2 Manager^000000 at Operations to report request completion.";
close;
@@ -2878,12 +2878,12 @@ dicastes01,187,230,5 script Laponte#pa0829 4_MAN_NITT,{
mes "Ha ha ha, many other adventurers are giving a helping hand. I'll see you next time.";
close;
}
- if (checkquest(12159,PLAYTIME) > -1 && checkquest(12159,PLAYTIME) < 2) {
+ if (questprogress(12159,PLAYTIME) && questprogress(12159,PLAYTIME) != 2) {
mes "[Laponte]";
mes "I do not have any additional requests. Please report to the ^990099Hunting Dept. 1 Manager^000000 at Operations to report request completion.";
close;
}
- else if (checkquest(12159,PLAYTIME) == 2) {
+ else if (questprogress(12159,PLAYTIME) == 2) {
mes "[Laponte]";
mes "Please come back after checking";
mes "previous requests with the ^990099Hunting Dept. 1 Manager^000000.";
@@ -3050,12 +3050,12 @@ dicastes01,208,230,3 script Pura#pa0829 4_MAN_NITT,{
mes "We are not that unfortunate to receive help from you.";
close;
}
- if (checkquest(12161,PLAYTIME) == 2) {
+ if (questprogress(12161,PLAYTIME) == 2) {
mes "[Pura]";
mes "Have you already met the ^990099Supply Dept. 1 Manager^000000 at Operations? I will give you a new request after you clear your request history.";
close;
}
- else if (checkquest(12161,PLAYTIME) > -1) {
+ else if (questprogress(12161,PLAYTIME)) {
mes "[Pura]";
mes "I don't have any requests for you now. Report back to the ^990099Supply Dept. 1 Manager^000000 at Operations after you complete all requests.";
close;
@@ -3240,12 +3240,12 @@ dicastes01,225,211,3 script Tragis#pa0829 4_MAN_NITT,{
mes "It is pretty embarassing that you are looking for a request with your level, you know that?";
close;
}
- if (checkquest(12162,PLAYTIME) == 2) {
+ if (questprogress(12162,PLAYTIME) == 2) {
mes "[Tragis]";
mes "Calculate your request activities with the ^990099Supply Dept. 2 Manager^000000 at Operations and then come back.";
close;
}
- else if (checkquest(12162,PLAYTIME) > -1) {
+ else if (questprogress(12162,PLAYTIME)) {
mes "[Tragis]";
mes "I don't have any requests for you now. Report back to the ^990099Supply Dept. 2 Manager^000000 at Operations after you complete all requests.";
close;
@@ -3845,9 +3845,10 @@ dic_in01,245,119,4 script Shay#ep133_13 4_M_ACROSS,{
"7190","Galtens are interested in the Cat Merchant for their cat ears.";
mes "[" + strcharinfo(0) + "]";
mes "I'm trying to organize the information I've collected.";
- for (set .@size, getarraysize(.@ward$); .@i < .@size; set .@i, .@i + 2)
- if (checkquest(atoi(.@ward$[.@i])) >= 0) {
- set .@sealall, .@sealall + 1;
+ .@size = getarraysize(.@ward$);
+ for (.@i = 0; .@i < .@size; .@i += 2)
+ if (questprogress(atoi(.@ward$[.@i]))) {
+ ++.@sealall;
mes .@ward$[.@i+1];
}
if (!.@sealall) mes "But what should I do with the collected information?";
@@ -4050,8 +4051,8 @@ dic_in01,245,119,4 script Shay#ep133_13 4_M_ACROSS,{
mes "Meet Ahat by collecting exploit certifications.";
mes "And then find doubt what is the relationship between him and the crack.";
set ep13_3_secret, 12;
- for (set .@i, 0; .@i < getarraysize(.@quest); set .@i, .@i + 1)
- if (checkquest(.@quest[.@i]) >= 0) erasequest .@quest[.@i];
+ for (.@i = 0; .@i < getarraysize(.@quest); ++.@i)
+ if (questprogress(.@quest[.@i])) erasequest .@quest[.@i];
setquest 7197;
break;
}
@@ -4315,7 +4316,7 @@ dicastes01,207,210,5 script Walking Knit#ep133_15 4_MAN_BENKUNI,{
mes "Ah, did you see the group of cats in front of the castle?";
mes "They are really soft and cuddly unlike us.";
next;
- if (checkquest(7188) >= -1) {
+ if (questprogress(7188)) {
mes "[Knit]";
mes "And especially their ear and tail!!";
next;
@@ -4404,7 +4405,7 @@ dicastes01,112,248,5 script Resting Piom#ep133_16 4_MAN_PIOM5,{
mes "Huh? You're... human!";
mes "Why are you here?";
next;
- if (checkquest(7189) >= -1) {
+ if (questprogress(7189)) {
select("About a human with cat ears..");
mes "[Piom]";
mes "HAHAHAHA!!!";
@@ -4476,7 +4477,7 @@ dicastes01,249,140,3 script Training Galten#ep133_17 4_MAN_GALTUN,{
mes "Hmm? Aren't you the outsider that came here awhile ago?";
mes "Have you come to see the training grounds?";
next;
- if (checkquest(7190) >= -1) {
+ if (questprogress(7190)) {
select("About a human with cat ears..");
mes "[Galten]";
mes "Cat ears?";
@@ -4883,14 +4884,14 @@ dic_fild01,231,174,5 script BK#ep133_18 4_M_MERCAT2,{
if (countitem(.@item[.@type]) == 10) {
mes "Collected enough for Cheshire but";
mes "you may need some more to report separately.";
- if (checkquest(7202) == -1) setquest 7202;
+ if (!questprogress(7202)) setquest 7202;
close;
}
mes "Not enough was collected to fill Cheshire's request.";
close;
}
else if (countitem(.@item[.@type]) == 10) {
- if (checkquest(7202) >= 0) {
+ if (questprogress(7202)) {
setarray .@str$, "stone fragments","bloodstains","pieces of skin";
mes "Need more " + .@str$[.@type] + " to report back to Doha at the expedition camp.";
}
@@ -5219,9 +5220,10 @@ dic_in01,165,104,0 script Frede#13_3_in 4_MAN_PIOM,{
}
else if (ep13_3_bra == 4) {
setarray .@quest_id, 11159,11160,11161,11162,11163,11164;
- for (set .@size, getarraysize(.@quest_id); .@i < .@size; set .@i, .@i + 1)
- if (checkquest(.@quest_id[.@i]) == -1) {
- set .@fail, 1;
+ .@size = getarraysize(.@quest_id);
+ for (.@i = 0; .@i < .@size; ++.@i)
+ if (!questprogress(.@quest_id[.@i])) {
+ .@fail = true;
break;
}
if (!.@fail) {
@@ -5307,9 +5309,10 @@ dic_in01,165,104,0 script Frede#13_3_in 4_MAN_PIOM,{
close;
}
setarray .@quest_id, 11165,11166,11167,11168,11169,11170;
- for (set .@size, getarraysize(.@quest_id); .@i < .@size; set .@i, .@i + 1)
- if (checkquest(.@quest_id[.@i]) == -1) {
- set .@fail, 1;
+ .@size = getarraysize(.@quest_id);
+ for (.@i = 0; .@i < .@size; ++.@i)
+ if (!questprogress(.@quest_id[.@i])) {
+ .@fail = true;
break;
}
if (!.@fail) {
@@ -5360,7 +5363,7 @@ dic_dun01,205,43,5 script Brian#ep13_3_ 4_MAN_PIOM4,{
close;
}
else if (ep13_3_bra < 8) {
- if (checkquest(11159) >= 0 || ep13_3_bra != 4) {
+ if (questprogress(11159) || ep13_3_bra != 4) {
mes "[Brian]";
mes "Oh... that reminds me, how many days passed since I came here...";
mes "Do you happen to know what day it is today?";
@@ -5399,7 +5402,7 @@ dic_dun01,205,43,5 script Brian#ep13_3_ 4_MAN_PIOM4,{
close;
}
else if (ep13_3_bra == 8) {
- if (checkquest(11165) >= 0) {
+ if (questprogress(11165)) {
mes "[Brian]";
mes "I'm out of Bradium already.";
mes "Frede has been nagging me about this all the time but now I see why.";
@@ -5461,7 +5464,7 @@ dic_dun01,153,107,4 script Tyler#13_3 4_MAN_PIOM6,{
close;
}
else if (ep13_3_bra == 4) {
- if (checkquest(11161) >= 0) {
+ if (questprogress(11161)) {
mes "[Tyler]";
mes "If you happen to bump into him in the village, please tell him I'm fine and not to worry.";
close;
@@ -5523,7 +5526,7 @@ dic_dun01,153,107,4 script Tyler#13_3 4_MAN_PIOM6,{
close;
}
else if (ep13_3_bra == 8) {
- if (checkquest(11167) >= 0) {
+ if (questprogress(11167)) {
mes "[Tyler]";
mes "Oh!! I was out of Bradium. How did you know!";
mes "Thanks!";
@@ -5591,7 +5594,7 @@ dic_dun01,235,243,0 script John#13_3 4_MAN_PIOM,{
close;
}
else if (ep13_3_bra == 4) {
- if (checkquest(11160) >= 0) {
+ if (questprogress(11160)) {
mes "[John]";
mes "Oh well...";
mes "There... is nothing to worry about.";
@@ -5645,7 +5648,7 @@ dic_dun01,235,243,0 script John#13_3 4_MAN_PIOM,{
close;
}
else if (ep13_3_bra == 8) {
- if (checkquest(11166) >= 0) {
+ if (questprogress(11166)) {
mes "[John]";
mes "......";
mes "Thanks....";
@@ -5691,7 +5694,7 @@ dic_dun02,110,127,5 script Rose#13_3 4_MAN_PIOM6,{
close;
}
else if (ep13_3_bra == 4) {
- if (checkquest(11162) >= 0) {
+ if (questprogress(11162)) {
mes "[Rose]";
mes "Tell him there is no problem at all except that I am too good at my job.";
mes "Because I'm perfect.";
@@ -5729,7 +5732,7 @@ dic_dun02,110,127,5 script Rose#13_3 4_MAN_PIOM6,{
close;
}
else if (ep13_3_bra == 8) {
- if (checkquest(11168) >= 0) {
+ if (questprogress(11168)) {
mes "[Rose]";
mes "I'll return to the village soon.";
mes "We can meet up then~";
@@ -5788,7 +5791,7 @@ dic_dun01,64,107,7 script Bain#13_3 4_MAN_PIOM4,{
close;
}
else if (ep13_3_bra == 4) {
- if (checkquest(11163) >= 0) {
+ if (questprogress(11163)) {
mes "[Bain]";
mes "Just tell him I'm doing well.";
mes "Simple, isn't it?";
@@ -5819,7 +5822,7 @@ dic_dun01,64,107,7 script Bain#13_3 4_MAN_PIOM4,{
close;
}
else if (ep13_3_bra == 8) {
- if (checkquest(11169) >= 0) {
+ if (questprogress(11169)) {
mes "[Bain]";
mes "But I will be in trouble if I don't go back to the village for Bradium.";
next;
@@ -5883,7 +5886,7 @@ dic_dun01,58,225,4 script Lash#13_3 4_MAN_PIOM5,{
close;
}
else if (ep13_3_bra == 4) {
- if (checkquest(11164) >= 0) {
+ if (questprogress(11164)) {
mes "[Lash]";
mes "If you'd like to tell him how I'm doing, look at my forearm. Doesn't it spell out 'Strong' on it?";
next;
@@ -5929,7 +5932,7 @@ dic_dun01,58,225,4 script Lash#13_3 4_MAN_PIOM5,{
close;
}
else if (ep13_3_bra == 8) {
- if (checkquest(11170) >= 0) {
+ if (questprogress(11170)) {
mes "[Lash]";
mes "Wow!!!!";
mes "You've saved me!";
@@ -6050,7 +6053,7 @@ dic_in01,349,129,5 script Bouy#13_3 4_MAN_BENKUNI,{
close;
}
else if (ep13_3_bra == 7) {
- if (checkquest(11175,PLAYTIME) > 1) {
+ if (questprogress(11175,PLAYTIME) == 2) {
mes "[Bouy]";
mes "I did it!";
mes "I was a bit nervous because it has been a long time since I did manual work but I think I did a good job.";
diff --git a/npc/re/quests/quests_eclage.txt b/npc/re/quests/quests_eclage.txt
index 0bc237d58..f7776ec81 100644
--- a/npc/re/quests/quests_eclage.txt
+++ b/npc/re/quests/quests_eclage.txt
@@ -347,7 +347,7 @@ eclage,102,32,4 script Fairy Carpenter#ep14_2 4_M_FAIRYKID2,{
emotion e_sob;
close;
}
- if (checkquest(11312) == -1) {
+ if (!questprogress(11312)) {
mes "[Fairy Carpenter]";
mes "This area is kind of broken, so be careful.";
mes "Otherwise, you'll fall aaaaaall the way down.";
@@ -743,7 +743,7 @@ ecl_in04,109,215,2 script Hiel#pa0829 4_M_FAIRYSCHOLAR,{
// For Eclage
//============================================================
function script F_Eclage_Traveler {
- if (checkquest(7411) > -1 && checkquest(7412) > -1 && checkquest(7413) > -1) {
+ if (questprogress(7411) && questprogress(7412) && questprogress(7413)) {
cutin "minuel01.bmp",4;
donpcevent "Eclage Guard#tl01::OnEnable";
mes "[Eclage Guard]";
@@ -792,7 +792,7 @@ function script F_Eclage_Traveler {
ecl_in01,32,52,4 script Traveler Fome#tl01 4_F_DOGTRAVELER,3,3,{
if (ep14_2_tl == 0) {
- if (checkquest(7411) == -1) {
+ if (!questprogress(7411)) {
mes "[Fome]";
mes "Come here and have a talk with us.";
mes "My name is Fome and I'm from the central region of Alpheim.";
@@ -903,7 +903,7 @@ ecl_in01,32,52,4 script Traveler Fome#tl01 4_F_DOGTRAVELER,3,3,{
close;
}
OnTouch:
- if (ep14_2_tl == 0 && checkquest(7411) == -1 && checkquest(7412) == -1 && checkquest(7413) == -1) {
+ if (ep14_2_tl == 0 && !questprogress(7411) && !questprogress(7412) && !questprogress(7413)) {
mes "A group of travelers of Alpheim are having a conversation.";
emotion e_loud;
next;
@@ -920,7 +920,7 @@ OnTouch:
ecl_in01,32,51,6 script Traveler Litrip#tl02 4_M_DOGTRAVELER,{
if (ep14_2_tl == 0) {
- if (checkquest(7412) == -1) {
+ if (questprogress(7412)) {
mes "[Litrip]";
mes "Oh, look at this strange traveler.";
mes "Come here. My name is Litrip.";
@@ -1008,7 +1008,7 @@ ecl_in01,32,51,6 script Traveler Litrip#tl02 4_M_DOGTRAVELER,{
ecl_in01,35,51,2 script Traveler Chiba#tl03 4_M_DOGTRAVELER2,{
if (ep14_2_tl == 0) {
- if (checkquest(7413) == -1) {
+ if (questprogress(7413)) {
mes "[Chiba]";
mes "You're human from Midgard.";
mes "I'm Chiba.";
@@ -1157,7 +1157,7 @@ ecl_in01,82,70,2 script Eclage Guard#tl02 4_M_FAIRYSOLDIER,{
mes "I see you pretty often.";
mes "I was notified in advance that the Chief of Staff requested for an audience.";
next;
- if (checkquest(7416,PLAYTIME) < 2) {
+ if (questprogress(7416,PLAYTIME) != 2) {
mes "[Eclage Guard]";
mes "But I'm afraid it's too early.";
mes "I think you have to wait for a while.";
@@ -1210,7 +1210,7 @@ ecl_in01,82,70,2 script Eclage Guard#tl02 4_M_FAIRYSOLDIER,{
end;
}
} else if (ep14_2_tl == 5) {
- if (checkquest(7418) == -1) {
+ if (!questprogress(7418)) {
cutin "minuel01.bmp",2;
mes "[Eclage Guard]";
mes "Eh, good to see you again.";
@@ -1428,7 +1428,7 @@ ecl_in03,245,93,2 script Chief of Staff#tl01 4_F_FAIRY,{
warp "ecl_in01",47,28;
end;
} else if (ep14_2_tl == 3) {
- if (checkquest(7416,PLAYTIME) < 2) {
+ if (questprogress(7416,PLAYTIME) != 2) {
mes "[Shenime]";
mes "You need to wait a little longer to see Mayor Jun.";
mes "He is pretty busy, so please bear with us.";
@@ -1618,7 +1618,7 @@ ecl_fild01,205,86,4 script Eclage Messenger Roy#tl 4_M_FAIRYSOLDIER2,{
mes "...Ah... I'm just feeling sorry for myself, so just continue on your way.";
close;
} else {
- if (checkquest(7419) == -1) {
+ if (!questprogress(7419)) {
mes "[Roy]";
mes "It's hard.";
mes "It really is hard.";
@@ -1705,7 +1705,7 @@ eclage,112,40,4 script Eclage Guard Leo#tl 4_M_FAIRYSOLDIER2,{
mes "I hope you enjoy your trip.";
close;
} else {
- if (checkquest(7420) == -1) {
+ if (!questprogress(7420)) {
mes "[Leo]";
mes "Hi, how are you?";
emotion e_gasp;
diff --git a/npc/re/quests/quests_malangdo.txt b/npc/re/quests/quests_malangdo.txt
index 0511a1e55..f6e55302c 100644
--- a/npc/re/quests/quests_malangdo.txt
+++ b/npc/re/quests/quests_malangdo.txt
@@ -1100,12 +1100,12 @@ mal_in02,179,57,1 script Geologist Mali#mal 4_CAT_ADV1,{
getitem 6422,20; //Egrade_Coin
close;
} else if (ma_tomas > 99) {
- if (checkquest(11240) > -1 || checkquest(11241) > -1) {
+ if (questprogress(11240) || questprogress(11241)) {
mes "[Geologist Mali]";
mes "Please listen to ^6666ccmy assistant, Bob^000000 in detail, mew~.";
mes "Get out of here and visit the ^6666cca room on your right^000000, mew~";
close;
- } else if (checkquest(11242) > -1) {
+ } else if (questprogress(11242)) {
mes "[Geologist Mali]";
mes "Ah! Bob complimented you so much on your great job, mew~";
mes "Please help us next time again when you can, mew~";
@@ -1113,13 +1113,13 @@ mal_in02,179,57,1 script Geologist Mali#mal 4_CAT_ADV1,{
getitem 6422,4; //Egrade_Coin
close;
} else {
- if (checkquest(11243,PLAYTIME) == 0 || checkquest(11243,PLAYTIME) == 1) {
+ if (questprogress(11243,PLAYTIME) == 1) {
mes "[Geologist Mali]";
mes "Don't overdo yourself, mew~";
mes "It'd be bad if your health gets worse, mew~";
close;
}
- if (checkquest(11243,PLAYTIME) == 2)
+ if (questprogress(11243,PLAYTIME) == 2)
erasequest 11243;
mes "[Geologist Mali]";
mes "There is a lot more repairing left to do for today!";
@@ -1292,10 +1292,10 @@ mal_in02,140,94,0 script Bob#mal 4_CAT_DOWN,{
changequest 11223,11224;
close;
} else if (ma_tomas > 99) {
- if (checkquest(11240) > -1) {
+ if (questprogress(11240)) {
set @mal_bob_q,2;
goto L_Quest1;
- } else if (checkquest(11241) > -1)
+ } else if (questprogress(11241))
goto L_Quest2;
}
mes "[Bob]";
@@ -1307,7 +1307,7 @@ mal_in02,140,94,0 script Bob#mal 4_CAT_DOWN,{
- script Crack#mal0 -1,{
if (.off) end; // Official script uses a 1-second timer to disable cracks. Added to prevent abuse.
- if (ma_tomas == 15 || checkquest(11241) > -1) {
+ if (ma_tomas == 15 || questprogress(11241)) {
if (countitem(6434) < 1) {
mes "- To repair the crack -";
mes "- you need a Fix Kit. -";
@@ -1363,7 +1363,7 @@ mal_in02,140,94,0 script Bob#mal 4_CAT_DOWN,{
set ma_tomas,16;
changequest 11222,11223;
}
- if (checkquest(11241) > -1) {
+ if (questprogress(11241)) {
changequest 11241,11242;
}
} else {
@@ -1805,7 +1805,7 @@ mal_in01,114,169,5 script Rican#mal 4_CAT_SAILOR4,{
mes "If you see my son, please tell him to get back soon~";
close;
} else if (ma_tomas > 99) {
- if (checkquest(11238) != -1) {
+ if (questprogress(11238)) {
if (countitem(6435) < 30) {
mes "[Rican]";
mes "You need exactly 30 to get a set!";
@@ -1819,13 +1819,13 @@ mal_in01,114,169,5 script Rican#mal 4_CAT_SAILOR4,{
setquest 11239;
getitem 6422,5; //Egrade_Coin
close;
- } else if (checkquest(11239,PLAYTIME) == 0 || checkquest(11239,PLAYTIME) == 1) {
+ } else if (questprogress(11239,PLAYTIME) == 1) {
mes "[Rican]";
mes "Would you like to take a rest for a while?";
mes "It hasn't been a day yet since you last worked~";
close;
} else {
- if (checkquest(11239,PLAYTIME) == 2)
+ if (questprogress(11239,PLAYTIME) == 2)
erasequest 11239;
mes "[Rican]";
mes "Hehe~";
@@ -1900,7 +1900,7 @@ mal_in01,116,168,0 script Dry Machine#mal 2_SLOT_MACHINE,{
mes "Your inventory is too full to proceed. Come back after reducing your load.";
close;
}
- if (ma_tomas == 9 || checkquest(11238) > -1) {
+ if (ma_tomas == 9 || questprogress(11238)) {
if (rand(1,5) == 4) {
mes "- As I put my hand in the sand -";
mes "- a fresh smell comes out. -";
@@ -2385,15 +2385,15 @@ mal_dun01,136,122,3 script Biscuit#mal 4_ASTER,{
getitem 12636,20; //Malang_Sp_Can
close;
} else if (ma_tomas > 99) {
- if (checkquest(11244) > -1) {
+ if (questprogress(11244)) {
set @mal_bob_q,2;
goto L_Quest;
- } else if (checkquest(11245,PLAYTIME) == 0 || checkquest(11245,PLAYTIME) == 1) {
+ } else if (questprogress(11245,PLAYTIME) == 1) {
mes "[Biscuit]";
mes "I'll call you when I need you, so don't worry!";
close;
} else {
- if (checkquest(11245,PLAYTIME) == 2)
+ if (questprogress(11245,PLAYTIME) == 2)
erasequest 11245;
mes "[Biscuit]";
mes "It's the time for Star Candy to have a meal.";
@@ -2890,7 +2890,7 @@ malangdo,175,206,3 script Gobonge#ml 4_CAT_SAILOR5,{
mes "- Can't go next step due to having too many items. -";
close;
}
- if (checkquest(1152,PLAYTIME) == 0) {
+ if (!questprogress(1152,PLAYTIME)) {
mes "[Gobonge]";
mes "Hmm, investigation is not enough.";
mes "We need go back to basic point.";
@@ -2898,10 +2898,10 @@ malangdo,175,206,3 script Gobonge#ml 4_CAT_SAILOR5,{
mes "I might be in pain of stomach";
mes "like usual.";
close;
- } else if (checkquest(1152,PLAYTIME) == 1) {
+ } else if (questprogress(1152,PLAYTIME) == 1) {
erasequest 1152;
set malang_bad_guys,0;
- } else if (checkquest(1152,PLAYTIME) == 2) {
+ } else if (questprogress(1152,PLAYTIME) == 2) {
completequest 1152;
erasequest 1152;
set malang_bad_guys,0;
@@ -3451,7 +3451,7 @@ malangdo,125,147,3 script Patrol Leader#ml 4_CAT_SAILOR2,{
close;
}
} else if (malang_bad_guys == 11) {
- if (checkquest(1154,HUNTING) == 2) {
+ if (questprogress(1154,HUNTING) == 2) {
mes "[Patrol Leader]";
mes "Wow, you did to ^0000FFRed Eruma^000000 so badly!";
mes "I am impressed at your work.";
@@ -3654,7 +3654,7 @@ mal_in02,76,63,7 script Cleanyang 4_CAT_SAILOR1,{
close;
}
} else if (mal_qook == 1) {
- if (checkquest(7261) != -1 && checkquest(7262) != -1 && checkquest(7263) != -1) {
+ if (questprogress(7261) && questprogress(7262) && questprogress(7263)) {
emotion e_omg;
mes "[Cleanyang]";
mes "Uh. What is that? Meow.";
@@ -3839,14 +3839,14 @@ mal_in02,76,63,7 script Cleanyang 4_CAT_SAILOR1,{
next;
switch(select("It's time to promise~:I'm here to see the result~:Shake your butt~")) {
case 1:
- if (checkquest(7267,PLAYTIME) == 0) {
+ if (!questprogress(7267,PLAYTIME)) {
mes "[Cleanyang]";
mes "Uh? Not yet.";
mes "Today's cat's ship biscuit is not provided yet, so I will know that after wait little bit more.";
mes "It might be after chef's distribution of cat's ship biscuit.";
close;
}
- if (checkquest(7268) != -1) {
+ if (questprogress(7268)) {
mes "[Cleanyang]";
mes "My service to you today.";
mes "Recently, there are 9 spot that hided cat's ship biscuit as well.";
@@ -3860,7 +3860,7 @@ mal_in02,76,63,7 script Cleanyang 4_CAT_SAILOR1,{
mes "Please search the 9 spot where hiding frequently.";
close;
}
- if (checkquest(7267,PLAYTIME) == 2)
+ if (questprogress(7267,PLAYTIME) == 2)
completequest 7267;
erasequest 7267;
mes "[Cleanyang]";
@@ -3884,15 +3884,15 @@ mal_in02,76,63,7 script Cleanyang 4_CAT_SAILOR1,{
close;
}
case 2:
- if (checkquest(7268) == -1) {
+ if (!questprogress(7268)) {
mes "[Cleanyang]";
mes "Um? Nobody request for collecting cat's ship biscuit today.";
mes "By the way, what is the result report?";
mes "Are you sick?";
close;
}
- if (checkquest(7261) != -1 && checkquest(7262) != -1 && checkquest(7263) != -1 && checkquest(7269) != -1 && checkquest(7270) != -1 &&
- checkquest(7271) != -1 && checkquest(7272) != -1 && checkquest(7273) != -1 && checkquest(7274) != -1 && checkquest(7275) != -1) {
+ if (questprogress(7261) && questprogress(7262) && questprogress(7263) && questprogress(7269) && questprogress(7270) &&
+ questprogress(7271) && questprogress(7272) && questprogress(7273) && questprogress(7274) && questprogress(7275)) {
mes "[Cleanyang]";
mes "Um, the rising cat's ship biscuit spot!";
mes "Did you collect all fully?";
@@ -3953,7 +3953,7 @@ mal_in02,29,67,0 script #CaptainRoom3 CLEAR_NPC,{
close;
}
if (mal_qook == 1) {
- if (checkquest(7261) == -1) {
+ if (!questprogress(7261)) {
mes "Lots of junk are piled up in a corner of captain's room.";
mes "Cleanyang might not clean in a corner because it is not within his hand.";
next;
@@ -3987,7 +3987,7 @@ mal_in02,29,67,0 script #CaptainRoom3 CLEAR_NPC,{
setquest 7261;
getitem 11536,1; //Cat_Hard_Biscuit
next;
- if (checkquest(7261) != -1 && checkquest(7262) != -1 && checkquest(7263) != -1) {
+ if (questprogress(7261) && questprogress(7262) && questprogress(7263)) {
mes "I guess I searched pretty enough.";
mes "Let's tell Cleanyang that is infested of insects due to cat's ship biscuit is left long time.";
close;
@@ -4000,8 +4000,8 @@ mal_in02,29,67,0 script #CaptainRoom3 CLEAR_NPC,{
mes "I think it's ok now due to we removed all of them.";
close;
}
- if (checkquest(7268) != -1) {
- if (checkquest(7261) == -1) {
+ if (questprogress(7268)) {
+ if (!questprogress(7261)) {
mes "Lots of junk are piled up in a corner of captain's room.";
mes "Cleanyng might not clean in a corner because it is not within his hand.";
mes "He reached out and search under the junk.";
@@ -4031,8 +4031,8 @@ mal_in02,183,49,0 script #MeetingFloor4 CLEAR_NPC,{
mes "- You have too many items so you can't continue the quest. -";
close;
}
- if (mal_qook == 1 || checkquest(7268) != -1) {
- if (checkquest(7263) == -1) {
+ if (mal_qook == 1 || questprogress(7268)) {
+ if (!questprogress(7263)) {
mes "This is ventilation window on the floor. It is really close to Cooking table";
mes "I'm trying to ignore that but it is on my mind. What should I do?";
next;
@@ -4056,7 +4056,7 @@ mal_in02,183,49,0 script #MeetingFloor4 CLEAR_NPC,{
getitem 11536,1; //Cat_Hard_Biscuit
if (mal_qook == 1) {
next;
- if (checkquest(7261) != -1 && checkquest(7262) != -1 && checkquest(7263) != -1) {
+ if (questprogress(7261) && questprogress(7262) && questprogress(7263)) {
mes "I guess I searched pretty enough.";
mes "Let's tell Cleanyang that is infested of insects due to cat's ship biscuit is left long time.";
} else
@@ -4078,8 +4078,8 @@ mal_in02,103,22,0 script #MalBed5 CLEAR_NPC,{
mes "- You have too many items so you can't continue the quest. -";
close;
}
- if (mal_qook == 1 || checkquest(7268) != -1) {
- if (checkquest(7262) == -1) {
+ if (mal_qook == 1 || questprogress(7268)) {
+ if (!questprogress(7262)) {
mes "This is bed for sailors. There is too much hair and so messy.";
mes "At the corner of under the bed is does not reached hand so I'm thinking too much about that.";
next;
@@ -4096,7 +4096,7 @@ mal_in02,103,22,0 script #MalBed5 CLEAR_NPC,{
getitem 11536,1; //Cat_Hard_Biscuit
if (mal_qook == 1) {
next;
- if (checkquest(7261) != -1 && checkquest(7262) != -1 && checkquest(7263) != -1) {
+ if (questprogress(7261) && questprogress(7262) && questprogress(7263)) {
mes "I guess I searched pretty enough.";
mes "Let's tell Cleanyang that is infested of insects due to cat's ship biscuit is left long time.";
} else
@@ -4123,8 +4123,8 @@ malangdo,141,178,0 script #Darkweed6 CLEAR_NPC,{
mes "- You have too many items so you can't continue the quest. -";
close;
}
- if (checkquest(7268) != -1) {
- if (checkquest(7269) == -1) {
+ if (questprogress(7268)) {
+ if (!questprogress(7269)) {
mes "Many weeds are growing in rest area near cat tower.";
mes "It's easily ignored, so it's on my mind.";
next;
@@ -4160,9 +4160,9 @@ malangdo,133,134,0 script Strange Pile of Sand#7 4_SOIL,{
mes "- You have too many items so you can't continue the quest. -";
close;
}
- if (checkquest(7268) != -1) {
+ if (questprogress(7268)) {
set .@quest, (strnpcinfo(0) == "Strange Pile of Sand#7")?7270:7275;
- if (checkquest(.@quest) == -1) {
+ if (!questprogress(.@quest)) {
mes "The pile of sand is billowed like a grave. Should be something in there.";
mes "According to rumors, cats have a habit to bury with sand after stool...";
next;
@@ -4204,8 +4204,8 @@ malangdo,232,131,0 script #UnderStairs8 CLEAR_NPC,{
mes "- You have too many items so you can't continue the quest. -";
close;
}
- if (checkquest(7268) != -1) {
- if (checkquest(7271) == -1) {
+ if (questprogress(7268)) {
+ if (!questprogress(7271)) {
mes "Some weeds are growing under the low stairs.";
mes "It's really hard to find something fell under the stairs..";
next;
@@ -4238,8 +4238,8 @@ mal_in01,74,20,0 script #CornerTower9 CLEAR_NPC,{
mes "- You have too many items so you can't continue the quest. -";
close;
}
- if (checkquest(7268) != -1) {
- if (checkquest(7272) == -1) {
+ if (questprogress(7268)) {
+ if (!questprogress(7272)) {
mes "This cat tower is for playing and resting.";
mes "Dust is piled up because there is gap between the foothold and ground.";
next;
@@ -4269,8 +4269,8 @@ mal_in01,159,225,0 script #CornerLocker10 CLEAR_NPC,{
mes "- You have too many items so you can't continue the quest. -";
close;
}
- if (checkquest(7268) != -1) {
- if (checkquest(7273) == -1) {
+ if (questprogress(7268)) {
+ if (!questprogress(7273)) {
mes "In the corner of the gap between the wall and locker that is used by cat's gamers,";
mes "I can see something there. It's really hard to find object if drop there.";
next;
@@ -4300,8 +4300,8 @@ mal_in01,24,72,0 script #FootholdTower11 CLEAR_NPC,{
mes "- You have too many items so you can't continue the quest. -";
close;
}
- if (checkquest(7268) != -1) {
- if (checkquest(7274) == -1) {
+ if (questprogress(7268)) {
+ if (!questprogress(7274)) {
mes "This cat tower is for playing and resting in Malangdo.";
mes "Dust is piled up because there is gap between the foothold and ground.";
next;
@@ -4485,7 +4485,7 @@ mal_in02,187,58,3 script Chef Nyas 4_CAT_CHEF,{
next;
switch(select("What's today's work?:Food Delivery:Just bored...")) {
case 1:
- if (checkquest(7276,PLAYTIME) == 0) {
+ if (questprogress(7276,PLAYTIME)) {
mes "[Chef Nyas]";
mes "Now, cat's ship biscuit is being baked in this oven.";
mes "It's all for your delivery food.";
@@ -4506,12 +4506,12 @@ mal_in02,187,58,3 script Chef Nyas 4_CAT_CHEF,{
mes "Just take care of them.";
close;
}
- if (checkquest(7276,PLAYTIME) == 2)
+ if (questprogress(7276,PLAYTIME) == 2)
completequest 7276;
mes "[Chef Nyas]";
mes "Here you are.";
mes "I need ingredients for cat's ship biscuit now. Fortunately, you are here at the right moment.";
- if (checkquest(7276) != -1)
+ if (questprogress(7276))
erasequest 7276;
next;
mes "[Chef Nyas]";
@@ -4951,7 +4951,7 @@ malangdo,211,203,4 script [Meow Team] Charo#nya_11 4_CAT_ADV2,{
mes "I'm really disappointed.";
mes "Try again~ you can make it!";
set nyadven02,0;
- if (checkquest(7257) > -1)
+ if (questprogress(7257))
erasequest 7257;
close;
}
@@ -5291,7 +5291,7 @@ malangdo,215,201,3 script [Meow Team] Roku#nya_10 4_CAT_DOWN,{
delitem 12636,1; //Malang_Sp_Can
getitem 6428,1; //Bravery_Card_A
set nyadven02,0;
- if (checkquest(7257) > -1)
+ if (questprogress(7257))
erasequest 7257;
close;
case 2:
@@ -5336,7 +5336,7 @@ malangdo,215,201,3 script [Meow Team] Roku#nya_10 4_CAT_DOWN,{
mes "Do you want to try again?";
mes "I will delete the report of the failed result.";
} else {
- if (checkquest(7257,PLAYTIME) == 0 || checkquest(7257,PLAYTIME) == 1) {
+ if (questprogress(7257,PLAYTIME) == 1) {
mes "[Roku]";
mes "No, not yet.";
mes "Duruduru race is only once for a day.";
@@ -5347,7 +5347,7 @@ malangdo,215,201,3 script [Meow Team] Roku#nya_10 4_CAT_DOWN,{
mes "I know that you will try the Duruduru race.";
mes "I deleted your last report.";
}
- if (checkquest(7257) > -1)
+ if (questprogress(7257))
erasequest 7257;
next;
mes "[Roku]";
@@ -5616,7 +5616,7 @@ malangdo,175,163,0 script Meowbell#nya_12 CLEAR_NPC,{
viewpoint 2,1,1,3,0xFFFFFF;
viewpoint 2,1,1,4,0xFFFFFF;
viewpoint 2,1,1,5,0xFFFFFF;
- if (checkquest(.@quest,PLAYTIME) == 0 || checkquest(.@quest,PLAYTIME) == 1) {
+ if (questprogress(.@quest,PLAYTIME) == 1) {
mes "Knock Meowbell!!";
set nyadven02,27;
changequest .@quest,7257;
@@ -6000,7 +6000,7 @@ malangdo,172,178,7 script Cat Detective#nya_14 4_CAT_ADV2,{
next;
switch(select("How's the condition of Bang?:Ignore it.")) {
case 1:
- if (checkquest(7249,PLAYTIME) == 0 || checkquest(7249,PLAYTIME) == 1) {
+ if (questprogress(7249,PLAYTIME) == 1) {
mes "[Homnya]";
mes "it's so motivated but it's not the time yet.";
mes "Not yet even though naughty machine is noisy.";
@@ -6010,7 +6010,7 @@ malangdo,172,178,7 script Cat Detective#nya_14 4_CAT_ADV2,{
mes "We also have break time.....";
close2;
} else {
- if (checkquest(7249,PLAYTIME) == 2)
+ if (questprogress(7249,PLAYTIME) == 2)
erasequest 7249;
mes "[Homnya]";
mes "Can you hear how noisy this one is?";
@@ -6102,7 +6102,7 @@ malangdo,174,175,0 script Noisy Machine#nya_13 CLEAR_NPC,{
mes "It looks more unstable as it spins faster.";
close;
}
- if (checkquest(7249,PLAYTIME) == 0 || checkquest(7249,PLAYTIME) == 1) {
+ if (questprogress(7249,PLAYTIME) == 1) {
mes "[Homnya]";
mes "It's so motivated, but it's not time yet.";
mes "Not yet, even though the machine is so noisy.";
@@ -6308,7 +6308,7 @@ function script F_Mal_Picture {
return 1;
else if (nyadven != 10)
return 2;
- else if (checkquest(getarg(0)) > -1)
+ else if (questprogress(getarg(0)))
return 3;
else {
mes getarg(2);
@@ -6319,7 +6319,7 @@ function script F_Mal_Picture {
setquest getarg(0);
getitem 6430,1; //Picture_Piece
next;
- if (checkquest(7251) > -1 && checkquest(7252) > -1 && checkquest(7253) > -1 && checkquest(7254) > -1 && checkquest(7255) > -1 && checkquest(7256) > -1) {
+ if (questprogress(7251) && questprogress(7252) && questprogress(7253) && questprogress(7254) && questprogress(7255) && questprogress(7256)) {
mes "It looks like you can put these pieces of paintings together.";
mes "If I found all the pieces, I should go back to Homnya.";
set nyadven,11;
@@ -6686,7 +6686,7 @@ mal_in01,31,210,2 script Cat Gamers Director 4_CAT_MERMASTER,{
setquest 5060;
close;
} else if (malang_gamer == 5) {
- if (checkquest(5060,PLAYTIME) == 0 || checkquest(5060,PLAYTIME) == 1) {
+ if (questprogress(5060,PLAYTIME) == 1) {
mes "Cat Gamers Director seems to be in shock. Let's give him some time to calm down.";
close;
}
@@ -6731,7 +6731,7 @@ mal_in01,31,210,2 script Cat Gamers Director 4_CAT_MERMASTER,{
setquest 5061;
close;
} else if (malang_gamer == 6) {
- if (checkquest(5062) == 2 && checkquest(5063) == 2 && checkquest(5064) == 2 && checkquest(5065) == 2) {
+ if (questprogress(5062) == 2 && questprogress(5063) == 2 && questprogress(5064) == 2 && questprogress(5065) == 2) {
mes "[Cat Gamers Director]";
mes "Heh~ It seems some humans are scamming cats around this town.";
next;
@@ -6780,7 +6780,7 @@ mal_in01,31,210,2 script Cat Gamers Director 4_CAT_MERMASTER,{
mes "I appreciate your help, "+strcharinfo(0)+". heh~";
close;
} else if (malang_gamer == 7) {
- if (checkquest(5060,PLAYTIME) == 0 || checkquest(5060,PLAYTIME) == 1) {
+ if (questprogress(5060,PLAYTIME) == 1) {
mes "Cat Gamers Director seems to be in shock once again. Better give more time to calm down.";
close;
}
@@ -6847,7 +6847,7 @@ mal_in01,31,210,2 script Cat Gamers Director 4_CAT_MERMASTER,{
setquest 5068;
close;
} else if (malang_gamer == 10) {
- if (checkquest(5068,PLAYTIME) == 0 || checkquest(5068,PLAYTIME) == 1) {
+ if (questprogress(5068,PLAYTIME) == 1) {
mes "[Cat Gamers Director]";
mes "Still receiving petition letters. Heh~";
next;
@@ -7019,7 +7019,7 @@ mal_in01,31,210,2 script Cat Gamers Director 4_CAT_MERMASTER,{
close;
}
} else if (malang_gamer == 12) {
- if (checkquest(5069,PLAYTIME) == 0 || checkquest(5069,PLAYTIME) == 1) {
+ if (questprogress(5069,PLAYTIME) == 1) {
mes "[Cat Gamers Director]";
mes "Heh~ You want to get the '^0000FFCat Gamers Certificate^000000' faster. Heh~ It's not really easy to get such a certificate easily.";
next;
@@ -7133,10 +7133,10 @@ mal_in01,31,210,2 script Cat Gamers Director 4_CAT_MERMASTER,{
// Detect quest (ID range 5074~5090)
mes "[Cat Gamers Director]";
- if (checkquest(5074,HUNTING) > -1) {
+ if (questprogress(5074,HUNTING)) {
mes "Heh~ It's not like I didn't feed them right... Heh~ I hope it was not too much for you, "+strcharinfo(0)+".";
next;
- if (checkquest(5074,HUNTING) == 2 && countitem(1023) >= 10) {
+ if (questprogress(5074,HUNTING) == 2 && countitem(1023) >= 10) {
delitem 1023,10; //Fish_Tail
callsub L_CompleteQuest,5074,
"Heh~ So, you brought 30 Phens and 10 Fish Tails, just as ordered.";
@@ -7145,10 +7145,10 @@ mal_in01,31,210,2 script Cat Gamers Director 4_CAT_MERMASTER,{
mes "Heh~ It says in the note to bring 30 Phens and 10 Fish Tails. Heh~ Maybe you didn't catch enough Phens, or forgot some Fish Tails? Heh~";
close;
}
- } else if (checkquest(5075,HUNTING) > -1) {
+ } else if (questprogress(5075,HUNTING)) {
mes "Heh~ Hmm, 50 Marses, and 30 Milk Bottles... Heh~";
next;
- if (checkquest(5075,HUNTING) == 2 && countitem(519) >= 30) {
+ if (questprogress(5075,HUNTING) == 2 && countitem(519) >= 30) {
delitem 519,30; //Milk
callsub L_CompleteQuest,5075,
"Heh~ Guess they wanted some healthy food. Heh~ They should have just told me... Let me show you my skills. Heh~";
@@ -7157,10 +7157,10 @@ mal_in01,31,210,2 script Cat Gamers Director 4_CAT_MERMASTER,{
mes "Heh~ But, where are 50 Marses and 30 Milk Bottles? Heh~ Please see if you haven't missed them...";
close;
}
- } else if (checkquest(5076,HUNTING) > -1) {
+ } else if (questprogress(5076,HUNTING)) {
mes "Heh~ Our team must have some grudge over Team 'Dog n Waltz', enough to ask you for this kind of favor...";
next;
- if (checkquest(5076,HUNTING) == 2) {
+ if (questprogress(5076,HUNTING) == 2) {
callsub L_CompleteQuest,5076,
"Heh~ So you have finished harassing 30 Kobold Archers as noted. Heh~ Outstanding.";
} else {
@@ -7168,11 +7168,11 @@ mal_in01,31,210,2 script Cat Gamers Director 4_CAT_MERMASTER,{
mes "Heh~ It says on the note, harass 30 Kobold Archers. Heh~ Please check if you have harassed 30 of them already.";
close;
}
- } else if (checkquest(5077,HUNTING) > -1) {
+ } else if (questprogress(5077,HUNTING)) {
mes "Heh~ Ah, quickness training. It's good to see our players trying their best on training.";
mes "Heh~ Yes, nothing is better than mouse catching for improving quickness.";
next;
- if (checkquest(5077,HUNTING) == 2) {
+ if (questprogress(5077,HUNTING) == 2) {
callsub L_CompleteQuest,5077,
"Heh~ Oh, you got some fresh and chubby Cramps. Heh~ Great.";
} else {
@@ -7180,10 +7180,10 @@ mal_in01,31,210,2 script Cat Gamers Director 4_CAT_MERMASTER,{
mes "Heh? Where are those 10 Cramps you promised? Heh~ You didn't eat them... did you?";
close;
}
- } else if (checkquest(5078,HUNTING) > -1) {
+ } else if (questprogress(5078,HUNTING)) {
mes "Heh~ '50 Peco Peco please!! Let's party.' Hmm... Heh~ 50 Pecos can feed all of our neighbors.";
next;
- if (checkquest(5078,HUNTING) == 2) {
+ if (questprogress(5078,HUNTING) == 2) {
callsub L_CompleteQuest,5078,
"Heh~ Wow, you did bring 50 Peco Pecos. Heh~ I guess we'll really have a party this evening.";
} else {
@@ -7191,7 +7191,7 @@ mal_in01,31,210,2 script Cat Gamers Director 4_CAT_MERMASTER,{
mes "Heh~ Where are those Peco Pecos? Still not ready? Heh~";
close;
}
- } else if (checkquest(5079) > -1) {
+ } else if (questprogress(5079)) {
mes "Heh~ Hmm... let me see... Heh~ That's right, I was worrying about our team getting so nervous before the actual game... But, they won't even talk to me about it.";
next;
if (countitem(7038) >= 20) {
@@ -7203,7 +7203,7 @@ mal_in01,31,210,2 script Cat Gamers Director 4_CAT_MERMASTER,{
mes "Heh~ Where are those 20 yarns? It says 20 on the note, right...? Please check if you have lost them somewhere.";
close;
}
- } else if (checkquest(5080) > -1) {
+ } else if (questprogress(5080)) {
mes "Heh~ The note says, get me 30 Rat Tails for a snack.";
next;
if (countitem(1016) >= 30) {
@@ -7215,7 +7215,7 @@ mal_in01,31,210,2 script Cat Gamers Director 4_CAT_MERMASTER,{
mes "Heh~ Where are those 30 Rat Tails? Please check and come back later.";
close;
}
- } else if (checkquest(5081) > -1) {
+ } else if (questprogress(5081)) {
mes "Heh~ It says 5 on the note... 5 of what? What?! Lemons?";
next;
if (countitem(568) >= 5) {
@@ -7227,7 +7227,7 @@ mal_in01,31,210,2 script Cat Gamers Director 4_CAT_MERMASTER,{
mes "Heh~ Let's just get 5 Lemons for them, will you? Heh~ I am still not sure where they want to use them...";
close;
}
- } else if (checkquest(5082) > -1) {
+ } else if (questprogress(5082)) {
mes "Heh~ Give us 10 Ice Pieces or 10 Ice Creams!! Heh~ I personally prefer Ice Cream, just so you know.";
next;
if (countitem(7066) >= 10) {
@@ -7243,10 +7243,10 @@ mal_in01,31,210,2 script Cat Gamers Director 4_CAT_MERMASTER,{
mes "Heh~ Where are the Ice Pieces or Ice Creams? You should get them before they melt...";
close;
}
- } else if (checkquest(5083) > -1 || checkquest(5084) > -1) {
+ } else if (questprogress(5083) || questprogress(5084)) {
mes "Heh~ Here, I found the note from our team. Heh~";
next;
- if (checkquest(5083) > -1) {
+ if (questprogress(5083)) {
mes "[Cat Gamers Director]";
mes "Heh~ It says 'We will meet Eryu together.'. Heh~ Have you met Eryu already? I don't think so... Heh~";
close;
@@ -7254,10 +7254,10 @@ mal_in01,31,210,2 script Cat Gamers Director 4_CAT_MERMASTER,{
callsub L_CompleteQuest,5084,
"Heh~ Oh, you did meet Eryu. Heh~ I will lecture them later for making you work too much... Heh~";
}
- } else if (checkquest(5085) > -1 || checkquest(5086) > -1) {
+ } else if (questprogress(5085) || questprogress(5086)) {
mes "Heh~ Here, I found the note from our team. Heh~";
next;
- if (checkquest(5085) > -1) {
+ if (questprogress(5085)) {
mes "[Cat Gamers Director]";
mes "Heh~ It says 'We will meet Stew together.'. Heh~ Have you met Stew already? I don't think so... Heh~";
close;
@@ -7265,10 +7265,10 @@ mal_in01,31,210,2 script Cat Gamers Director 4_CAT_MERMASTER,{
callsub L_CompleteQuest,5086,
"Heh~ Oh, you did meet Stew. Heh~ I will lecture them later for making you work too much... Heh~";
}
- } else if (checkquest(5087) > -1 || checkquest(5088) > -1) {
+ } else if (questprogress(5087) || questprogress(5088)) {
mes "Heh~ Here, I found the note from our team. Heh~";
next;
- if (checkquest(5087) > -1) {
+ if (questprogress(5087)) {
mes "[Cat Gamers Director]";
mes "Heh~ It says 'We will meet Ketchup together.'. Heh~ Have you met Ketchup already? I don't think so... Heh~";
close;
@@ -7276,10 +7276,10 @@ mal_in01,31,210,2 script Cat Gamers Director 4_CAT_MERMASTER,{
callsub L_CompleteQuest,5088,
"Heh~ Oh, you did meet Ketchup. Heh~ I will lecture them later for making you work too much... Heh~";
}
- } else if (checkquest(5089) > -1 || checkquest(5090) > -1) {
+ } else if (questprogress(5089) || questprogress(5090)) {
mes "Heh~ Here, I found the note from our team. Heh~";
next;
- if (checkquest(5089) > -1) {
+ if (questprogress(5089)) {
mes "[Cat Gamers Director]";
mes "Heh~ It says 'We will meet Eff together.'. Heh~ Have you met Eff already? I don't think so... Heh~";
close;
@@ -7606,8 +7606,8 @@ malangdo,161,197,4 script Eryu#gamer 4_CAT,{
mes "Your inventory is too full to proceed. Come back after reducing your load.";
close;
}
- if (checkquest(5061) == 0 || checkquest(5061) == 1) {
- if (checkquest(5062) == -1) {
+ if (questprogress(5061) == 1) {
+ if (!questprogress(5062)) {
mes "You found Eryu the cat, and start talking.";
next;
mes "[Eryu]";
@@ -7719,7 +7719,7 @@ malangdo,161,197,4 script Eryu#gamer 4_CAT,{
break;
}
close2;
- } else if (checkquest(5062) == 2) {
+ } else if (questprogress(5062) == 2) {
mes "[Eryu]";
mes "Aren't you the magazine writer?";
mes "What brings you here again...?";
@@ -7739,7 +7739,7 @@ malangdo,161,197,4 script Eryu#gamer 4_CAT,{
mes "This is not possible. Please contact an administrator.";
close2;
}
- } else if (checkquest(5083) == 0 || checkquest(5083) == 1) {
+ } else if (questprogress(5083) == 1) {
mes "[Eryu]";
mes "Who are you?";
next;
@@ -7763,7 +7763,7 @@ malangdo,161,197,4 script Eryu#gamer 4_CAT,{
mes "Eryu seems to recognize you.";
mes .@str$;
close2;
- } else if (checkquest(5084) == 0 || checkquest(5084) == 1) {
+ } else if (questprogress(5084) == 1) {
mes "[Eryu]";
mes "I think you are the writer...";
mes "Hey~ Stop there~";
@@ -7822,8 +7822,8 @@ malangdo,230,197,4 script Stew#gamer 4_CAT_3COLOR,{
mes "Your inventory is too full to proceed. Come back after reducing your load.";
close;
}
- if (checkquest(5061) == 0 || checkquest(5061) == 1) {
- if (checkquest(5063) == -1) {
+ if (questprogress(5061) == 1) {
+ if (!questprogress(5063)) {
mes "You found Stew the cat, and start talking.";
next;
mes "[Stew]";
@@ -7948,7 +7948,7 @@ malangdo,230,197,4 script Stew#gamer 4_CAT_3COLOR,{
break;
}
close2;
- } else if (checkquest(5063) == 2) {
+ } else if (questprogress(5063) == 2) {
mes "[Stew]";
mes "Aren't you from the 'Boom Can' Company?";
mes "Another survey meow?";
@@ -7967,7 +7967,7 @@ malangdo,230,197,4 script Stew#gamer 4_CAT_3COLOR,{
mes "This is not possible. Please contact an administrator.";
close2;
}
- } else if (checkquest(5085) == 0 || checkquest(5085) == 1) {
+ } else if (questprogress(5085) == 1) {
mes "[Stew]";
mes "Who are you meow?";
emotion e_what;
@@ -7992,7 +7992,7 @@ malangdo,230,197,4 script Stew#gamer 4_CAT_3COLOR,{
mes "Stew seems to recognize you.";
mes .@str$;
close2;
- } else if (checkquest(5086) == 0 || checkquest(5086) == 1) {
+ } else if (questprogress(5086) == 1) {
mes "[Stew]";
mes "I think you are from the 'Boom Can' Company, meow... Who are you, meow~";
next;
@@ -8051,8 +8051,8 @@ malangdo,244,144,4 script Ketchup#gamer 4_CAT_SAILOR3,{
mes "Your inventory is too full to proceed. Come back after reducing your load.";
close;
}
- if (checkquest(5061) == 0 || checkquest(5061) == 1) {
- if (checkquest(5064) == -1) {
+ if (questprogress(5061) == 1) {
+ if (!questprogress(5064)) {
mes "You found Ketchup the cat, and start talking.";
next;
mes "[Ketchup]";
@@ -8136,7 +8136,7 @@ malangdo,244,144,4 script Ketchup#gamer 4_CAT_SAILOR3,{
break;
}
close2;
- } else if (checkquest(5064) == 2) {
+ } else if (questprogress(5064) == 2) {
mes "[Ketchup]";
mes "You are...";
emotion e_omg;
@@ -8149,7 +8149,7 @@ malangdo,244,144,4 script Ketchup#gamer 4_CAT_SAILOR3,{
mes "This is not possible. Please contact an administrator.";
close2;
}
- } else if (checkquest(5087) == 0 || checkquest(5087) == 1) {
+ } else if (questprogress(5087) == 1) {
mes "[Ketchup]";
mes "Who are you?";
emotion e_what;
@@ -8182,7 +8182,7 @@ malangdo,244,144,4 script Ketchup#gamer 4_CAT_SAILOR3,{
mes "It seems you need to find Ketchup one more time.";
close2;
}
- } else if (checkquest(5088) == 0 || checkquest(5088) == 1) {
+ } else if (questprogress(5088) == 1) {
mes "[Ketchup]";
mes "Can... 'Cans for Kittens'?";
emotion e_omg;
@@ -8240,8 +8240,8 @@ malangdo,181,119,7 script Eff#gamer 4_CAT_ADV2,{
mes "Your inventory is too full to proceed. Come back after reducing your load.";
close;
}
- if (checkquest(5061) == 0 || checkquest(5061) == 1) {
- if (checkquest(5065) == -1) {
+ if (questprogress(5061) == 1) {
+ if (!questprogress(5065)) {
mes "You found Eff the cat, and start talking.";
next;
mes "[Eff]";
@@ -8395,7 +8395,7 @@ malangdo,181,119,7 script Eff#gamer 4_CAT_ADV2,{
break;
}
close2;
- } else if (checkquest(5065) == 2) {
+ } else if (questprogress(5065) == 2) {
mes "[Eff]";
mes "You are--!!";
mes "Meow~ I want to invest. Meow~";
@@ -8417,7 +8417,7 @@ malangdo,181,119,7 script Eff#gamer 4_CAT_ADV2,{
mes "This is not possible. Please contact an administrator.";
close2;
}
- } else if (checkquest(5089) == 0 || checkquest(5089) == 1) {
+ } else if (questprogress(5089) == 1) {
mes "[Eff]";
mes "Who are you, meow?";
next;
@@ -8440,7 +8440,7 @@ malangdo,181,119,7 script Eff#gamer 4_CAT_ADV2,{
mes "Eff seems to recognize you.";
mes .@str$;
close2;
- } else if (checkquest(5090) == 0 || checkquest(5090) == 1) {
+ } else if (questprogress(5090) == 1) {
mes "[Eff]";
mes "You are--!!";
mes "Meow~ I want to invest. Meow~";
@@ -8502,7 +8502,7 @@ mal_in01,91,216,4 script Ser#gamer 4_CAT_SAILOR1,{
close;
}
for(set .@i,5074; .@i<=5090; set .@i,.@i+1) {
- if (checkquest(.@i) > -1) {
+ if (questprogress(.@i)) {
mes "[Ser]";
mes "Hey, ^0000FF"+strcharinfo(0)+"^000000. You haven't done what we asked you for. A promise is a promise, you know.";
next;
@@ -8535,11 +8535,11 @@ mal_in01,91,216,4 script Ser#gamer 4_CAT_SAILOR1,{
mes "Please go get the certificate.";
close;
}
- if (checkquest(5070,PLAYTIME) == 0 || checkquest(5070,PLAYTIME) == 1) {
+ if (questprogress(5070,PLAYTIME) == 1) {
mes "[Ser]";
mes "Is it tomorrow already? I don't think so! Can't you read the time?";
close;
- } else if (checkquest(5070,PLAYTIME) == 2)
+ } else if (questprogress(5070,PLAYTIME) == 2)
erasequest 5070;
mes "[Ser]";
mes "Oh, ^0000FF"+strcharinfo(0)+"^000000? Want to play the Rock Paper Scissors game?";
@@ -8846,7 +8846,7 @@ mal_in01,86,222,4 script Paa#gamer 4_CAT_SAILOR1,{
close;
}
for(set .@i,5074; .@i<=5090; set .@i,.@i+1) {
- if (checkquest(.@i) > -1) {
+ if (questprogress(.@i)) {
mes "[Paa]";
mes "You haven't done what we asked you for meow. A promise is a promise, you know meow.";
next;
@@ -8879,11 +8879,11 @@ mal_in01,86,222,4 script Paa#gamer 4_CAT_SAILOR1,{
mes "Go get the certificate meow.";
close;
}
- if (checkquest(5070,PLAYTIME) == 0 || checkquest(5070,PLAYTIME) == 1) {
+ if (questprogress(5070,PLAYTIME) == 1) {
mes "[Paa]";
mes "We can only play the game once a day meow. Come tomorrow meow.";
close;
- } else if (checkquest(5070,PLAYTIME) == 2)
+ } else if (questprogress(5070,PLAYTIME) == 2)
erasequest 5070;
mes "[Paa]";
mes "Oh, ^0000FF"+strcharinfo(0)+"^000000 meow? Want to play the Rock Paper Scissors game meow?";
@@ -9176,7 +9176,7 @@ mal_in01,91,222,4 script Kuka#gamer 4_M_BABYCAT,{
close;
}
for(set .@i,5074; .@i<=5090; set .@i,.@i+1) {
- if (checkquest(.@i) > -1) {
+ if (questprogress(.@i)) {
mes "[Kuka]";
mes "You haven't done what we asked you for yo~. A promise is a promise, you know yo~.";
next;
@@ -9209,11 +9209,11 @@ mal_in01,91,222,4 script Kuka#gamer 4_M_BABYCAT,{
mes "Please go get the certificate yo~";
close;
}
- if (checkquest(5071,PLAYTIME) == 0 || checkquest(5071,PLAYTIME) == 1) {
+ if (questprogress(5071,PLAYTIME) == 1) {
mes "[Kuka]";
mes "Is it not tomorrow yet yo~ You can play one game a day yo~ Come back tomorrow yo~";
close;
- } else if (checkquest(5071,PLAYTIME) == 2)
+ } else if (questprogress(5071,PLAYTIME) == 2)
erasequest 5071;
mes "[Kuka]";
mes "Oh great member you, ^0000FF"+strcharinfo(0)+"^000000~ Let's play ChamChamCham yo~";
@@ -9498,7 +9498,7 @@ mal_in01,134,221,4 script KungKung#gamer 4_M_BABYCAT,{
close;
}
for(set .@i,5074; .@i<=5090; set .@i,.@i+1) {
- if (checkquest(.@i) > -1) {
+ if (questprogress(.@i)) {
mes "[KungKung]";
mes "You didn't keep your promise. I have no business with you.";
close;
@@ -9525,11 +9525,11 @@ mal_in01,134,221,4 script KungKung#gamer 4_M_BABYCAT,{
mes "Where is your certificate? You cannot practice with us unless you have that certificate. Go get it.";
close;
}
- if (checkquest(5072,PLAYTIME) == 0 || checkquest(5072,PLAYTIME) == 1) {
+ if (questprogress(5072,PLAYTIME) == 1) {
mes "[KungKung]";
mes "You don't have a watch? Or can't read the time? It's not the time yet.";
close;
- } else if (checkquest(5072,PLAYTIME) == 2)
+ } else if (questprogress(5072,PLAYTIME) == 2)
erasequest 5072;
mes "[KungKung]";
mes "Are you the practice partner? You are late. Let's start right away.";
@@ -9916,7 +9916,7 @@ mal_in01,133,214,6 script Leader#gamer 4_CAT_SAILOR3,{
close;
}
for(set .@i,5074; .@i<=5090; set .@i,.@i+1) {
- if (checkquest(.@i) > -1) {
+ if (questprogress(.@i)) {
mes "[Leader]";
mes "You cannot challenge this Flag Game unless you are done with your assigned work.";
close;
@@ -9943,11 +9943,11 @@ mal_in01,133,214,6 script Leader#gamer 4_CAT_SAILOR3,{
mes "You cannot challenge this Flag Game unless you are wearing our certificate item. Please come back later.";
close;
}
- if (checkquest(5073) == 0 || checkquest(5073) == 1) {
+ if (questprogress(5073) == 1) {
mes "[Leader]";
mes "The Flag Game is only available once a day.";
close;
- } else if (checkquest(5073) == 2)
+ } else if (questprogress(5073) == 2)
erasequest 5073;
mes "[Leader]";
mes "Do you want to challege?";
@@ -10446,8 +10446,8 @@ mal_in01,142,220,6 script Sign#Cat G B2 4_BULLETIN_BOARD2,{
}
mal_in01,155,222,2 script Uneet#gamer 4_LAM,{
- set .@playtime, checkquest(5069,PLAYTIME);
- if (.@playtime == 0 || .@playtime == 1) {
+ .@playtime = questprogress(5069,PLAYTIME);
+ if (.@playtime == 1) {
mes "[Uneet]";
mes "Wow Wot~ What a busy day~";
mes "Oh, you are the one who won the honorable certificate?";
diff --git a/npc/re/quests/quests_malaya.txt b/npc/re/quests/quests_malaya.txt
index 617ccf2c7..c64dd5230 100644
--- a/npc/re/quests/quests_malaya.txt
+++ b/npc/re/quests/quests_malaya.txt
@@ -70,8 +70,8 @@ malaya,266,76,3 script Rodel the Guard#malaya 4_MAL_SOLDIER,4,4,{
mes "I was thinking of giving you the extermination mission that's being carried out in the city. What a shame. ";
close;
}
- .@playtime = checkquest(7405, PLAYTIME);
- if (.@playtime == 0) {
+ .@playtime = questprogress(7405, PLAYTIME);
+ if (!.@playtime) {
mes "[Rodel the Guard]";
mes "Whew, thanks to you, I have one less thing to worry about.";
mes "I will lose less of my things.";
@@ -93,8 +93,8 @@ malaya,266,76,3 script Rodel the Guard#malaya 4_MAL_SOLDIER,4,4,{
mes "Come and find me when you decide.";
close;
} else {
- .@hunting = checkquest(7404, HUNTING);
- if (.@hunting == -1) {
+ .@hunting = questprogress(7404, HUNTING);
+ if (!.@hunting) {
mes "[Rodel the Guard]";
switch(rand(1, 6)) {
case 1:
@@ -133,7 +133,7 @@ malaya,266,76,3 script Rodel the Guard#malaya 4_MAL_SOLDIER,4,4,{
mes "It would be a simple task for you.";
setquest 7404;
close;
- } else if (.@hunting == 0) {
+ } else if (.@hunting == 0) { // FIXME
mes "[Rodel the Guard]";
mes "You have to get rid of 20 Jejelings.";
mes "20 should be enough to give those Jejelings a good scare.";
@@ -259,7 +259,7 @@ malaya,185,358,3 script Leader Phong in Mumbaki 4_BARYO_CHIEF,{
mes "Young friend. Your presence is welcomed anywhere.";
mes "The light from your pure soul will protect you from the darkness.";
set malaya_hi, 10;
- if (checkquest(7350) > -1)
+ if (questprogress(7350))
erasequest 7350;
close;
} else if (malaya_hi == 10) {
@@ -487,7 +487,7 @@ malaya,185,358,3 script Leader Phong in Mumbaki 4_BARYO_CHIEF,{
close;
}
case 2:
- if (checkquest(7402) == -1) {
+ if (!questprogress(7402)) {
mes "[Phong in Mumbaki]";
mes "Who is the floral tribute for?";
mes "Don't tell me you're making one in advance cause you're lazy?";
@@ -643,8 +643,8 @@ malaya,169,350,5 script Imelda#malaya 4_M_BRZ_JACI,{
setquest 7367;
close;
} else if (malaya_hi == 22) {
- .@playtime = checkquest(7367, PLAYTIME);
- if (.@playtime == 0 || .@playtime == 1) {
+ .@playtime = questprogress(7367, PLAYTIME);
+ if (.@playtime == 1) {
mes "Imelda is in ritual with a devout aura, compared to when she streamed invectives.";
mes "Better not disturb her.";
close;
@@ -720,7 +720,7 @@ malaya,169,350,5 script Imelda#malaya 4_M_BRZ_JACI,{
next;
switch (select("I'll help you making Spiritual Protections.:Love and Spiritual Protection for all.")) {
case 1:
- if (checkquest(7380) > -1) {
+ if (questprogress(7380)) {
if ((countitem(6501) < 6) || (countitem(6502) < 6) || (countitem(6500) < 6)) {
mes "[Imelda]";
mes "Materials for making a Spiritual Protection are";
@@ -749,8 +749,8 @@ malaya,169,350,5 script Imelda#malaya 4_M_BRZ_JACI,{
getexp 200000,200000;
close;
} else {
- .@playtime = checkquest(7381, PLAYTIME);
- if ((.@playtime == 0) || (.@playtime == 1)) {
+ .@playtime = questprogress(7381, PLAYTIME);
+ if (.@playtime == 1) {
mes "[Imelda]";
mes "I appreciate your kindness, but we have enough for today.";
mes "I'll ask for you when I need more materials.";
@@ -789,8 +789,8 @@ malaya,169,350,5 script Imelda#malaya 4_M_BRZ_JACI,{
}
}
case 2:
- if (checkquest(7374) != -1) {
- if (checkquest(7379) == -1) {
+ if (questprogress(7374)) {
+ if (!questprogress(7379)) {
mes "[Imelda]";
mes "Please deliver these new Spiritual Protections to the villagers.";
mes "You know them, right?";
@@ -819,8 +819,8 @@ malaya,169,350,5 script Imelda#malaya 4_M_BRZ_JACI,{
$malayaNames$[0] = strcharinfo(0);
close;
} else {
- .@playtime = checkquest(7375, PLAYTIME);
- if (.@playtime == 0 || .@playtime == 1) {
+ .@playtime = questprogress(7375, PLAYTIME);
+ if (.@playtime == 1) {
mes "[Imelda]";
mes "The Spiritual Protections given before will still be in effect";
mes "It's okay for now.";
@@ -838,7 +838,7 @@ malaya,169,350,5 script Imelda#malaya 4_M_BRZ_JACI,{
mes "Of course, you'll still encounter ghosts here and there.";
close;
}
- if ((checkquest(7381) == 0) || (checkquest(7381) == 1)) {
+ if (questprogress(7381) == 1) {
mes "[Imelda]";
mes "Thank you very much.";
mes "Come back when you've given them all out.";
@@ -873,7 +873,7 @@ malaya,169,350,5 script Imelda#malaya 4_M_BRZ_JACI,{
mes "Of course, you'll still encounter ghosts here and there.";
close;
}
- if ((checkquest(7381, PLAYTIME) == 0) || (checkquest(7381, PLAYTIME) == 1)) {
+ if (questprogress(7381, PLAYTIME) == 1) {
mes "[Imelda]";
mes "Thank you very much.";
mes "Come back when you've given them all out.";
@@ -912,7 +912,7 @@ malaya,181,353,5 script Old Man Nardo#malaya 4_M_BARYO_OLD,{
mes "Not from around here, I see. I have nothing to say.";
close;
} else if (malaya_hi == 10) {
- if (checkquest(7353) == 2) {
+ if (questprogress(7353) == 2) {
mes "[Old Man Nardo]";
mes "How about lending a hand for a poor old man?";
mes "I don't care if it's just a sleeve of your shirt, just give me something with your vigor.";
@@ -937,7 +937,7 @@ malaya,181,353,5 script Old Man Nardo#malaya 4_M_BARYO_OLD,{
mes "-The troubled villagers desire your belongings because you fend off the ghosts. -";
setquest 7353;
completequest 7353;
- if ((checkquest(7352) + checkquest(7353) + checkquest(7354) + checkquest(7355) + checkquest(7356) + checkquest(7357)) > 9) {
+ if (questprogress(7352) + questprogress(7353) + questprogress(7354) + questprogress(7355) + questprogress(7356) + questprogress(7357) > 9) {
next;
mes "-So many have already asked you for this. Perhaps it will be better to speak with Phong in Mumbaki.-";
set malaya_hi, 11;
@@ -951,7 +951,7 @@ malaya,181,353,5 script Old Man Nardo#malaya 4_M_BARYO_OLD,{
mes "Must counsel with Mumbaki first!";
close;
} else if (malaya_hi == 12) {
- if (checkquest(7360) != -1) {
+ if (questprogress(7360)) {
mes "[Old Man Nardo]";
mes "To be honest, I do not believe that this Holy Artifact has any abilities.";
mes "It's just for the peace of mind.";
@@ -980,7 +980,8 @@ malaya,181,353,5 script Old Man Nardo#malaya 4_M_BARYO_OLD,{
delitem 523, 1; //Holy_Water
setquest 7360;
completequest 7360;
- if ((checkquest(7359) + checkquest(7360) + checkquest(7361) + checkquest(7362) + checkquest(7363) + checkquest(7364)) > 11) {
+ if (questprogress(7359) == 2 && questprogress(7360) == 2 && questprogress(7361) == 2
+ && questprogress(7362) == 2 && questprogress(7363) == 2 && questprogress(7364) == 2) {
mes "-With the Old Man as last, enough Holy Artifacts have been given out.-";
set malaya_hi, 13;
erasequest 7351;
@@ -1032,7 +1033,7 @@ malaya,181,353,5 script Old Man Nardo#malaya 4_M_BARYO_OLD,{
mes "Thank you.";
close;
case 2:
- if ((checkquest(7374) != -1) && (checkquest(7369) != -1)) {
+ if (questprogress(7374) && questprogress(7369)) {
if (!countitem(6503)) {
mes "^4d4dffThere's no Spiritual Protection to give to the Old Man.^000000";
close;
@@ -1046,7 +1047,7 @@ malaya,181,353,5 script Old Man Nardo#malaya 4_M_BARYO_OLD,{
delitem 6503, 1; // Soul_Protection
erasequest 7369;
setquest 7383;
- if ((checkquest(7382) + checkquest(7383) + checkquest(7384) + checkquest(7385) + checkquest(7386) + checkquest(7387)) > 5) {
+ if (questprogress(7382) + questprogress(7383) + questprogress(7384) + questprogress(7385) + questprogress(7386) + questprogress(7387) > 5) {
mes "- With the Old Man as last, all Spiritual Protections have been delivered. Head back to Imelda.-";
if (malaya_hi == 23) {
set malaya_hi, 24;
@@ -1075,7 +1076,7 @@ malaya,181,353,5 script Old Man Nardo#malaya 4_M_BARYO_OLD,{
mes "I'm sorry but I can't let you carry the precious Cast Iron Cauldron.";
close;
}
- if ((checkquest(7378, PLAYTIME) == 0) || (checkquest(7378, PLAYTIME) == 1)) {
+ if (questprogress(7378, PLAYTIME) == 1) {
mes "[Old Man Nardo]";
mes "You've delivered the Cast Iron Cauldron to Baryo, so that's enough for today.";
mes "No matter how strong a cauldron is, even with the toughest cast iron, it only lasts a day.";
@@ -1083,7 +1084,7 @@ malaya,181,353,5 script Old Man Nardo#malaya 4_M_BARYO_OLD,{
mes "[Old Man Nardo]";
mes "Help me out again tomorrow if you can.";
close;
- } else if (checkquest(7378, PLAYTIME) == 2) {
+ } else if (questprogress(7378, PLAYTIME) == 2) {
mes "[Old Man Nardo]";
mes "Hey there!";
mes "So, are you well and well fed?";
@@ -1094,7 +1095,7 @@ malaya,181,353,5 script Old Man Nardo#malaya 4_M_BARYO_OLD,{
erasequest 7378;
close;
} else {
- if (checkquest(7377) != -1) {
+ if (questprogress(7377)) {
if (countitem(6503) < 5) {
mes "[Old Man Nardo]";
mes "Did you deliver the cauldron in one piece?";
@@ -1121,7 +1122,7 @@ malaya,181,353,5 script Old Man Nardo#malaya 4_M_BARYO_OLD,{
$malayaNames$[2] = strcharinfo(0);
close;
} else {
- if (checkquest(7376) > -1) {
+ if (questprogress(7376)) {
mes "[Old Man Nardo]";
mes "Go to Kiko in Mumbaki at Baryo Mahiwaga and deliver the Cast Iron Cauldron.";
mes "This should help against the Bakonawa troubles.";
@@ -1176,7 +1177,7 @@ malaya,224,267,3 script Romel#malaya 4_M_MAYOR,{
mes "(He evades your gaze and ignores you.)";
close;
} else if (malaya_hi == 10) {
- if (checkquest(7357) == 2) {
+ if (questprogress(7357) == 2) {
mes "[Romel]";
mes "....So cold-hearted.";
mes "And here we are, always trembling in anxiety...";
@@ -1201,7 +1202,7 @@ malaya,224,267,3 script Romel#malaya 4_M_MAYOR,{
mes "-The troubled villagers desire your belongings because you fend off the ghosts. -";
setquest 7357;
completequest 7357;
- if ((checkquest(7352) + checkquest(7353) + checkquest(7354) + checkquest(7355) + checkquest(7356) + checkquest(7357)) > 9) {
+ if (questprogress(7352) + questprogress(7353) + questprogress(7354) + questprogress(7355) + questprogress(7356) + questprogress(7357) > 9) {
next;
mes "- So many have already asked you for this. Perhaps it will be better to speak with Phong in Mumbaki.-";
set malaya_hi, 11;
@@ -1214,7 +1215,7 @@ malaya,224,267,3 script Romel#malaya 4_M_MAYOR,{
mes "He'll surely take a hair or pull a sleeve if he had his way!";
close;
} else if (malaya_hi == 12) {
- if (checkquest(7364) != -1) {
+ if (questprogress(7364)) {
mes "[Romel]";
mes "Frankly speaking, it's for the peace of mind.";
mes "With it, I could face them with more boldness.";
@@ -1245,7 +1246,8 @@ malaya,224,267,3 script Romel#malaya 4_M_MAYOR,{
delitem 523, 1; //Holy_Water
setquest 7364;
completequest 7364;
- if ((checkquest(7359) + checkquest(7360) + checkquest(7361) + checkquest(7362) + checkquest(7363) + checkquest(7364)) > 11) {
+ if (questprogress(7359) == 2 && questprogress(7360) == 2 && questprogress(7361) == 2
+ && questprogress(7362) == 2 && questprogress(7363) == 2 && questprogress(7364) == 2) {
mes "-With Romel as last, I think enough Holy Artifacts have been given.-";
set malaya_hi, 13;
erasequest 7351;
@@ -1286,7 +1288,7 @@ malaya,224,267,3 script Romel#malaya 4_M_MAYOR,{
mes "I am at peace these days.";
close;
}
- if ((checkquest(7374) == -1) || (checkquest(7373) == -1)) {
+ if (!questprogress(7374) || !questprogress(7373)) {
mes "[Romel]";
mes "A new Spiritual Protection?";
mes "The one you gave me before still works fine.";
@@ -1306,7 +1308,7 @@ malaya,224,267,3 script Romel#malaya 4_M_MAYOR,{
delitem 6503, 1; // Soul_Protection
erasequest 7373;
setquest 7387;
- if ((checkquest(7382) + checkquest(7383) + checkquest(7384) + checkquest(7385) + checkquest(7386) + checkquest(7387)) > 5) {
+ if (questprogress(7382) + questprogress(7383) + questprogress(7384) + questprogress(7385) + questprogress(7386) + questprogress(7387) > 5) {
mes "- With Romel as last, all Spiritual Protections have been delivered. Head back to Imelda.-";
if (malaya_hi == 23) {
set malaya_hi, 24;
@@ -1332,7 +1334,7 @@ malaya,223,267,5 script Talah#malaya 4_F_DST_CHILD,{
mes "(When your eyes met with hers, she ran and hid behind her father.)";
close;
} else if (malaya_hi == 10) {
- if (checkquest(7356) == 2) {
+ if (questprogress(7356) == 2) {
mes "[Talah]";
mes "Talah might be taken away tonight.";
mes "Scary kids might come to Talah.";
@@ -1355,7 +1357,7 @@ malaya,223,267,5 script Talah#malaya 4_F_DST_CHILD,{
mes "- The troubled villagers desire your belongings because you fend off the ghosts. -";
setquest 7356;
completequest 7356;
- if ((checkquest(7352) + checkquest(7353) + checkquest(7354) + checkquest(7355) + checkquest(7356) + checkquest(7357)) > 9) {
+ if (questprogress(7352) + questprogress(7353) + questprogress(7354) + questprogress(7355) + questprogress(7356) + questprogress(7357) > 9) {
next;
mes "- So many have already asked you for this. Perhaps it will be better to speak with Phong in Mumbaki. -";
set malaya_hi, 11;
@@ -1367,7 +1369,7 @@ malaya,223,267,5 script Talah#malaya 4_F_DST_CHILD,{
mes "Talah looks from you to her father with inquisitive eyes.";
close;
} else if (malaya_hi == 12) {
- if (checkquest(7363) != -1) {
+ if (questprogress(7363)) {
mes "[Talah]";
mes "I dont know for sure";
mes "but I get a warm feel from them.";
@@ -1393,7 +1395,8 @@ malaya,223,267,5 script Talah#malaya 4_F_DST_CHILD,{
delitem 523, 1; //Holy_Water
setquest 7363;
completequest 7363;
- if ((checkquest(7359) + checkquest(7360) + checkquest(7361) + checkquest(7362) + checkquest(7363) + checkquest(7364)) > 11) {
+ if (questprogress(7359) == 2 && questprogress(7360) == 2 && questprogress(7361) == 2
+ && questprogress(7362) == 2 && questprogress(7363) == 2 && questprogress(7364) == 2) {
mes "-With Talah as last, I think enough Holy Artifacts have been given.-";
set malaya_hi, 13;
erasequest 7351;
@@ -1415,7 +1418,7 @@ malaya,223,267,5 script Talah#malaya 4_F_DST_CHILD,{
mes "You're keeping us safe aren't you?";
close;
}
- if ((checkquest(7374) != -1) && (checkquest(7372) != -1)) {
+ if (questprogress(7374) && questprogress(7372)) {
if (!countitem(6503)) {
mes "^4d4dffThere is no Spiritual Protection to give to Talah.^000000";
close;
@@ -1430,7 +1433,7 @@ malaya,223,267,5 script Talah#malaya 4_F_DST_CHILD,{
delitem 6503, 1; // Soul_Protection
erasequest 7372;
setquest 7386;
- if ((checkquest(7382) + checkquest(7383) + checkquest(7384) + checkquest(7385) + checkquest(7386) + checkquest(7387)) > 5) {
+ if (questprogress(7382) + questprogress(7383) + questprogress(7384) + questprogress(7385) + questprogress(7386) + questprogress(7387) > 5) {
mes "- With Talah as last, all Spiritual Protections have been delivered. Head back to Imelda. -";
if (malaya_hi == 23) {
set malaya_hi, 24;
@@ -1460,7 +1463,7 @@ malaya,62,274,0 script Sand Trap#malaya 4_SOIL,{
mes "- Cannot proceed with the quest. You are carrying too many items. -";
close;
}
- if ((checkquest(7366) == -1) && (checkquest(7380) == -1)) {
+ if (!questprogress(7366) && !questprogress(7380)) {
mes "A device to evaporate sea water is buried in the sand...";
close;
}
@@ -1494,7 +1497,7 @@ ma_fild01,178,206,0 script Black Bamboo#malaya CLEAR_NPC,4,4,{
mes "- Cannot proceed with the quest. You are carrying too many items. -";
close;
}
- if ((checkquest(7366) == -1) && (checkquest(7380) == -1)) {
+ if (!questprogress(7366) && !questprogress(7380)) {
mes "There's a short and black bamboo tree.";
close;
}
@@ -1513,7 +1516,7 @@ ma_fild01,178,206,0 script Black Bamboo#malaya CLEAR_NPC,4,4,{
mes "I knew I could do this!";
close;
OnTouch:
- if ((checkquest(7366) != -1) || (checkquest(7380) != -1)) {
+ if (questprogress(7366) || questprogress(7380)) {
specialeffect EF_LEVEL99_4;
}
end;
@@ -1540,7 +1543,7 @@ malaya,295,171,3 script Collection Dealer Woeon 4_M_MALAYA,{
mes "Go away. Shoo, leave!";
close;
} else if (malaya_hi == 10) {
- if (checkquest(7355) == 2) {
+ if (questprogress(7355) == 2) {
mes "[Woeon]";
mes "Now, look here my friend...";
mes "This can all be solved by giving me a button.";
@@ -1564,7 +1567,7 @@ malaya,295,171,3 script Collection Dealer Woeon 4_M_MALAYA,{
mes "- The troubled villagers desire your belongings because you fend off the ghosts. -";
setquest 7355;
completequest 7355;
- if ((checkquest(7352) + checkquest(7353) + checkquest(7354) + checkquest(7355) + checkquest(7356) + checkquest(7357)) > 9) {
+ if (questprogress(7352) + questprogress(7353) + questprogress(7354) + questprogress(7355) + questprogress(7356) + questprogress(7357) > 9) {
next;
mes "- So many have already asked you for this. Perhaps it will be better to speak with Phong in Mumbaki.-";
set malaya_hi, 11;
@@ -1584,7 +1587,7 @@ malaya,295,171,3 script Collection Dealer Woeon 4_M_MALAYA,{
mes "Cold hearted son of a...";
close;
} else if (malaya_hi == 12) {
- if (checkquest(7362) != -1) {
+ if (questprogress(7362)) {
mes "[Woeon]";
mes "Hmm. Look at my hands.";
mes "Less shaky, eh?";
@@ -1618,7 +1621,8 @@ malaya,295,171,3 script Collection Dealer Woeon 4_M_MALAYA,{
delitem 523, 1; //Holy_Water
setquest 7362;
completequest 7362;
- if ((checkquest(7359) + checkquest(7360) + checkquest(7361) + checkquest(7362) + checkquest(7363) + checkquest(7364)) > 11) {
+ if (questprogress(7359) == 2 && questprogress(7360) == 2 && questprogress(7361) == 2
+ && questprogress(7362) == 2 && questprogress(7363) == 2 && questprogress(7364) == 2) {
mes "-With Woeon as last, I think enough Holy Artifacts have been given.-";
set malaya_hi, 13;
erasequest 7351;
@@ -1636,7 +1640,7 @@ malaya,295,171,3 script Collection Dealer Woeon 4_M_MALAYA,{
mes "Oh, hi there!";
next;
if (select("Give Spiritual Protection.:The Dealer and his Collection") == 1) {
- if (((checkquest(7374) == 0) || (checkquest(7374) == 1)) && ((checkquest(7371) == 0) || (checkquest(7371) == 1))) {
+ if (questprogress(7374) == 1 && questprogress(7371) == 1) {
if (!countitem(6503)) {
mes "^4d4dffThere is no Spiritual Protection to give to Woeon.^000000";
close;
@@ -1650,7 +1654,7 @@ malaya,295,171,3 script Collection Dealer Woeon 4_M_MALAYA,{
delitem 6503, 1; // Soul_Protection
erasequest 7371;
setquest 7385;
- if ((checkquest(7382) + checkquest(7383) + checkquest(7384) + checkquest(7385) + checkquest(7386) + checkquest(7387)) > 5) {
+ if (questprogress(7382) + questprogress(7383) + questprogress(7384) + questprogress(7385) + questprogress(7386) + questprogress(7387) > 5) {
mes "-With Woeon as last, all Spiritual Protections have been delivered.-";
if (malaya_hi == 23) {
set malaya_hi, 24;
@@ -1683,13 +1687,13 @@ malaya,295,171,3 script Collection Dealer Woeon 4_M_MALAYA,{
mes "I'll let you have at it once you're stronger, my friend!";
close;
}
- if ((checkquest(7392, PLAYTIME) == 0) || (checkquest(7392, PLAYTIME) == 1)) {
+ if (questprogress(7392, PLAYTIME) == 1) {
mes "[Woeon]";
mes "Oh, the Jejellopy collecting?";
mes "I have enough for today.";
mes "Come back again tomorrow.";
close;
- } else if (checkquest(7392, PLAYTIME) == 2) {
+ } else if (questprogress(7392, PLAYTIME) == 2) {
mes "[Woeon]";
mes "Oh, yes yes.";
mes "You're going to collect Jejellopy today as well?";
@@ -1708,7 +1712,7 @@ malaya,295,171,3 script Collection Dealer Woeon 4_M_MALAYA,{
setquest 7391;
close;
} else {
- if ((checkquest(7391) == 0) || (checkquest(7391) == 1)) {
+ if (questprogress(7391) == 1) {
if (countitem(6498) < 30) {
mes "[Woeon]";
mes "Hmm? I don't think you have enough.";
@@ -1777,7 +1781,7 @@ malaya,119,217,3 script Blacksmith Pandoi 4_M_DEWBOY,{
mes "Go... Go away!";
close;
} else if (malaya_hi == 10) {
- if (checkquest(7354) == 2) {
+ if (questprogress(7354) == 2) {
mes "[Pandoi]";
mes "Please..";
mes "Couldn't you help a guy out here, just for the sake of it?";
@@ -1806,7 +1810,7 @@ malaya,119,217,3 script Blacksmith Pandoi 4_M_DEWBOY,{
mes "-The troubled villagers desire your belongings because you fend off the ghosts. -";
setquest 7354;
completequest 7354;
- if ((checkquest(7352) + checkquest(7353) + checkquest(7354) + checkquest(7355) + checkquest(7356) + checkquest(7357)) > 9) {
+ if (questprogress(7352) + questprogress(7353) + questprogress(7354) + questprogress(7355) + questprogress(7356) + questprogress(7357) > 9) {
next;
mes "- So many have already asked you for this. Perhaps it will be better to speak with Phong in Mumbaki.-";
set malaya_hi, 11;
@@ -1826,7 +1830,7 @@ malaya,119,217,3 script Blacksmith Pandoi 4_M_DEWBOY,{
mes "Do you really think ignoring me is the best option?!";
close;
} else if (malaya_hi == 12) {
- if (checkquest(7361) != -1) {
+ if (questprogress(7361)) {
mes "[Pandoi]";
mes "Now that I have confidence, the only thing left for me to do is charge to the hospital or field for material!";
mes "Bu... But, I'm too scared...";
@@ -1850,7 +1854,8 @@ malaya,119,217,3 script Blacksmith Pandoi 4_M_DEWBOY,{
delitem 523, 1; //Holy_Water
setquest 7361;
completequest 7361;
- if ((checkquest(7359) + checkquest(7360) + checkquest(7361) + checkquest(7362) + checkquest(7363) + checkquest(7364)) > 11) {
+ if (questprogress(7359) == 2 && questprogress(7360) == 2 && questprogress(7361) == 2
+ && questprogress(7362) == 2 && questprogress(7363) == 2 && questprogress(7364) == 2) {
mes "-With Pandoi as last, I think I've given enough Holy Artifacts.-";
set malaya_hi, 13;
erasequest 7351;
@@ -1887,7 +1892,7 @@ malaya,119,217,3 script Blacksmith Pandoi 4_M_DEWBOY,{
next;
switch (select("Give Spiritual Protection.:Silver Blade.:Silver Cross")) {
case 1:
- if ((checkquest(7374) == -1) || (checkquest(7370) == -1)) {
+ if (!questprogress(7374) || !questprogress(7370)) {
mes "[Pandoi]";
mes "I appreciate you taking care of the expiration dates of my Spiritual Protection.";
mes "I think mine's good for now. ";
@@ -1906,7 +1911,7 @@ malaya,119,217,3 script Blacksmith Pandoi 4_M_DEWBOY,{
delitem 6503, 1; // Soul_Protection
erasequest 7370;
setquest 7384;
- if ((checkquest(7382) + checkquest(7383) + checkquest(7384) + checkquest(7385) + checkquest(7386) + checkquest(7387)) > 5) {
+ if (questprogress(7382) + questprogress(7383) + questprogress(7384) + questprogress(7385) + questprogress(7386) + questprogress(7387) > 5) {
mes "-With Pandoi as last, all Spiritual Protections have been delivered.-";
if (malaya_hi == 23) {
set malaya_hi, 24;
@@ -1932,7 +1937,7 @@ malaya,119,217,3 script Blacksmith Pandoi 4_M_DEWBOY,{
mes "If you go in there like that... You'll never make it out alive!";
close;
}
- .@hunting = checkquest(7393, HUNTING);
+ .@hunting = questprogress(7393, HUNTING);
if (.@hunting == 2) {
if (countitem(6508) < 10) {
mes "[Pandoi]";
@@ -1968,7 +1973,7 @@ malaya,119,217,3 script Blacksmith Pandoi 4_M_DEWBOY,{
if (!rand(3))
$malayaNames$[1] = strcharinfo(0);
close;
- } else if (.@hunting == 0 || .@hunting == 1) {
+ } else if (.@hunting == 1) {
mes "[Pandoi]";
mes "The village hospital holds the most hideous things inside.";
mes "I'm not sure what exactly... Whatever's in there, I'm not willing to go near it...";
@@ -1978,8 +1983,8 @@ malaya,119,217,3 script Blacksmith Pandoi 4_M_DEWBOY,{
mes "You're the only one I can trust!";
close;
} else {
- .@playtime = checkquest(7394, PLAYTIME);
- if (.@playtime == 0 || .@playtime == 1) {
+ .@playtime = questprogress(7394, PLAYTIME);
+ if (.@playtime == 1) {
mes "[Pandoi]";
mes "I still have some silver to smelt.";
mes "I'll request more if I fail again.";
@@ -2125,7 +2130,7 @@ malaya,326,68,2 script Pedro the Sailor 4W_SAILOR,{
mes "I'm seeing ghosts. I think it's my time to die.";
close;
} else if (malaya_hi == 10) {
- if (checkquest(7352) == 2) {
+ if (questprogress(7352) == 2) {
mes "- Pedro the Sailor seems to have given up, but he can't take his gaze off of me.-";
close;
}
@@ -2168,7 +2173,7 @@ malaya,326,68,2 script Pedro the Sailor 4W_SAILOR,{
mes "- Pedro the Sailor seems to have given up, but he can't take his gaze off of me.-";
setquest 7352;
completequest 7352;
- if ((checkquest(7352) + checkquest(7353) + checkquest(7354) + checkquest(7355) + checkquest(7356) + checkquest(7357)) > 9) {
+ if (questprogress(7352) + questprogress(7353) + questprogress(7354) + questprogress(7355) + questprogress(7356) + questprogress(7357) > 9) {
next;
mes "- So many have already asked you for this. Perhaps it will be better to speak with Phong in Mumbaki. -";
set malaya_hi, 11;
@@ -2181,7 +2186,7 @@ malaya,326,68,2 script Pedro the Sailor 4W_SAILOR,{
mes "This is so awkward.";
close;
} else if (malaya_hi == 12) {
- if (checkquest(7359) != -1) {
+ if (questprogress(7359)) {
mes "[Pedro the Sailor]";
mes "Anyway, now that I have what they hate...";
mes "Now's the time to charge into my ship...!";
@@ -2208,7 +2213,8 @@ malaya,326,68,2 script Pedro the Sailor 4W_SAILOR,{
delitem 523, 1; //Holy_Water
setquest 7359;
completequest 7359;
- if ((checkquest(7359) + checkquest(7360) + checkquest(7361) + checkquest(7362) + checkquest(7363) + checkquest(7364)) > 11) {
+ if (questprogress(7359) == 2 && questprogress(7360) == 2 && questprogress(7361) == 2
+ && questprogress(7362) == 2 && questprogress(7363) == 2 && questprogress(7364) == 2) {
mes "-With Pedro the Sailor as last, I think I gave enough Holy Artifacts.-";
set malaya_hi, 13;
erasequest 7351;
@@ -2229,7 +2235,7 @@ malaya,326,68,2 script Pedro the Sailor 4W_SAILOR,{
mes "Well, living the dream, eh?";
next;
if (select("Give Spiritual Protection.:About the Ferry Ride") == 1) {
- if ((checkquest(7374) == -1) || (checkquest(7368) == -1)) {
+ if (!questprogress(7374) || !questprogress(7368)) {
mes "[Pedro the Sailor]";
mes "The Spiritual Protection you gave me before works fine.";
mes "I'm good for now.";
@@ -2248,7 +2254,7 @@ malaya,326,68,2 script Pedro the Sailor 4W_SAILOR,{
delitem 6503, 1; // Soul_Protection
erasequest 7368;
setquest 7382;
- if ((checkquest(7382) + checkquest(7383) + checkquest(7384) + checkquest(7385) + checkquest(7386) + checkquest(7387)) > 5) {
+ if (questprogress(7382) + questprogress(7383) + questprogress(7384) + questprogress(7385) + questprogress(7386) + questprogress(7387) > 5) {
mes "-With Pedro the Sailor as last, all Spiritual Protections have been delivered.-";
if (malaya_hi == 23) {
set malaya_hi, 24;
@@ -2381,8 +2387,8 @@ malaya,326,68,2 script Pedro the Sailor 4W_SAILOR,{
$malayaNames$[0] = strcharinfo(0);
close;
} else {
- .@playtime = checkquest(7401, PLAYTIME);
- if (.@playtime == 0 || .@playtime == 1) {
+ .@playtime = questprogress(7401, PLAYTIME);
+ if (.@playtime == 1) {
mes "[Pedro the Sailor]";
mes "If you want to go to Alberta, use the big ship over there.";
mes "This little one goes to Izlude.";
@@ -2412,8 +2418,8 @@ malaya,326,68,2 script Pedro the Sailor 4W_SAILOR,{
erasequest 7401;
goto L_SetQuest;
} else {
- if (checkquest(7403) == -1) {
- if (checkquest(7402) == -1) {
+ if (!questprogress(7403)) {
+ if (!questprogress(7402)) {
goto L_SetQuest;
}
mes "[Pedro the Sailor]";
@@ -2630,9 +2636,9 @@ OnTouch:
mes "If they bother me again, however, I won't be.";
close;
} else {
- if (checkquest(7402) == -1) {
- if (checkquest(7403) == -1) {
- if ((checkquest(7401, PLAYTIME) == 0) || (checkquest(7401, PLAYTIME) == 1)) {
+ if (!questprogress(7402)) {
+ if (!questprogress(7403)) {
+ if (questprogress(7401, PLAYTIME) == 1) {
cutin "malaya_diwata02", 2;
mes "[Diwata]";
mes "Surprisingly enough, I'm doing fine.";
@@ -2733,8 +2739,8 @@ ma_fild01,261,208,2 script Kiko in Mumbaki 4_BARYO_CHIEF,{
next;
switch (select("Give Cast-Iron Caldron.:Request Purification Ritual.:Exchange Jellopy for gold.")) {
case 1:
- if (checkquest(7376) == -1) {
- if (checkquest(7377) == -1) {
+ if (!questprogress(7376)) {
+ if (!questprogress(7377)) {
mes "[Kiko in Mumbaki]";
mes "What cauldron?";
mes "As far as I know, you're not the one bringing it.";
@@ -2779,8 +2785,8 @@ ma_fild01,261,208,2 script Kiko in Mumbaki 4_BARYO_CHIEF,{
erasequest 7376;
close;
case 2:
- if (checkquest(7406) == -1) {
- if (checkquest(7407) == -1) {
+ if (!questprogress(7406)) {
+ if (!questprogress(7407)) {
mes "[Kiko in Mumbaki]";
mes "The only purification needed in this village is Vantai's food.";
mes "There are no rituals where an outsider, like yourself, can take part in.";
@@ -2861,8 +2867,8 @@ ma_fild01,239,253,3 script Dhong the Guard 4_MAL_SOLDIER,{
mes "Ha ha ha ha ha ha ha!";
close;
}
- .@playtime = checkquest(7408, PLAYTIME);
- if (.@playtime == 0 || .@playtime == 1) {
+ .@playtime = questprogress(7408, PLAYTIME);
+ if (.@playtime == 1) {
mes "[Dhong the Guard]";
mes "The bones you brought Vantai gave him a feast.";
mes "He'll be full and merry for a while now.";
@@ -2889,7 +2895,7 @@ ma_fild01,239,253,3 script Dhong the Guard 4_MAL_SOLDIER,{
mes "for the hero to get us some Evil Spirit Bones from the forest.";
close;
} else {
- if (checkquest(7406) != -1) {
+ if (questprogress(7406)) {
mes "[Dhong the Guard]";
mes "What I'm saying is that, to be a good guard dog, he must be able to stand ground against evil spirits.";
mes "For that he needs to eat Evil Spirit Bones, but it must be purified before he can eat them.";
@@ -2899,7 +2905,7 @@ ma_fild01,239,253,3 script Dhong the Guard 4_MAL_SOLDIER,{
mes "Kiko in Mumbaki will purify them for you.";
close;
} else {
- if (checkquest(7407) == 1) {
+ if (questprogress(7407) == 1) {
if (countitem(6505) < 10) {
mes "[Dhong the Guard]";
mes "Kiko in Mumbaki asked for 10 Purified Spirit Bones.";
@@ -2995,8 +3001,8 @@ ma_fild01,200,190,3 script Maries#malaya 4_F_BARYO_WOMAN,{
mes "An anxious looking woman is stands.";
close;
}
- .@playtime = checkquest(7390, PLAYTIME);
- if (.@playtime == 0 || .@playtime == 1) {
+ .@playtime = questprogress(7390, PLAYTIME);
+ if (.@playtime == 1) {
mes "[Maries]";
mes "Now that the children know that they can get back home with an Inside-out Shirt,";
mes "they play out in the forest recklessly and timelessly.";
@@ -3012,7 +3018,7 @@ ma_fild01,200,190,3 script Maries#malaya 4_F_BARYO_WOMAN,{
erasequest 7390;
close;
} else {
- if (checkquest(7389) != -1) {
+ if (questprogress(7389)) {
mes "[Maries]";
mes "You came back.";
mes "Thanks to you, the child has returned home safely.";
@@ -3031,7 +3037,7 @@ ma_fild01,200,190,3 script Maries#malaya 4_F_BARYO_WOMAN,{
$malayaNames$[2] = strcharinfo(0);
close;
} else {
- if (checkquest(7388) != -1) {
+ if (questprogress(7388)) {
mes "[Maries]";
mes "I'm sure they're lost in the woods because of mischievous spirits.";
mes "Please give the child the ^4d4dffInside-out Shirt^000000 when found.";
@@ -3099,7 +3105,7 @@ ma_fild01,203,189,3 script Little Girl#malaya 4_F_BARYO_GIRL,{
}
ma_fild01,251,93,3 script Lost Child#malaya01 4_F_BARYO_GIRL,{
- if (checkquest(7388) > -1) {
+ if (questprogress(7388)) {
if (!countitem(12700)) {
mes "[Little Kid]";
mes "Sigh. Are you lost too?";
@@ -3144,7 +3150,7 @@ ma_fild01,251,93,3 script Lost Child#malaya01 4_F_BARYO_GIRL,{
}
end;
} else {
- if (checkquest(7389) != -1) {
+ if (questprogress(7389)) {
mes "[Little Kid]";
mes "I want to play some more.";
mes "I can always go back with this shirt.";
@@ -3226,8 +3232,8 @@ ma_fild02,241,39,5 script Good Capre Budidai 4_MAL_BUDIDAI,{
mes "We'll never make it.";
close;
}
- .@playtime = checkquest(7410, PLAYTIME);
- if (.@playtime == 0 || .@playtime == 1) {
+ .@playtime = questprogress(7410, PLAYTIME);
+ if (.@playtime == 1) {
mes "[Budidai]";
mes "Traveler, my friend!";
mes "Bongisungisu ran far far away.";
@@ -3243,8 +3249,8 @@ ma_fild02,241,39,5 script Good Capre Budidai 4_MAL_BUDIDAI,{
mes "You won't turn you're back on a good Capre?";
close;
} else {
- if (checkquest(7409) != -1) {
- if (checkquest(7409, HUNTING) == 2) {
+ if (questprogress(7409)) {
+ if (questprogress(7409, HUNTING) == 2) {
mes "[Budidai]";
mes "Astonishing, wanderer!";
mes "I could hear the pitiful wails of Bongisungisu all the way from here!";
@@ -4642,8 +4648,8 @@ malaya,290,340,3 script Guard Leader#buwaya 4_MAL_CAPTAIN,{
getexp 1000000, 600000;
completequest 2280;
} else {
- set .@hunting, checkquest(2281,HUNTING);
- if (.@hunting == -1) {
+ .@hunting = questprogress(2281,HUNTING);
+ if (!.@hunting) {
mes "[Guard Leader]";
mes "Hear Buwaya appeared from the depth of the Forest.";
mes "As everyone knows, all our manpower is dispatched to handle Bangungots servants attacking the hospital recently.";
@@ -4673,7 +4679,7 @@ malaya,290,340,3 script Guard Leader#buwaya 4_MAL_CAPTAIN,{
mes "Keep this in mind and be cautious at all times.";
mes "I recommend asking trustful colleagues for help.";
setquest 2281;
- } else if (.@hunting == 0 || .@hunting == 1) {
+ } else if (.@hunting == 1) {
mes "[Guard Leader]";
mes "How is it going with the Buwaya situation?";
next;
@@ -6150,7 +6156,7 @@ malaya,289,364,4 script Young Fortune Teller 4_F_MALAYA,{
close;
}
} else if (malaya_bakona2 == 7) {
- if (checkquest(1186,HUNTING) == 2) {
+ if (questprogress(1186,HUNTING) == 2) {
mes "[Young Fortune Teller]";
mes "It looks like you took care of ^FF0000Tikbalang^000000";
mes "well enough.";
@@ -6549,7 +6555,7 @@ sec_in02,10,16,5 script Bakonawa Intro Helper 4_MASK_SMOKEY,{
set malaya_bakona1,0;
set malaya_bakona2,0;
for(set .@i,1174; .@i<=1193; set .@i,.@i+1) {
- if (checkquest(.@i) > -1)
+ if (questprogress(.@i))
erasequest .@i;
}
close;
@@ -6558,7 +6564,7 @@ sec_in02,10,16,5 script Bakonawa Intro Helper 4_MASK_SMOKEY,{
mes "Here you go!";
set malaya_bakona1,6;
for(set .@i,1174; .@i<=1178; set .@i,.@i+1) {
- if (checkquest(.@i) > -1)
+ if (questprogress(.@i))
erasequest .@i;
}
setquest 1179;
@@ -6568,7 +6574,7 @@ sec_in02,10,16,5 script Bakonawa Intro Helper 4_MASK_SMOKEY,{
mes "Here you go!";
set malaya_bakona2,0;
for(set .@i,1180; .@i<=1193; set .@i,.@i+1) {
- if (checkquest(.@i) > -1)
+ if (questprogress(.@i))
erasequest .@i;
}
close;
@@ -6583,7 +6589,7 @@ sec_in02,10,16,5 script Bakonawa Intro Helper 4_MASK_SMOKEY,{
set malaya_bakona2,8;
setquest 1187;
for(set .@i,1178; .@i<=1193; set .@i,.@i+1) {
- if (checkquest(.@i) > -1)
+ if (questprogress(.@i))
erasequest .@i;
}
close;
@@ -6689,7 +6695,7 @@ function script F_Malaya_Nurse {
callsub L_Warp, getarg(0), 1;
} else if (malaya_bang == 40) {
callsub L_Weight;
- if (checkquest(11309,HUNTING) == 2) {
+ if (questprogress(11309,HUNTING) == 2) {
callsub L_Complete;
set malaya_bang,41;
completequest 11309;
@@ -6703,7 +6709,7 @@ function script F_Malaya_Nurse {
}
} else if (malaya_bang > 40) {
if (malaya_bang == 42) {
- if (checkquest(11309,HUNTING) == 2) {
+ if (questprogress(11309,HUNTING) == 2) {
callsub L_Complete;
set malaya_bang,41;
completequest 11309;
diff --git a/npc/re/quests/quests_mora.txt b/npc/re/quests/quests_mora.txt
index a8697058a..94429ae8e 100644
--- a/npc/re/quests/quests_mora.txt
+++ b/npc/re/quests/quests_mora.txt
@@ -138,7 +138,7 @@ mid_camp,148,222,4 script Theore#ep14_1_bs 4_F_SCIENCE,3,3,{
}
}
} else if (ep14_1_bs == 2) {
- if (checkquest(11182,PLAYTIME) < 2) {
+ if (questprogress(11182,PLAYTIME) != 2) {
mes "[Theore]";
mes "......";
switch(rand(1,4)) {
@@ -530,7 +530,7 @@ splendide,183,117,4 script Tired-looking Fairy 4_F_FAIRYKID3,{
mes "I'm tired, don't talk to me.";
close;
} else if (ep14_1_bs < 10) {
- if (checkquest(11187) == -1) {
+ if (!questprogress(11187)) {
mes "[Tired-looking Fairy]";
mes "I'm tired, don't talk to me.";
next;
@@ -552,7 +552,7 @@ splendide,183,117,4 script Tired-looking Fairy 4_F_FAIRYKID3,{
mes "Then tell me if you remember anything.";
close;
}
- } else if (checkquest(11187) == 2) {
+ } else if (questprogress(11187) == 2) {
mes "[Tired-looking Fairy]";
mes "I hope you can find the owner.";
close;
@@ -771,7 +771,7 @@ splendide,119,138,4 script Kusmi#ep14_1_bs 4_F_FAIRYKID5,{
next;
mes "[Kusmi]";
mes "If you go to the warehouse in Mora Village, the manager will tell you moree.";
- if (checkquest(11193) > -1 && checkquest(11193) < 2)
+ if (questprogress(11193) == 1)
close;
mes "Also, on the way back, will you check to see that my friend Rondo is in Mora Villagee?";
next;
@@ -779,7 +779,7 @@ splendide,119,138,4 script Kusmi#ep14_1_bs 4_F_FAIRYKID5,{
mes "He always used to visit Splendide around this time, but the situation is no good now. I'll have to tell him to come another time.";
close;
} else if (ep14_1_bs > 14) {
- if (checkquest(11193) == -1) {
+ if (!questprogress(11193)) {
mes "[Kusmi]";
mes "Will you check to see that my friend Rondo is in Mora Villagee?";
next;
@@ -802,7 +802,7 @@ splendide,119,138,4 script Kusmi#ep14_1_bs 4_F_FAIRYKID5,{
mes "[Kusmi]";
mes "Oh, And Daphrer is in northwest Splendide.";
}
- if (checkquest(11193) < 2) {
+ if (questprogress(11193) != 2) {
completequest 11192;
completequest 11193;
}
@@ -958,14 +958,14 @@ splendide,304,295,4 script Theodore#ep14_1_bs 4_M_FAIRYKID4,{
mes "[Theodore]";
mes "If you speak to the Warehouse Manager of Mora Village, you'd be able to get more information.";
mes "If you're willing, will you go to Bifrost's 'Mora' Village and meet the Warehouse Manager?";
- if (checkquest(11199) > -1 && checkquest(11199) < 2)
+ if (questprogress(11199) == 1)
close;
next;
mes "[Theodore]";
mes "And if it's not too much trouble, you could drop by my friend Lilitia's also...";
close;
} else if (ep14_1_bs > 14) {
- if (checkquest(11199) == -1) {
+ if (!questprogress(11199)) {
mes "[Theodore]";
mes "And if it's not too much trouble, you could drop by my friend Lilitia's also...";
close;
@@ -984,7 +984,7 @@ splendide,304,295,4 script Theodore#ep14_1_bs 4_M_FAIRYKID4,{
mes "[Theodore]";
mes "Oh, And Daphrer is in northwest Splendide.";
}
- if (checkquest(11199) < 2) {
+ if (questprogress(11199) != 2) {
completequest 11198;
completequest 11199;
}
@@ -1140,7 +1140,7 @@ splendide,168,301,4 script Pauchon#ep14_1_bs 4_F_FAIRYKID4,{
next;
mes "[Pauchon]";
mes "The supplies from the mainland come through the Village. If you go speak to the Warehouse Manager, he'll be able to tell you something.";
- if (checkquest(11205) > -1 && checkquest(11205) < 2)
+ if (questprogress(11205) == 1)
close;
mes "Also, please pay a visit to my friend Humming.";
next;
@@ -1148,7 +1148,7 @@ splendide,168,301,4 script Pauchon#ep14_1_bs 4_F_FAIRYKID4,{
mes "He's such a flighty guy, might have already left, but we were supposed to meet up in Mora Village.";
close;
} else if (ep14_1_bs > 14) {
- if (checkquest(11205) == -1) {
+ if (!questprogress(11205)) {
mes "[Pauchon]";
mes "Please pay a visit to my friend Humming.";
mes "He's such a flighty guy, might have already left, but we were supposed to meet up in Mora Village.";
@@ -1167,7 +1167,7 @@ splendide,168,301,4 script Pauchon#ep14_1_bs 4_F_FAIRYKID4,{
mes "[Pauchon]";
mes "Oh, And Daphrer is in northwest Splendide.";
}
- if (checkquest(11205) < 2) {
+ if (questprogress(11205) != 2) {
completequest 11204;
completequest 11205;
}
@@ -1201,13 +1201,13 @@ splendide,262,376,4 script Laphine Soldier#ep14_1 4_M_FAIRYSOLDIER,{
next;
mes "[Laphine Soldier]";
mes "You can get to Alfheim by making it through the Maze of the Hazy Forest. However, nobody has ever come back from the Maze of the Hazy Forest.";
- if (checkquest(11190) > -1 && checkquest(11190) < 2) {
+ if (questprogress(11190) == 1) {
set ep14_1_bs,13;
changequest 11190,11191;
- } else if (checkquest(11196) > -1 && checkquest(11196) < 2) {
+ } else if (questprogress(11196) == 1) {
set ep14_1_bs,13;
changequest 11196,11197;
- } else if (checkquest(11202) > -1 && checkquest(11202) < 2) {
+ } else if (questprogress(11202) == 1) {
set ep14_1_bs,13;
changequest 11202,11203;
}
@@ -1270,7 +1270,7 @@ mora,35,119,4 script Rondo#ep14_1_bs 4_M_DOGTRAVELER,{
mes "[Rondo]";
mes "Please tell Kusmi";
mes "that if he wants to meet, we can meet any time. There is nothing to worry about.";
- if (checkquest(11193) == -1)
+ if (!questprogress(11193))
setquest 11193;
}
close;
@@ -1290,7 +1290,7 @@ mora,98,66,4 script Lilitia#ep14_1_bs 4_F_RAFLE_PK,{
mes "[Lilitia]";
mes "What? Theodore sent you?";
mes "Please tell him that I'm so mad!!";
- if (checkquest(11199) == -1)
+ if (!questprogress(11199))
setquest 11199;
close;
}
@@ -1316,7 +1316,7 @@ mora,139,102,2 script Humming#ep14_1_bs 4_F_DOGTRAVELER,{
mes "[Humming]";
mes "If you reach Splendide before me, please tell Pauchon";
mes "that I'm going through the Maze of the Hazy Forest.";
- if (checkquest(11205) == -1)
+ if (!questprogress(11205))
setquest 11205;
close;
}
@@ -1465,7 +1465,7 @@ sec_in02,35,175,0 script Theore Set Guid 4_F_FAIRYKID,{
dic_in01,262,191,0 script #ep14_1_xq02 HIDDEN_WARP_NPC,0,3,{
end;
OnTouch:
- if (ep13_3_secret > 22 && checkquest(7206) == -1) {
+ if (ep13_3_secret > 22 && !questprogress(7206)) {
enablenpc "Cheshire#ep14_1_xq01";
cutin "ep13_cheshire_h",1;
mes "[Cheshire]";
@@ -1507,8 +1507,8 @@ dic_dun01,274,114,0 script Stacked Boxes of Goods CLEAR_NPC,{
mes "- You have too many items to do this quest. -";
close;
}
- set .@playtime, checkquest(7208,PLAYTIME);
- if (.@playtime == 0 || .@playtime == 1) {
+ .@playtime = questprogress(7208,PLAYTIME);
+ if (.@playtime == 1) {
mes "Boxes with all kinds of goods in them are stacked to the ceiling.";
mes "The marked box Cheshire was talking about doesn't seem to be here yet.";
close;
@@ -1531,8 +1531,8 @@ dic_dun01,274,114,0 script Stacked Boxes of Goods CLEAR_NPC,{
close;
}
} else {
- if (checkquest(7207) == -1) {
- if (checkquest(7206) > -1) {
+ if (!questprogress(7207)) {
+ if (questprogress(7206)) {
mes "Boxes with all kinds of goods in them are stacked to the ceiling.";
mes "Looking closely, you find a box with a small piece of paper stuck to it.";
next;
@@ -1545,7 +1545,7 @@ dic_dun01,274,114,0 script Stacked Boxes of Goods CLEAR_NPC,{
getitem 6392,1; //Bradium_Box
close;
}
- } else if (checkquest(7207) < 2) {
+ } else if (questprogress(7207) != 2) {
mes "You've already obtained the box Cheshire was talking about.";
mes "Now you only have to take it to the Crevice of Bifrost.";
close;
@@ -1562,7 +1562,7 @@ bif_fild01,335,168,3 script Cheshire#ep14_1_xq04 4_M_CATMAN1,{
close;
}
cutin "ep13_cheshire",1;
- if (checkquest(7209) > -1) {
+ if (questprogress(7209)) {
if (countitem(6090) < 20) {
mes "[Cheshire]";
mes "Bring me 20 pieces of refined Bradium.";
@@ -1592,7 +1592,7 @@ bif_fild01,335,168,3 script Cheshire#ep14_1_xq04 4_M_CATMAN1,{
end;
}
callsub L_CheckPlaytime;
- if (checkquest(7210) > -1) {
+ if (questprogress(7210)) {
if (countitem(6392) == 0)
callsub L_LostQuest,7210;
else {
@@ -1616,8 +1616,8 @@ bif_fild01,335,168,3 script Cheshire#ep14_1_xq04 4_M_CATMAN1,{
}
}
if (ep13_3_secret > 22) {
- if (checkquest(7207) == -1) {
- if (checkquest(7206) == -1) {
+ if (!questprogress(7207)) {
+ if (!questprogress(7206)) {
mes "[Cheshire]";
mes "...Hmm? Huh?";
mes "It's "+strcharinfo(0)+"!";
@@ -1685,7 +1685,7 @@ bif_fild01,335,168,3 script Cheshire#ep14_1_xq04 4_M_CATMAN1,{
cutin "",255;
end;
}
- } else if (checkquest(7207) < 2) {
+ } else if (questprogress(7207) != 2) {
if (countitem(6392) == 0)
callsub L_LostQuest,7207;
else {
@@ -1828,8 +1828,8 @@ L_LostQuest:
cutin "",255;
end;
L_CheckPlaytime:
- set .@playtime, checkquest(7208,PLAYTIME);
- if (.@playtime == 0 || .@playtime == 1) {
+ .@playtime = questprogress(7208,PLAYTIME);
+ if (.@playtime == 1) {
mes "[Cheshire]";
mes "Each day, one of these boxes is sent to Kamidal Tunnel.";
mes "It's smuggled in among other items.";
@@ -2662,7 +2662,7 @@ mora,31,138,6 script Raffle Researcher#ep14 4_M_RAFLE_OR,{
emotion e_paper;
close;
} else if (ep14_1_muk == 1) {
- if (checkquest(5016) > -1 && countitem(6385) == 0) {
+ if (questprogress(5016) && countitem(6385) == 0) {
mes "[Raffle Researcher]";
mes "You're back? Where are my research tools?";
emotion e_what;
@@ -2716,7 +2716,7 @@ mora,31,138,6 script Raffle Researcher#ep14 4_M_RAFLE_OR,{
close;
} else if (ep14_1_muk == 2) {
// Unofficial check, but it's needed here.
- if (checkquest(5029,PLAYTIME) == 0 || checkquest(5029,PLAYTIME) == 1) {
+ if (questprogress(5029,PLAYTIME) == 1) {
mes "[Raffle Researcher]";
mes "It must've been hard work to retrieve the tools.";
mes "Why don't you take this and go to the inn";
@@ -2847,7 +2847,7 @@ mora,31,138,6 script Raffle Researcher#ep14 4_M_RAFLE_OR,{
setquest 5019;
close;
} else if (ep14_1_muk == 7) {
- if (checkquest(5019) > -1 && countitem(6386) < 10) {
+ if (questprogress(5019) && countitem(6386) < 10) {
mes "[Raffle Researcher]";
mes "Have you collected the samples yet?";
mes "Please hurry up.";
@@ -2882,7 +2882,7 @@ mora,31,138,6 script Raffle Researcher#ep14 4_M_RAFLE_OR,{
setquest 5020;
close;
} else if (ep14_1_muk == 8) {
- if (checkquest(5020,PLAYTIME) == 0 || checkquest(5020,PLAYTIME) == 1) {
+ if (questprogress(5020,PLAYTIME) == 1) {
mes "[Raffle Researcher]";
mes "The basic tests have not been completed yet.";
mes "There's nothing for you to do now.";
@@ -2924,8 +2924,8 @@ mora,31,138,6 script Raffle Researcher#ep14 4_M_RAFLE_OR,{
setquest .@quest;
close;
} else if (ep14_1_muk == 9) {
- if (checkquest(5021) > -1 || checkquest(5022) > -1) {
- if (checkquest(5021) > -1) {
+ if (questprogress(5021) || questprogress(5022)) {
+ if (questprogress(5021)) {
set .@quest,5021;
set .@item,6387; //Teeth_Sample
setarray .@str$[0],"tooth","teeth";
@@ -2966,7 +2966,7 @@ mora,31,138,6 script Raffle Researcher#ep14 4_M_RAFLE_OR,{
erasequest .@quest;
setquest 5023;
close;
- } else if (checkquest(5023,PLAYTIME) == 0 || checkquest(5023,PLAYTIME) == 1) {
+ } else if (questprogress(5023,PLAYTIME) == 1) {
mes "[Raffle Researcher]";
mes "I'm still analyzing the DNA.";
mes "The DNA analysis takes about 6 hours.";
@@ -3189,7 +3189,7 @@ mora,31,138,6 script Raffle Researcher#ep14 4_M_RAFLE_OR,{
mes "will take about 12 hours.";
close;
} else if (ep14_1_muk == 14) {
- if (checkquest(5028,PLAYTIME) == 0 || checkquest(5028,PLAYTIME) == 1) {
+ if (questprogress(5028,PLAYTIME) == 1) {
mes "[Raffle Researcher]";
mes "What? You're here? Well...";
next;
@@ -3462,8 +3462,8 @@ mora,114,79,0 script Black Shadow#ep14_muk CLEAR_NPC,{
donpcevent "Black Shadow#ep14_muk::OnDisable";
end;
}
- set .@playtime, checkquest(5029,PLAYTIME);
- if (.@playtime == 0 || .@playtime == 1) {
+ .@playtime = questprogress(5029,PLAYTIME);
+ if (.@playtime == 1) {
mes "You see a dark hole. As you show interest, something disappears quickly into the dark hole.";
close2;
donpcevent "Black Shadow#ep14_muk::OnDisable";
@@ -3471,7 +3471,7 @@ mora,114,79,0 script Black Shadow#ep14_muk CLEAR_NPC,{
} else if (.@playtime == 2)
erasequest 5029;
if (ep14_1_goki == 30) {
- if (checkquest(5030) == -1 && checkquest(5031) == -1 && checkquest(5032) == -1 && checkquest(5033) == -1 && checkquest(5034) == -1) {
+ if (!questprogress(5030) && !questprogress(5031) && !questprogress(5032) && !questprogress(5033) && !questprogress(5034)) {
mes "[Unidentified creature]";
mes "Arrgghh!!!";
mes "Why you bother me.";
@@ -3548,7 +3548,7 @@ mora,114,79,0 script Black Shadow#ep14_muk CLEAR_NPC,{
mes "You tell me my family do okay.";
setquest 5030+rand(4); //5030,5031,5032,5033
close;
- } else if (checkquest(5030) > -1 || checkquest(5031) > -1 || checkquest(5032) > -1 || checkquest(5033) > -1) {
+ } else if (questprogress(5030) || questprogress(5031) || questprogress(5032) || questprogress(5033)) {
mes "[Fishee]";
mes "Please. In puddle.";
mes "You tell me my family do okay.";
@@ -3567,7 +3567,7 @@ mora,114,79,0 script Black Shadow#ep14_muk CLEAR_NPC,{
mes "Please. In puddle.";
mes "You tell me my family do okay.";
close;
- } else if (checkquest(5034) > -1 && checkquest(5034) < 2) {
+ } else if (questprogress(5034) == 1) {
if (MaxWeight - Weight < 100 || checkweight(5792,1) == 0) {
mes "[Fishee]";
mes "You have lots.";
@@ -3593,7 +3593,7 @@ mora,114,79,0 script Black Shadow#ep14_muk CLEAR_NPC,{
completequest 5034;
getitem 5792,1; //Fish_Pin
close;
- } else if (checkquest(5034) == 2) {
+ } else if (questprogress(5034) == 2) {
mes "[Fishee]";
mes "You... I saw. Feeling. I saw. Feeling.";
mes "You... Name?";
@@ -3711,7 +3711,7 @@ mora,114,79,0 script Black Shadow#ep14_muk CLEAR_NPC,{
if (.@npc_hp <= 0) {
mes "You won. The unidentified creature is unconscious.";
next;
- if (checkquest(5016) > -1 && countitem(6385) == 0) {
+ if (questprogress(5016) && countitem(6385) == 0) {
mes "What will you do?";
next;
select("Look for the research tools.");
@@ -3733,7 +3733,7 @@ mora,114,79,0 script Black Shadow#ep14_muk CLEAR_NPC,{
close2;
donpcevent "Black Shadow#ep14_muk::OnDisable";
end;
- } else if (checkquest(5017) > -1) {
+ } else if (questprogress(5017)) {
mes "How will you bully the creature?";
next;
input .@inputstr$;
@@ -4076,7 +4076,7 @@ OnFullon:
}
- script ???#mora -1,{
- if (checkquest(5019) > -1) {
+ if (questprogress(5019)) {
mes "You find an area emitting a distinct aura.";
mes "You may be able to collect bath water samples.";
mes "What will you do?";
@@ -4119,8 +4119,8 @@ OnFullon:
close2;
donpcevent strnpcinfo(0)+"::OnDisable";
end;
- } else if (checkquest(5021) > -1 || checkquest(5022) > -1) {
- if (checkquest(5021) > -1) {
+ } else if (questprogress(5021) || questprogress(5022)) {
+ if (questprogress(5021)) {
set .@str$,"tooth";
set .@item,6387; //Teeth_Sample
} else {
@@ -4191,12 +4191,12 @@ OnTimer60000:
donpcevent strnpcinfo(0)+"::OnEnable";
end;
OnTouch:
- if (checkquest(5034) == 2 || ep14_1_muk == 0 || rand(5)) {
+ if (questprogress(5034) == 2 || ep14_1_muk == 0 || rand(5)) {
percentheal 5,5;
end;
}
- set .@playtime, checkquest(5029,PLAYTIME);
- if (.@playtime == 0 || .@playtime == 1) {
+ .@playtime = questprogress(5029,PLAYTIME);
+ if (.@playtime == 1) {
percentheal 5,5;
end;
} else if (.@playtime == 2) {
@@ -4225,7 +4225,7 @@ mora,118,86,0 duplicate(???#mora) ???#ep14_muk05 CLEAR_NPC,2,2
setarray .@quest1[1],5024,5025,5026,5027;
setarray .@dir$[1],"east","west","south","north";
- if (checkquest(.@quest1[.@i]) > -1) {
+ if (questprogress(.@quest1[.@i])) {
if (countitem(6389) == 0) {
mes "This appears to be the puddle to the "+.@dir$[.@i];
mes "that the researcher talked about.";
@@ -4259,9 +4259,9 @@ mora,118,86,0 duplicate(???#mora) ???#ep14_muk05 CLEAR_NPC,2,2
deletearray .@quest1[.@i],1;
deletearray .@dir$[.@i],1;
- if (checkquest(.@quest1[1]) > -1 || checkquest(.@quest1[2]) > -1 || checkquest(.@quest1[3]) > -1) {
+ if (questprogress(.@quest1[1]) || questprogress(.@quest1[2]) || questprogress(.@quest1[3])) {
for(set .@j,1; .@j<=3; set .@j,.@j+1) {
- if (checkquest(.@quest1[.@j]) > -1)
+ if (questprogress(.@quest1[.@j]))
break;
}
mes "This is not the puddle to the "+.@dir$[.@j]+".";
@@ -4272,7 +4272,7 @@ mora,118,86,0 duplicate(???#mora) ???#ep14_muk05 CLEAR_NPC,2,2
set .@quest2[0], .@quest2[.@i];
deletearray .@quest2[.@i],1;
- if (ep14_1_goki == 30 && checkquest(.@quest2[0]) > -1) {
+ if (ep14_1_goki == 30 && questprogress(.@quest2[0])) {
mes "You arrived at the puddle to the "+.@dir$[0]+".";
mes "You should look for the unidentified creature's family.";
next;
@@ -4329,13 +4329,13 @@ mora,118,86,0 duplicate(???#mora) ???#ep14_muk05 CLEAR_NPC,2,2
mes "We okay. Happy. Here. You tell son.";
changequest .@quest2[0],5034;
close;
- } else if (checkquest(5034) > -1 && checkquest(5034) < 2) {
+ } else if (questprogress(5034) == 1) {
mes "[Fishee's Dad]";
mes "Yes... Human give son news.";
mes "Thanks. Son,";
mes "We okay. Happy. Here. You tell son.";
close;
- } else if (checkquest(.@quest2[1]) > -1 || checkquest(.@quest2[2]) > -1 || checkquest(.@quest2[3]) > -1) {
+ } else if (questprogress(.@quest2[1]) || questprogress(.@quest2[2]) || questprogress(.@quest2[3])) {
mes "You arrived at the puddle to the "+.@dir$[0]+".";
mes "You should look for the unidentified creature's family.";
next;
@@ -4377,8 +4377,8 @@ mora,133,80,6 script Elephantine#pa0829 4_ELEPHANT,{
mes "Why don't you come back when you've grown stronger? I can't give you tasks when you're in your current state.";
close;
}
- set .@playtime, checkquest(12230,PLAYTIME);
- if (.@playtime == 0 || .@playtime == 1) {
+ .@playtime = questprogress(12230,PLAYTIME);
+ if (.@playtime == 1) {
mes "[Elephantine]";
mes "I have no additional tasks available now. If I get some, I'll let you know when you come back.";
close;
@@ -4485,8 +4485,8 @@ mora,115,98,8 script Hotcha#pa0829 4_ELEPHANT,{
mes "This place is like a paradise for adventurers. Not for weak ones like you, though.";
close;
}
- set .@playtime, checkquest(12230,PLAYTIME);
- if (.@playtime == -1) {
+ .@playtime = questprogress(12230,PLAYTIME);
+ if (!.@playtime) {
mes "[Hotcha]";
mes "I see you haven't received";
mes "any tasks yet.";
@@ -4504,7 +4504,7 @@ mora,115,98,8 script Hotcha#pa0829 4_ELEPHANT,{
mes "[Hotcha]";
mes "Once they are removed, go talk to Elephantine and you can receive new tasks.";
for(set .@i,12225; .@i<=12229; set .@i,.@i+1) {
- if (checkquest(.@i) > -1)
+ if (questprogress(.@i))
erasequest .@i;
}
erasequest 12230;
@@ -4521,7 +4521,7 @@ mora,115,98,8 script Hotcha#pa0829 4_ELEPHANT,{
next;
for(set .@i,12225; .@i<=12229; set .@i,.@i+1) {
- if (checkquest(.@i,HUNTING) == 2) {
+ if (questprogress(.@i,HUNTING) == 2) {
mes "[Hotcha]";
mes "Yes, I see you've completed the task. It has been confirmed as completed.";
erasequest .@i;
@@ -4560,8 +4560,8 @@ mora,119,103,4 script Bow-wow#pa0829 4_M_DOGTRAVELER,{
mes "You really have no clue. What could you do with such a weak body?";
close;
}
- set .@playtime, checkquest(12241,PLAYTIME);
- if (.@playtime == 0 || .@playtime == 1) {
+ .@playtime = questprogress(12241,PLAYTIME);
+ if (.@playtime == 1) {
mes "[Bow-wow]";
mes "I have no additional tasks available now. If I get some, I'll let you know when you come back.";
close;
@@ -4668,8 +4668,8 @@ mora,119,118,4 script General Good Dealer#pa0 4_M_RAFLE_GR,{
mes "What could you do with that fragile body? Go get some exercise.";
close;
}
- set .@playtime, checkquest(12241,PLAYTIME);
- if (.@playtime == -1) {
+ .@playtime = questprogress(12241,PLAYTIME);
+ if (!.@playtime) {
mes "[General Good Dealer]";
mes "I see you haven't received";
mes "any tasks yet.";
@@ -4687,7 +4687,7 @@ mora,119,118,4 script General Good Dealer#pa0 4_M_RAFLE_GR,{
mes "[General Good Dealer]";
mes "Once they are removed, go talk to Bow-wow and you can receive new tasks.";
for(set .@i,12231; .@i<=12235; set .@i,.@i+1) {
- if (checkquest(.@i) > -1)
+ if (questprogress(.@i))
erasequest .@i;
}
erasequest 12241;
@@ -4716,7 +4716,7 @@ mora,119,118,4 script General Good Dealer#pa0 4_M_RAFLE_GR,{
close;
L_CheckQuest:
- if (checkquest(getarg(0)) > -1) {
+ if (questprogress(getarg(0))) {
if (countitem(getarg(1)) < getarg(2)) {
mes "[General Good Dealer]";
mes "The amount is not enough...";
@@ -4756,8 +4756,8 @@ mora,124,108,7 script Woof-grrr#pa0829 4_M_DOGTRAVELER2,{
mes "This place is not a nursery. Grow up and come back, and I'll gladly give you tasks.";
close;
}
- set .@playtime, checkquest(12242,PLAYTIME);
- if (.@playtime == 0 || .@playtime == 1) {
+ .@playtime = questprogress(12242,PLAYTIME);
+ if (.@playtime == 1) {
mes "[Woof-grrr]";
mes "I have no additional tasks available now. If I get some, I'll let you know when you come back.";
close;
@@ -4864,8 +4864,8 @@ mora,127,112,4 script Commodities Dealer#pa08 4_F_RAFLE_PK,{
mes "Go away! I can't concentrate on cataloging with you hanging around like that...";
close;
}
- set .@playtime, checkquest(12242,PLAYTIME);
- if (.@playtime == -1) {
+ .@playtime = questprogress(12242,PLAYTIME);
+ if (!.@playtime) {
mes "[Commodities Dealer]";
mes "I see you haven't received";
mes "any tasks yet.";
@@ -4883,7 +4883,7 @@ mora,127,112,4 script Commodities Dealer#pa08 4_F_RAFLE_PK,{
mes "[Commodities Dealer]";
mes "Once they are removed, go talk to Woof-grrr and you can receive new tasks.";
for(set .@i,12236; .@i<=12240; set .@i,.@i+1) {
- if (checkquest(.@i) > -1)
+ if (questprogress(.@i))
erasequest .@i;
}
erasequest 12242;
@@ -4912,7 +4912,7 @@ mora,127,112,4 script Commodities Dealer#pa08 4_F_RAFLE_PK,{
close;
L_CheckQuest:
- if (checkquest(getarg(0)) > -1) {
+ if (questprogress(getarg(0))) {
if (countitem(getarg(1)) < getarg(2)) {
mes "[Commodities Dealer]";
mes "The amount is not enough...";
@@ -4952,8 +4952,8 @@ mora,170,101,4 script Soul Guide#pa0829 4_F_DOGTRAVELER,{
mes "You need to have a strong spirit to do this task. I think you need a lot more discipline.";
close;
}
- set .@playtime, checkquest(12253,PLAYTIME);
- if (.@playtime == 0 || .@playtime == 1) {
+ .@playtime = questprogress(12253,PLAYTIME);
+ if (.@playtime == 1) {
mes "You still have marks of the haunting souls on your body.";
next;
mes "You'll have to come back when the marks have disappeared.";
@@ -4961,7 +4961,7 @@ mora,170,101,4 script Soul Guide#pa0829 4_F_DOGTRAVELER,{
} else if (.@playtime == 2) {
mes "You feel your mind has calmed down once again. You now have enough energy to go look for other souls, so talk to the Guide again.";
for(set .@i,12243; .@i<=12252; set .@i,.@i+1) {
- if (checkquest(.@i) > -1)
+ if (questprogress(.@i))
erasequest .@i;
}
erasequest 12253;
@@ -5089,7 +5089,7 @@ sec_in02,29,34,5 script Initializing Mora Sanjo 4_MAN_NITT,{
mes "14.1 Initializing all quest window include related daily quest and map and so on";
freeloop(1);
for(set .@i,12225; .@i<=12353; set .@i,.@i+1) {
- if (checkquest(.@i) > -1)
+ if (questprogress(.@i))
erasequest .@i;
}
freeloop(0);
@@ -5106,7 +5106,7 @@ function script mora_remains {
mes "You have to make space in your inventory.";
close;
}
- if (checkquest(getarg(0)) > -1) {
+ if (questprogress(getarg(0))) {
specialeffect2 EF_BLIND;
specialeffect2 EF_BEGINSPELL;
progressbar "ffff00",4;
@@ -5155,8 +5155,8 @@ mora,118,166,6 script Knights Chief#mo 4_F_RAFLE_VI,{
}
mora,116,165,5 script Knights Boss#mo 4_M_RAFLE_VI,{
- set .@playtime, checkquest(1119,PLAYTIME);
- if (.@playtime == 0 || .@playtime == 1) {
+ .@playtime = questprogress(1119,PLAYTIME);
+ if (.@playtime == 1) {
mes "[Order of the Knights Boss]";
mes "We've run out of Mora Coins.";
mes "Come back tomorrow!";
diff --git a/npc/re/quests/quests_morocc.txt b/npc/re/quests/quests_morocc.txt
index 480618a70..5632245f0 100644
--- a/npc/re/quests/quests_morocc.txt
+++ b/npc/re/quests/quests_morocc.txt
@@ -119,15 +119,15 @@ moc_prydn1,94,98,3 script Suspicious Cat#night2 4_CAT_SAILOR4,{
warp "moc_prydb1",100,57;
end;
case 2:
- set .@playtime, checkquest(2290,PLAYTIME);
- if (.@playtime == 0 || .@playtime == 1) {
+ .@playtime = questprogress(2290,PLAYTIME);
+ if (.@playtime == 1) {
mes "[Suspicious Cat]";
mes "Look at that Verit, he's afraid of us! Kyaahaha! We're safe, at least for a while!";
close;
} else if (.@playtime == 2)
erasequest 2290;
- set .@hunting, checkquest(2289,HUNTING);
- if (.@hunting == -1) {
+ .@hunting = questprogress(2289,HUNTING);
+ if (!.@hunting) {
mes "[Suspicious Cat]";
mes "Did you know that cats and dogs don't get along?";
next;
@@ -157,7 +157,7 @@ moc_prydn1,94,98,3 script Suspicious Cat#night2 4_CAT_SAILOR4,{
mes "Pah! You don't care about me? Fine, you traitor!";
close;
}
- } else if (.@hunting == 0 || .@hunting == 1) {
+ } else if (.@hunting == 1) {
mes "[Suspicious Cat]";
mes "Is Verit's training going well?";
next;
@@ -181,15 +181,15 @@ moc_prydn1,94,98,3 script Suspicious Cat#night2 4_CAT_SAILOR4,{
close;
}
case 3:
- set .@playtime, checkquest(2291,PLAYTIME);
- if (.@playtime == 0 || .@playtime == 1) {
+ .@playtime = questprogress(2291,PLAYTIME);
+ if (.@playtime == 1) {
mes "[Suspicious Cat]";
mes "Good, I'll make a good use of the time you gained! But I gotta do something about this stomachache first.....";
close;
} else if (.@playtime == 2)
erasequest 2291;
- set .@hunting, checkquest(2292,HUNTING);
- if (.@hunting == -1) {
+ .@hunting = questprogress(2292,HUNTING);
+ if (!.@hunting) {
mes "[Suspicious Cat]";
mes "Precious treasures are supposed to be hidden in the deep secret places here!";
mes "I'm sure the mummy's precious treasures are hidden in the second basement level.";
@@ -217,7 +217,7 @@ moc_prydn1,94,98,3 script Suspicious Cat#night2 4_CAT_SAILOR4,{
mes "Bah, you're so cold-hearted.";
close;
}
- } else if (.@hunting == 0 || .@hunting == 1) {
+ } else if (.@hunting == 1) {
mes "[Suspicious Cat]";
mes "Is fighting Ancient Mummies going well?";
next;
diff --git a/sql-files/item_db_re.sql b/sql-files/item_db_re.sql
index ac7ecd0fb..cc0b07de9 100644
--- a/sql-files/item_db_re.sql
+++ b/sql-files/item_db_re.sql
@@ -5921,7 +5921,7 @@ REPLACE INTO `item_db_re` VALUES ('12618','Bgrade_Pocket','Bgrade Pocket','2','2
REPLACE INTO `item_db_re` VALUES ('12619','Cgrade_Pocket','Cgrade Pocket','2','20','10','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','packageitem();','','');
REPLACE INTO `item_db_re` VALUES ('12620','Dgrade_Pocket','Dgrade Pocket','2','20','10','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','packageitem();','','');
REPLACE INTO `item_db_re` VALUES ('12621','Egrade_Pocket','Egrade Pocket','2','20','10','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','packageitem();','','');
-REPLACE INTO `item_db_re` VALUES ('12622','Boarding_Halter','Halter Lead','11','20','10','0','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','0','3000','0',NULL,'0',NULL,'0',NULL,'0','setmounting();','','');
+REPLACE INTO `item_db_re` VALUES ('12622','Boarding_Halter','Halter Lead','11','20','10','0','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','0','3000','0',NULL,'0',NULL,'0',NULL,'0','setcashmount();','','');
REPLACE INTO `item_db_re` VALUES ('12623','High_Weapon_Box','High Weapon Box','2','20','10','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','getrandgroupitem 12623,1;','','');
REPLACE INTO `item_db_re` VALUES ('12624','Delicious_Jelly','Delicious Jelly','0','0','0','50','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','0','0','16',NULL,'0',NULL,'0',NULL,'0','percentheal 3,3;','','');
REPLACE INTO `item_db_re` VALUES ('12625','Sapa_Feat_Cert_Pack','Proof Of Sapha\'s Honor Package','2','0','0','0','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','','');
diff --git a/src/char/Makefile.in b/src/char/Makefile.in
index 59dc56076..ecb2f8741 100644
--- a/src/char/Makefile.in
+++ b/src/char/Makefile.in
@@ -91,7 +91,7 @@ char-server: ../../char-server@EXEEXT@
../../char-server@EXEEXT@: $(CHAR_SERVER_SQL_DEPENDS) Makefile
@echo " LD $(notdir $@)"
- @$(CC) @LDFLAGS@ -o ../../char-server@EXEEXT@ $(CHAR_OBJ) $(COMMON_D)/obj_sql/common_sql.a \
+ @$(CC) @STATIC@ @LDFLAGS@ -o ../../char-server@EXEEXT@ $(CHAR_OBJ) $(COMMON_D)/obj_sql/common_sql.a \
$(COMMON_D)/obj_all/common.a $(MT19937AR_OBJ) $(LIBCONFIG_OBJ) @LIBS@ @MYSQL_LIBS@
# char object files
diff --git a/src/char/char.c b/src/char/char.c
index 6549ead3c..824c782bc 100644
--- a/src/char/char.c
+++ b/src/char/char.c
@@ -750,6 +750,7 @@ int memitemdata_to_sql(const struct item items[], int max, int id, int tableswit
return 1;
}
+ memset(&item, 0, sizeof(item));
SQL->StmtBindColumn(stmt, 0, SQLDT_INT, &item.id, 0, NULL, NULL);
SQL->StmtBindColumn(stmt, 1, SQLDT_SHORT, &item.nameid, 0, NULL, NULL);
SQL->StmtBindColumn(stmt, 2, SQLDT_SHORT, &item.amount, 0, NULL, NULL);
@@ -893,6 +894,7 @@ int inventory_to_sql(const struct item items[], int max, int id) {
return 1;
}
+ memset(&item, 0, sizeof(item));
SQL->StmtBindColumn(stmt, 0, SQLDT_INT, &item.id, 0, NULL, NULL);
SQL->StmtBindColumn(stmt, 1, SQLDT_SHORT, &item.nameid, 0, NULL, NULL);
SQL->StmtBindColumn(stmt, 2, SQLDT_SHORT, &item.amount, 0, NULL, NULL);
@@ -1229,6 +1231,7 @@ int mmo_char_fromsql(int char_id, struct mmo_charstatus* p, bool load_everything
//read memo data
//`memo` (`memo_id`,`char_id`,`map`,`x`,`y`)
+ memset(&tmp_point, 0, sizeof(tmp_point));
if( SQL_ERROR == SQL->StmtPrepare(stmt, "SELECT `map`,`x`,`y` FROM `%s` WHERE `char_id`=? ORDER by `memo_id` LIMIT %d", memo_db, MAX_MEMOPOINTS)
|| SQL_ERROR == SQL->StmtBindParam(stmt, 0, SQLDT_INT, &char_id, 0)
|| SQL_ERROR == SQL->StmtExecute(stmt)
@@ -1251,6 +1254,7 @@ int mmo_char_fromsql(int char_id, struct mmo_charstatus* p, bool load_everything
StrBuf->Printf(&buf, ", `card%d`", i);
StrBuf->Printf(&buf, " FROM `%s` WHERE `char_id`=? LIMIT %d", inventory_db, MAX_INVENTORY);
+ memset(&tmp_item, 0, sizeof(tmp_item));
if( SQL_ERROR == SQL->StmtPrepareStr(stmt, StrBuf->Value(&buf))
|| SQL_ERROR == SQL->StmtBindParam(stmt, 0, SQLDT_INT, &char_id, 0)
|| SQL_ERROR == SQL->StmtExecute(stmt)
@@ -1312,6 +1316,7 @@ int mmo_char_fromsql(int char_id, struct mmo_charstatus* p, bool load_everything
//read skill
//`skill` (`char_id`, `id`, `lv`)
+ memset(&tmp_skill, 0, sizeof(tmp_skill));
if( SQL_ERROR == SQL->StmtPrepare(stmt, "SELECT `id`, `lv`,`flag` FROM `%s` WHERE `char_id`=? LIMIT %d", skill_db, MAX_SKILL)
|| SQL_ERROR == SQL->StmtBindParam(stmt, 0, SQLDT_INT, &char_id, 0)
|| SQL_ERROR == SQL->StmtExecute(stmt)
@@ -1333,6 +1338,7 @@ int mmo_char_fromsql(int char_id, struct mmo_charstatus* p, bool load_everything
//read friends
//`friends` (`char_id`, `friend_account`, `friend_id`)
+ memset(&tmp_friend, 0, sizeof(tmp_friend));
if( SQL_ERROR == SQL->StmtPrepare(stmt, "SELECT c.`account_id`, c.`char_id`, c.`name` FROM `%s` c LEFT JOIN `%s` f ON f.`friend_account` = c.`account_id` AND f.`friend_id` = c.`char_id` WHERE f.`char_id`=? LIMIT %d", char_db, friend_db, MAX_FRIENDS)
|| SQL_ERROR == SQL->StmtBindParam(stmt, 0, SQLDT_INT, &char_id, 0)
|| SQL_ERROR == SQL->StmtExecute(stmt)
@@ -1348,6 +1354,7 @@ int mmo_char_fromsql(int char_id, struct mmo_charstatus* p, bool load_everything
#ifdef HOTKEY_SAVING
//read hotkeys
//`hotkey` (`char_id`, `hotkey`, `type`, `itemskill_id`, `skill_lvl`
+ memset(&tmp_hotkey, 0, sizeof(tmp_hotkey));
if( SQL_ERROR == SQL->StmtPrepare(stmt, "SELECT `hotkey`, `type`, `itemskill_id`, `skill_lvl` FROM `%s` WHERE `char_id`=?", hotkey_db)
|| SQL_ERROR == SQL->StmtBindParam(stmt, 0, SQLDT_INT, &char_id, 0)
|| SQL_ERROR == SQL->StmtExecute(stmt)
@@ -3061,6 +3068,7 @@ int parse_frommap(int fd)
int count;
char* data;
+ memset(&scdata, 0, sizeof(scdata));
WFIFOHEAD(fd,14+50*sizeof(struct status_change_data));
WFIFOW(fd,0) = 0x2b1d;
WFIFOL(fd,4) = aid;
@@ -3232,7 +3240,6 @@ int parse_frommap(int fd)
{
int map_id, map_fd = -1;
struct mmo_charstatus* char_data;
- struct mmo_charstatus char_dat;
map_id = search_mapserver(RFIFOW(fd,18), ntohl(RFIFOL(fd,24)), ntohs(RFIFOW(fd,28))); //Locate mapserver by ip and port.
if (map_id >= 0)
@@ -3240,6 +3247,7 @@ int parse_frommap(int fd)
//Char should just had been saved before this packet, so this should be safe. [Skotlex]
char_data = (struct mmo_charstatus*)uidb_get(char_db_,RFIFOL(fd,14));
if (char_data == NULL) { //Really shouldn't happen.
+ struct mmo_charstatus char_dat;
mmo_char_fromsql(RFIFOL(fd,14), &char_dat, true);
char_data = (struct mmo_charstatus*)uidb_get(char_db_,RFIFOL(fd,14));
}
diff --git a/src/char/char.h b/src/char/char.h
index 5a70d2ca7..4d053484b 100644
--- a/src/char/char.h
+++ b/src/char/char.h
@@ -14,8 +14,6 @@ enum E_CHARSERVER_ST {
CHARSERVER_ST_LAST
};
-struct mmo_charstatus;
-
struct char_session_data {
bool auth; // whether the session is authed or not
int account_id, login_id1, login_id2, sex;
diff --git a/src/char/int_mail.c b/src/char/int_mail.c
index 86a36d59f..47d2cc1c5 100644
--- a/src/char/int_mail.c
+++ b/src/char/int_mail.c
@@ -148,6 +148,7 @@ static bool mail_loadmessage(int mail_id, struct mail_message* msg)
{
int j;
StringBuf buf;
+ memset(msg, 0, sizeof(struct mail_message)); // Initialize data
StrBuf->Init(&buf);
StrBuf->AppendStr(&buf, "SELECT `id`,`send_name`,`send_id`,`dest_name`,`dest_id`,`title`,`message`,`time`,`status`,"
@@ -206,6 +207,7 @@ static bool mail_loadmessage(int mail_id, struct mail_message* msg)
static void mapif_Mail_sendinbox(int fd, int char_id, unsigned char flag)
{
struct mail_data md;
+ memset(&md, 0, sizeof(md));
mail_fromsql(char_id, &md);
//FIXME: dumping the whole structure like this is unsafe [ultramage]
@@ -262,6 +264,7 @@ static bool mail_DeleteAttach(int mail_id)
static void mapif_Mail_getattach(int fd, int char_id, int mail_id)
{
struct mail_message msg;
+ memset(&msg, 0, sizeof(msg));
if( !mail_loadmessage(mail_id, &msg) )
return;
diff --git a/src/char/int_storage.c b/src/char/int_storage.c
index 882d9b2a5..b9d9f2e2c 100644
--- a/src/char/int_storage.c
+++ b/src/char/int_storage.c
@@ -282,6 +282,7 @@ int mapif_parse_ItemBoundRetrieve_sub(int fd)
return 1;
}
+ memset(&item, 0, sizeof(item));
SQL->StmtBindColumn(stmt, 0, SQLDT_INT, &item.id, 0, NULL, NULL);
SQL->StmtBindColumn(stmt, 1, SQLDT_SHORT, &item.nameid, 0, NULL, NULL);
SQL->StmtBindColumn(stmt, 2, SQLDT_SHORT, &item.amount, 0, NULL, NULL);
diff --git a/src/char/inter.c b/src/char/inter.c
index 2c652d897..df2920aa0 100644
--- a/src/char/inter.c
+++ b/src/char/inter.c
@@ -483,19 +483,19 @@ void geoip_init(void) {
geoip.active = true;
db = fopen("./db/GeoIP.dat","rb");
- if( db == NULL ) {
+ if (db == NULL) {
ShowError("geoip_readdb: Error reading GeoIP.dat!\n");
geoip_final(false);
return;
}
fno = fileno(db);
- if( fstat(fno, &bufa) < 0 ) {
+ if (fstat(fno, &bufa) < 0) {
ShowError("geoip_readdb: Error stating GeoIP.dat! Error %d\n", errno);
geoip_final(false);
return;
}
geoip.cache = aMalloc( (sizeof(geoip.cache) * bufa.st_size) );
- if( fread(geoip.cache, sizeof(unsigned char), bufa.st_size, db) != bufa.st_size ) {
+ if (fread(geoip.cache, sizeof(unsigned char), bufa.st_size, db) != bufa.st_size) {
ShowError("geoip_cache: Couldn't read all elements!\n");
fclose(db);
geoip_final(false);
@@ -504,10 +504,15 @@ void geoip_init(void) {
// Search database type
fseek(db, -3l, SEEK_END);
- for( i = 0; i < GEOIP_STRUCTURE_INFO_MAX_SIZE; i++ ) {
- fread(delim, sizeof(delim[0]), 3, db);
- if( delim[0] == 255 && delim[1] == 255 && delim[2] == 255 ) {
- fread(&db_type, sizeof(db_type), 1, db);
+ for (i = 0; i < GEOIP_STRUCTURE_INFO_MAX_SIZE; i++) {
+ if (fread(delim, sizeof(delim[0]), 3, db) != 3) {
+ db_type = 0;
+ break;
+ }
+ if (delim[0] == 255 && delim[1] == 255 && delim[2] == 255) {
+ if (fread(&db_type, sizeof(db_type), 1, db) != 1) {
+ db_type = 0;
+ }
break;
} else {
fseek(db, -4l, SEEK_CUR);
@@ -516,8 +521,8 @@ void geoip_init(void) {
fclose(db);
- if( db_type != 1 ) {
- if( db_type )
+ if (db_type != 1) {
+ if (db_type)
ShowError("geoip_init(): Database type is not supported %d!\n", db_type);
else
ShowError("geoip_init(): GeoIP is corrupted!\n");
diff --git a/src/login/Makefile.in b/src/login/Makefile.in
index 7551eed5f..a4aec59cf 100644
--- a/src/login/Makefile.in
+++ b/src/login/Makefile.in
@@ -87,7 +87,7 @@ login-server: ../../login-server@EXEEXT@
../../login-server@EXEEXT@: $(LOGIN_SERVER_SQL_DEPENDS) Makefile
@echo " LD $(notdir $@)"
- @$(CC) @LDFLAGS@ -o ../../login-server@EXEEXT@ $(LOGIN_OBJ) $(COMMON_D)/obj_sql/common_sql.a \
+ @$(CC) @STATIC@ @LDFLAGS@ -o ../../login-server@EXEEXT@ $(LOGIN_OBJ) $(COMMON_D)/obj_sql/common_sql.a \
$(COMMON_D)/obj_all/common.a $(MT19937AR_OBJ) $(LIBCONFIG_OBJ) @LIBS@ @MYSQL_LIBS@
# login object files
diff --git a/src/login/login.c b/src/login/login.c
index 828afb22b..129049627 100644
--- a/src/login/login.c
+++ b/src/login/login.c
@@ -1651,6 +1651,7 @@ int login_config_read(const char* cfgName)
else if(!strcmpi(w1, "client_hash")) {
int group = 0;
char md5[33];
+ memset(md5, '\0', 33);
if (sscanf(w2, "%d, %32s", &group, md5) == 2) {
struct client_hash_node *nnode;
diff --git a/src/map/Makefile.in b/src/map/Makefile.in
index fc58c9d70..ee8b7ac56 100644
--- a/src/map/Makefile.in
+++ b/src/map/Makefile.in
@@ -104,7 +104,7 @@ map-server: ../../map-server@EXEEXT@
../../map-server@EXEEXT@: $(MAP_SERVER_SQL_DEPENDS) Makefile
@echo " LD $(notdir $@)"
- @$(CC) @LDFLAGS@ -o ../../map-server@EXEEXT@ $(MAP_OBJ) $(COMMON_D)/obj_sql/common_sql.a \
+ @$(CC) @STATIC@ @LDFLAGS@ -o ../../map-server@EXEEXT@ $(MAP_OBJ) $(COMMON_D)/obj_sql/common_sql.a \
$(COMMON_D)/obj_all/common.a $(MT19937AR_OBJ) $(LIBCONFIG_OBJ) @LIBS@ @PCRE_LIBS@ @MYSQL_LIBS@
# map object files
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index 049adf1fc..ef528c454 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -583,7 +583,7 @@ ACMD(who) {
iter = mapit_getallusers();
for (pl_sd = (TBL_PC*)mapit->first(iter); mapit->exists(iter); pl_sd = (TBL_PC*)mapit->next(iter)) {
- if (!((pc_has_permission(pl_sd, PC_PERM_HIDE_SESSION) || (pl_sd->sc.option & OPTION_INVISIBLE)) && pc_get_group_level(pl_sd) > level)) { // you can look only lower or same level
+ if (!((pc_has_permission(pl_sd, PC_PERM_HIDE_SESSION) || pc_isinvisible(pl_sd)) && pc_get_group_level(pl_sd) > level)) { // you can look only lower or same level
if (stristr(pl_sd->status.name, player_name) == NULL // search with no case sensitive
|| (map_id >= 0 && pl_sd->bl.m != map_id))
continue;
@@ -689,7 +689,7 @@ ACMD(whogm)
continue;
}
if (pl_level > level) {
- if (pl_sd->sc.option & OPTION_INVISIBLE)
+ if (pc_isinvisible(pl_sd))
continue;
sprintf(atcmd_output, msg_txt(913), pl_sd->status.name); // Name: %s (GM)
clif->message(fd, atcmd_output);
@@ -889,7 +889,7 @@ ACMD(option)
*
*------------------------------------------*/
ACMD(hide) {
- if (sd->sc.option & OPTION_INVISIBLE) {
+ if (pc_isinvisible(sd)) {
sd->sc.option &= ~OPTION_INVISIBLE;
if (sd->disguise != -1 )
status->set_viewdata(&sd->bl, sd->disguise);
@@ -3923,12 +3923,12 @@ ACMD(mount_peco)
clif->message(fd, atcmd_output);
return false;
}
- if( !(sd->sc.option&OPTION_DRAGON1) ) {
+ if (!pc_isridingdragon(sd)) {
clif->message(sd->fd,msg_txt(1119)); // You have mounted your Dragon.
- pc->setoption(sd, sd->sc.option|OPTION_DRAGON1);
+ pc->setridingdragon(sd, OPTION_DRAGON1);
} else {
clif->message(sd->fd,msg_txt(1120)); // You have released your Dragon.
- pc->setoption(sd, sd->sc.option&~OPTION_DRAGON1);
+ pc->setridingdragon(sd, 0);
}
return true;
}
@@ -3940,34 +3940,34 @@ ACMD(mount_peco)
}
if( !pc_isridingwug(sd) ) {
clif->message(sd->fd,msg_txt(1121)); // You have mounted your Warg.
- pc->setoption(sd, sd->sc.option|OPTION_WUGRIDER);
+ pc->setridingwug(sd, true);
} else {
clif->message(sd->fd,msg_txt(1122)); // You have released your Warg.
- pc->setoption(sd, sd->sc.option&~OPTION_WUGRIDER);
+ pc->setridingwug(sd, false);
}
return true;
}
if( (sd->class_&MAPID_THIRDMASK) == MAPID_MECHANIC ) {
if( !pc_ismadogear(sd) ) {
clif->message(sd->fd,msg_txt(1123)); // You have mounted your Mado Gear.
- pc->setoption(sd, sd->sc.option|OPTION_MADOGEAR);
+ pc->setmadogear(sd, true);
} else {
clif->message(sd->fd,msg_txt(1124)); // You have released your Mado Gear.
- pc->setoption(sd, sd->sc.option&~OPTION_MADOGEAR);
+ pc->setmadogear(sd, false);
}
return true;
}
if( sd->class_&MAPID_SWORDMAN && sd->class_&JOBL_2 ) {
- if( !pc_isriding(sd) ) { // if actually no peco
+ if (!pc_isridingpeco(sd)) { // if actually no peco
if (!pc->checkskill(sd, KN_RIDING)) {
sprintf(atcmd_output, msg_txt(213), skill->get_desc(KN_RIDING)); // You need %s to mount!
clif->message(fd, atcmd_output);
return false;
}
- pc->setoption(sd, sd->sc.option | OPTION_RIDING);
+ pc->setridingpeco(sd, true);
clif->message(fd, msg_txt(102)); // You have mounted a Peco Peco.
} else {//Dismount
- pc->setoption(sd, sd->sc.option & ~OPTION_RIDING);
+ pc->setridingpeco(sd, false);
clif->message(fd, msg_txt(214)); // You have released your Peco Peco.
}
return true;
@@ -4621,8 +4621,7 @@ ACMD(disguise)
return false;
}
- if(pc_isriding(sd))
- {
+ if (pc_hasmount(sd)) {
clif->message(fd, msg_txt(1144)); // Character cannot be disguised while mounted.
return false;
}
@@ -4709,8 +4708,8 @@ ACMD(disguiseguild)
return false;
}
- for( i = 0; i < g->max_member; i++ )
- if( (pl_sd = g->member[i].sd) && !pc_isriding(pl_sd) )
+ for (i = 0; i < g->max_member; i++)
+ if ((pl_sd = g->member[i].sd) && !pc_hasmount(pl_sd))
pc->disguise(pl_sd, id);
clif->message(fd, msg_txt(122)); // Disguise applied.
@@ -8358,15 +8357,16 @@ ACMD(charcommands)
return true;
}
/* for new mounts */
-ACMD(mount2) {
+ACMD(cashmount)
+{
- if( sd->sc.option&(OPTION_WUGRIDER|OPTION_RIDING|OPTION_DRAGON|OPTION_MADOGEAR) ) {
+ if (pc_hasmount(sd)) {
clif->message(fd, msg_txt(1476)); // You are already mounting something else
return false;
}
clif->message(sd->fd,msg_txt(1362)); // NOTICE: If you crash with mount your LUA is outdated.
- if( !(sd->sc.data[SC_ALL_RIDING]) ) {
+ if (!sd->sc.data[SC_ALL_RIDING]) {
clif->message(sd->fd,msg_txt(1363)); // You have mounted.
sc_start(NULL,&sd->bl,SC_ALL_RIDING,100,0,-1);
} else {
@@ -9634,7 +9634,7 @@ void atcommand_basecommands(void) {
ACMD_DEF2("rmvperm", addperm),
ACMD_DEF(unloadnpcfile),
ACMD_DEF(cart),
- ACMD_DEF(mount2),
+ ACMD_DEF(cashmount),
ACMD_DEF(join),
ACMD_DEF(channel),
ACMD_DEF(fontcolor),
diff --git a/src/map/battle.c b/src/map/battle.c
index 3b50d3507..1b8e44cb3 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -663,10 +663,10 @@ int64 battle_addmastery(struct map_session_data *sd,struct block_list *target,in
break;
case W_1HSPEAR:
case W_2HSPEAR:
- if((skill_lv = pc->checkskill(sd,KN_SPEARMASTERY)) > 0) {
- if(pc_isridingdragon(sd))
+ if ((skill_lv = pc->checkskill(sd,KN_SPEARMASTERY)) > 0) {
+ if (pc_isridingdragon(sd))
damage += (skill_lv * 10);
- else if(pc_isriding(sd))
+ else if (pc_isridingpeco(sd))
damage += (skill_lv * 5);
else
damage += (skill_lv * 4);
@@ -6144,7 +6144,7 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f
TBL_SKILL *su = (TBL_SKILL*)target;
if( !su->group )
return 0;
- if( skill->get_inf2(su->group->skill_id)&INF2_TRAP ) { //Only a few skills can target traps...
+ if( skill->get_inf2(su->group->skill_id)&INF2_TRAP && su->group->unit_id != UNT_USED_TRAPS) { //Only a few skills can target traps...
switch( battle->get_current_skill(src) ) {
case RK_DRAGONBREATH:// it can only hit traps in pvp/gvg maps
case RK_DRAGONBREATH_WATER:
@@ -6243,6 +6243,7 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f
break;
case BL_SKILL: {
struct skill_unit *su = (struct skill_unit *)src;
+ struct status_change* sc = status->get_sc(target);
if (!su->group)
return 0;
@@ -6253,6 +6254,11 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f
if (inf2&INF2_TARGET_SELF)
return 1;
}
+ //Status changes that prevent traps from triggering
+ if (sc && sc->count && skill->get_inf2(su->group->skill_id)&INF2_TRAP) {
+ if( sc->data[SC_WZ_SIGHTBLASTER] && sc->data[SC_WZ_SIGHTBLASTER]->val2 > 0 && sc->data[SC_WZ_SIGHTBLASTER]->val4%2 == 0)
+ return -1;
+ }
}
break;
case BL_MER:
@@ -6830,7 +6836,8 @@ static const struct battle_data {
{ "guild_castle_expulsion", &battle_config.guild_castle_expulsion, 0, 0, 1, },
{ "song_timer_reset", &battle_config.song_timer_reset, 0, 0, 1, },
{ "snap_dodge", &battle_config.snap_dodge, 0, 0, 1, },
- { "monster_chase_refresh", &battle_config.mob_chase_refresh, 1, 0, 30, }
+ { "monster_chase_refresh", &battle_config.mob_chase_refresh, 1, 0, 30, },
+ { "icewall_walk_block", &battle_config.icewall_walk_block, 75, 0, 255, }
};
#ifndef STATS_OPT_OUT
/**
diff --git a/src/map/battle.h b/src/map/battle.h
index 966fa073e..6ac2df391 100644
--- a/src/map/battle.h
+++ b/src/map/battle.h
@@ -452,6 +452,7 @@ struct Battle_Config {
int mob_size_influence; // Enable modifications on earned experience, drop rates and monster status depending on monster size. [mkbu95]
int bowling_bash_area;
int mob_chase_refresh; //How often a monster should refresh its chase [Playtester]
+ int icewall_walk_block; //How long a monster should stay trapped in icewall [Playtester]
/** Hercules **/
int skill_trap_type;
diff --git a/src/map/chrif.c b/src/map/chrif.c
index 34e92bee0..c78b34309 100644
--- a/src/map/chrif.c
+++ b/src/map/chrif.c
@@ -1125,9 +1125,12 @@ bool chrif_save_scdata(struct map_session_data *sd) { //parses the sc_data of th
continue;
if (sc->data[i]->timer != INVALID_TIMER) {
td = timer->get(sc->data[i]->timer);
- if (td == NULL || td->func != status->change_timer || DIFF_TICK(td->tick,tick) < 0)
+ if (td == NULL || td->func != status->change_timer)
continue;
- data.tick = DIFF_TICK32(td->tick,tick); //Duration that is left before ending.
+ if (DIFF_TICK32(td->tick,tick) > 0)
+ data.tick = DIFF_TICK32(td->tick,tick); //Duration that is left before ending.
+ else
+ data.tick = 0; //Negative tick does not necessarily mean that sc has expired
} else
data.tick = -1; //Infinite duration
data.type = i;
diff --git a/src/map/clif.c b/src/map/clif.c
index a5928bc89..b9cd4cbaf 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -4785,7 +4785,9 @@ int clif_outsight(struct block_list *bl,va_list ap)
}
if (sd && sd->fd) { //sd is watching tbl go out of view.
nullpo_ret(tbl);
- if (((vd=status->get_viewdata(tbl)) && vd->class_ != INVISIBLE_CLASS) &&
+ if(tbl->type == BL_SKILL) //Trap knocked out of sight
+ clif->clearchar_skillunit((struct skill_unit *)tbl,sd->fd);
+ else if (((vd=status->get_viewdata(tbl)) && vd->class_ != INVISIBLE_CLASS) &&
!(tbl->type == BL_NPC && (((TBL_NPC*)tbl)->option&OPTION_INVISIBLE)))
clif->clearunit_single(tbl->id,CLR_OUTSIGHT,sd->fd);
}
@@ -5831,12 +5833,12 @@ void clif_pvpset(struct map_session_data *sd,int pvprank,int pvpnum,int type)
unsigned char buf[32];
WBUFW(buf,0) = 0x19a;
WBUFL(buf,2) = sd->bl.id;
- if(sd->sc.option&(OPTION_HIDE|OPTION_CLOAK))
+ if (sd->sc.option&(OPTION_HIDE|OPTION_CLOAK)) // TODO[Haru] Should this be pc_ishiding(sd)? (i.e. include Chase Walk and any new options)
WBUFL(buf,6) = UINT32_MAX; //On client displays as --
else
WBUFL(buf,6) = pvprank;
WBUFL(buf,10) = pvpnum;
- if(sd->sc.option&OPTION_INVISIBLE || sd->disguise != -1) //Causes crashes when a 'mob' with pvp info dies.
+ if (pc_isinvisible(sd) || sd->disguise != -1) //Causes crashes when a 'mob' with pvp info dies.
clif->send(buf,packet_len(0x19a),&sd->bl,SELF);
else if(!type)
clif->send(buf,packet_len(0x19a),&sd->bl,AREA);
@@ -9338,7 +9340,7 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) {
sd->state.hpmeter_visible = 1;
}
- if( !(sd->sc.option&OPTION_INVISIBLE) ) { // increment the number of pvp players on the map
+ if (!pc_isinvisible(sd)) { // increment the number of pvp players on the map
map->list[sd->bl.m].users_pvp++;
}
@@ -9359,7 +9361,7 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) {
if( sd->bg_id ) clif->bg_hp(sd); // BattleGround System
- if(map->list[sd->bl.m].flag.pvp && !(sd->sc.option&OPTION_INVISIBLE)) {
+ if (map->list[sd->bl.m].flag.pvp && !pc_isinvisible(sd)) {
if(!battle_config.pk_mode) { // remove pvp stuff for pk_mode [Valaris]
if (!map->list[sd->bl.m].flag.pvp_nocalcrank)
sd->pvp_timer = timer->add(timer->gettick()+200, pc->calc_pvprank_timer, sd->bl.id, 0);
@@ -9444,11 +9446,11 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) {
clif->updatestatus(sd,SP_SKILLPOINT);
clif->initialstatus(sd);
- if (sd->sc.option&OPTION_FALCON)
+ if (pc_isfalcon(sd))
clif->status_change(&sd->bl, SI_FALCON, 1, 0, 0, 0, 0);
- if (sd->sc.option&(OPTION_RIDING|OPTION_DRAGON))
+ if (pc_isridingpeco(sd) || pc_isridingdragon(sd))
clif->status_change(&sd->bl, SI_RIDING, 1, 0, 0, 0, 0);
- else if (sd->sc.option&OPTION_WUGRIDER)
+ else if (pc_isridingwug(sd))
clif->status_change(&sd->bl, SI_WUGRIDER, 1, 0, 0, 0, 0);
if(sd->status.manner < 0)
@@ -10488,7 +10490,7 @@ void clif_parse_WisMessage(int fd, struct map_session_data* sd)
// if player ignores everyone
if (dstsd->state.ignoreAll && pc_get_group_level(sd) <= pc_get_group_level(dstsd)) {
- if (dstsd->sc.option & OPTION_INVISIBLE && pc_get_group_level(sd) < pc_get_group_level(dstsd))
+ if (pc_isinvisible(dstsd) && pc_get_group_level(sd) < pc_get_group_level(dstsd))
clif->wis_end(fd, 1); // 1: target character is not logged in
else
clif->wis_end(fd, 3); // 3: everyone ignored by target
@@ -11162,16 +11164,17 @@ void clif_parse_GetItemFromCart(int fd,struct map_session_data *sd)
/// 012a
void clif_parse_RemoveOption(int fd,struct map_session_data *sd)
{
- if( !(sd->sc.option&(OPTION_RIDING|OPTION_FALCON|OPTION_DRAGON|OPTION_MADOGEAR))
+ if (pc_isridingpeco(sd) || pc_isfalcon(sd) || pc_isridingdragon(sd) || pc_ismadogear(sd)) {
+ // priority to remove this option before we can clear cart
+ pc->setoption(sd,sd->sc.option&~(OPTION_RIDING|OPTION_FALCON|OPTION_DRAGON|OPTION_MADOGEAR));
+ } else {
#ifdef NEW_CARTS
- && sd->sc.data[SC_PUSH_CART] ){
- pc->setcart(sd,0);
-#else
- ){
+ if (sd->sc.data[SC_PUSH_CART])
+ pc->setcart(sd,0);
+#else // not NEW_CARTS
pc->setoption(sd,sd->sc.option&~OPTION_CART);
-#endif
- }else // priority to remove this option before we can clear cart
- pc->setoption(sd,sd->sc.option&~(OPTION_RIDING|OPTION_FALCON|OPTION_DRAGON|OPTION_MADOGEAR));
+#endif // NEW_CARTS
+ }
}
@@ -15116,7 +15119,8 @@ void clif_parse_Mail_send(int fd, struct map_session_data *sd)
if (body_len > MAIL_BODY_LENGTH)
body_len = MAIL_BODY_LENGTH;
- if( !mail->setattachment(sd, &msg) ) { // Invalid Append condition
+ memset(&msg, 0, sizeof(msg));
+ if (!mail->setattachment(sd, &msg)) { // Invalid Append condition
clif->mail_send(sd->fd, true); // fail
mail->removeitem(sd,0);
mail->removezeny(sd,0);
@@ -15334,9 +15338,10 @@ void clif_parse_Auction_register(int fd, struct map_session_data *sd)
struct auction_data auction;
struct item_data *item;
- if( !battle_config.feature_auction )
+ if (!battle_config.feature_auction)
return;
+ memset(&auction, 0, sizeof(auction));
auction.price = RFIFOL(fd,2);
auction.buynow = RFIFOL(fd,6);
auction.hours = RFIFOW(fd,10);
diff --git a/src/map/clif.h b/src/map/clif.h
index bb71db5ae..1013add85 100644
--- a/src/map/clif.h
+++ b/src/map/clif.h
@@ -18,8 +18,6 @@
**/
struct item;
struct item_data;
-struct storage_data;
-struct guild_storage;
struct unit_data;
struct map_session_data;
struct homun_data;
diff --git a/src/map/guild.c b/src/map/guild.c
index 595711755..1d9cf03a9 100644
--- a/src/map/guild.c
+++ b/src/map/guild.c
@@ -459,6 +459,8 @@ int guild_recv_info(struct guild *sg) {
struct map_session_data *sd;
bool guild_new = false;
struct hChSysCh *aChSysSave = NULL;
+ short *instance_save = NULL;
+ unsigned short instances_save = 0;
nullpo_ret(sg);
@@ -538,10 +540,16 @@ int guild_recv_info(struct guild *sg) {
before=*g;
if( g->channel )
aChSysSave = g->channel;
+ if( g->instance )
+ instance_save = g->instance;
+ if( g->instances )
+ instances_save = g->instances;
}
memcpy(g,sg,sizeof(struct guild));
g->channel = aChSysSave;
+ g->instance = instance_save;
+ g->instances = instances_save;
if(g->max_member > MAX_GUILD) {
ShowError("guild_recv_info: Received guild with %d members, but MAX_GUILD is only %d. Extra guild-members have been lost!\n", g->max_member, MAX_GUILD);
diff --git a/src/map/map.c b/src/map/map.c
index 14af392b7..045233e91 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -2420,28 +2420,27 @@ uint8 map_calc_dir(struct block_list* src, int16 x, int16 y)
}
else if( dx >= 0 && dy >=0 )
{ // upper-right
- if( dx*2 <= dy ) dir = 0; // up
- else if( dx > dy*2 ) dir = 6; // right
- else dir = 7; // up-right
+ if( dx*2 < dy || dx == 0 ) dir = 0; // up
+ else if( dx > dy*2+1 || dy == 0 ) dir = 6; // right
+ else dir = 7; // up-right
}
else if( dx >= 0 && dy <= 0 )
{ // lower-right
- if( dx*2 <= -dy ) dir = 4; // down
- else if( dx > -dy*2 ) dir = 6; // right
- else dir = 5; // down-right
+ if( dx*2 < -dy || dx == 0 ) dir = 4; // down
+ else if( dx > -dy*2+1 || dy == 0 ) dir = 6; // right
+ else dir = 5; // down-right
}
else if( dx <= 0 && dy <= 0 )
{ // lower-left
- if( dx*2 >= dy ) dir = 4; // down
- else if( dx < dy*2 ) dir = 2; // left
- else dir = 3; // down-left
+ if( dx*2 > dy || dx == 0 ) dir = 4; // down
+ else if( dx < dy*2-1 || dy == 0 ) dir = 2; // left
+ else dir = 3; // down-left
}
else
{ // upper-left
- if( -dx*2 <= dy ) dir = 0; // up
- else if( -dx > dy*2 ) dir = 2; // left
- else dir = 1; // up-left
-
+ if( -dx*2 < dy || dx == 0 ) dir = 0; // up
+ else if( -dx > dy*2+1 || dy == 0) dir = 2; // left
+ else dir = 1; // up-left
}
return dir;
}
@@ -2587,6 +2586,8 @@ int map_getcellp(struct map_data* m,int16 x,int16 y,cell_chk cellchk) {
return (cell.nochat);
case CELL_CHKICEWALL:
return (cell.icewall);
+ case CELL_CHKNOICEWALL:
+ return (cell.noicewall);
// special checks
case CELL_CHKPASS:
@@ -2646,6 +2647,8 @@ void map_setcell(int16 m, int16 x, int16 y, cell_t cell, bool flag) {
case CELL_NOVENDING: map->list[m].cell[j].novending = flag; break;
case CELL_NOCHAT: map->list[m].cell[j].nochat = flag; break;
case CELL_ICEWALL: map->list[m].cell[j].icewall = flag; break;
+ case CELL_NOICEWALL: map->list[m].cell[j].noicewall = flag; break;
+
default:
ShowWarning("map_setcell: invalid cell type '%d'\n", (int)cell);
break;
diff --git a/src/map/map.h b/src/map/map.h
index c36f905ef..5468016b4 100644
--- a/src/map/map.h
+++ b/src/map/map.h
@@ -444,6 +444,7 @@ typedef enum {
CELL_NOVENDING,
CELL_NOCHAT,
CELL_ICEWALL,
+ CELL_NOICEWALL,
} cell_t;
@@ -467,6 +468,7 @@ typedef enum {
CELL_CHKNOVENDING,
CELL_CHKNOCHAT,
CELL_CHKICEWALL,
+ CELL_CHKNOICEWALL,
} cell_chk;
@@ -484,7 +486,8 @@ struct mapcell {
landprotector : 1,
novending : 1,
nochat : 1,
- icewall : 1;
+ icewall : 1,
+ noicewall : 1;
#ifdef CELL_NOSTACK
int cell_bl; //Holds amount of bls in this cell.
@@ -658,13 +661,7 @@ struct map_data {
int jexp; // map experience multiplicator
int bexp; // map experience multiplicator
int nocommand; //Blocks @/# commands for non-gms. [Skotlex]
- /**
- * Ice wall reference counter for bugreport:3574
- * - since there are a thousand mobs out there in a lot of maps checking on,
- * - every targeting for icewall on attack path would just be a waste, so,
- * - this counter allows icewall checking be only run when there is a actual ice wall on the map
- **/
- int icewall_num;
+
// Instance Variables
int instance_id;
int instance_src_map;
diff --git a/src/map/mob.c b/src/map/mob.c
index 122cc91aa..eaf8c8468 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -1076,15 +1076,6 @@ int mob_ai_sub_hard_activesearch(struct block_list *bl,va_list ap)
((*target) == NULL || !check_distance_bl(&md->bl, *target, dist)) &&
battle->check_range(&md->bl,bl,md->db->range2)
) { //Pick closest target?
-
- if( map->list[bl->m].icewall_num &&
- !path->search_long(NULL,bl->m,md->bl.x,md->bl.y,bl->x,bl->y,CELL_CHKICEWALL) ) {
-
- if( !check_distance_bl(&md->bl, bl, status_get_range(&md->bl) ) )
- return 0;
-
- }
-
(*target) = bl;
md->target_id=bl->id;
md->min_chase= dist + md->db->range3;
@@ -1288,8 +1279,7 @@ int mob_unlocktarget(struct mob_data *md, int64 tick) {
md->state.skillstate = MSS_IDLE;
case MSS_IDLE:
// Idle skill.
- if ((md->target_id || !(++md->ud.walk_count%IDLE_SKILL_INTERVAL)) &&
- mob->skill_use(md, tick, -1))
+ if (!(++md->ud.walk_count%IDLE_SKILL_INTERVAL) && mob->skill_use(md, tick, -1))
break;
//Random walk.
if (!md->master_id &&
@@ -1457,6 +1447,7 @@ bool mob_ai_sub_hard(struct mob_data *md, int64 tick) {
|| md->sc.data[SC_WUGBITE] || md->sc.data[SC_VACUUM_EXTREME] || md->sc.data[SC_THORNS_TRAP]
|| md->sc.data[SC__MANHOLE])) // Not yet confirmed if boss will teleport once it can't reach target.
|| !mob->can_reach(md, tbl, md->min_chase, MSS_RUSH)
+ || md->walktoxy_fail_count > 0
)
&& md->state.attacked_count++ >= RUDE_ATTACKED_COUNT
&& !mob->skill_use(md, tick, MSC_RUDEATTACKED) // If can't rude Attack
@@ -1479,6 +1470,7 @@ bool mob_ai_sub_hard(struct mob_data *md, int64 tick) {
|| md->sc.data[SC_WUGBITE] || md->sc.data[SC_VACUUM_EXTREME] || md->sc.data[SC_THORNS_TRAP]
|| md->sc.data[SC__MANHOLE])) // Not yet confirmed if boss will teleport once it can't reach target.
|| !mob->can_reach(md, abl, dist+md->db->range3, MSS_RUSH)
+ || md->walktoxy_fail_count > 0
)
)
) {
@@ -1551,7 +1543,7 @@ bool mob_ai_sub_hard(struct mob_data *md, int64 tick) {
}
}
- //This handles triggering idle walk/skill.
+ //This handles triggering idle/walk skill.
mob->unlocktarget(md, tick);
return true;
}
@@ -1611,8 +1603,8 @@ bool mob_ai_sub_hard(struct mob_data *md, int64 tick) {
//Attempt to attack.
//At this point we know the target is attackable, we just gotta check if the range matches.
- if (battle->check_range (&md->bl, tbl, md->status.rhw.range))
- { //Target within range, engage
+ if (battle->check_range(&md->bl, tbl, md->status.rhw.range) && !(md->sc.option&OPTION_HIDE))
+ { //Target within range and able to use normal attack, engage
if (md->ud.target != tbl->id || md->ud.attacktimer == INVALID_TIMER)
{ //Only attack if no more attack delay left
if(tbl->type == BL_PC)
@@ -1632,27 +1624,30 @@ bool mob_ai_sub_hard(struct mob_data *md, int64 tick) {
return true;
}
+ //Monsters in berserk state, unable to use normal attacks, will always attempt a skill
+ if(md->ud.walktimer == INVALID_TIMER && (md->state.skillstate == MSS_BERSERK || md->state.skillstate == MSS_ANGRY)) {
+ if (DIFF_TICK(md->ud.canmove_tick, tick) <= MIN_MOBTHINKTIME && DIFF_TICK(md->ud.canact_tick, tick) < -MIN_MOBTHINKTIME*IDLE_SKILL_INTERVAL)
+ { //Only use skill if able to walk on next tick and not used a skill the last second
+ mob->skill_use(md, tick, -1);
+ }
+ }
+
+ //Target still in attack range, no need to chase the target
+ if(battle->check_range(&md->bl, tbl, md->status.rhw.range))
+ return true;
+
+
//Out of range...
if (!(mode&MD_CANMOVE) || (!can_move && DIFF_TICK(tick, md->ud.canmove_tick) > 0))
- { //Can't chase. Immobile and trapped mobs should unlock target and use an idle skill on next interval.
- if ((md->ud.target != tbl->id || md->ud.attacktimer == INVALID_TIMER))
- { //Only unlock target to use idle skill if no more attack left
- md->ud.walk_count = (md->ud.walk_count+1)%250;
- if (!(md->ud.walk_count%IDLE_SKILL_INTERVAL))
- mob_unlocktarget(md,tick);
+ { //Can't chase. Immobile and trapped mobs should unlock target and use an idle skill.
+ if (md->ud.attacktimer == INVALID_TIMER)
+ { //Only unlock target if no more attack delay left
+ //This handles triggering idle/walk skill.
+ mob->unlocktarget(md,tick);
}
return true;
}
- //Before a monster starts to chase a target, it will check if it has a ranged "attack" skill to use on it.
- if(md->ud.walktimer == INVALID_TIMER && (md->state.skillstate == MSS_BERSERK || md->state.skillstate == MSS_ANGRY))
- {
- if (DIFF_TICK(md->ud.canmove_tick, tick) <= MIN_MOBTHINKTIME && DIFF_TICK(md->ud.canact_tick, tick) < -MIN_MOBTHINKTIME*IDLE_SKILL_INTERVAL)
- { //Only use skill if able to walk on next tick and not used a skill the last second
- mob->skill_use(md, tick, -1);
- }
- }
-
if (md->ud.walktimer != INVALID_TIMER && md->ud.target == tbl->id &&
(
!(battle_config.mob_ai&0x1) ||
diff --git a/src/map/mob.h b/src/map/mob.h
index 4df96d7f8..848bfbb2f 100644
--- a/src/map/mob.h
+++ b/src/map/mob.h
@@ -171,6 +171,7 @@ struct mob_data {
short move_fail_count;
short lootitem_count;
short min_chase;
+ unsigned char walktoxy_fail_count; //Pathfinding succeeds but the actual walking failed (e.g. Icewall lock)
int deletetimer;
int master_id,master_dist;
diff --git a/src/map/npc.c b/src/map/npc.c
index a33db6b99..7378ac470 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -1818,11 +1818,11 @@ int npc_buylist(struct map_session_data* sd, int n, unsigned short* item_list) {
for( i = 0; i < n; ++i ) {
int nameid = item_list[i*2+1];
int amount = item_list[i*2+0];
- struct item item_tmp;
- if (itemdb_type(nameid) == IT_PETEGG)
+ if (itemdb_type(nameid) == IT_PETEGG) {
pet->create_egg(sd, nameid);
- else {
+ } else {
+ struct item item_tmp;
memset(&item_tmp,0,sizeof(item_tmp));
item_tmp.nameid = nameid;
item_tmp.identify = 1;
@@ -1933,7 +1933,6 @@ int npc_market_buylist(struct map_session_data* sd, unsigned short list_size, st
for( i = 0; i < list_size; ++i ) {
int nameid = p->list[i].ITID;
int amount = p->list[i].qty;
- struct item item_tmp;
j = npc_market_qty[i];
@@ -1944,9 +1943,10 @@ int npc_market_buylist(struct map_session_data* sd, unsigned short list_size, st
npc->market_tosql(nd,j);
- if (itemdb_type(nameid) == IT_PETEGG)
+ if (itemdb_type(nameid) == IT_PETEGG) {
pet->create_egg(sd, nameid);
- else {
+ } else {
+ struct item item_tmp;
memset(&item_tmp,0,sizeof(item_tmp));
item_tmp.nameid = nameid;
item_tmp.identify = 1;
@@ -3324,8 +3324,8 @@ int npc_do_atcmd_event(struct map_session_data* sd, const char* command, const c
struct event_data* ev = (struct event_data*)strdb_get(npc->ev_db, eventname);
struct npc_data *nd;
struct script_state *st;
- int i = 0, j = 0, k = 0;
- char *temp;
+ int i = 0, nargs = 0;
+ size_t len;
nullpo_ret(sd);
@@ -3353,27 +3353,29 @@ int npc_do_atcmd_event(struct map_session_data* sd, const char* command, const c
st = script->alloc_state(ev->nd->u.scr.script, ev->pos, sd->bl.id, ev->nd->bl.id);
script->setd_sub(st, NULL, ".@atcmd_command$", 0, (void *)command, NULL);
- // split atcmd parameters based on spaces
- temp = (char*)aMalloc(strlen(message) + 1);
-
- for( i = 0; i < ( strlen( message ) + 1 ) && k < 127; i ++ ) {
- if( message[i] == ' ' || message[i] == '\0' ) {
- if( message[ ( i - 1 ) ] == ' ' ) {
- continue; // To prevent "@atcmd [space][space]" and .@atcmd_numparameters return 1 without any parameter.
- }
- temp[k] = '\0';
- k = 0;
- if( temp[0] != '\0' ) {
- script->setd_sub( st, NULL, ".@atcmd_parameters$", j++, (void *)temp, NULL );
+ len = strlen(message);
+ if (len) {
+ char *temp, *p;
+ p = temp = aStrdup(message);
+ // Sanity check - Skip leading spaces (shouldn't happen)
+ while (i <= len && temp[i] == ' ') {
+ p++;
+ i++;
+ }
+ // split atcmd parameters based on spaces
+ while (i <= len) {
+ if (temp[i] != ' ' && temp[i] != '\0') {
+ i++;
+ continue;
}
- } else {
- temp[k] = message[i];
- k++;
+ temp[i] = '\0';
+ script->setd_sub(st, NULL, ".@atcmd_parameters$", nargs++, (void *)p, NULL);
+ i++;
+ p = temp + i;
}
+ aFree(temp);
}
-
- script->setd_sub(st, NULL, ".@atcmd_numparameters", 0, (void *)h64BPTRSIZE(j), NULL);
- aFree(temp);
+ script->setd_sub(st, NULL, ".@atcmd_numparameters", 0, (void *)h64BPTRSIZE(nargs), NULL);
script->run_main(st);
return 0;
@@ -4179,9 +4181,6 @@ int npc_parsesrcfile(const char* filepath, bool runOnInit) {
if( strcmp(w1,"function") == 0 ) {
p = npc->parse_function(w1, w2, w3, w4, p, buffer, filepath, &success);
} else {
-#ifdef ENABLE_CASE_CHECK
- if( strcasecmp(w1, "function") == 0 ) DeprecationWarning("npc_parsesrcfile", w1, "function", filepath, strline(buffer, p-buffer)); // TODO
-#endif // ENABLE_CASE_CHECK
p = npc->parse_script(w1,w2,w3,w4, p, buffer, filepath,runOnInit?NPO_ONINIT:NPO_NONE, &success);
}
}
@@ -4206,22 +4205,6 @@ int npc_parsesrcfile(const char* filepath, bool runOnInit) {
}
else
{
-#ifdef ENABLE_CASE_CHECK
- if( strcasecmp(w2, "warp") == 0 ) { DeprecationWarning("npc_parsesrcfile", w2, "warp", filepath, strline(buffer, p-buffer)); } // TODO
- else if( strcasecmp(w2,"shop") == 0 ) { DeprecationWarning("npc_parsesrcfile", w2, "shop", filepath, strline(buffer, p-buffer)); } // TODO
- else if( strcasecmp(w2,"cashshop") == 0 ) { DeprecationWarning("npc_parsesrcfile", w2, "cashshop", filepath, strline(buffer, p-buffer)); } // TODO
- else if( strcasecmp(w2, "script") == 0 ) { DeprecationWarning("npc_parsesrcfile", w2, "script", filepath, strline(buffer, p-buffer)); } // TODO
- else if( strcasecmp(w2,"trader") == 0 ) DeprecationWarning("npc_parsesrcfile", w2, "trader", filepath, strline(buffer, p-buffer)) // TODO
- else if( strncasecmp(w2, "duplicate", 9) == 0 ) {
- char temp[10];
- safestrncpy(temp, w2, 10);
- DeprecationWarning("npc_parsesrcfile", temp, "duplicate", filepath, strline(buffer, p-buffer)); // TODO
- }
- else if( strcasecmp(w2,"monster") == 0 ) { DeprecationWarning("npc_parsesrcfile", w2, "monster", filepath, strline(buffer, p-buffer)); } // TODO:
- else if( strcasecmp(w2,"boss_monster") == 0 ) { DeprecationWarning("npc_parsesrcfile", w2, "boss_monster", filepath, strline(buffer, p-buffer)); } // TODO
- else if( strcasecmp(w2, "mapflag") == 0 ) { DeprecationWarning("npc_parsesrcfile", w2, "mapflag", filepath, strline(buffer, p-buffer)); } // TODO
- else
-#endif // ENABLE_CASE_CHECK
ShowError("npc_parsesrcfile: Unable to parse, probably a missing or extra TAB in file '%s', line '%d'. Skipping line...\n * w1=%s\n * w2=%s\n * w3=%s\n * w4=%s\n", filepath, strline(buffer,p-buffer), w1, w2, w3, w4);
p = strchr(p,'\n');// skip and continue
success = EXIT_FAILURE;
@@ -4293,7 +4276,7 @@ void npc_read_event_script(void)
script_event[i].event_count++;
#ifdef ENABLE_CASE_CHECK
} else if( p && strcasecmp(name, p) == 0 ) {
- DeprecationWarning2("npc_read_event_script", p, name, config[i].event_name); // TODO
+ DeprecationCaseWarning("npc_read_event_script", p, name, config[i].event_name); // TODO
#endif // ENABLE_CASE_CHECK
}
}
diff --git a/src/map/packets.h b/src/map/packets.h
index 810f341d4..699bb3fd2 100644
--- a/src/map/packets.h
+++ b/src/map/packets.h
@@ -2767,6 +2767,39 @@ packet(0x020d,-1);
packet(0x09DF,7);
#endif
+// 2014-10-22bRagexe - YomRawr
+#if PACKETVER >= 20141022
+ packet(0x0369,7,clif->pActionRequest,2,6);
+ packet(0x083C,10,clif->pUseSkillToId,2,4,6);
+ packet(0x0437,5,clif->pWalkToXY,2);
+ packet(0x035F,6,clif->pTickSend,2);
+ packet(0x08AD,5,clif->pChangeDir,2,4);
+ packet(0x094E,6,clif->pTakeItem,2);
+ packet(0x087D,6,clif->pDropItem,2,4);
+ packet(0x0878,8,clif->pMoveToKafra,2,4);
+ packet(0x08AA,8,clif->pMoveFromKafra,2,4);
+ packet(0x023B,10,clif->pUseSkillToPos,2,4,6,8);
+ packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10);
+ packet(0x096A,6,clif->pGetCharNameRequest,2);
+ packet(0x0368,6,clif->pSolveCharName,2);
+ packet(0x0835,12,clif->pSearchStoreInfoListItemClick,2,6,10);
+ packet(0x0940,2,clif->pSearchStoreInfoNextPage,0);
+ packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15);
+ packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12);
+ packet(0x0360,6,clif->pReqClickBuyingStore,2);
+ packet(0x0817,2,clif->pReqCloseBuyingStore,0);
+ packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89);
+ packet(0x0955,18,clif->pPartyBookingRegisterReq,2,4);
+ // packet(0x092B,8); // CZ_JOIN_BATTLE_FIELD
+ packet(0x0281,-1,clif->pItemListWindowSelected,2,4,8);
+ packet(0x093B,19,clif->pWantToConnection,2,6,10,14,18);
+ packet(0x0896,26,clif->pPartyInvite2,2);
+ // packet(0x08AB,4); // CZ_GANGSI_RANK
+ packet(0x091A,26,clif->pFriendsListAdd,2);
+ packet(0x0899,5,clif->pHomMenu,2,4);
+ packet(0x0438,36,clif->pStoragePassword,0);
+#endif
+
/* PacketKeys: http://hercules.ws/board/topic/1105-hercules-wpe-free-june-14th-patch/ */
#if PACKETVER >= 20110817
packetKeys(0x053D5CED,0x3DED6DED,0x6DED6DED); /* Thanks to Shakto */
@@ -2998,6 +3031,10 @@ packet(0x020d,-1);
packetKeys(0x04810281,0x42814281,0x42814281); /* Themon */
#endif
+#if PACKETVER >= 20141022
+ packetKeys(0x290551EA,0x2B952C75,0x2D67669B); /* YomRawr */
+#endif
+
#if defined(OBFUSCATIONKEY1) && defined(OBFUSCATIONKEY2) && defined(OBFUSCATIONKEY3)
packetKeys(OBFUSCATIONKEY1,OBFUSCATIONKEY2,OBFUSCATIONKEY3);
#endif
diff --git a/src/map/path.c b/src/map/path.c
index 681dfcb06..d8096ad43 100644
--- a/src/map/path.c
+++ b/src/map/path.c
@@ -129,9 +129,6 @@ bool path_search_long(struct shootpath_data *spd,int16 m,int16 x0,int16 y0,int16
spd->x[0] = x0;
spd->y[0] = y0;
- if (md->getcellp(md,x1,y1,cell))
- return false;
-
if (dx > abs(dy)) {
weight = dx;
spd->ry = 1;
@@ -142,8 +139,6 @@ bool path_search_long(struct shootpath_data *spd,int16 m,int16 x0,int16 y0,int16
while (x0 != x1 || y0 != y1)
{
- if (md->getcellp(md,x0,y0,cell))
- return false;
wx += dx;
wy += dy;
if (wx >= weight) {
@@ -163,6 +158,8 @@ bool path_search_long(struct shootpath_data *spd,int16 m,int16 x0,int16 y0,int16
spd->y[spd->len] = y0;
spd->len++;
}
+ if (md->getcellp(md,x0,y0,cell))
+ return false;
}
return true;
diff --git a/src/map/pc.c b/src/map/pc.c
index 71860340d..85dab4559 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -1320,7 +1320,7 @@ int pc_reg_received(struct map_session_data *sd)
clif->pLoadEndAck(sd->fd, sd);
}
- if( sd->sc.option & OPTION_INVISIBLE ) {
+ if (pc_isinvisible(sd)) {
sd->vd.class_ = INVISIBLE_CLASS;
clif->message(sd->fd, msg_txt(11)); // Invisible: On
// decrement the number of pvp players on the map
@@ -1729,7 +1729,7 @@ int pc_disguise(struct map_session_data *sd, int class_) {
if (class_ >= 0 && sd->disguise == class_)
return 0;
- if(sd->sc.option&OPTION_INVISIBLE) { //Character is invisible. Stealth class-change. [Skotlex]
+ if (pc_isinvisible(sd)) { //Character is invisible. Stealth class-change. [Skotlex]
sd->disguise = class_; //viewdata is set on uncloaking.
return 2;
}
@@ -4471,7 +4471,7 @@ int pc_useitem(struct map_session_data *sd,int n) {
} else {// not yet used item (all slots are initially empty)
sd->item_delay[i].nameid = nameid;
}
- if( !(nameid == ITEMID_REINS_OF_MOUNT && sd->sc.option&(OPTION_WUGRIDER|OPTION_RIDING|OPTION_DRAGON|OPTION_MADOGEAR)) )
+ if (!(nameid == ITEMID_REINS_OF_MOUNT && pc_hasmount(sd)))
sd->item_delay[i].tick = tick + sd->inventory_data[n]->delay;
} else {// should not happen
ShowError("pc_useitem: Exceeded item delay array capacity! (nameid=%d, char_id=%d)\n", nameid, sd->status.char_id);
@@ -8143,84 +8143,111 @@ int pc_setcart(struct map_session_data *sd,int type) {
return 0;
}
-/*==========================================
- * Give player a falcon
- *------------------------------------------*/
-int pc_setfalcon(TBL_PC* sd, int flag)
+/* FIXME: These setter methods are inconsistent in their class/skill checks.
+ They should be changed so that they all either do or skip the checks.*/
+
+/**
+ * Gives/removes a falcon.
+ *
+ * The target player needs the required skills in order to obtain a falcon.
+ *
+ * @param sd Target player.
+ * @param flag New state.
+ **/
+void pc_setfalcon(TBL_PC* sd, bool flag)
{
- if( flag ){
- if( pc->checkskill(sd,HT_FALCON)>0 ) // add falcon if he have the skill
+ if (flag) {
+ if (pc->checkskill(sd,HT_FALCON) > 0) // add falcon if he have the skill
pc->setoption(sd,sd->sc.option|OPTION_FALCON);
- } else if( pc_isfalcon(sd) ){
+ } else if (pc_isfalcon(sd)) {
pc->setoption(sd,sd->sc.option&~OPTION_FALCON); // remove falcon
}
-
- return 0;
}
-/*==========================================
- * Set player riding
- *------------------------------------------*/
-int pc_setriding(TBL_PC* sd, int flag)
+/**
+ * Mounts/dismounts a Peco or Gryphon.
+ *
+ * The target player needs the required skills in order to mount a peco.
+ *
+ * @param sd Target player.
+ * @param flag New state.
+ **/
+void pc_setridingpeco(TBL_PC* sd, bool flag)
{
- if( flag )
- {
- // Rune Knight (Dragon)
- if( (sd->class_&MAPID_THIRDMASK) == MAPID_RUNE_KNIGHT ) {
- if( pc->checkskill(sd, RK_DRAGONTRAINING) )
- pc->setoption(sd, sd->sc.option|flag);
- }
- // Ranger (Warg)
- else if( (sd->class_&MAPID_THIRDMASK) == MAPID_RANGER ) {
- if( pc->checkskill(sd, RA_WUGRIDER) )
- pc->setoption(sd,sd->sc.option|OPTION_WUGRIDER);
- }
- // Mechanic (Mado Gear)
- else if( (sd->class_&MAPID_THIRDMASK) == MAPID_MECHANIC ) {
- if( pc->checkskill(sd, NC_MADOLICENCE) )
- pc->setoption(sd, sd->sc.option|OPTION_MADOGEAR);
- }
- // Knight / Crusader (Peco Peco)
- else {
- if( pc->checkskill(sd, KN_RIDING) )
- pc->setoption(sd, sd->sc.option|OPTION_RIDING);
- }
- }
- else if( pc_isriding(sd) )
- {
- // Rune Knight (Dragon)
- if( (sd->class_&MAPID_THIRDMASK) == MAPID_RUNE_KNIGHT ) {
- pc->setoption(sd, sd->sc.option&~OPTION_DRAGON);
- }
- // Ranger (Warg)
- else if( (sd->class_&MAPID_THIRDMASK) == MAPID_RANGER ) {
- pc->setoption(sd,sd->sc.option&~OPTION_WUGRIDER);
- }
- // Mechanic (Mado Gear)
- else if( (sd->class_&MAPID_THIRDMASK) == MAPID_MECHANIC ) {
- pc->setoption(sd, sd->sc.option&~OPTION_MADOGEAR);
- }
- // Knight / Crusaders (Peco Peco)
- else {
- pc->setoption(sd, sd->sc.option&~OPTION_RIDING);
- }
+ if (flag) {
+ if (pc->checkskill(sd, KN_RIDING))
+ pc->setoption(sd, sd->sc.option|OPTION_RIDING);
+ } else if (pc_isridingpeco(sd)) {
+ pc->setoption(sd, sd->sc.option&~OPTION_RIDING);
}
-
- return 0;
}
/**
- * Gives player a mado
- * @param flag 1 Set mado
+ * Gives/removes a Mado Gear.
+ *
+ * The target player needs to be the correct class in order to obtain a mado gear.
+ *
+ * @param sd Target player.
+ * @param flag New state.
**/
-void pc_setmadogear( struct map_session_data *sd, int flag ) {
- if( flag ) {
- if( (sd->class_&MAPID_THIRDMASK) == MAPID_MECHANIC )
+void pc_setmadogear(struct map_session_data *sd, bool flag)
+{
+ if (flag) {
+ if ((sd->class_&MAPID_THIRDMASK) == MAPID_MECHANIC)
pc->setoption(sd, sd->sc.option|OPTION_MADOGEAR);
- } else if( pc_ismadogear(sd) )
+ } else if (pc_ismadogear(sd)) {
pc->setoption(sd, sd->sc.option&~OPTION_MADOGEAR);
+ }
+}
- return;
+/**
+ * Mounts/dismounts a dragon.
+ *
+ * The target player needs the required skills in order to mount a dragon.
+ *
+ * @param sd Target player.
+ * @param type New state. This must be a valid OPTION_DRAGON* or 0.
+ **/
+void pc_setridingdragon(TBL_PC* sd, unsigned int type)
+{
+ if (type&OPTION_DRAGON) {
+ // Ensure only one dragon is set at a time.
+ if (type&OPTION_DRAGON1)
+ type = OPTION_DRAGON1;
+ else if (type&OPTION_DRAGON2)
+ type = OPTION_DRAGON2;
+ else if (type&OPTION_DRAGON3)
+ type = OPTION_DRAGON3;
+ else if (type&OPTION_DRAGON4)
+ type = OPTION_DRAGON4;
+ else if (type&OPTION_DRAGON5)
+ type = OPTION_DRAGON5;
+ else
+ type = OPTION_DRAGON1;
+
+ if (pc->checkskill(sd, RK_DRAGONTRAINING))
+ pc->setoption(sd, (sd->sc.option&~OPTION_DRAGON)|type);
+ } else if (pc_isridingdragon(sd)) {
+ pc->setoption(sd,sd->sc.option&~OPTION_DRAGON); // remove dragon
+ }
+}
+
+/**
+ * Mounts/dismounts a wug.
+ *
+ * The target player needs the required skills in order to mount a wug.
+ *
+ * @param sd Target player.
+ * @param flag New state.
+ **/
+void pc_setridingwug(TBL_PC* sd, bool flag)
+{
+ if (flag) {
+ if (pc->checkskill(sd, RA_WUGRIDER) > 0)
+ pc->setoption(sd,sd->sc.option|OPTION_WUGRIDER);
+ } else if (pc_isridingwug(sd)) {
+ pc->setoption(sd,sd->sc.option&~OPTION_WUGRIDER); // remove wug
+ }
}
/**
@@ -9329,8 +9356,8 @@ int pc_calc_pvprank_sub(struct block_list *bl,va_list ap)
sd1=(struct map_session_data *)bl;
sd2=va_arg(ap,struct map_session_data *);
- if( sd1->sc.option&OPTION_INVISIBLE || sd2->sc.option&OPTION_INVISIBLE )
- {// cannot register pvp rank for hidden GMs
+ if (pc_isinvisible(sd1) ||pc_isinvisible(sd2)) {
+ // cannot register pvp rank for hidden GMs
return 0;
}
@@ -9364,8 +9391,8 @@ int pc_calc_pvprank_timer(int tid, int64 tick, int id, intptr_t data) {
return 0;
sd->pvp_timer = INVALID_TIMER;
- if( sd->sc.option&OPTION_INVISIBLE )
- {// do not calculate the pvp rank for a hidden GM
+ if (pc_isinvisible(sd)) {
+ // do not calculate the pvp rank for a hidden GM
return 0;
}
@@ -11003,8 +11030,10 @@ void pc_defaults(void) {
pc->setoption = pc_setoption;
pc->setcart = pc_setcart;
pc->setfalcon = pc_setfalcon;
- pc->setriding = pc_setriding;
+ pc->setridingpeco = pc_setridingpeco;
pc->setmadogear = pc_setmadogear;
+ pc->setridingdragon = pc_setridingdragon;
+ pc->setridingwug = pc_setridingwug;
pc->changelook = pc_changelook;
pc->equiplookall = pc_equiplookall;
diff --git a/src/map/pc.h b/src/map/pc.h
index 6159a8f26..580908692 100644
--- a/src/map/pc.h
+++ b/src/map/pc.h
@@ -589,19 +589,20 @@ struct map_session_data {
#endif
#define pc_isfalcon(sd) ( (sd)->sc.option&OPTION_FALCON )
-#define pc_isriding(sd) ( (sd)->sc.option&(OPTION_RIDING|OPTION_DRAGON|OPTION_WUGRIDER|OPTION_MADOGEAR) )
#define pc_isinvisible(sd) ( (sd)->sc.option&OPTION_INVISIBLE )
#define pc_is50overweight(sd) ( (sd)->weight*100 >= (sd)->max_weight*battle->bc->natural_heal_weight_rate )
#define pc_is90overweight(sd) ( (sd)->weight*10 >= (sd)->max_weight*9 )
#define pc_maxparameter(sd) ( (((sd)->class_&MAPID_UPPERMASK) == MAPID_KAGEROUOBORO || ((sd)->class_&MAPID_UPPERMASK) == MAPID_REBELLION || ((sd)->class_&MAPID_THIRDMASK) == MAPID_SUPER_NOVICE_E) ? battle->bc->max_extended_parameter : (sd)->class_&JOBL_THIRD ? ((sd)->class_&JOBL_BABY ? battle->bc->max_baby_third_parameter : battle->bc->max_third_parameter) : ((sd)->class_&JOBL_BABY ? battle->bc->max_baby_parameter : battle->bc->max_parameter) )
-/**
- * Ranger
- **/
+/// Generic check for mounts
+#define pc_hasmount(sd) ( (sd)->sc.option&(OPTION_RIDING|OPTION_WUGRIDER|OPTION_DRAGON|OPTION_MADOGEAR) )
+/// Knight classes Peco / Gryphon
+#define pc_isridingpeco(sd) ( (sd)->sc.option&(OPTION_RIDING) )
+/// Ranger Warg
#define pc_iswug(sd) ( (sd)->sc.option&OPTION_WUG )
#define pc_isridingwug(sd) ( (sd)->sc.option&OPTION_WUGRIDER )
-// Mechanic Magic Gear
+/// Mechanic Magic Gear
#define pc_ismadogear(sd) ( (sd)->sc.option&OPTION_MADOGEAR )
-// Rune Knight Dragon
+/// Rune Knight Dragon
#define pc_isridingdragon(sd) ( (sd)->sc.option&OPTION_DRAGON )
#define pc_stop_walking(sd, type) (unit->stop_walking(&(sd)->bl, (type)))
@@ -897,9 +898,11 @@ struct pc_interface {
int (*jobchange) (struct map_session_data *sd,int job, int upper);
int (*setoption) (struct map_session_data *sd,int type);
int (*setcart) (struct map_session_data* sd, int type);
- int (*setfalcon) (struct map_session_data* sd, int flag);
- int (*setriding) (struct map_session_data* sd, int flag);
- void (*setmadogear) (struct map_session_data* sd, int flag);
+ void (*setfalcon) (struct map_session_data *sd, bool flag);
+ void (*setridingpeco) (struct map_session_data *sd, bool flag);
+ void (*setmadogear) (struct map_session_data *sd, bool flag);
+ void (*setridingdragon) (struct map_session_data *sd, unsigned int type);
+ void (*setridingwug) (struct map_session_data *sd, bool flag);
int (*changelook) (struct map_session_data *sd,int type,int val);
int (*equiplookall) (struct map_session_data *sd);
diff --git a/src/map/script.c b/src/map/script.c
index 77b60ddd2..1885c3c2c 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -526,7 +526,7 @@ int script_add_str(const char* p)
}
}
if( existingentry ) {
- DeprecationWarning2("script_add_str", p, existingentry, script->parser_current_file); // TODO
+ DeprecationCaseWarning("script_add_str", p, existingentry, script->parser_current_file); // TODO
}
#endif // ENABLE_CASE_CHECK
@@ -772,6 +772,8 @@ const char* parse_callfunc(const char* p, int require_paren, int is_custom)
script->addl(func);
script->addc(C_ARG);
arg = script->buildin[script->str_data[func].val];
+ if (script->str_data[func].deprecated)
+ DeprecationWarning(p);
if( !arg ) arg = &null_arg; // Use a dummy, null string
} else if( script->str_data[func].type == C_USERFUNC || script->str_data[func].type == C_USERFUNC_POS ) {
// script defined function
@@ -1349,7 +1351,7 @@ const char* parse_curly_close(const char* p)
char label[256];
int l;
// Remove temporary variables
- sprintf(label,"set $@__SW%x_VAL,0;",script->syntax.curly[pos].index);
+ sprintf(label,"__setr $@__SW%x_VAL,0;",script->syntax.curly[pos].index);
script->syntax.curly[script->syntax.curly_count++].type = TYPE_NULL;
script->parse_line(label);
script->syntax.curly_count--;
@@ -1431,10 +1433,6 @@ const char* parse_syntax(const char* p)
// Closing decision if, for , while
p = script->parse_syntax_close(p + 1);
return p;
-#ifdef ENABLE_CASE_CHECK
- } else if( p2 - p == 5 && strncasecmp(p, "break", 5) == 0 ) {
- disp_deprecation_message("parse_syntax", "break", p); // TODO
-#endif // ENABLE_CASE_CHECK
}
break;
case 'c':
@@ -1506,7 +1504,7 @@ const char* parse_syntax(const char* p)
disp_error_message("parse_syntax: dup 'case'",p);
linkdb_insert(&script->syntax.curly[pos].case_label, (void*)h64BPTRSIZE(v), (void*)1);
- sprintf(label,"set $@__SW%x_VAL,0;",script->syntax.curly[pos].index);
+ sprintf(label,"__setr $@__SW%x_VAL,0;",script->syntax.curly[pos].index);
script->syntax.curly[script->syntax.curly_count++].type = TYPE_NULL;
script->parse_line(label);
@@ -1545,12 +1543,6 @@ const char* parse_syntax(const char* p)
//Closing decision if, for , while
p = script->parse_syntax_close(p + 1);
return p;
-#ifdef ENABLE_CASE_CHECK
- } else if( p2 - p == 4 && strncasecmp(p, "case", 4) == 0 ) {
- disp_deprecation_message("parse_syntax", "case", p); // TODO
- } else if( p2 - p == 8 && strncasecmp(p, "continue", 8) == 0 ) {
- disp_deprecation_message("parse_syntax", "continue", p); // TODO
-#endif // ENABLE_CASE_CHECK
}
break;
case 'd':
@@ -1604,12 +1596,6 @@ const char* parse_syntax(const char* p)
script->set_label(l,script->pos,p);
script->syntax.curly_count++;
return p;
-#ifdef ENABLE_CASE_CHECK
- } else if( p2 - p == 7 && strncasecmp(p, "default", 7) == 0 ) {
- disp_deprecation_message("parse_syntax", "default", p); // TODO
- } else if( p2 - p == 2 && strncasecmp(p, "do", 2) == 0 ) {
- disp_deprecation_message("parse_syntax", "do", p); // TODO
-#endif // ENABLE_CASE_CHECK
}
break;
case 'f':
@@ -1647,7 +1633,7 @@ const char* parse_syntax(const char* p)
} else {
// Skip to the end point if the condition is false
sprintf(label,"__FR%x_FIN",script->syntax.curly[pos].index);
- script->addl(script->add_str("jump_zero"));
+ script->addl(script->add_str("__jump_zero"));
script->addc(C_ARG);
p=script->parse_expr(p);
p=script->skip_space(p);
@@ -1749,12 +1735,6 @@ const char* parse_syntax(const char* p)
{
disp_error_message("expect ';' or '{' at function syntax",p);
}
-#ifdef ENABLE_CASE_CHECK
- } else if( p2 - p == 3 && strncasecmp(p, "for", 3) == 0 ) {
- disp_deprecation_message("parse_syntax", "for", p); // TODO
- } else if( p2 - p == 8 && strncasecmp(p, "function", 8) == 0 ) {
- disp_deprecation_message("parse_syntax", "function", p); // TODO
-#endif // ENABLE_CASE_CHECK
}
break;
case 'i':
@@ -1772,17 +1752,13 @@ const char* parse_syntax(const char* p)
script->syntax.curly[script->syntax.curly_count].flag = 0;
sprintf(label,"__IF%x_%x",script->syntax.curly[script->syntax.curly_count].index,script->syntax.curly[script->syntax.curly_count].count);
script->syntax.curly_count++;
- script->addl(script->add_str("jump_zero"));
+ script->addl(script->add_str("__jump_zero"));
script->addc(C_ARG);
p=script->parse_expr(p);
p=script->skip_space(p);
script->addl(script->add_str(label));
script->addc(C_FUNC);
return p;
-#ifdef ENABLE_CASE_CHECK
- } else if( p2 - p == 2 && strncasecmp(p, "if", 2) == 0 ) {
- disp_deprecation_message("parse_syntax", "if", p); // TODO
-#endif // ENABLE_CASE_CHECK
}
break;
case 's':
@@ -1800,7 +1776,7 @@ const char* parse_syntax(const char* p)
script->syntax.curly[script->syntax.curly_count].flag = 0;
sprintf(label,"$@__SW%x_VAL",script->syntax.curly[script->syntax.curly_count].index);
script->syntax.curly_count++;
- script->addl(script->add_str("set"));
+ script->addl(script->add_str("__setr"));
script->addc(C_ARG);
script->addl(script->add_str(label));
p=script->parse_expr(p);
@@ -1810,10 +1786,6 @@ const char* parse_syntax(const char* p)
}
script->addc(C_FUNC);
return p + 1;
-#ifdef ENABLE_CASE_CHECK
- } else if( p2 - p == 6 && strncasecmp(p, "switch", 6) == 0 ) {
- disp_deprecation_message("parse_syntax", "switch", p); // TODO
-#endif // ENABLE_CASE_CHECK
}
break;
case 'w':
@@ -1837,17 +1809,13 @@ const char* parse_syntax(const char* p)
// Skip to the end point if the condition is false
sprintf(label,"__WL%x_FIN",script->syntax.curly[script->syntax.curly_count].index);
script->syntax.curly_count++;
- script->addl(script->add_str("jump_zero"));
+ script->addl(script->add_str("__jump_zero"));
script->addc(C_ARG);
p=script->parse_expr(p);
p=script->skip_space(p);
script->addl(script->add_str(label));
script->addc(C_FUNC);
return p;
-#ifdef ENABLE_CASE_CHECK
- } else if( p2 - p == 5 && strncasecmp(p, "while", 5) == 0 ) {
- disp_deprecation_message("parse_syntax", "while", p); // TODO
-#endif // ENABLE_CASE_CHECK
}
break;
}
@@ -1909,7 +1877,7 @@ const char* parse_syntax_close_sub(const char* p,int* flag)
disp_error_message("need '('",p);
}
sprintf(label,"__IF%x_%x",script->syntax.curly[pos].index,script->syntax.curly[pos].count);
- script->addl(script->add_str("jump_zero"));
+ script->addl(script->add_str("__jump_zero"));
script->addc(C_ARG);
p=script->parse_expr(p);
p=script->skip_space(p);
@@ -1917,10 +1885,6 @@ const char* parse_syntax_close_sub(const char* p,int* flag)
script->addc(C_FUNC);
*flag = 0;
return p;
-#ifdef ENABLE_CASE_CHECK
- } else if( p2 - p == 2 && strncasecmp(p, "if", 2) == 0 ) {
- disp_deprecation_message("parse_syntax", "if", p); // TODO
-#endif // ENABLE_CASE_CHECK
} else {
// else
if(!script->syntax.curly[pos].flag) {
@@ -1929,10 +1893,6 @@ const char* parse_syntax_close_sub(const char* p,int* flag)
return p;
}
}
-#ifdef ENABLE_CASE_CHECK
- } else if( !script->syntax.curly[pos].flag && p2 - p == 4 && strncasecmp(p, "else", 4) == 0 ) {
- disp_deprecation_message("parse_syntax", "else", p); // TODO
-#endif // ENABLE_CASE_CHECK
}
// Close if
script->syntax.curly_count--;
@@ -1959,9 +1919,6 @@ const char* parse_syntax_close_sub(const char* p,int* flag)
p = script->skip_space(p);
p2 = script->skip_word(p);
if( p2 - p != 5 || strncmp(p, "while", 5) != 0 ) {
-#ifdef ENABLE_CASE_CHECK
- if( p2 - p == 5 && strncasecmp(p, "while", 5) == 0 ) disp_deprecation_message("parse_syntax", "while", p); // TODO
-#endif // ENABLE_CASE_CHECK
disp_error_message("parse_syntax: need 'while'",p);
}
@@ -1974,7 +1931,7 @@ const char* parse_syntax_close_sub(const char* p,int* flag)
script->parse_nextline(false, p);
sprintf(label,"__DO%x_FIN",script->syntax.curly[pos].index);
- script->addl(script->add_str("jump_zero"));
+ script->addl(script->add_str("__jump_zero"));
script->addc(C_ARG);
p=script->parse_expr(p);
p=script->skip_space(p);
@@ -5681,7 +5638,7 @@ BUILDIN(copyarray);
/// The value is converted to the type of the variable.
///
/// set(<variable>,<value>) -> <variable>
-BUILDIN(setr) {
+BUILDIN(__setr) {
TBL_PC* sd = NULL;
struct script_data* data;
//struct script_data* datavalue;
@@ -5691,7 +5648,7 @@ BUILDIN(setr) {
data = script_getdata(st,2);
//datavalue = script_getdata(st,3);
- if( !data_isreference(data) || reference_toconstant(data) ) {
+ if (!data_isreference(data) || reference_toconstant(data)) {
ShowError("script:set: not a variable\n");
script->reportdata(script_getdata(st,2));
st->state = END;
@@ -5702,9 +5659,9 @@ BUILDIN(setr) {
name = reference_getname(data);
prefix = *name;
- if( not_server_variable(prefix) ) {
+ if (not_server_variable(prefix)) {
sd = script->rid2sd(st);
- if( sd == NULL ) {
+ if (sd == NULL) {
ShowError("script:set: no player attached for player variable '%s'\n", name);
return true;
}
@@ -5712,19 +5669,19 @@ BUILDIN(setr) {
#if 0
// TODO: see de43fa0f73be01080bd11c08adbfb7c158324c81
- if( data_isreference(datavalue) ) {
+ if (data_isreference(datavalue)) {
// the value being referenced is a variable
const char* namevalue = reference_getname(datavalue);
- if( !not_array_variable(*namevalue) ) {
+ if (!not_array_variable(*namevalue)) {
// array variable being copied into another array variable
- if( sd == NULL && not_server_variable(*namevalue) && !(sd = script->rid2sd(st)) ) {
+ if (sd == NULL && not_server_variable(*namevalue) && !(sd = script->rid2sd(st))) {
// player must be attached in order to copy a player variable
ShowError("script:set: no player attached for player variable '%s'\n", namevalue);
return true;
}
- if( is_string_variable(namevalue) != is_string_variable(name) ) {
+ if (is_string_variable(namevalue) != is_string_variable(name)) {
// non-matching array value types
ShowWarning("script:set: two array variables do not match in type.\n");
return true;
@@ -5739,9 +5696,9 @@ BUILDIN(setr) {
}
#endif
- if( script_hasdata(st, 4) ) {
+ if (script_hasdata(st, 4)) {
// Optional argument used by post-increment/post-decrement constructs to return the previous value
- if( is_string_variable(name) ) {
+ if (is_string_variable(name)) {
script_pushstrcopy(st, script_getstr(st, 4));
} else {
script_pushint(st, script_getnum(st, 4));
@@ -5751,7 +5708,7 @@ BUILDIN(setr) {
script_pushcopy(st,2);
}
- if( is_string_variable(name) )
+ if (is_string_variable(name))
script->set_reg(st,sd,num,name,(void*)script_getstr(st,3),script_getref(st,2));
else
script->set_reg(st,sd,num,name,(void*)h64BPTRSIZE(script_getnum(st,3)),script_getref(st,2));
@@ -7013,28 +6970,25 @@ BUILDIN(delitem) {
TBL_PC *sd;
struct item it;
- if( script_hasdata(st,4) )
- {
+ if (script_hasdata(st,4)) {
int account_id = script_getnum(st,4);
sd = map->id2sd(account_id); // <account id>
- if( sd == NULL )
- {
+ if (sd == NULL) {
ShowError("script:delitem: player not found (AID=%d).\n", account_id);
st->state = END;
return false;
}
- }
- else
- {
+ } else {
sd = script->rid2sd(st);// attached player
- if( sd == NULL )
+ if (sd == NULL)
return true;
}
- if( script_isstringtype(st, 2) ) {
+ memset(&it, 0, sizeof(it));
+ if (script_isstringtype(st, 2)) {
const char* item_name = script_getstr(st, 2);
struct item_data* id = itemdb->search_name(item_name);
- if( id == NULL ) {
+ if (id == NULL) {
ShowError("script:delitem: unknown item \"%s\".\n", item_name);
st->state = END;
return false;
@@ -7042,8 +6996,7 @@ BUILDIN(delitem) {
it.nameid = id->nameid;// "<item name>"
} else {
it.nameid = script_getnum(st, 2);// <item id>
- if( !itemdb->exists( it.nameid ) )
- {
+ if (!itemdb->exists(it.nameid)) {
ShowError("script:delitem: unknown item \"%d\".\n", it.nameid);
st->state = END;
return false;
@@ -7074,26 +7027,25 @@ BUILDIN(delitem2) {
TBL_PC *sd;
struct item it;
- if( script_hasdata(st,11) ) {
+ if (script_hasdata(st,11)) {
int account_id = script_getnum(st,11);
sd = map->id2sd(account_id); // <account id>
- if( sd == NULL ) {
+ if (sd == NULL) {
ShowError("script:delitem2: player not found (AID=%d).\n", account_id);
st->state = END;
return false;
}
- }
- else
- {
+ } else {
sd = script->rid2sd(st);// attached player
if( sd == NULL )
return true;
}
- if( script_isstringtype(st, 2) ) {
+ memset(&it, 0, sizeof(it));
+ if (script_isstringtype(st, 2)) {
const char* item_name = script_getstr(st, 2);
struct item_data* id = itemdb->search_name(item_name);
- if( id == NULL ) {
+ if (id == NULL) {
ShowError("script:delitem2: unknown item \"%s\".\n", item_name);
st->state = END;
return false;
@@ -7667,11 +7619,11 @@ BUILDIN(getbrokencount)
sd = script->rid2sd(st);
- if( sd == NULL )
+ if (sd == NULL)
return true;
- for(i = 0; i < MAX_INVENTORY; i++) {
- if(sd->status.inventory[i].attribute)
+ for (i = 0; i < MAX_INVENTORY; i++) {
+ if (sd->status.inventory[i].attribute)
counter++;
}
@@ -8635,10 +8587,10 @@ BUILDIN(checkfalcon)
TBL_PC* sd;
sd = script->rid2sd(st);
- if( sd == NULL )
+ if (sd == NULL)
return true;// no player attached, report source
- if( pc_isfalcon(sd) )
+ if (pc_isfalcon(sd))
script_pushint(st, 1);
else
script_pushint(st, 0);
@@ -8653,15 +8605,15 @@ BUILDIN(checkfalcon)
/// setfalcon;
BUILDIN(setfalcon)
{
- int flag = 1;
+ bool flag = true;
TBL_PC* sd;
sd = script->rid2sd(st);
- if( sd == NULL )
+ if (sd == NULL)
return true;// no player attached, report source
- if( script_hasdata(st,2) )
- flag = script_getnum(st,2);
+ if (script_hasdata(st,2))
+ flag = script_getnum(st,2) ? true : false;
pc->setfalcon(sd, flag);
@@ -8678,10 +8630,10 @@ BUILDIN(checkriding)
TBL_PC* sd;
sd = script->rid2sd(st);
- if( sd == NULL )
- return true;// no player attached, report source
+ if (sd == NULL)
+ return true; // no player attached, report source
- if( pc_isriding(sd) )
+ if (pc_hasmount(sd))
script_pushint(st, 1);
else
script_pushint(st, 0);
@@ -8701,17 +8653,143 @@ BUILDIN(setriding)
sd = script->rid2sd(st);
- if( sd == NULL )
+ if (sd == NULL)
return true;// no player attached, report source
- if( script_hasdata(st,2) )
+ if (script_hasdata(st,2))
flag = script_getnum(st,2);
+ pc->setridingpeco(sd, flag ? true : false);
- // Color variants for Rune Knight dragon mounts.
- if( (sd->class_&MAPID_THIRDMASK) == MAPID_RUNE_KNIGHT )
- flag = (flag == 1 ? OPTION_DRAGON1 : flag == 2 ? OPTION_DRAGON2 : flag == 3 ? OPTION_DRAGON3 : flag == 4 ? OPTION_DRAGON4 : flag == 5 ? OPTION_DRAGON5 : 0);
+ return true;
+}
+
+enum setmount_type {
+ SETMOUNT_TYPE_AUTODETECT = -1,
+ SETMOUNT_TYPE_NONE = 0,
+ SETMOUNT_TYPE_PECO = 1,
+ SETMOUNT_TYPE_WUG = 2,
+ SETMOUNT_TYPE_MADO = 3,
+ SETMOUNT_TYPE_DRAGON_GREEN = 4,
+ SETMOUNT_TYPE_DRAGON_BROWN = 5,
+ SETMOUNT_TYPE_DRAGON_GRAY = 6,
+ SETMOUNT_TYPE_DRAGON_BLUE = 7,
+ SETMOUNT_TYPE_DRAGON_RED = 8,
+ SETMOUNT_TYPE_MAX,
+ SETMOUNT_TYPE_DRAGON = SETMOUNT_TYPE_DRAGON_GREEN,
+};
+
+/**
+ * Checks if the player is riding a combat mount.
+ *
+ * Returns 0 if the player isn't riding, and non-zero if it is.
+ * The exact returned values are the same used as flag in setmount, except for
+ * dragons, where SETMOUNT_TYPE_DRAGON is returned, regardless of color.
+ */
+BUILDIN(checkmount)
+{
+ TBL_PC* sd;
- pc->setriding(sd, flag);
+ sd = script->rid2sd(st);
+ if (sd == NULL)
+ return true; // no player attached, report source
+
+ if (!pc_hasmount(sd)) {
+ script_pushint(st, SETMOUNT_TYPE_NONE);
+ } else if (pc_isridingpeco(sd)) {
+ script_pushint(st, SETMOUNT_TYPE_PECO);
+ } else if (pc_isridingwug(sd)) {
+ script_pushint(st, SETMOUNT_TYPE_WUG);
+ } else if (pc_ismadogear(sd)) {
+ script_pushint(st, SETMOUNT_TYPE_MADO);
+ } else { // if (pc_isridingdragon(sd))
+ script_pushint(st, SETMOUNT_TYPE_DRAGON);
+ }
+
+ return true;
+}
+
+/**
+ * Mounts or dismounts a combat mount.
+ *
+ * setmount <flag>;
+ * setmount;
+ *
+ * Accepted values for flag:
+ * MOUNT_NONE - dismount
+ * MOUNT_PECO - Peco Peco / Grand Peco / Gryphon (depending on the class)
+ * MOUNT_WUG - Wug (Rider)
+ * MOUNT_MADO - Mado Gear
+ * MOUNT_DRAGON - Dragon (default color)
+ * MOUNT_DRAGON_GREEN - Green Dragon
+ * MOUNT_DRAGON_BROWN - Brown Dragon
+ * MOUNT_DRAGON_GRAY - Gray Dragon
+ * MOUNT_DRAGON_BLUE - Blue Dragon
+ * MOUNT_DRAGON_RED - Red Dragon
+ *
+ * If an invalid value or no flag is specified, the appropriate mount is
+ * auto-detected. As a result of this, there is no need to specify a flag at
+ * all, unless it is a dragon color other than green.
+ */
+BUILDIN(setmount)
+{
+ int flag = SETMOUNT_TYPE_AUTODETECT;
+ TBL_PC* sd;
+
+ sd = script->rid2sd(st);
+
+ if (sd == NULL)
+ return true;// no player attached, report source
+
+ if (script_hasdata(st,2))
+ flag = script_getnum(st,2);
+
+ // Color variants for Rune Knight dragon mounts.
+ if (flag != SETMOUNT_TYPE_NONE) {
+ if (flag < SETMOUNT_TYPE_AUTODETECT || flag >= SETMOUNT_TYPE_MAX) {
+ ShowWarning("script_setmount: Unknown flag %d specified. Using auto-detected value.\n", flag);
+ flag = SETMOUNT_TYPE_AUTODETECT;
+ }
+ // Sanity checks and auto-detection
+ if ((sd->class_&MAPID_THIRDMASK) == MAPID_RUNE_KNIGHT) {
+ if (pc->checkskill(sd, RK_DRAGONTRAINING)) {
+ // Rune Knight (Dragon)
+ unsigned int option;
+ option = ( flag == SETMOUNT_TYPE_DRAGON_GREEN ? OPTION_DRAGON1 :
+ flag == SETMOUNT_TYPE_DRAGON_BROWN ? OPTION_DRAGON2 :
+ flag == SETMOUNT_TYPE_DRAGON_GRAY ? OPTION_DRAGON3 :
+ flag == SETMOUNT_TYPE_DRAGON_RED ? OPTION_DRAGON4 :
+ flag == SETMOUNT_TYPE_DRAGON_RED ? OPTION_DRAGON5 :
+ OPTION_DRAGON1); // default value
+ pc->setridingdragon(sd, option);
+ } else if ((sd->class_&MAPID_THIRDMASK) == MAPID_RANGER) {
+ // Ranger (Warg)
+ if (pc->checkskill(sd, RA_WUGRIDER))
+ pc->setridingwug(sd, true);
+ } else if ((sd->class_&MAPID_THIRDMASK) == MAPID_MECHANIC) {
+ // Mechanic (Mado Gear)
+ if (pc->checkskill(sd, NC_MADOLICENCE))
+ pc->setmadogear(sd, true);
+ } else if (flag != SETMOUNT_TYPE_PECO)
+ flag = SETMOUNT_TYPE_PECO;
+ } else {
+ // Knight / Crusader (Peco Peco)
+ if (pc->checkskill(sd, KN_RIDING))
+ pc->setridingpeco(sd, true);
+ }
+ } else if (pc_hasmount(sd)) {
+ if (pc_isridingdragon(sd)) {
+ pc->setridingdragon(sd, 0);
+ }
+ if (pc_isridingwug(sd)) {
+ pc->setridingwug(sd, false);
+ }
+ if (pc_ismadogear(sd)) {
+ pc->setmadogear(sd, false);
+ }
+ if (pc_isridingpeco(sd)) {
+ pc->setridingpeco(sd, false);
+ }
+ }
return true;
}
@@ -8763,15 +8841,15 @@ BUILDIN(checkmadogear)
/// setmadogear;
BUILDIN(setmadogear)
{
- int flag = 1;
+ bool flag = true;
TBL_PC* sd;
sd = script->rid2sd(st);
- if( sd == NULL )
+ if (sd == NULL)
return true;// no player attached, report source
- if( script_hasdata(st,2) )
- flag = script_getnum(st,2);
+ if (script_hasdata(st,2))
+ flag = script_getnum(st,2) ? true : false;
pc->setmadogear(sd, flag);
return true;
@@ -13123,14 +13201,14 @@ BUILDIN(checkequipedcard)
return true;
}
-BUILDIN(jump_zero)
+BUILDIN(__jump_zero)
{
int sel;
sel=script_getnum(st,2);
- if(!sel) {
+ if (!sel) {
int pos;
- if( !data_islabel(script_getdata(st,3)) ) {
- ShowError("script: jump_zero: not label !\n");
+ if (!data_islabel(script_getdata(st,3))) {
+ ShowError("script: jump_zero: not a label !\n");
st->state=END;
return false;
}
@@ -16315,21 +16393,15 @@ BUILDIN(erasequest) {
if( sd == NULL )
return false;
- if(script_hasdata(st, 3))
- {
- if(script_getnum(st, 3) < script_getnum(st, 2))
- {
+ if (script_hasdata(st, 3)) {
+ if (script_getnum(st, 3) < script_getnum(st, 2)) {
ShowError("buildin_erasequest: The second quest id must be greater than the id of the first.\n");
return false;
}
-
- for(quest_id = script_getnum(st, 2); quest_id < script_getnum(st, 3); quest_id++)
- {
+ for (quest_id = script_getnum(st, 2); quest_id < script_getnum(st, 3); quest_id++) {
quest->delete(sd, quest_id);
}
- }
- else
- {
+ } else {
quest->delete(sd, script_getnum(st, 2));
}
@@ -16343,21 +16415,15 @@ BUILDIN(completequest) {
if( sd == NULL )
return false;
- if(script_hasdata(st, 3))
- {
- if(script_getnum(st, 3) < script_getnum(st, 2))
- {
+ if (script_hasdata(st, 3)) {
+ if (script_getnum(st, 3) < script_getnum(st, 2)) {
ShowError("buildin_completequest: The second quest id must be greater than the id of the first.\n");
return false;
}
-
- for(quest_id = script_getnum(st, 2); quest_id < script_getnum(st, 3); quest_id++)
- {
+ for (quest_id = script_getnum(st, 2); quest_id < script_getnum(st, 3); quest_id++) {
quest->update_status(sd, quest_id, Q_COMPLETE);
}
- }
- else
- {
+ } else {
quest->update_status(sd, script_getnum(st, 2), Q_COMPLETE);
}
@@ -16391,24 +16457,41 @@ BUILDIN(checkquest) {
return true;
}
+BUILDIN(questactive) {
+ struct map_session_data *sd = script->rid2sd(st);
+ int quest_progress = 0;
+
+ if (sd == NULL)
+ return false;
+
+ if (quest->check(sd, script_getnum(st, 2), HAVEQUEST) == Q_ACTIVE)
+ script_pushint(st, 1);
+ else
+ script_pushint(st, 0);
+
+ script_pushint(st, quest_progress);
+
+ return true;
+}
+
BUILDIN(questprogress) {
struct map_session_data *sd = script->rid2sd(st);
enum quest_check_type type = HAVEQUEST;
int quest_progress = 0;
- if( sd == NULL )
+ if (sd == NULL)
return false;
- if( script_hasdata(st, 3) )
+ if (script_hasdata(st, 3))
type = (enum quest_check_type)script_getnum(st, 3);
quest_progress = quest->check(sd, script_getnum(st, 2), type);
// "Fix" returned quest state value to make more sense.
// 0 = Not Started, 1 = In Progress, 2 = Completed.
- if(quest_progress == -1)
+ if (quest_progress == -1) // Not found
quest_progress = 0;
- else if(quest_progress == 0 || quest_progress == 1)
+ else if (quest_progress == 0 || quest_progress == 1)
quest_progress = 1;
else
quest_progress = 2;
@@ -17363,9 +17446,10 @@ BUILDIN(setdragon) {
}
/**
- * ismounting() returns 1 if mounting a new mount or 0 otherwise
+ * hascashmount() returns 1 if mounting a cash mount or 0 otherwise
**/
-BUILDIN(ismounting) {
+BUILDIN(hascashmount)
+{
TBL_PC* sd;
if( (sd = script->rid2sd(st)) == NULL )
return true;
@@ -17377,20 +17461,22 @@ BUILDIN(ismounting) {
}
/**
- * setmounting() returns 1 on success or 0 otherwise
- * - Toggles new mounts on a player when he can mount
- * - Will fail if the player is mounting a non-new mount, e.g. dragon, peco, wug, etc.
- * - Will unmount the player is he is already mounting
+ * setcashmount() returns 1 on success or 0 otherwise
+ *
+ * - Toggles cash mounts on a player when he can mount
+ * - Will fail if the player is already riding a standard mount e.g. dragon, peco, wug, mado, etc.
+ * - Will unmount the player is he is already mounting a cash mount
**/
-BUILDIN(setmounting) {
+BUILDIN(setcashmount)
+{
TBL_PC* sd;
- if( (sd = script->rid2sd(st)) == NULL )
+ if ((sd = script->rid2sd(st)) == NULL)
return true;
- if( sd->sc.option&(OPTION_WUGRIDER|OPTION_RIDING|OPTION_DRAGON|OPTION_MADOGEAR) ) {
+ if (pc_hasmount(sd)) {
clif->msgtable(sd->fd, 0X78b);
script_pushint(st,0);//can't mount with one of these
} else {
- if( sd->sc.data[SC_ALL_RIDING] )
+ if (sd->sc.data[SC_ALL_RIDING])
status_change_end(&sd->bl, SC_ALL_RIDING, INVALID_TIMER);
else
sc_start(NULL,&sd->bl, SC_ALL_RIDING, 100, 0, -1);
@@ -18832,7 +18918,7 @@ bool script_add_builtin(const struct script_function *buildin, bool override) {
script->buildin[offset] = NULL;
} else {
// Adding new function
- if( strcmp(buildin->name, "setr") == 0 ) script->buildin_set_ref = n;
+ if( strcmp(buildin->name, "__setr") == 0 ) script->buildin_set_ref = n;
else if( strcmp(buildin->name, "callsub") == 0 ) script->buildin_callsub_ref = n;
else if( strcmp(buildin->name, "callfunc") == 0 ) script->buildin_callfunc_ref = n;
else if( strcmp(buildin->name, "getelementofarray") == 0 ) script->buildin_getelementofarray_ref = n;
@@ -18848,6 +18934,7 @@ bool script_add_builtin(const struct script_function *buildin, bool override) {
}
script->str_data[n].func = buildin->func;
+ script->str_data[n].deprecated = (buildin->deprecated ? 1 : 0);
/* we only store the arguments, its the only thing used out of this */
if( slen ) {
@@ -18865,13 +18952,20 @@ bool script_hp_add(char *name, char *args, bool (*func)(struct script_state *st)
buildin.name = name;
buildin.arg = args;
buildin.func = func;
+ buildin.deprecated = false;
return script->add_builtin(&buildin, true);
}
-#define BUILDIN_DEF(x,args) { buildin_ ## x , #x , args }
-#define BUILDIN_DEF2(x,x2,args) { buildin_ ## x , x2 , args }
+#define BUILDIN_DEF(x,args) { buildin_ ## x , #x , args, false }
+#define BUILDIN_DEF2(x,x2,args) { buildin_ ## x , x2 , args, false }
+#define BUILDIN_DEF_DEPRECATED(x,args) { buildin_ ## x , #x , args, true }
+#define BUILDIN_DEF2_DEPRECATED(x,x2,args) { buildin_ ## x , x2 , args, true }
void script_parse_builtin(void) {
struct script_function BUILDIN[] = {
+ /* Commands for internal use by the script engine */
+ BUILDIN_DEF(__jump_zero,"il"),
+ BUILDIN_DEF(__setr,"rv?"),
+
// NPC interaction
BUILDIN_DEF(mes,"s*"),
BUILDIN_DEF(next,""),
@@ -18896,8 +18990,7 @@ void script_parse_builtin(void) {
BUILDIN_DEF(warpguild,"siii"), // [Fredzilla]
BUILDIN_DEF(setlook,"ii"),
BUILDIN_DEF(changelook,"ii"), // Simulates but don't Store it
- BUILDIN_DEF2(setr,"set","rv"),
- BUILDIN_DEF(setr,"rv?"), // Not meant to be used directly, required for var++/var--
+ BUILDIN_DEF2(__setr,"set","rv"),
BUILDIN_DEF(setarray,"rv*"),
BUILDIN_DEF(cleararray,"rvi"),
BUILDIN_DEF(copyarray,"rri"),
@@ -18978,6 +19071,8 @@ void script_parse_builtin(void) {
BUILDIN_DEF(checkfalcon,""),
BUILDIN_DEF(setriding,"?"),
BUILDIN_DEF(checkriding,""),
+ BUILDIN_DEF(setmount,"?"),
+ BUILDIN_DEF(checkmount,""),
BUILDIN_DEF(checkwug,""),
BUILDIN_DEF(checkmadogear,""),
BUILDIN_DEF(setmadogear,"?"),
@@ -19099,7 +19194,7 @@ void script_parse_builtin(void) {
BUILDIN_DEF(petskillbonus,"iiii"), // [Valaris]
BUILDIN_DEF(petrecovery,"ii"), // [Valaris]
BUILDIN_DEF(petloot,"i"), // [Valaris]
- BUILDIN_DEF(petheal,"iiii"), // [Valaris]
+ BUILDIN_DEF_DEPRECATED(petheal,"iiii"), // Deprecated 2014-10-27 [Haru]
BUILDIN_DEF(petskillattack,"viii"), // [Skotlex]
BUILDIN_DEF(petskillattack2,"viiii"), // [Valaris]
BUILDIN_DEF(petskillsupport,"viiii"), // [Skotlex]
@@ -19149,7 +19244,7 @@ void script_parse_builtin(void) {
BUILDIN_DEF(gethominfo,"i"),
BUILDIN_DEF(getmercinfo,"i?"),
BUILDIN_DEF(checkequipedcard,"i"),
- BUILDIN_DEF(jump_zero,"il"), //for future jA script compatibility
+ BUILDIN_DEF2_DEPRECATED(__jump_zero,"jump_zero","il"), // Deprecated 2014-10-27 [Haru]
BUILDIN_DEF(globalmes,"s?"), //end jA addition
BUILDIN_DEF(unequip,"i"), // unequip command [Spectre]
BUILDIN_DEF(getstrlen,"s"), //strlen [Valaris]
@@ -19303,8 +19398,8 @@ void script_parse_builtin(void) {
BUILDIN_DEF(makerune,"i"),
BUILDIN_DEF(checkdragon,""),//[Ind]
BUILDIN_DEF(setdragon,"?"),//[Ind]
- BUILDIN_DEF(ismounting,""),//[Ind]
- BUILDIN_DEF(setmounting,""),//[Ind]
+ BUILDIN_DEF(hascashmount,""),//[Ind]
+ BUILDIN_DEF(setcashmount,""),//[Ind]
BUILDIN_DEF(checkre,"i"),
/**
* rAthena and beyond!
@@ -19339,8 +19434,9 @@ void script_parse_builtin(void) {
BUILDIN_DEF(setquest, "i"),
BUILDIN_DEF(erasequest, "i?"),
BUILDIN_DEF(completequest, "i?"),
- BUILDIN_DEF(checkquest, "i?"),
+ BUILDIN_DEF_DEPRECATED(checkquest, "i?"), // Deprecated 2014-10-28 [Haru]
BUILDIN_DEF(questprogress, "i?"),
+ BUILDIN_DEF(questactive, "i"),
BUILDIN_DEF(changequest, "ii"),
BUILDIN_DEF(showevent, "i?"),
diff --git a/src/map/script.h b/src/map/script.h
index 48abf1487..1a46ba02b 100644
--- a/src/map/script.h
+++ b/src/map/script.h
@@ -26,9 +26,9 @@ struct eri;
// TODO: Remove temporary code
#define ENABLE_CASE_CHECK
#define get_script_source(source) ((source) ? (source) : "Unknown (Possibly source or variables stored in database")
-#define DeprecationWarning(func, bad, good, file, line) ShowError("%s: use of deprecated keyword '%s' (use '%s' instead) in file '%s', line '%d'.\n", (func), (bad), (good), get_script_source(file), (line));
-#define DeprecationWarning2(func, bad, good, where) ShowError("%s: detected possible use of wrong case in a script. Found '%s', probably meant to be '%s' (in '%s').\n", (func), (bad), (good), get_script_source(where));
-#define disp_deprecation_message(func, good, p) disp_warning_message(func": use of deprecated keyword (use '"good"' instead).", (p));
+#define DeprecationCaseWarning(func, bad, good, where) ShowError("%s: detected possible use of wrong case in a script. Found '%s', probably meant to be '%s' (in '%s').\n", (func), (bad), (good), get_script_source(where))
+
+#define DeprecationWarning(p) disp_warning_message("This command is deprecated and it will be removed in a future update. Please see the script documentation for an alternative.\n", (p))
#define NUM_WHISPER_VAR 10
@@ -433,6 +433,7 @@ struct script_function {
bool (*func)(struct script_state *st);
char *name;
char *arg;
+ bool deprecated;
};
// String buffer structures.
@@ -445,6 +446,7 @@ struct str_data_struct {
bool (*func)(struct script_state *st);
int val;
int next;
+ uint8 deprecated : 1;
};
struct script_label_entry {
diff --git a/src/map/skill.c b/src/map/skill.c
index 51e266559..42aae546d 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -2120,6 +2120,7 @@ int skill_magic_reflect(struct block_list* src, struct block_list* bl, int type)
* packet shouldn't display a skill animation)
* flag&0x2000 is used to signal that the skill_lv should be passed as -1 to the
* client (causes player characters to not scream skill name)
+ * flag&0x4000 - Return 0 if damage was reflected
*-------------------------------------------------------------------------*/
int skill_attack(int attack_type, struct block_list* src, struct block_list *dsrc, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int64 tick, int flag) {
struct Damage dmg;
@@ -2791,6 +2792,9 @@ int skill_attack(int attack_type, struct block_list* src, struct block_list *dsr
map->freeblock_unlock();
+ if ((flag&0x4000) && rmdamage == 1)
+ return 0; //Should return 0 when damage was reflected
+
return (int)cap_value(damage,INT_MIN,INT_MAX);
}
@@ -8533,9 +8537,9 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
break;
case NC_SELFDESTRUCTION:
- if( sd ) {
- if( pc_ismadogear(sd) )
- pc->setmadogear(sd, 0);
+ if (sd) {
+ if (pc_ismadogear(sd))
+ pc->setmadogear(sd, false);
clif->skill_nodamage(src, bl, skill_id, skill_lv, 1);
skill->castend_damage_id(src, src, skill_id, skill_lv, tick, flag);
status->set_sp(src, 0, 0);
@@ -10074,7 +10078,6 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui
case MG_THUNDERSTORM:
case AL_PNEUMA:
- case WZ_ICEWALL:
case WZ_FIREPILLAR:
case WZ_QUAGMIRE:
case WZ_VERMILION:
@@ -10183,6 +10186,11 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui
sc_start(src,src,SC_NO_SWITCH_EQUIP,100,0,skill->get_time(skill_id,skill_lv));
skill->unitsetting(src,skill_id,skill_lv,x,y,0);
break;
+ case WZ_ICEWALL:
+ flag |= 1;
+ if( skill->unitsetting(src,skill_id,skill_lv,x,y,0) )
+ map->list[src->m].setcell(src->m, x, y, CELL_NOICEWALL, true);
+ break;
case RG_GRAFFITI: /* Graffiti [Valaris] */
skill->clear_unitgroup(src);
skill->unitsetting(src,skill_id,skill_lv,x,y,0);
@@ -10782,28 +10790,6 @@ bool skill_dance_switch(struct skill_unit* su, int flag) {
return true;
}
-/**
- * Upon Ice Wall cast it checks all nearby mobs to find any who may be blocked by the IW
- **/
-int skill_icewall_block(struct block_list *bl,va_list ap) {
- struct block_list *target = NULL;
- struct mob_data *md = ((TBL_MOB*)bl);
-
- nullpo_ret(bl);
- nullpo_ret(md);
- if( !md->target_id || ( target = map->id2bl(md->target_id) ) == NULL )
- return 0;
-
- if( path->search_long(NULL,bl->m,bl->x,bl->y,target->x,target->y,CELL_CHKICEWALL) )
- return 0;
-
- if( !check_distance_bl(bl, target, status_get_range(bl) ) ) {
- mob->unlocktarget(md,timer->gettick());
- mob_stop_walking(md,1);
- }
-
- return 0;
-}
/*==========================================
* Initializes and sets a ground skill.
* flag&1 is used to determine when the skill 'morphs' (Warp portal becomes active, or Fire Pillar becomes active)
@@ -11013,11 +10999,11 @@ struct skill_unit_group* skill_unitsetting(struct block_list *src, uint16 skill_
val1 += pc->checkskill(sd,BA_MUSICALLESSON);
break;
case DC_SERVICEFORYOU:
- val1 = 15+skill_lv+(st->int_/10); // MaxSP percent increase TO-DO: this INT bonus value is guessed
+ val1 = 15+skill_lv+(st->int_/10); // MaxSP percent increase
val2 = 20+3*skill_lv+(st->int_/10); // SP cost reduction
if(sd){
- val1 += (pc->checkskill(sd,DC_DANCINGLESSON) + 1) / 2;
- val2 += (pc->checkskill(sd,DC_DANCINGLESSON) + 1) / 2;
+ val1 += pc->checkskill(sd,DC_DANCINGLESSON) / 2;
+ val2 += pc->checkskill(sd,DC_DANCINGLESSON) / 2;
}
break;
case BA_ASSASSINCROSS:
@@ -11303,9 +11289,6 @@ struct skill_unit_group* skill_unitsetting(struct block_list *src, uint16 skill_
//success, unit created.
switch( skill_id ) {
- case WZ_ICEWALL:
- map->foreachinrange(skill->icewall_block, src, AREA_SIZE, BL_MOB);
- break;
case NJ_TATAMIGAESHI: //Store number of tiles.
group->val1 = group->alive_count;
break;
@@ -13465,7 +13448,7 @@ int skill_check_condition_castbegin(struct map_session_data* sd, uint16 skill_id
}
break;
case ST_RIDING:
- if(!pc_isriding(sd) && !pc_isridingdragon(sd)) {
+ if (!pc_isridingpeco(sd) && !pc_isridingdragon(sd)) {
clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
return 0;
}
@@ -13580,7 +13563,7 @@ int skill_check_condition_castbegin(struct map_session_data* sd, uint16 skill_id
return 0;
}
case ST_PECO:
- if(!pc_isriding(sd)) {
+ if (!pc_isridingpeco(sd)) {
clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
return 0;
}
@@ -14997,7 +14980,7 @@ int skill_frostjoke_scream(struct block_list *bl, va_list ap) {
return 0;
if (bl->type == BL_PC) {
struct map_session_data *sd = (struct map_session_data *)bl;
- if ( sd && sd->sc.option&(OPTION_INVISIBLE|OPTION_MADOGEAR) )
+ if (sd && (pc_isinvisible(sd) || pc_ismadogear(sd)))
return 0;//Frost Joke / Scream cannot target invisible or MADO Gear characters [Ind]
}
//It has been reported that Scream/Joke works the same regardless of woe-setting. [Skotlex]
@@ -15599,7 +15582,6 @@ struct skill_unit *skill_initunit (struct skill_unit_group *group, int idx, int
map->setgatcell(su->bl.m,su->bl.x,su->bl.y,5);
clif->changemapcell(0,su->bl.m,su->bl.x,su->bl.y,5,AREA);
skill->unitsetmapcell(su,WZ_ICEWALL,group->skill_lv,CELL_ICEWALL,true);
- map->list[su->bl.m].icewall_num++;
break;
case SA_LANDPROTECTOR:
skill->unitsetmapcell(su,SA_LANDPROTECTOR,group->skill_lv,CELL_LANDPROTECTOR,true);
@@ -15648,10 +15630,10 @@ int skill_delunit (struct skill_unit* su) {
}
break;
case WZ_ICEWALL:
+ map->list[su->bl.m].setcell(su->bl.m, su->bl.x, su->bl.y, CELL_NOICEWALL, false);
map->setgatcell(su->bl.m,su->bl.x,su->bl.y,su->val2);
clif->changemapcell(0,su->bl.m,su->bl.x,su->bl.y,su->val2,ALL_SAMEMAP); // hack to avoid clientside cell bug
skill->unitsetmapcell(su,WZ_ICEWALL,group->skill_lv,CELL_ICEWALL,false);
- map->list[su->bl.m].icewall_num--;
// AS_CLOAKING in low levels requires a wall to be cast, thus it needs to be
// checked again when a wall disapears! issue:8182 [Panikon]
map->foreachinarea(skill->check_cloaking_end, su->bl.m,
@@ -18803,7 +18785,6 @@ void skill_defaults(void) {
skill->frostjoke_scream = skill_frostjoke_scream;
skill->greed = skill_greed;
skill->destroy_trap = skill_destroy_trap;
- skill->icewall_block = skill_icewall_block;
skill->unitgrouptickset_search = skill_unitgrouptickset_search;
skill->dance_switch = skill_dance_switch;
skill->check_condition_char_sub = skill_check_condition_char_sub;
diff --git a/src/map/skill.h b/src/map/skill.h
index 6373d9275..4ec742bd0 100644
--- a/src/map/skill.h
+++ b/src/map/skill.h
@@ -1984,7 +1984,6 @@ struct skill_interface {
int (*frostjoke_scream) (struct block_list *bl, va_list ap);
int (*greed) (struct block_list *bl, va_list ap);
int (*destroy_trap) ( struct block_list *bl, va_list ap );
- int (*icewall_block) (struct block_list *bl,va_list ap);
struct skill_unit_group_tickset *(*unitgrouptickset_search) (struct block_list *bl, struct skill_unit_group *group, int64 tick);
bool (*dance_switch) (struct skill_unit* su, int flag);
int (*check_condition_char_sub) (struct block_list *bl, va_list ap);
diff --git a/src/map/status.c b/src/map/status.c
index 3cd28e322..824ad1f58 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -2485,13 +2485,14 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) {
bstatus->mode = MD_MASK&~(MD_BOSS|MD_PLANT|MD_DETECTOR|MD_ANGRY|MD_TARGETWEAK);
bstatus->size = (sd->class_&JOBL_BABY)?SZ_SMALL:SZ_MEDIUM;
- if (battle_config.character_size && (pc_isriding(sd) || pc_isridingdragon(sd)) ) { //[Lupus]
+ if (battle_config.character_size && (pc_isridingpeco(sd) || pc_isridingdragon(sd))) { //[Lupus]
if (sd->class_&JOBL_BABY) {
if (battle_config.character_size&SZ_BIG)
bstatus->size++;
- } else
+ } else {
if(battle_config.character_size&SZ_MEDIUM)
bstatus->size++;
+ }
}
bstatus->aspd_rate = 1000;
bstatus->ele_lv = 1;
@@ -2780,9 +2781,10 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) {
sd->left_weapon.atkmods[1] = status->atkmods[1][sd->weapontype2];
sd->left_weapon.atkmods[2] = status->atkmods[2][sd->weapontype2];
- if( (pc_isriding(sd) || pc_isridingdragon(sd)) &&
- (sd->status.weapon==W_1HSPEAR || sd->status.weapon==W_2HSPEAR))
- { //When Riding with spear, damage modifier to mid-class becomes
+ if ((pc_isridingpeco(sd) || pc_isridingdragon(sd))
+ && (sd->status.weapon==W_1HSPEAR || sd->status.weapon==W_2HSPEAR)
+ ) {
+ //When Riding with spear, damage modifier to mid-class becomes
//same as versus large size.
sd->right_weapon.atkmods[1] = sd->right_weapon.atkmods[2];
sd->left_weapon.atkmods[1] = sd->left_weapon.atkmods[2];
@@ -3062,9 +3064,9 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) {
if((skill_lv=pc->checkskill(sd,GS_SINGLEACTION))>0 &&
(sd->status.weapon >= W_REVOLVER && sd->status.weapon <= W_GRENADE))
bstatus->aspd_rate -= ((skill_lv+1)/2) * 10;
- if(pc_isriding(sd))
+ if (pc_isridingpeco(sd))
bstatus->aspd_rate += 500-100*pc->checkskill(sd,KN_CAVALIERMASTERY);
- else if(pc_isridingdragon(sd))
+ else if (pc_isridingdragon(sd))
bstatus->aspd_rate += 250-50*pc->checkskill(sd,RK_DRAGONTRAINING);
#else // needs more info
if((skill_lv=pc->checkskill(sd,SA_ADVANCEDBOOK))>0 && sd->status.weapon == W_BOOK)
@@ -3074,9 +3076,9 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) {
if((skill_lv=pc->checkskill(sd,GS_SINGLEACTION))>0 &&
(sd->status.weapon >= W_REVOLVER && sd->status.weapon <= W_GRENADE))
bstatus->aspd_rate += ((skill_lv+1)/2) * 10;
- if(pc_isriding(sd))
+ if (pc_isridingpeco(sd))
bstatus->aspd_rate -= 500-100*pc->checkskill(sd,KN_CAVALIERMASTERY);
- else if(pc_isridingdragon(sd))
+ else if (pc_isridingdragon(sd))
bstatus->aspd_rate -= 250-50*pc->checkskill(sd,RK_DRAGONTRAINING);
#endif
bstatus->adelay = 2*bstatus->amotion;
@@ -3094,7 +3096,7 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) {
// Weight
if((skill_lv=pc->checkskill(sd,MC_INCCARRY))>0)
sd->max_weight += 2000*skill_lv;
- if(pc_isriding(sd) && pc->checkskill(sd,KN_RIDING)>0)
+ if (pc_isridingpeco(sd) && pc->checkskill(sd,KN_RIDING) > 0)
sd->max_weight += 10000;
else if(pc_isridingdragon(sd))
sd->max_weight += 5000+2000*pc->checkskill(sd,RK_DRAGONTRAINING);
@@ -5231,16 +5233,16 @@ unsigned short status_calc_speed(struct block_list *bl, struct status_change *sc
{
int val = 0;
- if( sc->data[SC_FUSION] )
+ if(sc->data[SC_FUSION]) {
val = 25;
- else if( sd ) {
- if( pc_isriding(sd) || sd->sc.option&(OPTION_DRAGON) || sd->sc.data[SC_ALL_RIDING] )
+ } else if (sd) {
+ if (pc_isridingpeco(sd) || pc_isridingdragon(sd) || sd->sc.data[SC_ALL_RIDING])
val = 25;//Same bonus
- else if( pc_isridingwug(sd) )
+ else if (pc_isridingwug(sd))
val = 15 + 5 * pc->checkskill(sd, RA_WUGRIDER);
- else if( pc_ismadogear(sd) ) {
+ else if (pc_ismadogear(sd)) {
val = (- 10 * (5 - pc->checkskill(sd,NC_MADOLICENCE)));
- if( sc->data[SC_ACCELERATION] )
+ if (sc->data[SC_ACCELERATION])
val += 25;
}
}
@@ -6013,7 +6015,9 @@ int status_get_party_id(struct block_list *bl) {
return ((TBL_MER*)bl)->master->status.party_id;
break;
case BL_SKILL:
- return ((TBL_SKILL*)bl)->group->party_id;
+ if (((TBL_SKILL*)bl)->group)
+ return ((TBL_SKILL*)bl)->group->party_id;
+ break;
case BL_ELEM:
if (((TBL_ELEM*)bl)->master)
return ((TBL_ELEM*)bl)->master->status.party_id;
@@ -6056,7 +6060,9 @@ int status_get_guild_id(struct block_list *bl) {
return ((TBL_NPC*)bl)->u.scr.guild_id;
break;
case BL_SKILL:
- return ((TBL_SKILL*)bl)->group->guild_id;
+ if (((TBL_SKILL*)bl)->group)
+ return ((TBL_SKILL*)bl)->group->guild_id;
+ break;
case BL_ELEM:
if (((TBL_ELEM*)bl)->master)
return ((TBL_ELEM*)bl)->master->status.guild_id;
@@ -6178,7 +6184,7 @@ void status_set_viewdata(struct block_list *bl, int class_)
{
TBL_PC* sd = (TBL_PC*)bl;
if (pcdb_checkid(class_)) {
- if (sd->sc.option&OPTION_RIDING) {
+ if (pc_isridingpeco(sd)) {
switch (class_) { //Adapt class to a Mounted one.
case JOB_KNIGHT:
class_ = JOB_KNIGHT2;
@@ -7881,8 +7887,8 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t
case SC_RUWACH:
case SC_WZ_SIGHTBLASTER:
val3 = skill->get_splash(val2, val1); //Val2 should bring the skill-id.
- val2 = tick/250;
- tick_time = 10; // [GodLesZ] tick time
+ val2 = tick/20;
+ tick_time = 20; // [GodLesZ] tick time
break;
//Permanent effects.
@@ -8581,14 +8587,22 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t
val2 = 20 + 10 * val1; //ASPD. Need to confirm if Movement Speed reduction is the same. [Jobbie]
val3 = 20 * val1; //HIT
if( sd ) { // Removes Animals
- if( pc_isriding(sd) ) pc->setriding(sd, 0);
- if( pc_isridingdragon(sd) ) pc->setoption(sd, sd->sc.option&~OPTION_DRAGON);
- if( pc_iswug(sd) ) pc->setoption(sd, sd->sc.option&~OPTION_WUG);
- if( pc_isridingwug(sd) ) pc->setoption(sd, sd->sc.option&~OPTION_WUGRIDER);
- if( pc_isfalcon(sd) ) pc->setoption(sd, sd->sc.option&~OPTION_FALCON);
- if( sd->status.pet_id > 0 ) pet->menu(sd, 3);
- if( homun_alive(sd->hd) ) homun->vaporize(sd,HOM_ST_REST);
- if( sd->md ) mercenary->delete(sd->md,3);
+ if (pc_isridingpeco(sd))
+ pc->setridingpeco(sd, false);
+ if (pc_isridingdragon(sd))
+ pc->setridingdragon(sd, 0);
+ if (pc_iswug(sd))
+ pc->setoption(sd, sd->sc.option&~OPTION_WUG);
+ if (pc_isridingwug(sd))
+ pc->setridingwug(sd, false);
+ if (pc_isfalcon(sd))
+ pc->setfalcon(sd, false);
+ if (sd->status.pet_id > 0)
+ pet->menu(sd, 3);
+ if (homun_alive(sd->hd))
+ homun->vaporize(sd,HOM_ST_REST);
+ if (sd->md)
+ mercenary->delete(sd->md,3);
}
break;
case SC__LAZINESS:
@@ -8685,8 +8699,10 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t
if ( !val3 )
val3 = 50;
if( sd ) {
- if( pc_isriding(sd) ) pc->setriding(sd, 0);
- if( pc_isridingdragon(sd) ) pc->setoption(sd, sd->sc.option&~OPTION_DRAGON);
+ if (pc_isridingpeco(sd))
+ pc->setridingpeco(sd, false);
+ if (pc_isridingdragon(sd))
+ pc->setridingdragon(sd, false);
}
}
break;
@@ -8782,7 +8798,7 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t
struct block_list * src2;
val3 = st->agi * val1 / 60; // ASPD increase: [(Target AGI x Skill Level) / 60] %
if( (src2 = map->id2bl(val2)) ){
- val4 = ( 200/status_get_int(src2)?status_get_int(src2):1 ) * val1;// MDEF decrease: MDEF [(200 / Caster INT) x Skill Level]
+ val4 = ( 200/(status_get_int(src2)?status_get_int(src2):1) ) * val1;// MDEF decrease: MDEF [(200 / Caster INT) x Skill Level]
val2 = ( status_get_dex(src2)/4 + status_get_str(src2)/2 ) * val1 / 5; // ATK increase: ATK [{(Caster DEX / 4) + (Caster STR / 2)} x Skill Level / 5]
}
}
@@ -10510,14 +10526,17 @@ int status_change_timer(int tid, int64 tick, int id, intptr_t data) {
case SC_SIGHT:
case SC_RUWACH:
case SC_WZ_SIGHTBLASTER:
- if(type == SC_WZ_SIGHTBLASTER)
+ if(type == SC_WZ_SIGHTBLASTER) {
+ //Restore trap immunity
+ if(sce->val4%2)
+ sce->val4--;
map->foreachinrange(status->change_timer_sub, bl, sce->val3, BL_CHAR|BL_SKILL, bl, sce, type, tick);
- else
+ } else
map->foreachinrange(status->change_timer_sub, bl, sce->val3, BL_CHAR, bl, sce, type, tick);
if( --(sce->val2)>0 ){
- sce->val4 += 250; // use for Shadow Form 2 seconds checking.
- sc_timer_next(250+tick, status->change_timer, bl->id, data);
+ sce->val4 += 20; // use for Shadow Form 2 seconds checking.
+ sc_timer_next(20+tick, status->change_timer, bl->id, data);
return 0;
}
break;
@@ -11312,10 +11331,13 @@ int status_change_timer_sub(struct block_list* bl, va_list ap) {
if (battle->check_target( src, bl, BCT_ENEMY ) > 0
&& status->check_skilluse(src, bl, WZ_SIGHTBLASTER, 2)
) {
- if (sce && !(bl->type&BL_SKILL) //The hit is not counted if it's against a trap
- && skill->attack(BF_MAGIC,src,src,bl,WZ_SIGHTBLASTER,1,tick,0)
- ){
- sce->val2 = 0; //This signals it to end.
+ struct skill_unit *su = (struct skill_unit *)bl;
+ if (sce && skill->attack(BF_MAGIC,src,src,bl,WZ_SIGHTBLASTER,sce->val1,tick,0x4000)
+ && (!su || !su->group || !(skill->get_inf2(su->group->skill_id)&INF2_TRAP))) { // The hit is not counted if it's against a trap
+ sce->val2 = 0; // This signals it to end.
+ } else if((bl->type&BL_SKILL) && sce->val4%2 == 0) {
+ //Remove trap immunity temporarily so it triggers if you still stand on it
+ sce->val4++;
}
}
break;
diff --git a/src/map/unit.c b/src/map/unit.c
index f823a3fed..849e9348f 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -95,6 +95,8 @@ int unit_walktoxy_sub(struct block_list *bl)
ud = unit->bl2ud(bl);
if(ud == NULL) return 0;
+ memset(&wpd, 0, sizeof(wpd));
+
if( !path->search(&wpd,bl->m,bl->x,bl->y,ud->to_x,ud->to_y,ud->state.walk_easy,CELL_CHKNOPASS) )
return 0;
@@ -247,9 +249,24 @@ int unit_walktoxy_timer(int tid, int64 tick, int id, intptr_t data) {
dx = dirx[(int)dir];
dy = diry[(int)dir];
- if(map->getcell(bl->m,x+dx,y+dy,CELL_CHKNOPASS))
+ //Monsters will walk into an icewall from the west and south if they already started walking
+ if(map->getcell(bl->m,x+dx,y+dy,CELL_CHKNOPASS)
+ && (battle_config.icewall_walk_block == 0 || !map->getcell(bl->m,x+dx,y+dy,CELL_CHKICEWALL) || dx < 0 || dy < 0))
return unit->walktoxy_sub(bl);
+ //Monsters can only leave icewalls to the west and south
+ //But if movement fails more than icewall_walk_block times, they can ignore this rule
+ if(md && md->walktoxy_fail_count < battle_config.icewall_walk_block && map->getcell(bl->m,x,y,CELL_CHKICEWALL) && (dx > 0 || dy > 0)) {
+ //Needs to be done here so that rudeattack skills are invoked
+ md->walktoxy_fail_count++;
+ clif->fixpos(bl);
+ mob->unlocktarget(md, tick);
+ //Use idle skill at this point
+ if (!(++ud->walk_count%WALK_SKILL_INTERVAL))
+ mob->skill_use(md, tick, -1);
+ return 0;
+ }
+
//Refresh view for all those we lose sight
map->foreachinmovearea(clif->outsight, bl, AREA_SIZE, dx, dy, sd?BL_ALL:BL_PC, bl);
@@ -300,6 +317,8 @@ int unit_walktoxy_timer(int tid, int64 tick, int id, intptr_t data) {
sd->hd->masterteleport_timer = 0;
}
} else if (md) {
+ //Movement was successful, reset walktoxy_fail_count
+ md->walktoxy_fail_count = 0;
if( map->getcell(bl->m,x,y,CELL_CHKNPC) ) {
if( npc->touch_areanpc2(md) ) return 0; // Warped
} else
@@ -776,6 +795,7 @@ int unit_blown(struct block_list* bl, int dx, int dy, int count, int flag)
}
if( sd ) {
+ unit->stop_stepaction(bl); //Stop stepaction when knocked back
sd->ud.to_x = nx;
sd->ud.to_y = ny;
}
@@ -1564,6 +1584,12 @@ int unit_skilluse_pos2( struct block_list *src, short skill_x, short skill_y, ui
clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
return 0;
}
+ /**
+ * "WHY IS IT HEREE": ice wall cannot be canceled past this point, the client displays the animation even,
+ * if we cancel it from castend_pos, so it has to be here for it to not display the animation.
+ **/
+ if ( skill_id == WZ_ICEWALL && map->getcell(src->m, skill_x, skill_y, CELL_CHKNOICEWALL) )
+ return 0;
}
if (!status->check_skilluse(src, NULL, skill_id, 0))
@@ -2010,8 +2036,9 @@ int unit_attack_timer_sub(struct block_list* src, int tid, int64 tick) {
sstatus = status->get_status_data(src);
range = sstatus->rhw.range;
- if( unit->is_walking(target) )
- range++; //Extra range when chasing
+ if( unit->is_walking(target) && (target->type == BL_PC || !map->getcell(target->m,target->x,target->y,CELL_CHKICEWALL)) )
+ range++; // Extra range when chasing (does not apply to mobs locked in an icewall)
+
if(sd && !check_distance_client_bl(src,target,range)) {
// Player tries to attack but target is too far, notify client
clif->movetoattack(sd,target);
@@ -2367,7 +2394,7 @@ int unit_remove_map(struct block_list *bl, clr_type clrtype, const char* file, i
sd->debug_file, sd->debug_line, sd->debug_func, file, line, func);
} else if (--map->list[bl->m].users == 0 && battle_config.dynamic_mobs) //[Skotlex]
map->removemobs(bl->m);
- if( !(sd->sc.option&OPTION_INVISIBLE) ) {
+ if (!(pc_isinvisible(sd))) {
// decrement the number of active pvp players on the map
--map->list[bl->m].users_pvp;
}
diff --git a/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc
index 0e15eec93..6054e9d9a 100644
--- a/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc
@@ -3711,10 +3711,14 @@ struct {
struct HPMHookPoint *HP_pc_setcart_post;
struct HPMHookPoint *HP_pc_setfalcon_pre;
struct HPMHookPoint *HP_pc_setfalcon_post;
- struct HPMHookPoint *HP_pc_setriding_pre;
- struct HPMHookPoint *HP_pc_setriding_post;
+ struct HPMHookPoint *HP_pc_setridingpeco_pre;
+ struct HPMHookPoint *HP_pc_setridingpeco_post;
struct HPMHookPoint *HP_pc_setmadogear_pre;
struct HPMHookPoint *HP_pc_setmadogear_post;
+ struct HPMHookPoint *HP_pc_setridingdragon_pre;
+ struct HPMHookPoint *HP_pc_setridingdragon_post;
+ struct HPMHookPoint *HP_pc_setridingwug_pre;
+ struct HPMHookPoint *HP_pc_setridingwug_post;
struct HPMHookPoint *HP_pc_changelook_pre;
struct HPMHookPoint *HP_pc_changelook_post;
struct HPMHookPoint *HP_pc_equiplookall_pre;
@@ -4567,8 +4571,6 @@ struct {
struct HPMHookPoint *HP_skill_greed_post;
struct HPMHookPoint *HP_skill_destroy_trap_pre;
struct HPMHookPoint *HP_skill_destroy_trap_post;
- struct HPMHookPoint *HP_skill_icewall_block_pre;
- struct HPMHookPoint *HP_skill_icewall_block_post;
struct HPMHookPoint *HP_skill_unitgrouptickset_search_pre;
struct HPMHookPoint *HP_skill_unitgrouptickset_search_post;
struct HPMHookPoint *HP_skill_dance_switch_pre;
@@ -8756,10 +8758,14 @@ struct {
int HP_pc_setcart_post;
int HP_pc_setfalcon_pre;
int HP_pc_setfalcon_post;
- int HP_pc_setriding_pre;
- int HP_pc_setriding_post;
+ int HP_pc_setridingpeco_pre;
+ int HP_pc_setridingpeco_post;
int HP_pc_setmadogear_pre;
int HP_pc_setmadogear_post;
+ int HP_pc_setridingdragon_pre;
+ int HP_pc_setridingdragon_post;
+ int HP_pc_setridingwug_pre;
+ int HP_pc_setridingwug_post;
int HP_pc_changelook_pre;
int HP_pc_changelook_post;
int HP_pc_equiplookall_pre;
@@ -9612,8 +9618,6 @@ struct {
int HP_skill_greed_post;
int HP_skill_destroy_trap_pre;
int HP_skill_destroy_trap_post;
- int HP_skill_icewall_block_pre;
- int HP_skill_icewall_block_post;
int HP_skill_unitgrouptickset_search_pre;
int HP_skill_unitgrouptickset_search_post;
int HP_skill_dance_switch_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc
index 083e50cd8..e2f946f7e 100644
--- a/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc
@@ -1886,8 +1886,10 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(pc->setoption, HP_pc_setoption) },
{ HP_POP(pc->setcart, HP_pc_setcart) },
{ HP_POP(pc->setfalcon, HP_pc_setfalcon) },
- { HP_POP(pc->setriding, HP_pc_setriding) },
+ { HP_POP(pc->setridingpeco, HP_pc_setridingpeco) },
{ HP_POP(pc->setmadogear, HP_pc_setmadogear) },
+ { HP_POP(pc->setridingdragon, HP_pc_setridingdragon) },
+ { HP_POP(pc->setridingwug, HP_pc_setridingwug) },
{ HP_POP(pc->changelook, HP_pc_changelook) },
{ HP_POP(pc->equiplookall, HP_pc_equiplookall) },
{ HP_POP(pc->readparam, HP_pc_readparam) },
@@ -2319,7 +2321,6 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(skill->frostjoke_scream, HP_skill_frostjoke_scream) },
{ HP_POP(skill->greed, HP_skill_greed) },
{ HP_POP(skill->destroy_trap, HP_skill_destroy_trap) },
- { HP_POP(skill->icewall_block, HP_skill_icewall_block) },
{ HP_POP(skill->unitgrouptickset_search, HP_skill_unitgrouptickset_search) },
{ HP_POP(skill->dance_switch, HP_skill_dance_switch) },
{ HP_POP(skill->check_condition_char_sub, HP_skill_check_condition_char_sub) },
diff --git a/src/plugins/HPMHooking/HPMHooking.Hooks.inc b/src/plugins/HPMHooking/HPMHooking.Hooks.inc
index f3b149d83..f47cf27f0 100644
--- a/src/plugins/HPMHooking/HPMHooking.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking.Hooks.inc
@@ -49633,64 +49633,62 @@ int HP_pc_setcart(struct map_session_data *sd, int type) {
}
return retVal___;
}
-int HP_pc_setfalcon(struct map_session_data *sd, int flag) {
+void HP_pc_setfalcon(struct map_session_data *sd, bool flag) {
int hIndex = 0;
- int retVal___ = 0;
if( HPMHooks.count.HP_pc_setfalcon_pre ) {
- int (*preHookFunc) (struct map_session_data *sd, int *flag);
+ void (*preHookFunc) (struct map_session_data *sd, bool *flag);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setfalcon_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_setfalcon_pre[hIndex].func;
- retVal___ = preHookFunc(sd, &flag);
+ preHookFunc(sd, &flag);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
- return retVal___;
+ return;
}
}
{
- retVal___ = HPMHooks.source.pc.setfalcon(sd, flag);
+ HPMHooks.source.pc.setfalcon(sd, flag);
}
if( HPMHooks.count.HP_pc_setfalcon_post ) {
- int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *flag);
+ void (*postHookFunc) (struct map_session_data *sd, bool *flag);
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setfalcon_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_pc_setfalcon_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, sd, &flag);
+ postHookFunc(sd, &flag);
}
}
- return retVal___;
+ return;
}
-int HP_pc_setriding(struct map_session_data *sd, int flag) {
+void HP_pc_setridingpeco(struct map_session_data *sd, bool flag) {
int hIndex = 0;
- int retVal___ = 0;
- if( HPMHooks.count.HP_pc_setriding_pre ) {
- int (*preHookFunc) (struct map_session_data *sd, int *flag);
+ if( HPMHooks.count.HP_pc_setridingpeco_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, bool *flag);
*HPMforce_return = false;
- for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setriding_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_pc_setriding_pre[hIndex].func;
- retVal___ = preHookFunc(sd, &flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setridingpeco_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_setridingpeco_pre[hIndex].func;
+ preHookFunc(sd, &flag);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
- return retVal___;
+ return;
}
}
{
- retVal___ = HPMHooks.source.pc.setriding(sd, flag);
+ HPMHooks.source.pc.setridingpeco(sd, flag);
}
- if( HPMHooks.count.HP_pc_setriding_post ) {
- int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *flag);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setriding_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_pc_setriding_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, sd, &flag);
+ if( HPMHooks.count.HP_pc_setridingpeco_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, bool *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setridingpeco_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_setridingpeco_post[hIndex].func;
+ postHookFunc(sd, &flag);
}
}
- return retVal___;
+ return;
}
-void HP_pc_setmadogear(struct map_session_data *sd, int flag) {
+void HP_pc_setmadogear(struct map_session_data *sd, bool flag) {
int hIndex = 0;
if( HPMHooks.count.HP_pc_setmadogear_pre ) {
- void (*preHookFunc) (struct map_session_data *sd, int *flag);
+ void (*preHookFunc) (struct map_session_data *sd, bool *flag);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setmadogear_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_setmadogear_pre[hIndex].func;
@@ -49705,7 +49703,7 @@ void HP_pc_setmadogear(struct map_session_data *sd, int flag) {
HPMHooks.source.pc.setmadogear(sd, flag);
}
if( HPMHooks.count.HP_pc_setmadogear_post ) {
- void (*postHookFunc) (struct map_session_data *sd, int *flag);
+ void (*postHookFunc) (struct map_session_data *sd, bool *flag);
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setmadogear_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_pc_setmadogear_post[hIndex].func;
postHookFunc(sd, &flag);
@@ -49713,6 +49711,58 @@ void HP_pc_setmadogear(struct map_session_data *sd, int flag) {
}
return;
}
+void HP_pc_setridingdragon(struct map_session_data *sd, unsigned int type) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_pc_setridingdragon_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, unsigned int *type);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setridingdragon_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_setridingdragon_pre[hIndex].func;
+ preHookFunc(sd, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.pc.setridingdragon(sd, type);
+ }
+ if( HPMHooks.count.HP_pc_setridingdragon_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, unsigned int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setridingdragon_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_setridingdragon_post[hIndex].func;
+ postHookFunc(sd, &type);
+ }
+ }
+ return;
+}
+void HP_pc_setridingwug(struct map_session_data *sd, bool flag) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_pc_setridingwug_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, bool *flag);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setridingwug_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_setridingwug_pre[hIndex].func;
+ preHookFunc(sd, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.pc.setridingwug(sd, flag);
+ }
+ if( HPMHooks.count.HP_pc_setridingwug_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, bool *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setridingwug_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_setridingwug_post[hIndex].func;
+ postHookFunc(sd, &flag);
+ }
+ }
+ return;
+}
int HP_pc_changelook(struct map_session_data *sd, int type, int val) {
int hIndex = 0;
int retVal___ = 0;
@@ -61384,39 +61434,6 @@ int HP_skill_destroy_trap(struct block_list *bl, va_list ap) {
}
return retVal___;
}
-int HP_skill_icewall_block(struct block_list *bl, va_list ap) {
- int hIndex = 0;
- int retVal___ = 0;
- if( HPMHooks.count.HP_skill_icewall_block_pre ) {
- int (*preHookFunc) (struct block_list *bl, va_list ap);
- *HPMforce_return = false;
- for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_icewall_block_pre; hIndex++ ) {
- va_list ap___copy; va_copy(ap___copy, ap);
- preHookFunc = HPMHooks.list.HP_skill_icewall_block_pre[hIndex].func;
- retVal___ = preHookFunc(bl, ap___copy);
- va_end(ap___copy);
- }
- if( *HPMforce_return ) {
- *HPMforce_return = false;
- return retVal___;
- }
- }
- {
- va_list ap___copy; va_copy(ap___copy, ap);
- retVal___ = HPMHooks.source.skill.icewall_block(bl, ap___copy);
- va_end(ap___copy);
- }
- if( HPMHooks.count.HP_skill_icewall_block_post ) {
- int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_icewall_block_post; hIndex++ ) {
- va_list ap___copy; va_copy(ap___copy, ap);
- postHookFunc = HPMHooks.list.HP_skill_icewall_block_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, bl, ap___copy);
- va_end(ap___copy);
- }
- }
- return retVal___;
-}
struct skill_unit_group_tickset* HP_skill_unitgrouptickset_search(struct block_list *bl, struct skill_unit_group *group, int64 tick) {
int hIndex = 0;
struct skill_unit_group_tickset* retVal___ = NULL;
diff --git a/src/plugins/Makefile.in b/src/plugins/Makefile.in
index 77040d567..39f445319 100644
--- a/src/plugins/Makefile.in
+++ b/src/plugins/Makefile.in
@@ -80,4 +80,4 @@ Makefile: Makefile.in
../../plugins/%@DLLEXT@: %.c $(ALL_H) $$(shell ls %/* 2>/dev/null)
@echo " CC $<"
- @$(CC) @DEFS@ @CFLAGS@ @CPPFLAGS@ @LDFLAGS@ @SOFLAGS@ -o $@ $<
+ @$(CC) @PLUGINSTATIC@ @DEFS@ @CFLAGS@ @CPPFLAGS@ @LDFLAGS@ @SOFLAGS@ -o $@ $<
diff --git a/src/tool/Makefile.in b/src/tool/Makefile.in
index 127d3841b..2d7699db0 100644
--- a/src/tool/Makefile.in
+++ b/src/tool/Makefile.in
@@ -36,7 +36,7 @@ mapcache: ../../mapcache@EXEEXT@
../../mapcache@EXEEXT@: $(MAPCACHE_DEPENDS) Makefile
@echo " LD $(notdir $@)"
- @$(CC) @LDFLAGS@ -o ../../mapcache@EXEEXT@ $(MAPCACHE_DEPENDS) @LIBS@
+ @$(CC) @STATIC@ @LDFLAGS@ -o ../../mapcache@EXEEXT@ $(MAPCACHE_DEPENDS) @LIBS@
buildclean:
@echo " CLEAN tool (build temp files)"