diff options
32 files changed, 437 insertions, 279 deletions
diff --git a/.github/workflows/clang10_test.yml b/.github/workflows/clang10_test.yml index 28cb144f6..5fd53c371 100644 --- a/.github/workflows/clang10_test.yml +++ b/.github/workflows/clang10_test.yml @@ -41,6 +41,7 @@ jobs: SQLHOST: mariadb CC: ${{ matrix.CC }} CONFIGURE_FLAGS: CC=${{ matrix.CC }} --enable-debug --enable-Werror --enable-buildbot ${{ matrix.RENEWAL }} ${{ matrix.CLIENT_TYPE }} ${{ matrix.SANITIZER }} ${{ matrix.PACKET_VERSION }} + PACKET_VERSION: ${{ matrix.PACKET_VERSION }} steps: - uses: actions/checkout@v1 with: @@ -70,3 +71,8 @@ jobs: - name: test run: | ./tools/ci/travis.sh test ragnarok ragnarok ragnarok $SQLHOST + + - name: extra test + if: env.PACKET_VERSION != '--enable-packetver=20130724' + run: | + ./tools/ci/travis.sh extratest diff --git a/.github/workflows/gcc10_test.yml b/.github/workflows/gcc10_test.yml index 1b0909be8..2225fbba1 100644 --- a/.github/workflows/gcc10_test.yml +++ b/.github/workflows/gcc10_test.yml @@ -40,6 +40,7 @@ jobs: SQLHOST: mariadb CC: ${{ matrix.CC }} CONFIGURE_FLAGS: CC=${{ matrix.CC }} --enable-debug --enable-Werror --enable-buildbot ${{ matrix.RENEWAL }} ${{ matrix.CLIENT_TYPE }} ${{ matrix.SANITIZER }} ${{ matrix.PACKET_VERSION }} --enable-lto + PACKET_VERSION: ${{ matrix.PACKET_VERSION }} steps: - uses: actions/checkout@v1 with: @@ -69,3 +70,8 @@ jobs: - name: test run: | ./tools/ci/travis.sh test ragnarok ragnarok ragnarok $SQLHOST + + - name: extra test + if: env.PACKET_VERSION != '--enable-packetver=20130724' + run: | + ./tools/ci/travis.sh extratest diff --git a/.github/workflows/gcc9_test.yml b/.github/workflows/gcc9_test.yml index 4e9dc9bd9..798b6c476 100644 --- a/.github/workflows/gcc9_test.yml +++ b/.github/workflows/gcc9_test.yml @@ -40,6 +40,7 @@ jobs: SQLHOST: mariadb CC: ${{ matrix.CC }} CONFIGURE_FLAGS: CC=${{ matrix.CC }} --enable-debug --enable-Werror --enable-buildbot ${{ matrix.RENEWAL }} ${{ matrix.CLIENT_TYPE }} ${{ matrix.SANITIZER }} ${{ matrix.PACKET_VERSION }} --enable-lto + PACKET_VERSION: ${{ matrix.PACKET_VERSION }} steps: - uses: actions/checkout@v1 with: @@ -69,3 +70,8 @@ jobs: - name: test run: | ./tools/ci/travis.sh test ragnarok ragnarok ragnarok $SQLHOST + + - name: extra test + if: env.PACKET_VERSION != '--enable-packetver=20130724' + run: | + ./tools/ci/travis.sh extratest diff --git a/.github/workflows/mariadb.yml b/.github/workflows/mariadb.yml index 4479e9e4d..5293dd98b 100644 --- a/.github/workflows/mariadb.yml +++ b/.github/workflows/mariadb.yml @@ -38,6 +38,7 @@ jobs: SQLHOST: mysql CC: ${{ matrix.CC }} CONFIGURE_FLAGS: CC=${{ matrix.CC }} --enable-debug --enable-Werror --enable-buildbot ${{ matrix.RENEWAL }} ${{ matrix.CLIENT_TYPE }} ${{ matrix.SANITIZER }} ${{ matrix.PACKET_VERSION }} + PACKET_VERSION: ${{ matrix.PACKET_VERSION }} steps: - uses: actions/checkout@v1 with: @@ -67,3 +68,13 @@ jobs: - name: test run: | ./tools/ci/travis.sh test ragnarok ragnarok ragnarok $SQLHOST + + - name: extra test + if: env.PACKET_VERSION != '--enable-packetver=20130724' + run: | + ./tools/ci/travis.sh extratest + + - name: extra test + if: env.PACKET_VERSION != '--enable-packetver=20130724' + run: | + ./tools/ci/travis.sh extratest diff --git a/.github/workflows/mysql.yml b/.github/workflows/mysql.yml index 98e760a87..f26f86892 100644 --- a/.github/workflows/mysql.yml +++ b/.github/workflows/mysql.yml @@ -38,6 +38,7 @@ jobs: SQLHOST: mysql CC: ${{ matrix.CC }} CONFIGURE_FLAGS: CC=${{ matrix.CC }} --enable-debug --enable-Werror --enable-buildbot ${{ matrix.RENEWAL }} ${{ matrix.CLIENT_TYPE }} ${{ matrix.SANITIZER }} ${{ matrix.PACKET_VERSION }} + PACKET_VERSION: ${{ matrix.PACKET_VERSION }} steps: - uses: actions/checkout@v1 with: @@ -67,3 +68,8 @@ jobs: - name: test run: | ./tools/ci/travis.sh test ragnarok ragnarok ragnarok $SQLHOST + + - name: extra test + if: env.PACKET_VERSION != '--enable-packetver=20130724' + run: | + ./tools/ci/travis.sh extratest diff --git a/.travis.yml b/.travis.yml index 263f66776..77875e490 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,12 +9,17 @@ addons: install: - ./tools/ci/travis.sh getplugins || true +arch: + - amd64 + before_script: - uname -a + - env - ulimit -c unlimited -S - - ./tools/ci/travis.sh createdb ragnarok root - - ./tools/ci/travis.sh importdb ragnarok root - - ./tools/ci/travis.sh adduser ragnarok travis travis root + - if [[ "$(uname -m)" != "x86_64" ]]; then $SUDO ./tools/ci/travis.sh startmysql; fi + - $SUDO ./tools/ci/travis.sh createdb ragnarok root + - $SUDO ./tools/ci/travis.sh importdb ragnarok root + - $SUDO ./tools/ci/travis.sh adduser ragnarok travis travis root script: - if [[ ! -z "${HPM}" ]]; then ./tools/ci/travis.sh buildhpm $CONFIGURE_FLAGS; fi @@ -24,6 +29,9 @@ script: compiler: false # Necessary at the top level because referenced by allow_failures env: ignore=this # Necessary at the top level because referenced by allow_failures +git: + depth: 1 + jobs: allow_failures: - compiler: clang @@ -90,33 +98,11 @@ jobs: - gdb - clang-4.0 - compiler: clang - env: CONFIGURE_FLAGS="--enable-debug CC=clang-4.0 --enable-Werror --enable-packetver=20130724 --enable-packetver-re --enable-buildbot" - addons: - apt: - sources: - - llvm-toolchain-trusty-4.0 - - ubuntu-toolchain-r-test - packages: - - gdb - - clang-4.0 - - compiler: clang - env: CONFIGURE_FLAGS="--enable-debug CC=clang-4.0 --disable-renewal --enable-Werror --enable-buildbot" - addons: - apt: - sources: - - llvm-toolchain-trusty-4.0 - - ubuntu-toolchain-r-test - packages: - - gdb - - clang-4.0 - - compiler: clang env: CONFIGURE_FLAGS="--enable-debug --enable-Werror --enable-buildbot" - compiler: clang env: CONFIGURE_FLAGS="--enable-debug --disable-renewal --enable-Werror --enable-buildbot" - compiler: gcc - env: CONFIGURE_FLAGS="--enable-debug --enable-Werror --enable-packetver=20200304 --enable-packetver-re --enable-buildbot" - - compiler: gcc - env: CONFIGURE_FLAGS="--enable-debug --disable-renewal --enable-Werror --enable-buildbot" + env: CONFIGURE_FLAGS="--enable-debug --enable-Werror --enable-packetver=20200304 --enable-buildbot" - compiler: gcc env: LDFLAGS="-fuse-ld=gold" CONFIGURE_FLAGS="--enable-debug --enable-sanitize=full CC=gcc-5 --disable-manager --enable-Werror --enable-packetver=20200304 --enable-packetver-re --enable-buildbot" addons: @@ -127,68 +113,82 @@ jobs: - gdb - gcc-5 - compiler: gcc - env: LDFLAGS="-fuse-ld=gold" CONFIGURE_FLAGS="--enable-debug --enable-sanitize=full CC=gcc-5 --disable-manager --disable-renewal --enable-Werror --enable-buildbot" + env: LDFLAGS="-fuse-ld=gold" CONFIGURE_FLAGS="--enable-debug --enable-sanitize=full CC=gcc-6 --disable-manager --enable-Werror --enable-packetver=20200304 --enable-packetver-re --enable-buildbot" addons: apt: sources: - ubuntu-toolchain-r-test packages: - gdb - - gcc-5 + - gcc-6 - compiler: gcc - env: LDFLAGS="-fuse-ld=gold" CONFIGURE_FLAGS="--enable-debug --enable-sanitize=full CC=gcc-6 --disable-manager --enable-Werror --enable-packetver=20200304 --enable-packetver-re --enable-buildbot" + env: CONFIGURE_FLAGS="--enable-debug --disable-manager --disable-renewal --enable-Werror --enable-buildbot" addons: apt: sources: - ubuntu-toolchain-r-test packages: - gdb - - gcc-6 + - gcc-7 - compiler: gcc - env: LDFLAGS="-fuse-ld=gold" CONFIGURE_FLAGS="--enable-debug --enable-sanitize=full CC=gcc-6 --disable-manager --disable-renewal --enable-Werror --enable-buildbot" + env: LDFLAGS="-fuse-ld=gold" CONFIGURE_FLAGS="--enable-debug --enable-sanitize=full CC=gcc-8 --disable-manager --enable-Werror --enable-packetver=20200304 --enable-packetver-re --enable-buildbot" addons: apt: sources: - ubuntu-toolchain-r-test packages: - gdb - - gcc-6 + - gcc-8 - compiler: gcc - env: LDFLAGS="-fuse-ld=gold" CONFIGURE_FLAGS="--enable-debug CC=gcc-7 --disable-manager --enable-Werror --enable-packetver=20200304 --enable-packetver-re --enable-buildbot" + env: LDFLAGS="-fuse-ld=gold" CONFIGURE_FLAGS="--enable-debug --enable-sanitize=full CC=gcc-8 --disable-manager --disable-renewal --enable-Werror --enable-buildbot" addons: apt: sources: - ubuntu-toolchain-r-test packages: - gdb - - gcc-7 + - gcc-8 - compiler: gcc - env: LDFLAGS="-fuse-ld=gold" CONFIGURE_FLAGS="--enable-debug --enable-sanitize=full CC=gcc-7 --disable-manager --disable-renewal --enable-Werror --enable-buildbot" + arch: arm64 + env: CONFIGURE_FLAGS="--enable-debug --enable-sanitize=full CC=gcc-10 --enable-Werror --enable-packetver=20200304 --enable-packetver-re --enable-buildbot --disable-manager" SUDO="sudo" + dist: focal addons: apt: - sources: - - ubuntu-toolchain-r-test packages: + - libpcre3-dev - gdb - - gcc-7 + - mysql-server + - gcc-10 - compiler: gcc - env: LDFLAGS="-fuse-ld=gold" CONFIGURE_FLAGS="--enable-debug --enable-sanitize=full CC=gcc-8 --disable-manager --enable-Werror --enable-packetver=20200304 --enable-packetver-re --enable-buildbot" + arch: arm64 + env: CONFIGURE_FLAGS="--enable-debug --enable-Werror CC=gcc-10 --enable-packetver=20200304 --enable-packetver-re --enable-buildbot --disable-manager" SUDO="sudo" + dist: focal addons: apt: - sources: - - ubuntu-toolchain-r-test packages: + - libpcre3-dev - gdb - - gcc-8 + - mysql-server + - gcc-10 - compiler: gcc - env: LDFLAGS="-fuse-ld=gold" CONFIGURE_FLAGS="--enable-debug --enable-sanitize=full CC=gcc-8 --disable-manager --disable-renewal --enable-Werror --enable-buildbot" + arch: ppc64le + env: CONFIGURE_FLAGS="--enable-debug --enable-Werror --enable-packetver=20200304 --enable-packetver-re --enable-buildbot --disable-manager" SUDO="sudo" + dist: bionic addons: apt: - sources: - - ubuntu-toolchain-r-test packages: + - libpcre3-dev - gdb - - gcc-8 + - mysql-server +# big endian not supported +# - compiler: gcc +# arch: s390x +# env: CONFIGURE_FLAGS="--enable-debug --enable-Werror --enable-packetver=20200304 --enable-packetver-re --enable-buildbot" ROOT="true" +# addons: +# apt: +# packages: +# - libpcre3-dev +# - gdb notifications: email: false @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.ac 2b51b41ab. +# From configure.ac 6d5542195. # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69. # @@ -6460,7 +6460,6 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fsanitize=pointer-compare" >&5 $as_echo_n "checking whether $CC supports -fsanitize=pointer-compare... " >&6; } OLD_CFLAGS="$CFLAGS" @@ -6708,6 +6707,34 @@ fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fsigned-char" >&5 +$as_echo_n "checking whether $CC supports -fsigned-char... " >&6; } + OLD_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -fsigned-char" + OLD_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -fsigned-char" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int foo; +_ACEOF +if ac_fn_c_try_compile "$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; } + CFLAGS="$OLD_CFLAGS" + LDFLAGS="$OLD_LDFLAGS" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wno-unused-parameter" >&5 $as_echo_n "checking whether $CC supports -Wno-unused-parameter... " >&6; } OLD_CFLAGS="$CFLAGS" diff --git a/configure.ac b/configure.ac index 1d02fdf79..09a5ad6ad 100644 --- a/configure.ac +++ b/configure.ac @@ -1098,6 +1098,8 @@ AC_DEFUN([AC_CHECK_COMPILER_WNOFLAG], ] ) +AC_CHECK_FLAG(-fsigned-char) + AC_CHECK_COMPILER_WNOFLAG(unused-parameter, [int foo(int bar) { return 0; }]) AC_CHECK_COMPILER_WNOFLAG(clobbered) AC_CHECK_COMPILER_WFLAG(empty-body) diff --git a/db/map_index.txt b/db/map_index.txt index fbbf4d25a..6e77cb838 100644 --- a/db/map_index.txt +++ b/db/map_index.txt @@ -642,9 +642,9 @@ ve_fild04 ve_fild05 ve_fild06 ve_fild07 -poring_c01 -poring_c02 -que_ng +//poring_c01 628 +//poring_c02 629 +que_ng 630 nameless_i nameless_n nameless_in diff --git a/db/pre-re/item_db.conf b/db/pre-re/item_db.conf index cc7f5040d..c548209c8 100644 --- a/db/pre-re/item_db.conf +++ b/db/pre-re/item_db.conf @@ -98799,6 +98799,11 @@ item_db: ( Name: "Ein_1HMAGGER" }, { + Id: 28900 + AegisName: "Praetorian_Shield" + Name: "Praetorian Shield" +}, +{ Id: 28922 AegisName: "Herald_Of_GOD_IL" Name: "Herald_Of_GOD_IL" diff --git a/db/pre-re/mob_db.conf b/db/pre-re/mob_db.conf index 92fd149f3..eb0cf663b 100644 --- a/db/pre-re/mob_db.conf +++ b/db/pre-re/mob_db.conf @@ -50153,4 +50153,50 @@ mob_db: ( DamageMotion: 480 MvpExp: 0 }, +{ + Id: 2248 + SpriteName: "GOLDPORING" + Name: "Golden Poring" + Lv: 1 + Hp: 15 + Sp: 1 + Exp: 0 + JExp: 0 + AttackRange: 0 + Attack: [0, 0] + Def: 127 + Mdef: 5 + Stats: { + Str: 1 + Agi: 1 + Vit: 1 + Int: 1 + Dex: 999 + Luk: 1 + } + ViewRange: 10 + ChaseRange: 12 + Size: "Size_Medium" + Race: "RC_Plant" + Element: ("Ele_Water", 1) + Mode: { + CanMove: true + CanAttack: true + } + MoveSpeed: 400 + AttackDelay: 1872 + AttackMotion: 672 + DamageMotion: 480 + MvpExp: 0 +// Drops: { +// Blue_Card_C: 4000 +// BlueCard_2: 4000 +// BlueCard_0: 4000 +// BlueCard_1: 4000 +// BlueCard_W: 4000 +// BlueCard_R: 4000 +// RWC_Cele_Fire: 10000 +// RWC_Cele_Fire2: 10000 +// } +}, ) diff --git a/npc/custom/battleground/bg_common.txt b/npc/custom/battleground/bg_common.txt index 7ba3eecb0..d997263e6 100644 --- a/npc/custom/battleground/bg_common.txt +++ b/npc/custom/battleground/bg_common.txt @@ -5,7 +5,7 @@ // BattleGround Warper - Entrance // ********************************************************************* -- script Maroll Battle Recruiter::BatRecruit 4_F_JOB_KNIGHT,{ +- script Maroll Battle Recruiter::BatRecruit#custom 4_F_JOB_KNIGHT,{ mes "[Maroll Battle Recruiter]"; mes "Good day, adventurer."; mes "I'm a knight from a far country called Maroll Kingdom."; @@ -26,12 +26,12 @@ end; } -payon,189,104,3 duplicate(BatRecruit) Maroll Battle Recruiter::BatRecruit1 4_F_JOB_KNIGHT -prontera,123,83,5 duplicate(BatRecruit) Maroll Battle Recruiter::BatRecruit2 4_F_JOB_KNIGHT -rachel,149,138,5 duplicate(BatRecruit) Maroll Battle Recruiter::BatRecruit3 4_F_JOB_KNIGHT -moc_ruins,75,162,5 duplicate(BatRecruit) Maroll Battle Recruiter::BatRecruit4 4_F_JOB_KNIGHT -aldebaran,146,109,5 duplicate(BatRecruit) Maroll Battle Recruiter::BatRecruit5 4_F_JOB_KNIGHT -lighthalzen,153,86,5 duplicate(BatRecruit) Maroll Battle Recruiter::BatRecruit6 4_F_JOB_KNIGHT +payon,189,104,3 duplicate(BatRecruit#custom) Maroll Battle Recruiter::BatRecruit1#custom 4_F_JOB_KNIGHT +prontera,123,83,5 duplicate(BatRecruit#custom) Maroll Battle Recruiter::BatRecruit2#custom 4_F_JOB_KNIGHT +rachel,149,138,5 duplicate(BatRecruit#custom) Maroll Battle Recruiter::BatRecruit3#custom 4_F_JOB_KNIGHT +moc_ruins,75,162,5 duplicate(BatRecruit#custom) Maroll Battle Recruiter::BatRecruit4#custom 4_F_JOB_KNIGHT +aldebaran,146,109,5 duplicate(BatRecruit#custom) Maroll Battle Recruiter::BatRecruit5#custom 4_F_JOB_KNIGHT +lighthalzen,153,86,5 duplicate(BatRecruit#custom) Maroll Battle Recruiter::BatRecruit6#custom 4_F_JOB_KNIGHT // BattleGround Warper - Exit // ********************************************************************* @@ -59,14 +59,14 @@ bat_room,148,150,4 script Teleporter#bat 4_F_TELEPORTER,{ // Kafra // ********************************************************************* -bat_room,148,147,4 script Kafra Staff::kaf_bat 4_F_KAFRA9,{ +bat_room,148,147,4 script Kafra Staff::kaf_bat#custom 4_F_KAFRA9,{ cutin "kafra_09",2; callfunc "F_Kafra",0,2,1,150,0; } // General Guillaume // ********************************************************************* -bat_room,160,159,3 script General Guillaume 4_M_KY_KIYOM,{ +bat_room,160,159,3 script General Guillaume#custom 4_M_KY_KIYOM,{ cutin "bat_kiyom2",2; mes "[General Guillaume]"; mes "Hot-blooded adventurer, we need your ability to win this battle."; @@ -105,7 +105,7 @@ bat_room,160,159,3 script General Guillaume 4_M_KY_KIYOM,{ // General Croix // ********************************************************************* -bat_room,160,140,3 script Prince Croix 4_M_CRU_CRUA,{ +bat_room,160,140,3 script Prince Croix#custom 4_M_CRU_CRUA,{ cutin "bat_crua1",2; mes "[Prince Croix]"; mes "Wise adventurer, why don't you lend us your power for victory?"; @@ -133,45 +133,9 @@ bat_room,160,140,3 script Prince Croix 4_M_CRU_CRUA,{ end; } -// Time calculation Function -// ********************************************************************* -function script Time2Str { - set .@time_left, getarg(0) - gettimetick(2); - - set .@Days, .@time_left / 86400; - set .@time_left, .@time_left - (.@Days * 86400); - set .@Hours, .@time_left / 3600; - set .@time_left, .@time_left - (.@Hours * 3600); - set .@Minutes, .@time_left / 60; - set .@time_left, .@time_left - (.@Minutes * 60); - - set .@Time$, ""; - if( .@Days > 1 ) - set .@Time$, .@Time$ + .@Days + " days, "; - else if( .@Days > 0 ) - set .@Time$, .@Time$ + .@Days + " day, "; - - if( .@Hours > 1 ) - set .@Time$, .@Time$ + .@Hours + " hours, "; - else if( .@Hours > 0 ) - set .@Time$, .@Time$ + .@Hours + " hour, "; - - if( .@Minutes > 1 ) - set .@Time$, .@Time$ + .@Minutes + " minutes, "; - else if( .@Minutes > 0 ) - set .@Time$, .@Time$ + .@Minutes + " minute, "; - - if( .@time_left > 1 || .@time_left == 0 ) - set .@Time$, .@Time$ + .@time_left + " seconds."; - else if( .@time_left == 1 ) - set .@Time$, .@Time$ + .@time_left + " second."; - - return .@Time$; -} - // Guillaume Knight - Tierra Valley // ********************************************************************* -bat_room,159,178,5 script Guillaume Knight#1 4_M_KY_SOLD,{ +bat_room,159,178,5 script Guillaume Knight#1c 4_M_KY_SOLD,{ mes "[Guillaume Knight]"; mes "Tierra Gorge is a very steep canyon with two forts residing in the north and south ends of the map."; next; @@ -241,7 +205,7 @@ bat_room,156,178,5 script Tierra Valley Officer#1 4_M_KY_KNT,{ // Croix Knight - Tierra Valley // ********************************************************************* -bat_room,159,121,1 script Croix Knight#1 4_M_CRU_SOLD,{ +bat_room,159,121,1 script Croix Knight#1c 4_M_CRU_SOLD,{ mes "[Croix Knight]"; mes "Tierra Gorge is a very steep canyon with two forts residing in the north and south ends of the map."; next; @@ -311,7 +275,7 @@ bat_room,156,121,1 script Tierra Valley Officer#2 4_M_CRU_KNT,{ // Guillaume Knight - Tierra // ********************************************************************* -bat_room,167,178,5 script Guillaume Knight#2 4_M_KY_SOLD,{ +bat_room,167,178,5 script Guillaume Knight#2c 4_M_KY_SOLD,{ mes "[Guillaume Knight]"; mes "Tierra Gorge is a very steep canyon with two forts residing in the north and south ends of the map."; next; @@ -381,7 +345,7 @@ bat_room,164,178,5 script Tierra Valley Officer#3 4_M_KY_KNT,{ // Croix Knight - Tierra // ********************************************************************* -bat_room,167,121,1 script Croix Knight#2 4_M_CRU_SOLD,{ +bat_room,167,121,1 script Croix Knight#2c 4_M_CRU_SOLD,{ mes "[Croix Knight]"; mes "Tierra Gorge is a very steep canyon with two forts residing in the north and south ends of the map."; next; @@ -451,7 +415,7 @@ bat_room,164,121,1 script Tierra Valley Officer#4 4_M_CRU_KNT,{ // Guillaune Knight - Flavius // ********************************************************************* -bat_room,175,178,5 script Guillaume Knight#3 4_M_KY_SOLD,{ +bat_room,175,178,5 script Guillaume Knight#3c 4_M_KY_SOLD,{ mes "[Guillaume Knight]"; mes "The objective of the Flavius Battle is to score 2 points before your enemy by destroying their crystal."; next; @@ -522,7 +486,7 @@ bat_room,172,178,5 script Flavius Officer#1 4_M_KY_KNT,{ // Croix Knight - Flavius // ********************************************************************* -bat_room,175,121,1 script Croix Knight#3 4_M_CRU_SOLD,{ +bat_room,175,121,1 script Croix Knight#3c 4_M_CRU_SOLD,{ mes "[Croix Knight]"; mes "The objective of the Flavius Battle is to score 2 points before your enemy by destroying their crystal."; next; @@ -593,7 +557,7 @@ bat_room,172,121,1 script Flavius Officer#2 4_M_CRU_KNT,{ // Guillaune Knight - Flavius // ********************************************************************* -bat_room,151,178,5 script Guillaume Knight#4 4_M_KY_SOLD,{ +bat_room,151,178,5 script Guillaume Knight#4c 4_M_KY_SOLD,{ mes "[Guillaume Knight]"; mes "The objective of the Flavius Battle is to score 2 points before your enemy by destroying their crystal."; next; @@ -664,7 +628,7 @@ bat_room,148,178,5 script Flavius Officer#3 4_M_KY_KNT,{ // Croix Knight - Flavius // ********************************************************************* -bat_room,151,121,1 script Croix Knight#4 4_M_CRU_SOLD,{ +bat_room,151,121,1 script Croix Knight#4c 4_M_CRU_SOLD,{ mes "[Croix Knight]"; mes "The objective of the Flavius Battle is to score 2 points before your enemy by destroying their crystal."; next; @@ -1167,58 +1131,58 @@ OnTouch: } // Flavius bat_b02 -bat_room,57,81,0 duplicate(warp2bat_room) bat1 WARPNPC,1,1 -bat_room,57,90,0 duplicate(warp2bat_room) bat2 WARPNPC,1,1 +bat_room,57,81,0 duplicate(warp2bat_room) bat1#custom WARPNPC,1,1 +bat_room,57,90,0 duplicate(warp2bat_room) bat2#custom WARPNPC,1,1 // Free BG -bat_room,57,220,0 duplicate(warp2bat_room) bat3 WARPNPC,1,1 -bat_room,57,211,0 duplicate(warp2bat_room) bat4 WARPNPC,1,1 +bat_room,57,220,0 duplicate(warp2bat_room) bat3#custom WARPNPC,1,1 +bat_room,57,211,0 duplicate(warp2bat_room) bat4#custom WARPNPC,1,1 // Tierra Valley bat_a02 -bat_room,85,81,0 duplicate(warp2bat_room) bat5 WARPNPC,1,1 -bat_room,85,90,0 duplicate(warp2bat_room) bat6 WARPNPC,1,1 +bat_room,85,81,0 duplicate(warp2bat_room) bat5#custom WARPNPC,1,1 +bat_room,85,90,0 duplicate(warp2bat_room) bat6#custom WARPNPC,1,1 // Tierra Valley bat_a01 -bat_room,85,220,0 duplicate(warp2bat_room) bat7 WARPNPC,1,1 -bat_room,85,211,0 duplicate(warp2bat_room) bat8 WARPNPC,1,1 +bat_room,85,220,0 duplicate(warp2bat_room) bat7#custom WARPNPC,1,1 +bat_room,85,211,0 duplicate(warp2bat_room) bat8#custom WARPNPC,1,1 // Free BG -bat_room,113,81,0 duplicate(warp2bat_room) bat9 WARPNPC,1,1 -bat_room,113,90,0 duplicate(warp2bat_room) bat10 WARPNPC,1,1 +bat_room,113,81,0 duplicate(warp2bat_room) bat9#custom WARPNPC,1,1 +bat_room,113,90,0 duplicate(warp2bat_room) bat10#custom WARPNPC,1,1 // Free BG -bat_room,113,220,0 duplicate(warp2bat_room) bat11 WARPNPC,1,1 -bat_room,113,211,0 duplicate(warp2bat_room) bat12 WARPNPC,1,1 +bat_room,113,220,0 duplicate(warp2bat_room) bat11#custom WARPNPC,1,1 +bat_room,113,211,0 duplicate(warp2bat_room) bat12#custom WARPNPC,1,1 // Free BG -bat_room,141,81,0 duplicate(warp2bat_room) bat13 WARPNPC,1,1 -bat_room,141,90,0 duplicate(warp2bat_room) bat14 WARPNPC,1,1 +bat_room,141,81,0 duplicate(warp2bat_room) bat13#custom WARPNPC,1,1 +bat_room,141,90,0 duplicate(warp2bat_room) bat14#custom WARPNPC,1,1 // Free BG -bat_room,141,220,0 duplicate(warp2bat_room) bat15 WARPNPC,1,1 -bat_room,141,211,0 duplicate(warp2bat_room) bat16 WARPNPC,1,1 +bat_room,141,220,0 duplicate(warp2bat_room) bat15#custom WARPNPC,1,1 +bat_room,141,211,0 duplicate(warp2bat_room) bat16#custom WARPNPC,1,1 // Free BG -bat_room,169,81,0 duplicate(warp2bat_room) bat17 WARPNPC,1,1 -bat_room,169,90,0 duplicate(warp2bat_room) bat18 WARPNPC,1,1 +bat_room,169,81,0 duplicate(warp2bat_room) bat17#custom WARPNPC,1,1 +bat_room,169,90,0 duplicate(warp2bat_room) bat18#custom WARPNPC,1,1 // Free BG -bat_room,169,220,0 duplicate(warp2bat_room) bat19 WARPNPC,1,1 -bat_room,169,211,0 duplicate(warp2bat_room) bat20 WARPNPC,1,1 +bat_room,169,220,0 duplicate(warp2bat_room) bat19#custom WARPNPC,1,1 +bat_room,169,211,0 duplicate(warp2bat_room) bat20#custom WARPNPC,1,1 // Free BG -bat_room,197,81,0 duplicate(warp2bat_room) bat21 WARPNPC,1,1 -bat_room,197,90,0 duplicate(warp2bat_room) bat22 WARPNPC,1,1 +bat_room,197,81,0 duplicate(warp2bat_room) bat21#custom WARPNPC,1,1 +bat_room,197,90,0 duplicate(warp2bat_room) bat22#custom WARPNPC,1,1 // KvM bat_c03 -bat_room,197,220,0 duplicate(warp2bat_room) bat23 WARPNPC,1,1 -bat_room,197,211,0 duplicate(warp2bat_room) bat24 WARPNPC,1,1 +bat_room,197,220,0 duplicate(warp2bat_room) bat23#custom WARPNPC,1,1 +bat_room,197,211,0 duplicate(warp2bat_room) bat24#custom WARPNPC,1,1 // Free BG -bat_room,225,81,0 duplicate(warp2bat_room) bat25 WARPNPC,1,1 -bat_room,225,90,0 duplicate(warp2bat_room) bat26 WARPNPC,1,1 +bat_room,225,81,0 duplicate(warp2bat_room) bat25#custom WARPNPC,1,1 +bat_room,225,90,0 duplicate(warp2bat_room) bat26#custom WARPNPC,1,1 // KvM bat_c02 -bat_room,225,220,0 duplicate(warp2bat_room) bat27 WARPNPC,1,1 -bat_room,225,211,0 duplicate(warp2bat_room) bat28 WARPNPC,1,1 +bat_room,225,220,0 duplicate(warp2bat_room) bat27#custom WARPNPC,1,1 +bat_room,225,211,0 duplicate(warp2bat_room) bat28#custom WARPNPC,1,1 // Flavius bat_b01 -bat_room,253,81,0 duplicate(warp2bat_room) bat29 WARPNPC,1,1 -bat_room,253,90,0 duplicate(warp2bat_room) bat30 WARPNPC,1,1 +bat_room,253,81,0 duplicate(warp2bat_room) bat29#custom WARPNPC,1,1 +bat_room,253,90,0 duplicate(warp2bat_room) bat30#custom WARPNPC,1,1 // KvM bat_c01 -bat_room,253,220,0 duplicate(warp2bat_room) bat31 WARPNPC,1,1 -bat_room,253,211,0 duplicate(warp2bat_room) bat32 WARPNPC,1,1 +bat_room,253,220,0 duplicate(warp2bat_room) bat31#custom WARPNPC,1,1 +bat_room,253,211,0 duplicate(warp2bat_room) bat32#custom WARPNPC,1,1 // Badges Repairman // ********************************************************************* -bat_room,138,144,5 script Repairman#bg 4W_M_03,{ +bat_room,138,144,5 script Repairman#bgc 4W_M_03,{ callfunc "repairmain","Repairman"; end; } @@ -1226,7 +1190,7 @@ bat_room,138,144,5 script Repairman#bg 4W_M_03,{ // Badges Exchange // ********************************************************************* -bat_room,160,150,3 script Erundek 4_M_MANAGER,{ +bat_room,160,150,3 script Erundek#custom 4_M_MANAGER,{ mes "[Erundek]"; mes "Welcome, mighty warrior."; mes "What can I do for you today ?"; diff --git a/npc/custom/battleground/bg_kvm01.txt b/npc/custom/battleground/bg_kvm01.txt index bb3ba3e06..cf2d8aa15 100644 --- a/npc/custom/battleground/bg_kvm01.txt +++ b/npc/custom/battleground/bg_kvm01.txt @@ -5,27 +5,27 @@ // Registration NPC's // ********************************************************************* -bat_room,253,227,4 script Registration::KvM01R_Guillaume 4_M_KY_KNT,{ // KvM Guillaume +bat_room,253,227,4 script Registration::KvM01R_Guillaume#custom 4_M_KY_KNT,{ // KvM Guillaume end; OnInit: - waitingroom "Battle Station 5 Players",5,"KvM01_BG::OnGuillaumeJoin",1; + waitingroom "Battle Station 5 Players",5,"KvM01_BG#custom::OnGuillaumeJoin",1; end; OnEnterBG: - set $@KvM01BG_id1, waitingroom2bg("bat_c01",53,128,"KvM01_BG::OnGuillaumeQuit","KvM01_BG::OnGuillaumeDie"); + set $@KvM01BG_id1, waitingroom2bg("bat_c01",53,128,"KvM01_BG#custom::OnGuillaumeQuit","KvM01_BG#custom::OnGuillaumeDie"); end; } -bat_room,253,204,0 script Registration::KvM01R_Croix 4_M_CRU_KNT,{ // KvM Croix +bat_room,253,204,0 script Registration::KvM01R_Croix#custom 4_M_CRU_KNT,{ // KvM Croix end; OnInit: - waitingroom "Battle Station 5 Players",5,"KvM01_BG::OnCroixJoin",1; + waitingroom "Battle Station 5 Players",5,"KvM01_BG#custom::OnCroixJoin",1; end; OnEnterBG: - set $@KvM01BG_id2, waitingroom2bg("bat_c01",146,55,"KvM01_BG::OnCroixQuit","KvM01_BG::OnCroixDie"); + set $@KvM01BG_id2, waitingroom2bg("bat_c01",146,55,"KvM01_BG#custom::OnCroixQuit","KvM01_BG#custom::OnCroixDie"); end; } @@ -49,7 +49,7 @@ bat_c01,145,60,0 duplicate(#bat_c01a) #bat_c01f HIDDEN_NPC // Battleground Engine // ********************************************************************* -- script KvM01_BG FAKE_NPC,{ +- script KvM01_BG#custom FAKE_NPC,{ end; OnInit: @@ -65,7 +65,7 @@ OnInit: OnGuillaumeJoin: OnCroixJoin: - donpcevent "KvM01_BG::OnReadyCheck"; + donpcevent "KvM01_BG#custom::OnReadyCheck"; end; OnGuillaumeQuit: @@ -76,7 +76,7 @@ OnGuillaumeDie: set .Guillaume_Count, .Guillaume_Count - 1; set .Croix_Score, .Croix_Score + 1; bg_updatescore "bat_c01",.Guillaume_Score,.Croix_Score; - if( .Guillaume_Count < 1 ) donpcevent "KvM01_BG::OnCroixWin"; + if( .Guillaume_Count < 1 ) donpcevent "KvM01_BG#custom::OnCroixWin"; } end; @@ -88,15 +88,15 @@ OnCroixDie: set .Croix_Count, .Croix_Count - 1; set .Guillaume_Score, .Guillaume_Score + 1; bg_updatescore "bat_c01",.Guillaume_Score,.Croix_Score; - if( .Croix_Count < 1 ) donpcevent "KvM01_BG::OnGuillaumeWin"; + if( .Croix_Count < 1 ) donpcevent "KvM01_BG#custom::OnGuillaumeWin"; } end; OnReadyCheck: if( $@KvM01BG ) end; - set .@Guillaume, getwaitingroomstate(0,"KvM01R_Guillaume"); - set .@Croix, getwaitingroomstate(0,"KvM01R_Croix"); + set .@Guillaume, getwaitingroomstate(0,"KvM01R_Guillaume#custom"); + set .@Croix, getwaitingroomstate(0,"KvM01R_Croix#custom"); if( .@Guillaume < 5 || .@Croix < 5 ) { @@ -111,9 +111,9 @@ OnReadyCheck: } set $@KvM01BG, 1; // Starting - donpcevent "KvM01R_Croix::OnEnterBG"; - donpcevent "KvM01R_Guillaume::OnEnterBG"; - donpcevent "KvM01_BG::OnStart"; + donpcevent "KvM01R_Croix#custom::OnEnterBG"; + donpcevent "KvM01R_Guillaume#custom::OnEnterBG"; + donpcevent "KvM01_BG#custom::OnStart"; end; OnStart: @@ -166,7 +166,7 @@ OnTimer30000: mapannounce "bat_c01","There are not enough players to start the battle",1,0x696969; stopnpctimer; sleep 2000; - donpcevent "KvM01_BG::OnStop"; + donpcevent "KvM01_BG#custom::OnStop"; end; } @@ -187,9 +187,9 @@ OnTimer300000: OnTimer330000: if( .Croix_Count > .Guillaume_Count ) - donpcevent "KvM01_BG::OnCroixWin"; + donpcevent "KvM01_BG#custom::OnCroixWin"; else if( .Croix_Count < .Guillaume_Count ) - donpcevent "KvM01_BG::OnGuillaumeWin"; + donpcevent "KvM01_BG#custom::OnGuillaumeWin"; else { // Draw Game set $@KvM01BG, 3; @@ -198,7 +198,7 @@ OnTimer330000: stopnpctimer; sleep 2000; mapannounce "bat_c01","The time is out! This is a Tie...",1,0x696969; - donpcevent "KvM01_BG::OnStop"; + donpcevent "KvM01_BG#custom::OnStop"; } end; @@ -209,7 +209,7 @@ OnGuillaumeWin: stopnpctimer; sleep 2000; mapannounce "bat_c01","The Guillaume Army has won the Battle of Kreiger Von Midgard",1,0x0000FF; - donpcevent "KvM01_BG::OnStop"; + donpcevent "KvM01_BG#custom::OnStop"; end; OnCroixWin: @@ -219,7 +219,7 @@ OnCroixWin: stopnpctimer; sleep 2000; mapannounce "bat_c01","The Croix Army has won the Battle of Kreiger Von Midgard",1,0xFF0000; - donpcevent "KvM01_BG::OnStop"; + donpcevent "KvM01_BG#custom::OnStop"; end; OnStop: @@ -230,12 +230,12 @@ OnStop: // Warp Teams bg_warp $@KvM01BG_id1,"bat_c01",53,128; bg_warp $@KvM01BG_id2,"bat_c01",146,55; - donpcevent "KvM01_BG_Out::OnBegin"; + donpcevent "KvM01_BG_Out#custom::OnBegin"; end; OnReset: stopnpctimer; - stopnpctimer "KvM01_BG_Out"; + stopnpctimer "KvM01_BG_Out#custom"; set .Croix_Count, 0; set .Guillaume_Count, 0; set .Croix_Score, 0; @@ -254,11 +254,11 @@ OnReset: bg_updatescore "bat_c01",0,0; sleep 2000; set $@KvM01BG, 0; - donpcevent "KvM01_BG::OnReadyCheck"; // Maybe a game is ready to start + donpcevent "KvM01_BG#custom::OnReadyCheck"; // Maybe a game is ready to start end; } -- script KvM01_BG_Out FAKE_NPC,{ +- script KvM01_BG_Out#custom FAKE_NPC,{ end; OnBegin: @@ -275,7 +275,7 @@ OnTimer50000: mapannounce "bat_c01","Battle of Kreiger Von Midgard will close in 10 seconds!",1,0x696969; end; OnTimer60000: - donpcevent "KvM01_BG::OnReset"; + donpcevent "KvM01_BG#custom::OnReset"; end; } diff --git a/npc/custom/battleground/bg_kvm02.txt b/npc/custom/battleground/bg_kvm02.txt index a6cadb3af..9ffc508a6 100644 --- a/npc/custom/battleground/bg_kvm02.txt +++ b/npc/custom/battleground/bg_kvm02.txt @@ -5,27 +5,27 @@ // Registration NPC's // ********************************************************************* -bat_room,225,227,4 script Registration::KvM02R_Guillaume 4_M_KY_KNT,{ // KvM Guillaume +bat_room,225,227,4 script Registration::KvM02R_Guillaume#custom 4_M_KY_KNT,{ // KvM Guillaume end; OnInit: - waitingroom "Battle Station 5 Players",5,"KvM02_BG::OnGuillaumeJoin",1; + waitingroom "Battle Station 5 Players",5,"KvM02_BG#custom::OnGuillaumeJoin",1; end; OnEnterBG: - set $@KvM02BG_id1, waitingroom2bg("bat_c02",53,128,"KvM02_BG::OnGuillaumeQuit","KvM02_BG::OnGuillaumeDie"); + set $@KvM02BG_id1, waitingroom2bg("bat_c02",53,128,"KvM02_BG#custom::OnGuillaumeQuit","KvM02_BG#custom::OnGuillaumeDie"); end; } -bat_room,225,204,0 script Registration::KvM02R_Croix 4_M_CRU_KNT,{ // KvM Croix +bat_room,225,204,0 script Registration::KvM02R_Croix#custom 4_M_CRU_KNT,{ // KvM Croix end; OnInit: - waitingroom "Battle Station 5 Players",5,"KvM02_BG::OnCroixJoin",1; + waitingroom "Battle Station 5 Players",5,"KvM02_BG#custom::OnCroixJoin",1; end; OnEnterBG: - set $@KvM02BG_id2, waitingroom2bg("bat_c02",146,55,"KvM02_BG::OnCroixQuit","KvM02_BG::OnCroixDie"); + set $@KvM02BG_id2, waitingroom2bg("bat_c02",146,55,"KvM02_BG#custom::OnCroixQuit","KvM02_BG#custom::OnCroixDie"); end; } @@ -49,7 +49,7 @@ bat_c02,145,60,0 duplicate(#bat_c02a) #bat_c02f HIDDEN_NPC // Battleground Engine // ********************************************************************* -- script KvM02_BG FAKE_NPC,{ +- script KvM02_BG#custom FAKE_NPC,{ end; OnInit: @@ -65,7 +65,7 @@ OnInit: OnGuillaumeJoin: OnCroixJoin: - donpcevent "KvM02_BG::OnReadyCheck"; + donpcevent "KvM02_BG#custom::OnReadyCheck"; end; OnGuillaumeQuit: @@ -76,7 +76,7 @@ OnGuillaumeDie: set .Guillaume_Count, .Guillaume_Count - 1; set .Croix_Score, .Croix_Score + 1; bg_updatescore "bat_c02",.Guillaume_Score,.Croix_Score; - if( .Guillaume_Count < 1 ) donpcevent "KvM02_BG::OnCroixWin"; + if( .Guillaume_Count < 1 ) donpcevent "KvM02_BG#custom::OnCroixWin"; } end; @@ -88,15 +88,15 @@ OnCroixDie: set .Croix_Count, .Croix_Count - 1; set .Guillaume_Score, .Guillaume_Score + 1; bg_updatescore "bat_c02",.Guillaume_Score,.Croix_Score; - if( .Croix_Count < 1 ) donpcevent "KvM02_BG::OnGuillaumeWin"; + if( .Croix_Count < 1 ) donpcevent "KvM02_BG#custom::OnGuillaumeWin"; } end; OnReadyCheck: if( $@KvM02BG ) end; - set .@Guillaume, getwaitingroomstate(0,"KvM02R_Guillaume"); - set .@Croix, getwaitingroomstate(0,"KvM02R_Croix"); + set .@Guillaume, getwaitingroomstate(0,"KvM02R_Guillaume#custom"); + set .@Croix, getwaitingroomstate(0,"KvM02R_Croix#custom"); if( .@Guillaume < 5 || .@Croix < 5 ) { @@ -111,9 +111,9 @@ OnReadyCheck: } set $@KvM02BG, 1; // Starting - donpcevent "KvM02R_Croix::OnEnterBG"; - donpcevent "KvM02R_Guillaume::OnEnterBG"; - donpcevent "KvM02_BG::OnStart"; + donpcevent "KvM02R_Croix#custom::OnEnterBG"; + donpcevent "KvM02R_Guillaume#custom::OnEnterBG"; + donpcevent "KvM02_BG#custom::OnStart"; end; OnStart: @@ -166,7 +166,7 @@ OnTimer30000: mapannounce "bat_c02","There are not enough players to start the battle",1,0x808080; stopnpctimer; sleep 2000; - donpcevent "KvM02_BG::OnStop"; + donpcevent "KvM02_BG#custom::OnStop"; end; } @@ -187,9 +187,9 @@ OnTimer300000: OnTimer330000: if( .Croix_Count > .Guillaume_Count ) - donpcevent "KvM02_BG::OnCroixWin"; + donpcevent "KvM02_BG#custom::OnCroixWin"; else if( .Croix_Count < .Guillaume_Count ) - donpcevent "KvM02_BG::OnGuillaumeWin"; + donpcevent "KvM02_BG#custom::OnGuillaumeWin"; else { // Draw Game set $@KvM02BG, 3; @@ -198,7 +198,7 @@ OnTimer330000: stopnpctimer; sleep 2000; mapannounce "bat_c02","The time is out! This is a Tie...",1,0x808080; - donpcevent "KvM02_BG::OnStop"; + donpcevent "KvM02_BG#custom::OnStop"; } end; @@ -209,7 +209,7 @@ OnGuillaumeWin: stopnpctimer; sleep 2000; mapannounce "bat_c02","The Guillaume Army has won the Battle of Kreiger Von Midgard",1,0x0000FF; - donpcevent "KvM02_BG::OnStop"; + donpcevent "KvM02_BG#custom::OnStop"; end; OnCroixWin: @@ -219,7 +219,7 @@ OnCroixWin: stopnpctimer; sleep 2000; mapannounce "bat_c02","The Croix Army has won the Battle of Kreiger Von Midgard",1,0xFF0000; - donpcevent "KvM02_BG::OnStop"; + donpcevent "KvM02_BG#custom::OnStop"; end; OnStop: @@ -230,12 +230,12 @@ OnStop: // Warp Teams bg_warp $@KvM02BG_id1,"bat_c02",53,128; bg_warp $@KvM02BG_id2,"bat_c02",146,55; - donpcevent "KvM02_BG_Out::OnBegin"; + donpcevent "KvM02_BG_Out#custom::OnBegin"; end; OnReset: stopnpctimer; - stopnpctimer "KvM02_BG_Out"; + stopnpctimer "KvM02_BG_Out#custom"; set .Croix_Count, 0; set .Guillaume_Count, 0; set .Croix_Score, 0; @@ -254,11 +254,11 @@ OnReset: bg_updatescore "bat_c02",0,0; sleep 2000; set $@KvM02BG, 0; - donpcevent "KvM02_BG::OnReadyCheck"; // Maybe a game is ready to start + donpcevent "KvM02_BG#custom::OnReadyCheck"; // Maybe a game is ready to start end; } -- script KvM02_BG_Out FAKE_NPC,{ +- script KvM02_BG_Out#custom FAKE_NPC,{ end; OnBegin: @@ -275,7 +275,7 @@ OnTimer50000: mapannounce "bat_c02","Battle of Kreiger Von Midgard will close in 10 seconds!",1,0x808080; end; OnTimer60000: - donpcevent "KvM02_BG::OnReset"; + donpcevent "KvM02_BG#custom::OnReset"; end; } diff --git a/npc/custom/battleground/bg_kvm03.txt b/npc/custom/battleground/bg_kvm03.txt index 8f255c90f..14d7c03a3 100644 --- a/npc/custom/battleground/bg_kvm03.txt +++ b/npc/custom/battleground/bg_kvm03.txt @@ -5,27 +5,27 @@ // Registration NPC's // ********************************************************************* -bat_room,197,227,4 script Registration::KvM03R_Guillaume 4_M_KY_KNT,{ // KvM Guillaume +bat_room,197,227,4 script Registration::KvM03R_Guillaume#custom 4_M_KY_KNT,{ // KvM Guillaume end; OnInit: - waitingroom "Battle Station 5 Players",5,"KvM03_BG::OnGuillaumeJoin",1; + waitingroom "Battle Station 5 Players",5,"KvM03_BG#custom::OnGuillaumeJoin",1; end; OnEnterBG: - set $@KvM03BG_id1, waitingroom2bg("bat_c03",53,128,"KvM03_BG::OnGuillaumeQuit","KvM03_BG::OnGuillaumeDie"); + set $@KvM03BG_id1, waitingroom2bg("bat_c03",53,128,"KvM03_BG#custom::OnGuillaumeQuit","KvM03_BG#custom::OnGuillaumeDie"); end; } -bat_room,197,204,0 script Registration::KvM03R_Croix 4_M_CRU_KNT,{ // KvM Croix +bat_room,197,204,0 script Registration::KvM03R_Croix#custom 4_M_CRU_KNT,{ // KvM Croix end; OnInit: - waitingroom "Battle Station 5 Players",5,"KvM03_BG::OnCroixJoin",1; + waitingroom "Battle Station 5 Players",5,"KvM03_BG#custom::OnCroixJoin",1; end; OnEnterBG: - set $@KvM03BG_id2, waitingroom2bg("bat_c03",146,55,"KvM03_BG::OnCroixQuit","KvM03_BG::OnCroixDie"); + set $@KvM03BG_id2, waitingroom2bg("bat_c03",146,55,"KvM03_BG#custom::OnCroixQuit","KvM03_BG#custom::OnCroixDie"); end; } @@ -49,7 +49,7 @@ bat_c03,145,60,0 duplicate(#bat_c03a) #bat_c03f HIDDEN_NPC // Battleground Engine // ********************************************************************* -- script KvM03_BG FAKE_NPC,{ +- script KvM03_BG#custom FAKE_NPC,{ end; OnInit: @@ -65,7 +65,7 @@ OnInit: OnGuillaumeJoin: OnCroixJoin: - donpcevent "KvM03_BG::OnReadyCheck"; + donpcevent "KvM03_BG#custom::OnReadyCheck"; end; OnGuillaumeQuit: @@ -76,7 +76,7 @@ OnGuillaumeDie: set .Guillaume_Count, .Guillaume_Count - 1; set .Croix_Score, .Croix_Score + 1; bg_updatescore "bat_c03",.Guillaume_Score,.Croix_Score; - if( .Guillaume_Count < 1 ) donpcevent "KvM03_BG::OnCroixWin"; + if( .Guillaume_Count < 1 ) donpcevent "KvM03_BG#custom::OnCroixWin"; } end; @@ -88,15 +88,15 @@ OnCroixDie: set .Croix_Count, .Croix_Count - 1; set .Guillaume_Score, .Guillaume_Score + 1; bg_updatescore "bat_c03",.Guillaume_Score,.Croix_Score; - if( .Croix_Count < 1 ) donpcevent "KvM03_BG::OnGuillaumeWin"; + if( .Croix_Count < 1 ) donpcevent "KvM03_BG#custom::OnGuillaumeWin"; } end; OnReadyCheck: if( $@KvM03BG ) end; - set .@Guillaume, getwaitingroomstate(0,"KvM03R_Guillaume"); - set .@Croix, getwaitingroomstate(0,"KvM03R_Croix"); + set .@Guillaume, getwaitingroomstate(0,"KvM03R_Guillaume#custom"); + set .@Croix, getwaitingroomstate(0,"KvM03R_Croix#custom"); if( .@Guillaume < 5 || .@Croix < 5 ) { @@ -111,9 +111,9 @@ OnReadyCheck: } set $@KvM03BG, 1; // Starting - donpcevent "KvM03R_Croix::OnEnterBG"; - donpcevent "KvM03R_Guillaume::OnEnterBG"; - donpcevent "KvM03_BG::OnStart"; + donpcevent "KvM03R_Croix#custom::OnEnterBG"; + donpcevent "KvM03R_Guillaume#custom::OnEnterBG"; + donpcevent "KvM03_BG#custom::OnStart"; end; OnStart: @@ -166,7 +166,7 @@ OnTimer30000: mapannounce "bat_c03","There are not enough players to start the battle",1,0xC0C0C0; stopnpctimer; sleep 2000; - donpcevent "KvM03_BG::OnStop"; + donpcevent "KvM03_BG#custom::OnStop"; end; } @@ -187,9 +187,9 @@ OnTimer300000: OnTimer330000: if( .Croix_Count > .Guillaume_Count ) - donpcevent "KvM03_BG::OnCroixWin"; + donpcevent "KvM03_BG#custom::OnCroixWin"; else if( .Croix_Count < .Guillaume_Count ) - donpcevent "KvM03_BG::OnGuillaumeWin"; + donpcevent "KvM03_BG#custom::OnGuillaumeWin"; else { // Draw Game set $@KvM03BG, 3; @@ -198,7 +198,7 @@ OnTimer330000: stopnpctimer; sleep 2000; mapannounce "bat_c03","The time is out! This is a Tie...",1,0xC0C0C0; - donpcevent "KvM03_BG::OnStop"; + donpcevent "KvM03_BG#custom::OnStop"; } end; @@ -209,7 +209,7 @@ OnGuillaumeWin: stopnpctimer; sleep 2000; mapannounce "bat_c03","The Guillaume Army has won the Battle of Kreiger Von Midgard",1,0x0000FF; - donpcevent "KvM03_BG::OnStop"; + donpcevent "KvM03_BG#custom::OnStop"; end; OnCroixWin: @@ -219,7 +219,7 @@ OnCroixWin: stopnpctimer; sleep 2000; mapannounce "bat_c03","The Croix Army has won the Battle of Kreiger Von Midgard",1,0xFF0000; - donpcevent "KvM03_BG::OnStop"; + donpcevent "KvM03_BG#custom::OnStop"; end; OnStop: @@ -230,12 +230,12 @@ OnStop: // Warp Teams bg_warp $@KvM03BG_id1,"bat_c03",53,128; bg_warp $@KvM03BG_id2,"bat_c03",146,55; - donpcevent "KvM03_BG_Out::OnBegin"; + donpcevent "KvM03_BG_Out#custom::OnBegin"; end; OnReset: stopnpctimer; - stopnpctimer "KvM03_BG_Out"; + stopnpctimer "KvM03_BG_Out#custom"; set .Croix_Count, 0; set .Guillaume_Count, 0; set .Croix_Score, 0; @@ -254,11 +254,11 @@ OnReset: bg_updatescore "bat_c03",0,0; sleep 2000; set $@KvM03BG, 0; - donpcevent "KvM03_BG::OnReadyCheck"; // Maybe a game is ready to start + donpcevent "KvM03_BG#custom::OnReadyCheck"; // Maybe a game is ready to start end; } -- script KvM03_BG_Out FAKE_NPC,{ +- script KvM03_BG_Out#custom FAKE_NPC,{ end; OnBegin: @@ -275,7 +275,7 @@ OnTimer50000: mapannounce "bat_c03","Battle of Kreiger Von Midgard will close in 10 seconds!",1,0xC0C0C0; end; OnTimer60000: - donpcevent "KvM03_BG::OnReset"; + donpcevent "KvM03_BG#custom::OnReset"; end; } diff --git a/npc/mapflag/night.txt b/npc/mapflag/night.txt index 3e421bf13..444189412 100644 --- a/npc/mapflag/night.txt +++ b/npc/mapflag/night.txt @@ -263,8 +263,8 @@ ve_fild06 mapflag nightenabled ve_fild07 mapflag nightenabled //Episode 12 ==================== -poring_c01 mapflag nightenabled -poring_c02 mapflag nightenabled +//poring_c01 mapflag nightenabled +//poring_c02 mapflag nightenabled nameless_i mapflag nightenabled nameless_n mapflag nightenabled poring_w01 mapflag nightenabled diff --git a/npc/mapflag/nobranch.txt b/npc/mapflag/nobranch.txt index 4007c8203..7e4f3b49d 100644 --- a/npc/mapflag/nobranch.txt +++ b/npc/mapflag/nobranch.txt @@ -153,8 +153,8 @@ que_god01 mapflag nobranch que_god02 mapflag nobranch que_bingo mapflag nobranch que_hugel mapflag nobranch -poring_c01 mapflag nobranch -poring_c02 mapflag nobranch +//poring_c01 mapflag nobranch +//poring_c02 mapflag nobranch kh_mansion mapflag nobranch kh_rossi mapflag nobranch kh_school mapflag nobranch diff --git a/npc/mapflag/nomemo.txt b/npc/mapflag/nomemo.txt index 548f1563e..d4f7140fe 100644 --- a/npc/mapflag/nomemo.txt +++ b/npc/mapflag/nomemo.txt @@ -259,8 +259,8 @@ que_hugel mapflag nomemo que_rachel mapflag nomemo que_san04 mapflag nomemo que_thor mapflag nomemo -poring_c01 mapflag nomemo -poring_c02 mapflag nomemo +//poring_c01 mapflag nomemo +//poring_c02 mapflag nomemo // Dungeons ================= alde_dun01 mapflag nomemo alde_dun02 mapflag nomemo diff --git a/npc/mapflag/noteleport.txt b/npc/mapflag/noteleport.txt index 537781075..9f41e4342 100644 --- a/npc/mapflag/noteleport.txt +++ b/npc/mapflag/noteleport.txt @@ -186,8 +186,8 @@ kh_kiehl01 mapflag noteleport kh_kiehl02 mapflag noteleport que_rachel mapflag noteleport que_thor mapflag noteleport -poring_c01 mapflag noteleport -poring_c02 mapflag noteleport +//poring_c01 mapflag noteleport +//poring_c02 mapflag noteleport que_job01 mapflag noteleport que_job02 mapflag noteleport que_job03 mapflag noteleport diff --git a/npc/re/merchants/hd_refiner.txt b/npc/re/merchants/hd_refiner.txt index 43cdc2c01..7b032efff 100644 --- a/npc/re/merchants/hd_refiner.txt +++ b/npc/re/merchants/hd_refiner.txt @@ -38,7 +38,7 @@ //========================================================================= //== Blacksmith Mighty Hammer (+7~9) ======================= -- script ::MightyHammer FAKE_NPC,{ +- script ::MightyHammer#re FAKE_NPC,{ mes("[Blacksmith Mighty Hammer]"); mes("I'm a blacksmith skilled in refining weapons and armors."); mes("I can refine an item of your choice among the items you are equipped with."); @@ -171,20 +171,20 @@ mes "I am sure a person like you would never blame me for a decrease in refine level by 1. Hmm."; close; } -prt_in,59,54,3 duplicate(MightyHammer) Mighty Hammer#prt 4_M_DWARF -morocc_in,65,30,3 duplicate(MightyHammer) Mighty Hammer#morocc 4_M_DWARF -payon,148,176,3 duplicate(MightyHammer) Mighty Hammer#pay 4_M_DWARF -alberta_in,16,56,3 duplicate(MightyHammer) Mighty Hammer#alb 4_M_DWARF -yuno_in01,171,18,3 duplicate(MightyHammer) Mighty Hammer#yuno 4_M_DWARF -ein_in01,22,82,3 duplicate(MightyHammer) Mighty Hammer#ein 4_M_DWARF -lhz_in02,280,19,3 duplicate(MightyHammer) Mighty Hammer#lhz 4_M_DWARF +prt_in,59,54,3 duplicate(MightyHammer#re) Mighty Hammer#prtre 4_M_DWARF +morocc_in,65,30,3 duplicate(MightyHammer#re) Mighty Hammer#moroccre 4_M_DWARF +payon,148,176,3 duplicate(MightyHammer#re) Mighty Hammer#payre 4_M_DWARF +alberta_in,16,56,3 duplicate(MightyHammer#re) Mighty Hammer#albre 4_M_DWARF +yuno_in01,171,18,3 duplicate(MightyHammer#re) Mighty Hammer#yunore 4_M_DWARF +ein_in01,22,82,3 duplicate(MightyHammer#re) Mighty Hammer#einre 4_M_DWARF +lhz_in02,280,19,3 duplicate(MightyHammer#re) Mighty Hammer#lhzre 4_M_DWARF //- iRO NPC locations - -//moc_para01,38,185,4 duplicate(MightyHammer) Mighty Hammer#ed 4_M_DWARF -//payon,174,133,4 duplicate(MightyHammer) Mighty Hammer#im 4_M_DWARF +//moc_para01,38,185,4 duplicate(MightyHammer#re) Mighty Hammer#edre 4_M_DWARF +//payon,174,133,4 duplicate(MightyHammer#re) Mighty Hammer#imre 4_M_DWARF //== Basta (+10 and up) ==================================== -- script ::Basta FAKE_NPC,{ +- script ::Basta#re FAKE_NPC,{ disable_items; mes "[Basta]"; mes "I'm the best Blacksmith in the whole world, Basta."; @@ -327,10 +327,10 @@ lhz_in02,280,19,3 duplicate(MightyHammer) Mighty Hammer#lhz 4_M_DWARF mes "I'll do better next time! Don't worry!"; close; } -prt_in,57,54,3 duplicate(Basta) Basta#prt 4_M_DWARF -morocc_in,68,30,3 duplicate(Basta) Basta#morocc 4_M_DWARF -payon,148,174,3 duplicate(Basta) Basta#payon 4_M_DWARF -alberta_in,18,56,3 duplicate(Basta) Basta#alberta 4_M_DWARF -yuno_in01,173,18,3 duplicate(Basta) Basta#yuno 4_M_DWARF -ein_in01,24,82,3 duplicate(Basta) Basta#einbroch 4_M_DWARF -lhz_in02,280,17,3 duplicate(Basta) Basta#lighthalzen 4_M_DWARF +prt_in,57,54,3 duplicate(Basta#re) Basta#prtre 4_M_DWARF +morocc_in,68,30,3 duplicate(Basta#re) Basta#moroccre 4_M_DWARF +payon,148,174,3 duplicate(Basta#re) Basta#payonre 4_M_DWARF +alberta_in,18,56,3 duplicate(Basta#re) Basta#albertare 4_M_DWARF +yuno_in01,173,18,3 duplicate(Basta#re) Basta#yunore 4_M_DWARF +ein_in01,24,82,3 duplicate(Basta#re) Basta#einbrochre 4_M_DWARF +lhz_in02,280,17,3 duplicate(Basta#re) Basta#lighthalzenre 4_M_DWARF diff --git a/npc/scripts.conf b/npc/scripts.conf index 086370899..c5dd2b54b 100644 --- a/npc/scripts.conf +++ b/npc/scripts.conf @@ -120,7 +120,8 @@ "npc/events/god_se_festival.txt", // - Official Halloween Events (iRO) //"npc/events/halloween_2006.txt", -//"npc/events/halloween_2008.txt", +// missing map +// "npc/events/halloween_2008.txt", //"npc/events/halloween_2009.txt", // - Official idRO Idul Fitri Event //"npc/events/idul_fitri.txt", diff --git a/npc/scripts_dev.conf b/npc/scripts_dev.conf index d6d807a74..df644013d 100644 --- a/npc/scripts_dev.conf +++ b/npc/scripts_dev.conf @@ -31,4 +31,4 @@ //========================================================================= //================= Script Engine self-test =============================== -//"npc: npc/dev/test.txt", +//"npc/dev/test.txt", diff --git a/src/common/atomic.h b/src/common/atomic.h index 518d2e6ab..b9157373f 100644 --- a/src/common/atomic.h +++ b/src/common/atomic.h @@ -103,8 +103,9 @@ forceinline volatile int64 InterlockedExchange64(volatile int64 *target, int64 v // The __sync functions are available on x86 or ARMv6+ #if !defined(__x86_64__) && !defined(__i386__) \ + && !defined(__ppc64__) && ! defined(__powerpc64__) \ && ( !defined(__ARM_ARCH_VERSION__) || __ARM_ARCH_VERSION__ < 6 ) -#error Your Target Platfrom is not supported +#error Target platform currently not supported #endif static forceinline int64 InterlockedExchangeAdd64(volatile int64 *addend, int64 increment){ diff --git a/src/common/cbasetypes.h b/src/common/cbasetypes.h index 31d89d66b..06333a7b2 100644 --- a/src/common/cbasetypes.h +++ b/src/common/cbasetypes.h @@ -62,16 +62,24 @@ #endif // Standardize the ARM platform version, if available (the only values we're interested in right now are >= ARMv6) +#ifdef __ARM_ARCH +#define __ARM_ARCH_VERSION__ __ARM_ARCH +#else #if defined(__ARMV6__) || defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) \ || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) || defined(__ARM_ARCH_6T2__) // gcc ARMv6 #define __ARM_ARCH_VERSION__ 6 -#elif defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7S__) // gcc ARMv7 +#elif defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7S__) // gcc ARMv7 #define __ARM_ARCH_VERSION__ 7 +#elif defined(__ARM_ARCH_8__) || defined(__ARM_ARCH_8A__) +#define __ARM_ARCH_VERSION__ 8 #elif defined(_M_ARM) // MSVC #define __ARM_ARCH_VERSION__ _M_ARM +#elif defined(__TARGET_ARCH_ARM) // RVCT +#define __ARM_ARCH_VERSION__ __TARGET_ARCH_ARM #else #define __ARM_ARCH_VERSION__ 0 #endif +#endif // Necessary for __NetBSD_Version__ (defined as VVRR00PP00) on NetBSD #ifdef __NETBSD__ diff --git a/src/common/hercules.h b/src/common/hercules.h index 89ea761b4..e62656494 100644 --- a/src/common/hercules.h +++ b/src/common/hercules.h @@ -23,11 +23,15 @@ #include "config/core.h" #include "common/cbasetypes.h" +#ifdef HERCULES_CORE +#define HPExport static +#else // HERCULES_CORE #ifdef WIN32 - #define HPExport __declspec(dllexport) -#else - #define HPExport __attribute__((visibility("default"))) -#endif +#define HPExport __declspec(dllexport) +#else // WIN32 +#define HPExport __attribute__((visibility("default"))) +#endif // WIN32 +#endif // HERCULES_CORE #define HPShared extern diff --git a/src/map/battle.c b/src/map/battle.c index bea1c7ab2..ea00f938f 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -7688,6 +7688,8 @@ static void do_init_battle(bool minimal) static void do_final_battle(void) { + if (map->minimal) + return; ers_destroy(battle->delay_damage_ers); } diff --git a/src/map/map.c b/src/map/map.c index 24d571498..3312680da 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -6691,6 +6691,8 @@ int do_init(int argc, char *argv[]) atcommand->msg_read(map->MSG_CONF_NAME, false); map->inter_config_read(map->INTER_CONF_NAME, false); logs->config_read(map->LOG_CONF_NAME, false); + } else { + battle->config_read(map->BATTLE_CONF_FILENAME, false); } script->config_read(map->SCRIPT_CONF_NAME, false); @@ -6741,8 +6743,8 @@ int do_init(int argc, char *argv[]) timer->add_func_list(map->removemobs_timer, "map_removemobs_timer"); timer->add_interval(timer->gettick()+1000, map->freeblock_timer, 0, 0, 60*1000); - HPM->event(HPET_INIT); } + HPM->event(HPET_INIT); atcommand->init(minimal); battle->init(minimal); @@ -6789,8 +6791,12 @@ int do_init(int argc, char *argv[]) exit(EXIT_SUCCESS); } - if( minimal ) { + if (minimal) { HPM->event(HPET_READY); + HPM->event(HPET_FINAL); + battle->final(); + HPM_map_do_final(); + HPM->event(HPET_POST_FINAL); exit(EXIT_SUCCESS); } diff --git a/src/plugins/Makefile.in b/src/plugins/Makefile.in index e44412bfa..073cd8d41 100644 --- a/src/plugins/Makefile.in +++ b/src/plugins/Makefile.in @@ -43,7 +43,7 @@ HPMHOOKING = $(addprefix HPMHooking_, login char map) ALLPLUGINS = $(filter-out HPMHooking, $(basename $(wildcard *.c))) $(HPMHOOKING) # Plugins that will be built through 'make plugins' or 'make all' -PLUGINS = sample db2sql HPMHooking_char HPMHooking_login HPMHooking_map $(MYPLUGINS) +PLUGINS = sample db2sql constdb2doc generate-translations mapcache script_mapquit HPMHooking_char HPMHooking_login HPMHooking_map $(MYPLUGINS) COMMON_D = ../common # Includes private headers (plugins might need them) diff --git a/src/plugins/mapcache.c b/src/plugins/mapcache.c index 3dc6e3b34..2b8e4c6f8 100644 --- a/src/plugins/mapcache.c +++ b/src/plugins/mapcache.c @@ -402,7 +402,6 @@ bool fix_md5_truncation_sub(FILE *fp, const char *map_name) fseek(fp, 0, SEEK_SET); fwrite(&mheader, sizeof(mheader), 1, fp); - fclose(fp); return true; } diff --git a/tools/ci/travis.sh b/tools/ci/travis.sh index 10c653925..a1a3c7700 100755 --- a/tools/ci/travis.sh +++ b/tools/ci/travis.sh @@ -37,6 +37,8 @@ function usage { echo " $0 build [configure args]" echo " $0 test <dbname> [dbuser] [dbpassword] [dbhost]" echo " $0 getplugins" + echo " $0 startmysql" + echo " $0 extratest" exit 1 } @@ -71,7 +73,8 @@ function run_server { function run_test { echo "Running: test_$1" sysctl -w kernel.core_pattern=core || true - ./test_$1 2>runlog.txt + rm -rf core* || true + CRASH_PLEASE=1 ./test_$1 2>runlog.txt export errcode=$? export teststr=$(head -c 10000 runlog.txt) if [[ -n "${teststr}" ]]; then @@ -83,6 +86,13 @@ function run_test { fi if [ ${errcode} -ne 0 ]; then echo "test $1 terminated with exit code ${errcode}" + echo cat runlog.txt + cat runlog.txt + echo crash dump + COREFILE=$(find . -maxdepth 1 -name "core*" | head -n 1) + if [[ -f "$COREFILE" ]]; then + gdb -c "$COREFILE" $1 -ex "thread apply all bt" -ex "set pagination 0" -batch + fi aborterror "Test failed" fi } @@ -146,7 +156,14 @@ case "$MODE" in ;; adduser) echo "Adding user $NEWUSER as $DBUSER, with access to database $DBNAME..." - mysql $DBUSER_ARG $DBPASS_ARG $DBHOST_ARG --execute="GRANT SELECT,INSERT,UPDATE,DELETE ON $DBNAME.* TO '$NEWUSER'@'$DBHOST' IDENTIFIED BY '$NEWPASS';" + mysql $DBUSER_ARG $DBPASS_ARG $DBHOST_ARG --execute="GRANT SELECT,INSERT,UPDATE,DELETE ON $DBNAME.* TO '$NEWUSER'@'$DBHOST' IDENTIFIED BY '$NEWPASS';" || true + mysql $DBUSER_ARG $DBPASS_ARG $DBHOST_ARG --execute="CREATE USER '$NEWUSER'@'$DBHOST' IDENTIFIED BY '$NEWPASS';" || true + mysql $DBUSER_ARG $DBPASS_ARG $DBHOST_ARG --execute="GRANT SELECT,INSERT,UPDATE,DELETE ON $DBNAME.* TO '$NEWUSER'@'$DBHOST';" || true + mysql $DBUSER_ARG $DBPASS_ARG $DBHOST_ARG --execute="ALTER USER '$NEWUSER'@'$DBHOST' IDENTIFIED BY '$NEWPASS';" || true + mysql --defaults-file=/etc/mysql/debian.cnf $DBPASS_ARG $DBHOST_ARG --execute="CREATE USER '$NEWUSER'@'$DBHOST' IDENTIFIED BY '$NEWPASS';" || true + mysql --defaults-file=/etc/mysql/debian.cnf $DBPASS_ARG $DBHOST_ARG --execute="GRANT SELECT,INSERT,UPDATE,DELETE ON $DBNAME.* TO '$NEWUSER'@'$DBHOST';" || true + mysql --defaults-file=/etc/mysql/debian.cnf $DBPASS_ARG $DBHOST_ARG --execute="ALTER USER '$NEWUSER'@'$DBHOST' IDENTIFIED BY '$NEWPASS';" || true + ;; build) (cd tools && ./validateinterfaces.py silent) || aborterror "Interface validation error." @@ -207,13 +224,13 @@ EOF [ $? -eq 0 ] || aborterror "Unable to override inter-server configuration, aborting tests." ARGS="--load-script npc/dev/test.txt " ARGS="--load-plugin script_mapquit $ARGS --load-script npc/dev/ci_test.txt" - PLUGINS="--load-plugin HPMHooking --load-plugin sample" + PLUGINS="--load-plugin HPMHooking" echo "run tests" if [[ $DBUSER == "travis" ]]; then echo "Disable leak dection on travis" - export ASAN_OPTIONS=detect_leaks=0:detect_stack_use_after_return=true:strict_init_order=true + export ASAN_OPTIONS=detect_leaks=0:detect_stack_use_after_return=true:strict_init_order=true:detect_odr_violation=0 else - export ASAN_OPTIONS=detect_stack_use_after_return=true:strict_init_order=true + export ASAN_OPTIONS=detect_stack_use_after_return=true:strict_init_order=true:detect_odr_violation=0 fi # run_test spinlock # Not running the spinlock test for the time being (too time consuming) run_test libconfig @@ -221,7 +238,38 @@ EOF run_server ./login-server run_server ./char-server run_server ./map-server "$ARGS" - echo "run all servers wit HPM" + echo "run all servers with HPM" + run_server ./login-server "$PLUGINS" + run_server ./char-server "$PLUGINS" + run_server ./map-server "$ARGS $PLUGINS" + echo "run all servers with sample plugin" + run_server ./login-server "$PLUGINS --load-plugin sample" + run_server ./char-server "$PLUGINS --load-plugin sample" + run_server ./map-server "$PLUGINS --load-plugin sample" + echo "run all servers with constdb2doc" + run_server ./map-server "$PLUGINS --load-plugin constdb2doc --constdb2doc" + echo "run all servers with db2sql" + run_server ./map-server "$PLUGINS --load-plugin db2sql --db2sql" + run_server ./map-server "$PLUGINS --load-plugin db2sql --itemdb2sql" + run_server ./map-server "$PLUGINS --load-plugin db2sql --mobdb2sql" +# look like works on windows only +# echo "run all servers with dbghelpplug" +# run_server ./login-server "$PLUGINS --load-plugin dbghelpplug" +# run_server ./char-server "$PLUGINS --load-plugin dbghelpplug" +# run_server ./map-server "$PLUGINS --load-plugin dbghelpplug" + echo "run all servers with generate-translations" + run_server ./map-server "$PLUGINS --load-plugin generate-translations --generate-translations" + echo "run all servers with mapcache" +# for other flags need grf or other files + run_server ./map-server "$PLUGINS --load-plugin mapcache --fix-md5" + echo "run all servers with script_mapquit" + run_server ./map-server "$PLUGINS --load-plugin script_mapquit" + ;; + extratest) + export ASAN_OPTIONS=detect_stack_use_after_return=true:strict_init_order=true:detect_odr_violation=0 + PLUGINS="--load-plugin HPMHooking" + echo "run map server with uncommented old and custom scripts" + find ./npc -type f -name "*.conf" -exec ./tools/ci/uncomment.sh {} \; run_server ./login-server "$PLUGINS" run_server ./char-server "$PLUGINS" run_server ./map-server "$ARGS $PLUGINS" @@ -238,6 +286,13 @@ EOF # echo "Plugin not found, skipping advanced tests." #fi ;; + startmysql) + echo "Starting mysql..." + service mysql status || true + service mysql stop || true + service mysql start || true + service mysql status || true + ;; *) usage ;; diff --git a/tools/ci/uncomment.sh b/tools/ci/uncomment.sh new file mode 100755 index 000000000..22fe4e966 --- /dev/null +++ b/tools/ci/uncomment.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +sed -i "s|//\"npc/|\"npc/|g" $1 +sed -i "s|\"npc/location/to/script.txt\"|//\"npc/location/to/script.txt\"|g" $1 diff --git a/tools/validateinterfaces.py b/tools/validateinterfaces.py index e031c34ab..324a2aeec 100755 --- a/tools/validateinterfaces.py +++ b/tools/validateinterfaces.py @@ -23,7 +23,6 @@ import os import re import sys -from sets import Set interfaceRe = re.compile("struct (?P<name1>[a-z_]+)_interface (?P<name2>[a-z_]+)_s;") @@ -44,7 +43,7 @@ def searchStructStart(r, ifname): return False def readCFile(tracker, cFile): - methods = Set() + methods = set() shortIfName = "" with open(cFile, "r") as r: for line in r: @@ -78,7 +77,7 @@ def readCFile(tracker, cFile): return (None, shortIfName, methods) def readHFile(tracker, hFile, ifname): - methods = Set() + methods = set() with open(hFile, "r") as r: if searchStructStart(r, ifname) == False: return methods @@ -108,7 +107,7 @@ def checkIfFile(tracker, cFile, hFile): tracker.arr[ifname + "_" + method] = list() tracker.methods.add(ifname + "_" + method) if method not in cMethods: - print "Missing initialisation in file {0}: {1}".format(cFile, method) + print("Missing initialisation in file {0}: {1}".format(cFile, method)) tracker.retCode = 1 # for method in cMethods: # if method not in hMethods: @@ -175,13 +174,13 @@ def processDir(tracker, srcDir): checkFile(tracker, cPath) def reportMethods(tracker): - print "\n" + print("\n") for method in tracker.methods: if len(tracker.arr[method]) > 2: - print method + print(method) for t in tracker.arr[method]: - print t - print "\n" + print(t) + print("\n") def checkLostFile(tracker, cFile): @@ -198,7 +197,7 @@ def checkLostFile(tracker, cFile): continue if name not in tracker.fullmethods: # print "src : " + line - print name + print(name) def processLostDir(tracker, srcDir): files = os.listdir(srcDir) @@ -232,9 +231,9 @@ def runLong(): tracker = Tracker() tracker.arr = dict() -tracker.methods = Set() -tracker.fullmethods = Set() -tracker.interfaces = Set() +tracker.methods = set() +tracker.fullmethods = set() +tracker.interfaces = set() tracker.retCode = 0 if len(sys.argv) > 1: @@ -245,19 +244,19 @@ else: if cmd == "silent": runIf() elif cmd == "init": - print "Checking interfaces initialisation" + print("Checking interfaces initialisation") runIf() elif cmd == "lost": - print "Checking not added functions to interfaces" + print("Checking not added functions to interfaces") runLost(); elif cmd == "long": - print "Checking interfaces usage" + print("Checking interfaces usage") runLong(); else: - print "Checking interfaces initialisation" + print("Checking interfaces initialisation") runIf() - print "Checking not added functions to interfaces" + print("Checking not added functions to interfaces") runLost(); - print "Checking interfaces usage" + print("Checking interfaces usage") runLong(); exit(tracker.retCode) |