Browse Source

Merge branch 'master' into db/itemdb

Jittapan Pluemsumran 9 years ago
parent
commit
440921fba0
56 changed files with 396 additions and 273 deletions
  1. 1 0
      .gitignore
  2. 1 1
      README.md
  3. 122 0
      appveyor.yml
  4. 0 6
      db/const.txt
  5. 1 1
      db/import-tmpl/mob_race2_db.txt
  6. 10 10
      db/pre-re/mob_race2_db.txt
  7. 1 1
      db/pre-re/skill_db.txt
  8. 1 1
      db/re/item_db.txt
  9. 15 11
      db/re/mob_race2_db.txt
  10. 1 1
      db/re/skill_db.txt
  11. 14 14
      doc/script_commands.txt
  12. 0 4
      npc/custom/battleground/unofficial/bg_common.txt
  13. 0 1
      npc/events/MemorialDay_2008.txt
  14. 0 18
      npc/events/christmas_2005.txt
  15. 0 1
      npc/events/halloween_2006.txt
  16. 0 5
      npc/pre-re/jobs/novice/novice.txt
  17. 0 3
      npc/quests/juice_maker.txt
  18. 0 1
      npc/quests/obb_quest.txt
  19. 0 7
      npc/quests/quests_alberta.txt
  20. 0 1
      npc/quests/quests_amatsu.txt
  21. 30 22
      npc/quests/quests_ein.txt
  22. 0 1
      npc/quests/quests_hugel.txt
  23. 0 1
      npc/quests/quests_louyang.txt
  24. 0 1
      npc/quests/seals/brisingamen_seal.txt
  25. 0 1
      npc/quests/skills/hunter_skills.txt
  26. 0 1
      npc/re/cities/brasilis.txt
  27. 0 1
      npc/re/jobs/3-2/minstrel.txt
  28. 0 2
      npc/re/jobs/3-2/shadow_chaser.txt
  29. 0 14
      npc/re/jobs/novice/academy.txt
  30. 4 2
      npc/re/quests/eden/11-25.txt
  31. 4 2
      npc/re/quests/eden/26-40.txt
  32. 4 2
      npc/re/quests/eden/41-55.txt
  33. 4 2
      npc/re/quests/eden/56-70.txt
  34. 4 2
      npc/re/quests/eden/71-85.txt
  35. 4 2
      npc/re/quests/eden/86-90.txt
  36. 4 2
      npc/re/quests/eden/91-99.txt
  37. 5 3
      npc/re/quests/eden/eden_100_111.txt
  38. 4 2
      npc/re/quests/eden/eden_111_120.txt
  39. 5 3
      npc/re/quests/eden/eden_121_130.txt
  40. 4 2
      npc/re/quests/eden/eden_131_140.txt
  41. 31 5
      npc/re/quests/eden/eden_common.txt
  42. 14 12
      npc/re/quests/eden/eden_quests.txt
  43. 4 2
      npc/re/quests/eden/eden_service.txt
  44. 0 8
      npc/re/quests/quests_brasilis.txt
  45. 1 1
      sql-files/item_db_re.sql
  46. 1 1
      src/map/atcommand.c
  47. 13 35
      src/map/battle.c
  48. 2 0
      src/map/map.h
  49. 6 5
      src/map/mob.c
  50. 5 16
      src/map/mob.h
  51. 27 24
      src/map/party.c
  52. 1 1
      src/map/party.h
  53. 30 5
      src/map/pc.c
  54. 10 0
      src/map/script_constants.h
  55. 7 3
      src/map/status.c
  56. 1 0
      src/map/status.h

+ 1 - 0
.gitignore

@@ -101,6 +101,7 @@ Thumbs.db
 # /vcproj-14/
 .vs
 *.VC.db
+*.VC.opendb
 /vcproj-14/char-server
 /vcproj-14/login-server
 /vcproj-14/mapcache

+ 1 - 1
README.md

@@ -1,7 +1,7 @@
 rAthena
 =======
 
-Build Status: [![Build Status](https://travis-ci.org/rathena/rathena.png?branch=master)](https://travis-ci.org/rathena/rathena)
+Build Status: [![Build Status](https://travis-ci.org/rathena/rathena.png?branch=master)](https://travis-ci.org/rathena/rathena) [![Build status](https://ci.appveyor.com/api/projects/status/8574b8nlwd57loda/branch/master?svg=true)](https://ci.appveyor.com/project/rAthenaAPI/rathena/branch/master)
 
 Table of Contents
 ---------

+ 122 - 0
appveyor.yml

@@ -0,0 +1,122 @@
+image: Visual Studio 2015
+# This is the default location, but we put it here for safety reasons, since we use it in our test script
+clone_folder: c:\projects\rathena
+# We do not need the git history for our integration tests
+clone_depth: 1
+version: '{branch}-{build}'
+pull_requests:
+  do_not_increment_build_number: true
+environment:
+  matrix:
+  - VisualStudioVersion: 10.0
+    Solution: rAthena-10.sln
+  - VisualStudioVersion: 11.0
+    Solution: rAthena-12.sln
+  - VisualStudioVersion: 12.0
+    Solution: rAthena-13.sln
+  - VisualStudioVersion: 14.0
+    Solution: rAthena-14.sln
+  - VisualStudioVersion: 10.0
+    Solution: rAthena-10.sln
+    Defines: PRERE
+  - VisualStudioVersion: 11.0
+    Solution: rAthena-12.sln
+    Defines: PRERE
+  - VisualStudioVersion: 12.0
+    Solution: rAthena-13.sln
+    Defines: PRERE
+  - VisualStudioVersion: 14.0
+    Solution: rAthena-14.sln
+    Defines: PRERE
+platform:
+  - Win32
+configuration:
+  - Debug
+# Disable Release for now, since do not want to have any optimization and have access to debug infos on crash
+#  - Release
+matrix:
+  fast_finish: true
+build_script:
+- cmd: msbuild %Solution% /p:DefineConstants=%Defines%
+services: mysql
+test_script:
+- cmd: >-
+    rem Set up the environment variables we need
+    
+    set DB_HOST=127.0.0.1
+    
+    set DB_ROOT=root
+    
+    set DB_ROOTPW=Password12!
+    
+    set DB_USER=ragnarok
+    
+    set DB_USERPW=ragnarok
+    
+    set DB_NAME=ragnarok
+    
+    set MYSQL="C:\Program Files\MySql\MySQL Server 5.7\bin\mysql.exe"
+    
+    rem Setting creation
+    
+    cd C:\projects\rathena
+    
+    echo map_server_ip: %DB_HOST%>> conf\import\inter_conf.txt
+    
+    echo map_server_id: %DB_USER%>> conf\import\inter_conf.txt
+    
+    echo map_server_pw: %DB_PASS%>> conf\import\inter_conf.txt
+    
+    echo map_server_db: %DB_NAME%>> conf\import\inter_conf.txt
+    
+    echo log_db_ip: %DB_HOST%>> conf\import\inter_conf.txt
+    
+    echo log_db_id: %DB_USER%>> conf\import\inter_conf.txt
+    
+    echo log_db_pw: %DB_USERPW%>> conf\import\inter_conf.txt
+    
+    echo log_db_db: %DB_NAME%>> conf\import\inter_conf.txt
+    
+    rem MySQL database setup
+    
+    %MYSQL% -u %DB_ROOT% -p%DB_ROOTPW% -e "CREATE DATABASE %DB_NAME%;"
+    
+    %MYSQL% -u %DB_ROOT% -p%DB_ROOTPW% %DB_NAME% -e "source sql-files\main.sql"
+    
+    %MYSQL% -u %DB_ROOT% -p%DB_ROOTPW% %DB_NAME% -e "source sql-files\logs.sql"
+    
+    %MYSQL% -u %DB_ROOT% -p%DB_ROOTPW% %DB_NAME% -e "source sql-files\item_cash_db.sql"
+    
+    %MYSQL% -u %DB_ROOT% -p%DB_ROOTPW% %DB_NAME% -e "source sql-files\item_cash_db2.sql"
+    
+    %MYSQL% -u %DB_ROOT% -p%DB_ROOTPW% %DB_NAME% -e "source sql-files\item_db.sql"
+    
+    %MYSQL% -u %DB_ROOT% -p%DB_ROOTPW% %DB_NAME% -e "source sql-files\item_db2.sql"
+    
+    %MYSQL% -u %DB_ROOT% -p%DB_ROOTPW% %DB_NAME% -e "source sql-files\item_db_re.sql"
+    
+    %MYSQL% -u %DB_ROOT% -p%DB_ROOTPW% %DB_NAME% -e "source sql-files\item_db2_re.sql"
+    
+    %MYSQL% -u %DB_ROOT% -p%DB_ROOTPW% %DB_NAME% -e "source sql-files\mob_db.sql"
+    
+    %MYSQL% -u %DB_ROOT% -p%DB_ROOTPW% %DB_NAME% -e "source sql-files\mob_db2.sql"
+    
+    %MYSQL% -u %DB_ROOT% -p%DB_ROOTPW% %DB_NAME% -e "source sql-files\mob_db_re.sql"
+    
+    %MYSQL% -u %DB_ROOT% -p%DB_ROOTPW% %DB_NAME% -e "source sql-files\mob_db2_re.sql"
+    
+    %MYSQL% -u %DB_ROOT% -p%DB_ROOTPW% %DB_NAME% -e "source sql-files\mob_skill_db.sql"
+    
+    %MYSQL% -u %DB_ROOT% -p%DB_ROOTPW% %DB_NAME% -e "source sql-files\mob_skill_db2.sql"
+    
+    %MYSQL% -u %DB_ROOT% -p%DB_ROOTPW% %DB_NAME% -e "source sql-files\mob_skill_db_re.sql"
+    
+    %MYSQL% -u %DB_ROOT% -p%DB_ROOTPW% %DB_NAME% -e "source sql-files\mob_skill_db2_re.sql"
+    
+    %MYSQL% -u %DB_ROOT% -p%DB_ROOTPW% %DB_NAME% -e "source sql-files\roulette_default_data.sql"
+    
+    %MYSQL% -u %DB_ROOT% -p%DB_ROOTPW% -e "GRANT ALL ON *.* TO '%DB_USER%'@'%DB_HOST%' IDENTIFIED BY '%DB_USERPW%';"
+    
+    rem Start the map server
+    
+    map-server.exe --run-once

+ 0 - 6
db/const.txt

@@ -2455,9 +2455,3 @@ THANATOS_KEEP	10009
 4_F_REBELLION2	10201
 4_F_REBELLION3	10202
 4_M_ILYA	10203
-
-MOBG_Branch_Of_Dead_Tree	0
-MOBG_Poring_Box	1
-MOBG_Bloody_Dead_Branch	2
-MOBG_Red_Pouch_Of_Surprise	3
-MOBG_ClassChange	4

+ 1 - 1
db/import-tmpl/mob_race2_db.txt

@@ -1,5 +1,5 @@
 // Monster Racial Groups Database
 //
 // Structure of Database:
-// Race2ID,MobID1,MobID2,MobID3,...,MobID9
+// Race2ID,MobID1,MobID2,MobID3,...,MobID100
 

+ 10 - 10
db/pre-re/mob_race2_db.txt

@@ -1,23 +1,23 @@
 // Monster Racial Groups Database
 //
 // Structure of Database:
-// Race2ID,MobID1,MobID2,MobID3,...,MobID50
+// Race2ID,MobID1,MobID2,MobID3,...,MobID100
 
 // Goblins
-1,1122,1123,1124,1125,1126,1258,1299
+RC2_GOBLIN,1122,1123,1124,1125,1126,1258,1299
 // Kobolds
-2,1133,1134,1135,1282,1296
+RC2_KOBOLD,1133,1134,1135,1282,1296
 // Orcs
-3,1023,1152,1153,1189,1213,1273
+RC2_ORC,1023,1152,1153,1189,1213,1273
 // Golems
-4,1040,1278,1366,1497,2024
+RC2_GOLEM,1040,1278,1366,1497,2024
 // Guardians
-5,1285,1286,1287,2081
+RC2_GUARDIAN,1285,1286,1287,2081
 // Ninja Classes (Pirate's_Pride)
-6,1315,1364,1401,1560
+RC2_NINJA,1315,1364,1401,1560
 // GvG
-7,1143,1905,1906,1907
+RC2_GVG,1143,1905,1906,1907
 // Battlefield
-8,1906,1909,1914,1915
+RC2_BATTLEFIELD,1906,1909,1914,1915
 // Treasure Chests
-9,1324,1325,1326,1327,1328,1329,1330,1331,1332,1333,1334,1335,1336,1337,1338,1339,1340,1341,1342,1343,1344,1345,1346,1347,1348,1349,1350,1351,1352,1353,1354,1355,1356,1357,1358,1359,1360,1361,1362,1363,1938,1939,1940,1941,1942,1943,1944,1945,1946
+RC2_TREASURE,1324,1325,1326,1327,1328,1329,1330,1331,1332,1333,1334,1335,1336,1337,1338,1339,1340,1341,1342,1343,1344,1345,1346,1347,1348,1349,1350,1351,1352,1353,1354,1355,1356,1357,1358,1359,1360,1361,1362,1363,1938,1939,1940,1941,1942,1943,1944,1945,1946

+ 1 - 1
db/pre-re/skill_db.txt

@@ -876,7 +876,7 @@
 1006,0,6,4,3,0,1,1,1,yes,0,0x40001,0,magic,3,0x0,	WZ_SIGHTBLASTER,Sight Blaster
 1007,0,6,4,0,0x1,0,1,0,no,0,0x1,0,none,0,0x0,	SA_CREATECON,Create Elemental Converter
 1008,9,6,1,1,0x1,0,1,1,yes,0,0x1,0,magic,0,0x0,	SA_ELEMENTWATER,Elemental Change Water
-1009,-9,6,1,0,0,0,1,1,no,0,0x1,0,weapon,3,0x0,	HT_PHANTASMIC,Phantasmic Arrow
+1009,-9,6,1,-1,0,0,1,1,no,0,0x1,0,weapon,3,0x0,	HT_PHANTASMIC,Phantasmic Arrow
 1010,9,6,1,0,0x1,0,1,0,no,0,0x1,0,misc,0,0x0,	BA_PANGVOICE,Pang Voice
 1011,9,6,1,0,0x1,0,1,0,no,0,0x1,0,misc,0,0x0,	DC_WINKCHARM,Wink of Charm
 1012,0,0,0,0,0,0,1,0,no,0,0x1,0,weapon,0,0x4000,	BS_UNFAIRLYTRICK,Unfair Trick

+ 1 - 1
db/re/item_db.txt

@@ -1375,7 +1375,7 @@
 2187,Shield_of_Gray,Shield of Gray,4,10,,2000,,75,,1,0xFFFFFFFF,56,2,32,,120,1,3,{ .@r = getrefine(); bonus2 bSubEle,Ele_Holy,30+.@r; bonus bMdef,9+.@r/3; },{},{}
 2188,Svalinn,Svalinn,4,10,,500,,80,,1,0xFFFFFFFF,63,2,32,,65,1,3,{ .@r = getrefine(); bonus bMaxHP,9+.@r/3; bonus2 bAddEle,Ele_Water,4+.@r/3*5; },{},{}
 2189,Mad_Bunny,Mad Bunny Shield,4,10,,100,,40,,1,0xFFFFFFFF,63,2,32,,30,1,6,{ bonus2 bSubEle,Ele_All,5; bonus bMdef,6; bonus bDex,1; },{},{}
-2190,Ancient_Shield_Of_Aeon,Ancient Shield Of Aeon,4,0,,200,,5,,1,0x000FDF80,63,2,32,,130,1,2,{ bonus2 bSubEle,Ele_Neutral,10; bonus2 bSubEle,Ele_Fire,10; bonus2 bSubEle,Ele_Water,10; bonus2 bSubEle,Ele_Wind,10; bonus2 bSubEle,Ele_Earth,10; bonus2 bSubEle,Ele_Dark,10; bonus2 bSubEle,Ele_Holy,10; bonus2 bSubEle,Ele_Ghost,10; bonus bMaxHP,500; bonus bMaxSP,50; if(getrefine()>=14) skill "MG_STONECURSE",5; },{},{}
+2190,Ancient_Shield_Of_Aeon,Ancient Shield Of Aeon,4,0,,200,,5,,0,0x000FDF80,63,2,32,,130,1,2,{ bonus2 bSubEle,Ele_Neutral,10; bonus2 bSubEle,Ele_Fire,10; bonus2 bSubEle,Ele_Water,10; bonus2 bSubEle,Ele_Wind,10; bonus2 bSubEle,Ele_Earth,10; bonus2 bSubEle,Ele_Dark,10; bonus2 bSubEle,Ele_Holy,10; bonus2 bSubEle,Ele_Ghost,10; bonus bMaxHP,500; bonus bMaxSP,50; if(getrefine()>=14) skill "MG_STONECURSE",5; },{},{}
 2196,White_Gold_Shield,White Gold Shield,4,0,,1800,,140,,1,0xFFFFFFFF,63,2,32,,,1,,{ autobonus2 "{ bonus bMagicDamageReturn,20; }",100,2000,BF_MAGIC; /* Confirm: Success rate? */ },{},{}
 2198,Lapine_Shield,Lapine Shield,4,0,,1000,,25,,1,0xFFFFFFFF,63,2,32,,100,1,,{ bonus bMdef,10; if (getrefine() > 7) { bonus bMatk,20; } },{},{}
 // GM Shield

+ 15 - 11
db/re/mob_race2_db.txt

@@ -1,26 +1,30 @@
 // Monster Racial Groups Database
 //
 // Structure of Database:
-// Race2ID,MobID1,MobID2,MobID3,...,MobID50
+// Race2ID,MobID1,MobID2,MobID3,...,MobID100
 
 // Goblins
-1,1122,1123,1124,1125,1126,1258,1299
+RC2_GOBLIN,1122,1123,1124,1125,1126,1258,1299
 // Kobolds
-2,1133,1134,1135,1282,1296
+RC2_KOBOLD,1133,1134,1135,1282,1296
 // Orcs
-3,1023,1152,1153,1189,1213,1273
+RC2_ORC,1023,1152,1153,1189,1213,1273
 // Golems
-4,1040,1278,1366,1497,2024
+RC2_GOLEM,1040,1278,1366,1497,2024
 // Guardians
-5,1285,1286,1287,2081
+RC2_GUARDIAN,1285,1286,1287,2081
 // Ninja Classes (Pirate's_Pride)
-6,1315,1364,1401,1560
+RC2_NINJA,1315,1364,1401,1560
 // GvG
-7,1143,1905,1906,1907
+RC2_GVG,1143,1905,1906,1907
 // Battlefield
-8,1906,1909,1914,1915
+RC2_BATTLEFIELD,1906,1909,1914,1915
 // Treasure Chests
-9,1324,1325,1326,1327,1328,1329,1330,1331,1332,1333,1334,1335,1336,1337,1338,1339,1340,1341,1342,1343,1344,1345,1346,1347,1348,1349,1350,1351,1352,1353,1354,1355,1356,1357,1358,1359,1360,1361,1362,1363,1938,1939,1940,1941,1942,1943,1944,1945,1946
+RC2_TREASURE,1324,1325,1326,1327,1328,1329,1330,1331,1332,1333,1334,1335,1336,1337,1338,1339,1340,1341,1342,1343,1344,1345,1346,1347,1348,1349,1350,1351,1352,1353,1354,1355,1356,1357,1358,1359,1360,1361,1362,1363,1938,1939,1940,1941,1942,1943,1944,1945,1946
 // Bio Labs
 // TODO : Monsters in lhz_dun_n not implemented yet. [secretdataz]
-10,1634,1635,1636,1637,1638,1639,1640,1641,1642,1643,1644,1645,1646,1647,1648,1649,1650,1651,1652,1653,1654,1655,1656,1657,1658,1659,1660,1661,1662,1663,2221,2222,2223,2224,2225,2226,2227,2228,2229,2230,2231,2232,2233,2234,2235,2236,2237,2238,2239,2240,2241
+RC2_BIOLAB,1634,1635,1636,1637,1638,1639,1640,1641,1642,1643,1644,1645,1646,1647,1648,1649,1650,1651,1652,1653,1654,1655,1656,1657,1658,1659,1660,1661,1662,1663,2221,2222,2223,2224,2225,2226,2227,2228,2229,2230,2231,2232,2233,2234,2235,2236,2237,2238,2239,2240,2241
+// Manuk
+RC2_MANUK,1986,1987,1988,1989,1990,1997,1998,1999
+// Splendide
+RC2_SPLENDIDE,1991,1992,1993,1994,1995

+ 1 - 1
db/re/skill_db.txt

@@ -876,7 +876,7 @@
 1006,0,6,4,3,0,1,1,1,yes,0,0x40001,0,magic,3,0x0,	WZ_SIGHTBLASTER,Sight Blaster
 1007,0,6,4,0,0x1,0,1,0,no,0,0x1,0,none,0,0x0,	SA_CREATECON,Create Elemental Converter
 1008,9,6,1,1,0x1,0,1,1,yes,0,0x1,0,magic,0,0x0,	SA_ELEMENTWATER,Elemental Change Water
-1009,-9,6,1,0,0,0,1,1,no,0,0x1,0,weapon,3,0x0,	HT_PHANTASMIC,Phantasmic Arrow
+1009,-9,6,1,-1,0,0,1,1,no,0,0x1,0,weapon,3,0x0,	HT_PHANTASMIC,Phantasmic Arrow
 1010,9,6,1,0,0x1,0,1,0,no,0,0x1,0,misc,0,0x0,	BA_PANGVOICE,Pang Voice
 1011,9,6,1,0,0x1,0,1,0,no,0,0x1,0,misc,0,0x0,	DC_WINKCHARM,Wink of Charm
 1012,0,0,0,0,0,0,1,0,no,0,0x1,0,weapon,0,0x4000,	BS_UNFAIRLYTRICK,Unfair Trick

+ 14 - 14
doc/script_commands.txt

@@ -517,7 +517,7 @@ forever, and no trace remains of it even if it was stored with character or
 account data.
 
 Some variables are special, that is, they are already defined for you by the 
-scripting engine. You can see the full list somewhere in 'db/const.txt', which 
+scripting engine. You can see the full list in 'src/map/script_constants.h', which 
 is a file you should read, since it also allows you to replace lots of numbered 
 arguments for many commands with easier to read text. The special variables most 
 commonly used are all permanent character-based variables:
@@ -2290,7 +2290,7 @@ Also useful when passing arrays to functions or accessing another npc's arrays:
 
 This function will return the specified stat of the invoking character, or, if a
 character name is specified, of that player. The stat can either be a number or
-parameter name, defined in 'db/const.txt'.
+parameter name, defined in 'src/map/script_constants.h'.
 
 Some example parameters:
 
@@ -4055,7 +4055,7 @@ This command will change the job class of the invoking character.
 
 This command does work with numbers, but you can also use job names. The full 
 list of job names and the numbers they correspond to can be found in 
-'db/const.txt'.
+'src/map/script_constants.h'.
 
     // This would change your player into a Swordman
     jobchange Job_Swordman;
@@ -4275,7 +4275,7 @@ you can look at: 'npc/custom/stylist.txt'
 
 This command will push the currently attached player to given direction by given
 amount of square cells. Direction is the same as used when declaring NPCs, and
-can be specified by using one of the DIR_* constants (db/const.txt).
+can be specified by using one of the DIR_* constants (src/map/script_constants.h).
 
 The knock-back is not restricted by items or map flags, only obstacles are taken
 into account. If there is not enough space to perform the push (e.g. due to a
@@ -5153,7 +5153,7 @@ Used in reset NPC's (duh!)
 These commands will bestow a status effect on a character.
 
 The <effect type> determines which status is invoked. This can be either a number
-or constant, with the common statuses (mostly negative) found in 'db/const.txt'
+or constant, with the common statuses (mostly negative) found in 'src/map/script_constants.h'
 with the 'SC_' prefix. A full list is located in 'src/map/status.h', though
 they are not currently documented.
 
@@ -5422,7 +5422,7 @@ Types:
 	1: Buff
 	2: Debuff
 
-Status_icon: See "Status Icon" section in 'db/const.txt'. Default is SI_BLANK (-1).
+Status_icon: See "Status Icon" section in 'src/map/script_constants.h'. Default is SI_BLANK (-1).
 
 Example:
 	// Apple gives you +5 Str bonus for 1 minute when it's consumed.
@@ -6198,7 +6198,7 @@ This command will broadcast a message to all or most players, similar to
 The region the broadcast is heard in (target), source of the broadcast
 and the color the message will come up as is determined by the flags.
 
-The flag values are coded as constants in 'db/const.txt' to make them easier to use.
+The flag values are coded as constants in 'src/map/script_constants.h' to make them easier to use.
 
 Target flags:
 - bc_all: Broadcast message is sent server-wide (default).
@@ -6534,7 +6534,7 @@ specified.
 *setmapflag "<map name>",<flag>{,<zone>{,<type>}};
 
 This command marks a specified map with the given map flag, which will alter the 
-behavior of the map. A full list of mapflags is located in 'db/const.txt' with
+behavior of the map. A full list of mapflags is located in 'src/map/script_constants.h' with
 the 'mf_' prefix, and documentation can be found in 'doc/mapflags.txt'.
 
 The map flags alter the behavior of the map regarding teleporting (mf_nomemo, 
@@ -6900,8 +6900,8 @@ must be used.
 
 This command makes an object display an emotion sprite above their own as 
 if they were doing that emotion. For a full list of emotion numbers, 
-see 'db/const.txt' under 'e_'. The not so obvious ones are 'e_what' (a question mark) 
-and 'e_gasp' (the exclamation mark).
+see 'src/map/script_constants.h' under 'e_'. The not so obvious ones are 'e_what'
+(a question mark) and 'e_gasp' (the exclamation mark).
 
 The optional target parameter specifies who will get the emotion on top of
 their head. If 0 (the default if omitted), the NPC in current use will show
@@ -7142,7 +7142,7 @@ This command will make a <GID> say a message. The display name of the <GID> won'
 *unitemote <GID>,<emotion number>;
 
 This command will make a <GID> display an emotion sprite.
-For a full list of emotion numbers, see 'db/const.txt' under 'e_'.
+For a full list of emotion numbers, see 'src/map/script_constants.h' under 'e_'.
 
 ---------------------------------------
 
@@ -8044,7 +8044,7 @@ Each of these can be 'on' or 'off'. Together they define a cell's behavior.
 
 This command lets you alter these flags for all map cells in the specified
 (x1,y1)-(x2,y2) rectangle. The 'flag' can be 0 or 1 (0:clear flag, 1:set flag).
-The 'type' defines which flag to modify. Possible options see 'db/const.txt'.
+The 'type' defines which flag to modify. Possible options see 'src/map/script_constants.h'.
 
 Example:
 
@@ -8078,7 +8078,7 @@ remove a nonwalkable row of cells after the barricade mobs.
 
 This command will return 1 or 0, depending on whether the specified cell has
 the 'type' flag set or not. There are various types to check, all mimicking
-the server's cell_chk enumeration. The types can be found in 'db/const.txt'.
+the server's cell_chk enumeration. The types can be found in 'src/map/script_constants.h'.
 
 The meaning of the individual types can be confusing, so here's an overview:
   - cell_chkwall/water/cliff
@@ -8687,7 +8687,7 @@ NOTE: Currently ONLY supported for bonuses that used by 'bonus' script.
 This command will make the pet cure a specified status condition. The curing 
 actions will occur once every Delay seconds. For a full list of status 
 conditions that can be cured, see the list of 'SC_' status condition constants 
-in 'db/const.txt'.
+in 'src/map/script_constants.h'.
 
 ---------------------------------------
 

+ 0 - 4
npc/custom/battleground/unofficial/bg_common.txt

@@ -144,7 +144,6 @@ bat_room,159,178,5	script	Guillaume Knight#1	417,{
 	next;
 	mes "[Guillaume Knight]";
 	mes "The battle starts at your army's ship, and the goal is to advance and destroy your enemy's rations depot faster than they can destroy yours.";
-	mes "";
 	mes "The army that captures the neutral flag in the center of the battlefield will be rewarded with extra regeneration points, meaning their soldiers will resurrect more than the other side, giving them an advantage.";
 	next;
 	mes "[Guillaume Knight]";
@@ -214,7 +213,6 @@ bat_room,159,121,1	script	Croix Knight#1	413,{
 	next;
 	mes "[Croix Knight]";
 	mes "The battle starts at your army's ship, and the goal is to advance and destroy your enemy's rations depot faster than they can destroy yours.";
-	mes "";
 	mes "The army that captures the neutral flag in the center of the battlefield will be rewarded with extra regeneration points, meaning their soldiers will resurrect more than the other side, giving them an advantage.";
 	next;
 	mes "[Croix Knight]";
@@ -284,7 +282,6 @@ bat_room,167,178,5	script	Guillaume Knight#2	417,{
 	next;
 	mes "[Guillaume Knight]";
 	mes "The battle starts at your army's ship, and the goal is to advance and destroy your enemy's rations depot faster than they can destroy yours.";
-	mes "";
 	mes "The army that captures the neutral flag in the center of the battlefield will be rewarded with extra regeneration points, meaning their soldiers will resurrect more than the other side, giving them an advantage.";
 	next;
 	mes "[Guillaume Knight]";
@@ -354,7 +351,6 @@ bat_room,167,121,1	script	Croix Knight#2	413,{
 	next;
 	mes "[Croix Knight]";
 	mes "The battle starts at your army's ship, and the goal is to advance and destroy your enemy's rations depot faster than they can destroy yours.";
-	mes "";
 	mes "The army that captures the neutral flag in the center of the battlefield will be rewarded with extra regeneration points, meaning their soldiers will resurrect more than the other side, giving them an advantage.";
 	next;
 	mes "[Croix Knight]";

+ 0 - 1
npc/events/MemorialDay_2008.txt

@@ -49,7 +49,6 @@ prontera,182,214,4	script	Lauds#Memorial	58,{
 			mes "Fine, be unprepared!";
 			next;
 			mes "[Mad Sago Lauds]";
-			mes "";
 			mes "^FF0000YOU WILL RUE THE DAY!^000000";
 			close;
 		}

+ 0 - 18
npc/events/christmas_2005.txt

@@ -43,14 +43,12 @@ xmas_in,89,92,5	script	Louise Kim#designer	714,{
 	mes "Guess who made it?";
 	mes "As you know, Antonio is hard to catch,";
 	mes "that's because I blowed some power in the hat. ";
-	mes "";
 	next;
 	mes "[Designer Louise Kim]";
 	mes "If you don't like your hat,";
 	mes "bring it to me.";
 	mes "I'll change it to brand new one.";
 	mes "Stylish Louise's hat.";
-	mes "";
 	emotion e_lv;
 	next;
 	if (countitem(2236) > 0) {
@@ -184,7 +182,6 @@ xmas_in,89,92,5	script	Louise Kim#designer	714,{
 		mes "think about it carefully.";
 		mes "You can get the better designed hat,";
 		mes "and I can show off my talent.";
-		mes "";
 		emotion e_heh;
 		close;
 	}
@@ -269,7 +266,6 @@ prontera,155,285,3	script	Enjoy#enjoy	753,{
 			mes "[Enjoy]";
 			mes "If you are not with me, get away~!!";
 			mes "Get out of my sight!!!!";
-			mes "";
 			close;
 		case 3:
 			mes "[Enjoy]";
@@ -357,11 +353,9 @@ prontera,155,285,3	script	Enjoy#enjoy	753,{
 			mes "or who had to turn his/her back from kissing couples!!";
 			mes "What are you waiting for!!";
 			mes "Why do we have to be the victim!!";
-			mes "";
 			next;
 			mes "[Enjoy]";
 			mes "It's christmas season again!!";
-			mes "";
 			next;
 			mes "[Enjoy]";
 			mes "Are we the soldiers";
@@ -375,7 +369,6 @@ prontera,155,285,3	script	Enjoy#enjoy	753,{
 			mes "No need to envy!!";
 			mes "This christmas is for singles!! ";
 			mes "Yahoo~";
-			mes "";
 			next;
 			mes "[All]";
 			mes "Christmas for singles!!!";
@@ -459,7 +452,6 @@ prontera,155,285,3	script	Enjoy#enjoy	753,{
 		mes "Let's go for it!!!";
 		mes "Cheer up everybody!!!";
 		mes "Let's rock till you get happy~!";
-		mes "";
 		set christ_solo05,0;
 		close;
 	}
@@ -618,7 +610,6 @@ prontera,188,177,4	script	Happymerry#happymerry	869,{
 		mes "He help me last christmas,";
 		mes "when I failed refining my equips.";
 		mes "Oh, holy Enjoy~";
-		mes "";
 		next;
 		mes "[Happymerry]";
 		mes "Alright!I've been waiting for a year!!";
@@ -630,7 +621,6 @@ prontera,188,177,4	script	Happymerry#happymerry	869,{
 		mes "He's waiting for you!";
 		mes "Go ahead~";
 		mes "I'll follow you after contacting others.";
-		mes "";
 		next;
 		mes "[Happymerry]";
 		mes "Alright!";
@@ -676,7 +666,6 @@ prontera,62,339,3	script	Christ#christ	875,{
 		mes "Why do need to organize a party with priest?!";
 		mes "I don't need all that.";
 		mes "Only thing I need is this chubby Pecopeco~!";
-		mes "";
 		next;
 		mes "["+ strcharinfo(0) +"]";
 		mes "Um...";
@@ -737,7 +726,6 @@ prontera,62,339,3	script	Christ#christ	875,{
 		mes "Why do need to organize a party with priest?!";
 		mes "I don't need all that.";
 		mes "Only thing I need is this chubby Pecopeco~!";
-		mes "";
 		next;
 		mes "[Christ]";
 		mes "Who are you!";
@@ -857,10 +845,8 @@ prontera,35,209,5	script	Event#event	881,{
 		mes "It's ok, Tinybee. I'm not lonely at all.";
 		mes "I have Ms.Bathory and Ms.Orclady with me.";
 		mes "Hahahaha~~~";
-		mes "";
 		next;
 		mes "-He laughed talking to his right hand.-";
-		mes "";
 		//Emotion "Event#event" ET_KIK
 		emotion e_kis;
 		next;
@@ -879,11 +865,9 @@ prontera,35,209,5	script	Event#event	881,{
 		mes "Don't be so lonely~.";
 		mes "I'll make your christmas unforgettably fantastic.";
 		mes "Let's go Tinybee.";
-		mes "";
 		next;
 		mes "-He kept talking to his right hand-";
 		mes "-and packed his stuff and bowed to Kafra.-";
-		mes "";
 		next;
 		mes "["+ strcharinfo(0) +"]";
 		mes "Finally!!! Done telling everyone!!";
@@ -925,10 +909,8 @@ prontera,35,209,5	script	Event#event	881,{
 		mes "It's ok Tinybee.I'm not lonely at all.";
 		mes "I have Ms.Bathory and Ms.Orclady with me.";
 		mes "Hahahaha~~~";
-		mes "";
 		next;
 		mes "-He laughed talking to his right hand.-";
-		mes "";
 		emotion e_kis;
 		close;
 	}

+ 0 - 1
npc/events/halloween_2006.txt

@@ -293,7 +293,6 @@ geffen,145,132,3	script	Hoirin#06_hw	729,{
 			mes "^4d4dff 1 Pumpkin Mojo";
 			mes "2 Pumpkin";
 			mes "2 Egg^000000";
-			mes "";
 			next;
 			mes "[Hoirin]";
 			mes "Just Bring Pumpkin Mojo, Pumpkin, and a Egg.";

+ 0 - 5
npc/pre-re/jobs/novice/novice.txt

@@ -1537,7 +1537,6 @@ new_1-2,161,182,5	script	Instructor#nv	92,{
 	mes "Welcome to my class.";
 	mes "Choose the subject you";
 	mes "wish to learn more about.";
-	mes "";
 	next;
 	while(1) {
 		switch(select("Basic Info Window:Party Window:Item Window:Option Window:Equipment Window:Cancel")) {
@@ -3001,7 +3000,6 @@ new_1-4,100,29,1	script	Hanson#nv	46,{
 			mes "Fill in the blank:";
 			mes "You ^3355FF_____^000000";
 			mes "competing with other people...";
-			mes "";
 			next;
 			switch(select("don't mind...:don't like...:don't care about...")) {
 			case 1:
@@ -3406,7 +3404,6 @@ new_1-4,100,29,1	script	Hanson#nv	46,{
 					next;
 					mes "[Hanson]";
 					mes "The town you will arrive is named 'Geffen'.";
-					mes "";
 					mes "The mage academy is located in the Northwest part in town. Please remember this.";
 					next;
 					mes "[Hanson]";
@@ -4071,7 +4068,6 @@ new_1-4,91,22,4	script	Bruce#nv	57,{
 					next;
 					mes "[Bruce]";
 					mes "When advancing to the Second Job Class, Acolytes can change their jobs to ^8E2323Priests^000000 or ^8E2323Monks^000000.";
-					mes "";
 					set nov_3_swordman,20;
 					next;
 					break;
@@ -4229,7 +4225,6 @@ new_1-4,91,22,4	script	Bruce#nv	57,{
 					next;
 					mes "[Bruce]";
 					mes "When advancing to the Second Job Class, Acolytes can change their jobs to ^8E2323Priests^000000 or ^8E2323Monks^000000.";
-					mes "";
 					set nov_3_swordman,20;
 					next;
 					break;

+ 0 - 3
npc/quests/juice_maker.txt

@@ -294,13 +294,10 @@ payon_in03,188,146,5	script	Marx Hansen#juice	86,{
 			mes "# Fruit Juice Information #";
 			mes "^CC4E5C- Apple Juice -^000000";
 			mes "Apple x 1 ea, Empty Bottle x 1 ea, 3 zeny.";
-			mes "";
 			mes "^E3CF57- Banana Juice -^000000";
 			mes "Banana x 1 ea, Empty Bottle x 1 ea, 3 zeny.";
-			mes "";
 			mes "^ED9121- Carrot Juice -^000000";
 			mes "Carrot x 1 ea, Empty Bottle x 1 ea, 3 zeny.";
-			mes "";
 			mes "^CC00FF- Grape Juice -^000000";
 			mes "Grape x 1 ea, Empty Bottle x 1 ea, 3 zeny.";
 			close;

+ 0 - 1
npc/quests/obb_quest.txt

@@ -800,7 +800,6 @@ moc_ruins,105,62,4	script	Jacob#thai	50,{
 						next;
 						mes "[Jacob]";
 						mes "....You.";
-						mes "";
 						next;
 						mes "[Jacob]";
 						mes "I don't want to see your ugly face";

+ 0 - 7
npc/quests/quests_alberta.txt

@@ -1530,7 +1530,6 @@ tur_dun01,160,81,4	script	Skull Stone#tur	111,{
 		mes "^3355FFUnder the stone^000000";
 		mes "^3355FFis a tiny key hole^000000";
 		mes "^3355FFwith a skull mark.^000000";
-		mes "";
 		mes "^3355FFYou used the Skull key^000000";
 		mes "^3355FFin that key hole.^000000";
 		next;
@@ -1573,7 +1572,6 @@ tur_dun02,132,251,4	script	Turtle Tree Roots#tur	111,{
 		mes "^3355FFUnder the tree roots^000000";
 		mes "^3355FFis a tiny key hole^000000";
 		mes "^3355FFmarked with a root insignia.^000000";
-		mes "";
 		mes "^3355FFYou used the Roots key^000000";
 		mes "^3355FFin that key hole.^000000";
 		next;
@@ -1614,7 +1612,6 @@ tur_dun02,132,251,4	script	Turtle Tree Roots#tur	111,{
 		next;
 		mes "^3355FFInside the pile of turtle^000000";
 		mes "^3355FFcrystals, a scroll is hidden.^000000";
-		mes "";
 		set TURTLE,7;
 		mes "^3355FFYou've gained a^000000";
 		mes "^3355FFTurtle Crystal key.^000000";
@@ -1632,7 +1629,6 @@ tur_dun02,46,125,4	script	A pile of turtle crystal	111,{
 		mes "^3355FFAmong the Turtle Crystals,^000000";
 		mes "^3355FFyou find a strange key hole.^000000";
 		next;
-		mes "";
 		mes "^3355FFYou use the";
 		mes "Turtle crystal key";
 		mes "in the key hole.^000000";
@@ -1671,7 +1667,6 @@ tur_dun02,46,125,4	script	A pile of turtle crystal	111,{
 		next;
 		mes "^3355FFAt the edge of the crystal^000000";
 		mes "^3355FFplate, is a long key.^000000";
-		mes "";
 		set TURTLE,8;
 		mes "^3355FFYou've gained the^000000";
 		mes "^3355FFTurtle Pillar key.^000000";
@@ -1688,7 +1683,6 @@ tur_dun02,49,158,4	script	Turtle Pillar#tur	111,{
 		mes "^3355FFAt the base of the pillar^000000";
 		mes "^3355FFis a tiny key hole with^000000";
 		mes "^3355FFa turtle shaped mark.^000000";
-		mes "";
 		mes "^3355FFYou used the";
 		mes "Turtle Pillar key";
 		mes "in that key hole.^000000";
@@ -1929,7 +1923,6 @@ tur_dun04,113,178,4	script	Turtle Statue#tur	111,{
 		mes "^3355FFOn top of the statue";
 		mes "is a small key hole";
 		mes "with the turtle mark.^000000";
-		mes "";
 		mes "^3355FFYou used the";
 		mes "Security Key";
 		mes "in the keyhole.^000000";

+ 0 - 1
npc/quests/quests_amatsu.txt

@@ -1180,7 +1180,6 @@ ama_in01,162,17,1	script	Sushi Master#ama	765,{
 				mes "[Magumagu]";
 				mes "Oh man, you don't have enough money.";
 				mes "If you want to eat delicious fish slice, you better bring more money.";
-				mes "";
 				close;
 			}
 			set Zeny, Zeny-37;

+ 30 - 22
npc/quests/quests_ein.txt

@@ -86,7 +86,7 @@ einbech,97,167,5	script	Cavitar	847,{
 				mes "that you brought before";
 				mes "I give you an Oridecon.";
 				next;
-				if (checkweight(618,1)) {
+				if ((MaxWeight - Weight) > 2399) {
 					mes "[Cavitar]";
 					mes "Good, you brought";
 					mes "everything! Now let me";
@@ -475,7 +475,6 @@ einbech,97,167,5	script	Cavitar	847,{
 // Uwe Kleine :: ein_anoz
 //============================================================
 einbroch,215,180,6	script	Uwe Kleine#ein	85,{
-	set EinUwe,0;
 	if (BaseClass == Job_Blacksmith) {
 		if (ein_cook > 999) {
 			set .@ccc,ein_cook-1000;
@@ -1493,7 +1492,6 @@ einbroch,215,180,6	script	Uwe Kleine#ein	85,{
 						mes "I know it's the easiest";
 						mes "lame excuse for a person";
 						mes "who never try hard anything.";
-						mes "";
 						next;
 						mes "[Uwe]";
 						mes "It's very same for a smith job.";
@@ -3372,8 +3370,9 @@ OnTimer600000:
 }
 
 einbroch,132,84,3	script	Liotzburg#ein	853,2,2,{
-	if ((EinFactory == 13) || (EinFactory == 14)) {
-		changequest 8029,8030;
+	if (EinFactory == 13 || EinFactory == 14) {
+		if (isbegin_quest(8029) == 1)
+			changequest 8029,8030;
 		set EinFactory,14;
 		mes "[Liotzburg]";
 		mes "What...?";
@@ -4076,8 +4075,9 @@ ein_in01,67,242,3	script	Zelmeto	851,{
 }
 
 ein_in01,49,232,3	script	2nd Control Panel#ins	111,{
-	if ((EinFactory == 1) || (EinFactory == 2)) {
-		changequest 8017,8018;
+	if (EinFactory == 1 || EinFactory == 2) {
+		if (isbegin_quest(8017) == 1)
+			changequest 8017,8018;
 		set EinFactory,2;
 		mes "^3355FFIt's the 2nd control panel";
 		mes "Zelmeto asked you to inspect.";
@@ -4091,8 +4091,9 @@ ein_in01,49,232,3	script	2nd Control Panel#ins	111,{
 }
 
 ein_in01,108,217,3	script	3rd Pressure Governor#1	111,{
-	if ((EinFactory == 3) || (EinFactory == 4)) {
-		changequest 8019,8020;
+	if (EinFactory == 3 || EinFactory == 4) {
+		if (isbegin_quest(8019) == 1)
+			changequest 8019,8020;
 		set EinFactory,4;
 		mes "^3355FFAt first glance, this";
 		mes "pressure governor looks";
@@ -4107,8 +4108,9 @@ ein_in01,108,217,3	script	3rd Pressure Governor#1	111,{
 }
 
 ein_in01,62,258,3	script	Main Control Panel#ins	111,{
-	if ((EinFactory == 5) || (EinFactory == 6)) {
-		changequest 8021,8022;
+	if (EinFactory == 5 || EinFactory == 6) {
+		if (isbegin_quest(8021) == 1)
+			changequest 8021,8022;
 		set EinFactory,6;
 		mes "^3355FFThe main control panel";
 		mes "doesn't look like it has";
@@ -4123,8 +4125,9 @@ ein_in01,62,258,3	script	Main Control Panel#ins	111,{
 }
 
 ein_in01,46,197,3	script	Conveyor#ins	111,{
-	if ((EinFactory == 7) || (EinFactory == 8)) {
-		changequest 8023,8024;
+	if (EinFactory == 7 || EinFactory == 8) {
+		if (isbegin_quest(8023) == 1)
+			changequest 8023,8024;
 		set EinFactory,8;
 		mes "^3355FFThe conveyor's movements";
 		mes "look jittery and clumsy. The";
@@ -4138,8 +4141,9 @@ ein_in01,46,197,3	script	Conveyor#ins	111,{
 }
 
 ein_in01,100,266,3	script	Pipe#ins	111,{
-	if ((EinFactory == 9) || (EinFactory == 10)) {
-		changequest 8025,8026;
+	if (EinFactory == 9 || EinFactory == 10) {
+		if (isbegin_quest(8025) == 1)
+			changequest 8025,8026;
 		set EinFactory,10;
 		mes "^3355FFThe inspection of this";
 		mes "pipe didn't take very long.";
@@ -4154,8 +4158,9 @@ ein_in01,100,266,3	script	Pipe#ins	111,{
 }
 
 ein_in01,95,239,3	script	Conveyor#ins2	111,{
-	if ((EinFactory == 11) || (EinFactory == 12)) {
-		changequest 8027,8028;
+	if (EinFactory == 11 || EinFactory == 12) {
+		if (isbegin_quest(8027) == 1)
+			changequest 8027,8028;
 		set EinFactory,12;
 		mes "^3355FFThis conveyor seems";
 		mes "to have similar problems";
@@ -4744,7 +4749,6 @@ ein_in01,231,163,7	script	Sick Old Man#ein	849,{
 		close;
 	}
 	else if (Shinokas_Quest == 2) {
-		set einbech,0;
 		mes "[Sick Old Man]";
 		mes "...!";
 		next;
@@ -4790,7 +4794,7 @@ ein_in01,231,163,7	script	Sick Old Man#ein	849,{
 				mes "^3355FFIt doesn't seem";
 				mes "like this old man";
 				mes "is telling the truth...^000000";
-				set einbech,0;
+				set .@einbech,0;
 				next;
 			}
 			else {
@@ -6006,7 +6010,7 @@ ein_in01,31,138,3	script	Calla#ein	90,{
 			mes "^333333*Sob Sob...*^000000";
 			delitem 712,1; //Flower
 			set EIN_LOVERQ,6;
-			changequest 8079,808;
+			changequest 8079,8080;
 			close;
 		}
 		else {
@@ -7048,7 +7052,10 @@ ein_in01,31,151,3	script	Satra#ein	850,{
 		mes "this kind of task will require";
 		mes "some effort on your part.";
 		set EIN_LOVERQ,9;
-		changequest 8082,8083;
+		if (isbegin_quest(8081) == 1)
+			changequest 8081,8083;
+		else
+			changequest 8082,8083;
 		next;
 		mes "[Satra]";
 		mes "Tah tah,";
@@ -7138,7 +7145,8 @@ ein_in01,191,102,5	script	Kaijeta#ein	846,{
 		mes "petty hatred between our";
 		mes "two towns stop my son from";
 		mes "seeing the woman he loves...";
-		changequest 8081,8082;
+		if (isbegin_quest(8081) == 1)
+			changequest 8081,8082;
 		close;
 	}
 	if (EIN_LOVERQ == 7) {

+ 0 - 1
npc/quests/quests_hugel.txt

@@ -3357,7 +3357,6 @@ hu_in01,317,312,0	script	Book	111,{
 					mes "People say that his mansion is rather like a fortress.";
 					mes "I also don't know why someone would want to build his house";
 					mes "as strong as a fortress. Regardless, I am pretty sure that his support will be a great help for us.";
-					mes "";
 					mes "It was a really tiring day today. It was also a very chaotic day.";
 					mes "To be honest, I don't know what is going to happen now.";
 					mes "I am scared if I would die helplessly. I am scared and depressed.";

+ 0 - 1
npc/quests/quests_louyang.txt

@@ -3840,7 +3840,6 @@ lou_in02,253,45,0	script	Employee#poison	822,{
 				mes "[Song Zhi Du]";
 				mes "Muhahahahaha!";
 				mes "Hahahahahahahahahahah!";
-				mes "";
 				next;
 				mes "[Song Zhi Du]";
 				mes "I made it!";

+ 0 - 1
npc/quests/seals/brisingamen_seal.txt

@@ -2571,7 +2571,6 @@ prontera,262,353,0	script	Gravestone	111,{
 			mes "Lowen Ellenen";
 			mes " ";
 			mes " XXXX. XX. XX.";
-			mes "";
 			mes "Her noble spirit";
 			mes "was sent to the holy";
 			mes "place by Valkyrie's will.";

+ 0 - 1
npc/quests/skills/hunter_skills.txt

@@ -197,7 +197,6 @@ pay_arche,109,169,3	script	Arpesto	712,{
 				mes "[Reidin Corse]";
 				mes "Ar-Arpesto, no!";
 				mes "...........................";
-				mes "";
 				mes "Oh. Oh, come on! The arrow";
 				mes "just glanced you! You'll be";
 				mes "alright. Quit being a baby.";

+ 0 - 1
npc/re/cities/brasilis.txt

@@ -99,7 +99,6 @@ brasilis,240,247,3	script	Signpost#bra3	858,{
 
 brasilis,303,309,3	script	Signpost#bra4	858,{
 	mes ":: Jungle Cable ::";
-	mes "";
 	mes "- Not for the faint of heart -";
 	close;
 }

+ 0 - 1
npc/re/jobs/3-2/minstrel.txt

@@ -733,7 +733,6 @@ OnTouch:
 		mes "Name : Maestro Song";
 		next;
 		mes "- Bring this receipt and exchange it";
-		mes "";
 		mes "- Juno's store manager : Mr. Click.";
 		next;
 		mes "- Directions : Around Juno's plaza.";

+ 0 - 2
npc/re/jobs/3-2/shadow_chaser.txt

@@ -1952,8 +1952,6 @@ job3_sha01,22,78,0	script	????#keybox01	844,{
 		mes " ";
 		mes " "+.@i;
 		next;
-		mes "";
-		mes "";
 		mes " "+.@Codes1$[.@i];
 		next;
 		mes "It shows some letters and numbers.";

+ 0 - 14
npc/re/jobs/novice/academy.txt

@@ -999,7 +999,6 @@ izlude,120,207,4	script	Information Staff#0	8W_SOLDIER,{
 						next;
 						mes "[Information Staff]";
 						mes "Byalan Island is the scary place with ^8B4513Izlude dungeon^000000 in it.";
-						mes "";
 						mes "Do you need additional directions?";
 						viewpoint 1, 197, 205, 1, 0xFFFF00;
 						next;
@@ -1266,7 +1265,6 @@ izlude,120,207,4	script	Information Staff#0	8W_SOLDIER,{
 						next;
 						mes "[Information Staff]";
 						mes "Byalan Island is the scary place with ^8B4513Izlude dungeon^000000 in it.";
-						mes "";
 						mes "Do you need additional directions?";
 						viewpoint 1, 197, 205, 1, 0xFFFF00;
 						next;
@@ -1444,9 +1442,7 @@ izlude,179,75,3	script	Airship#iz	4_BULLETIN_BOARD2,3,3,{
 	if (isbegin_quest(7474)) {
 		if (!isbegin_quest(7475)) {
 			mes "==== Airship Information====";
-			mes "";
 			mes "Izlude - Juno - Rachel";
-			mes "";
 			mes "Travellers bound for either the ^4d4dffSchwarzwalt Republic^000000 or ^4d4dffArunafeltz^000000 may board the airship here.";
 			next;
 			if (.@total == 1) {
@@ -1551,17 +1547,13 @@ izlude,179,75,3	script	Airship#iz	4_BULLETIN_BOARD2,3,3,{
 			}
 		} else {
 			mes "==== Airship Information ====";
-			mes "";
 			mes "Izlude - Juno - Rachel";
-			mes "";
 			mes "Travellers bound for either the ^4d4dffSchwarzwalt Republic^000000 or ^4d4dffArunafeltz^000000 may board the airship here.";
 			close;
 		}
 	} else {
 		mes "==== Airship Information ====";
-		mes "";
 		mes "Izlude - Juno - Rachel";
-		mes "";
 		mes "Travellers bound for either the ^4d4dffSchwarzwalt Republic^000000 or ^4d4dffArunafeltz^000000 may board the airship here.";
 		close;
 	}
@@ -1589,7 +1581,6 @@ izlude,207,167,3	script	Arena#iz	4_BULLETIN_BOARD2,3,3,{
 	if (isbegin_quest(7474) == 1) {
 		if (!isbegin_quest(7476)) {
 			mes "== Challenge! Arena! ==";
-			mes "";
 			mes "Breath taking battle with monsters!";
 			mes "Where is your limit?";
 			mes "PvE party with your comrad!";
@@ -1695,7 +1686,6 @@ izlude,207,167,3	script	Arena#iz	4_BULLETIN_BOARD2,3,3,{
 			}
 		} else {
 			mes "== Challenge! Arena! ==";
-			mes "";
 			mes "Breath taking battle with monsters!";
 			mes "Where is your limit?";
 			mes "PvE party with your comrad!";
@@ -1704,7 +1694,6 @@ izlude,207,167,3	script	Arena#iz	4_BULLETIN_BOARD2,3,3,{
 		}
 	} else {
 		mes "== Challenge! Arena! ==";
-		mes "";
 		mes "Breath taking battle with monsters!";
 		mes "Where is your limit?";
 		mes "PvE party with your comrad!";
@@ -1735,7 +1724,6 @@ izlude,45,94,3	script	Bulletin Board#iz	4_BULLETIN_BOARD2,3,3,{
 	if (isbegin_quest(7474) == 1) {
 		if (!isbegin_quest(7477)) {
 			mes "==== Information ====";
-			mes "";
 			mes "Prontera Field.";
 			mes "The city of Prontera is located to the north.";
 			next;
@@ -1845,14 +1833,12 @@ izlude,45,94,3	script	Bulletin Board#iz	4_BULLETIN_BOARD2,3,3,{
 			}
 		} else {
 			mes "==== Information ====";
-			mes "";
 			mes "Prontera Field.";
 			mes "The city of Prontera is located to the north.";
 			close;
 		}
 	} else {
 		mes "==== Information ====";
-		mes "";
 		mes "Prontera Field.";
 		mes "The city of Prontera is located to the north.";
 		close;

+ 4 - 2
npc/re/quests/eden/11-25.txt

@@ -3,7 +3,7 @@
 //===== By: ==================================================
 //= L0ne_W0lf
 //===== Current Version: =====================================
-//= 1.3
+//= 1.5
 //===== Compatible With: =====================================
 //= rAthena Project
 //===== Description: =========================================
@@ -13,10 +13,12 @@
 //= 1.1 Some little optimization here and there. [Masao]
 //= 1.2 Optimized. [Euphy]
 //= 1.3 Bug fixes. [Capuche]
+//= 1.4 Added support to Para_Team_Mark_ in Eden Group. [Ragno]
+//= 1.5 Added use of F_HasEdenGroupMark function. [Ragno]
 //============================================================
 
 moc_para01,36,38,3	script	Mission [11 - 25]#Tuto	4_BOARD3,{
-	if (countitem(6219) < 1) {// Para_Team_Mark
+	if (!callfunc("F_HasEdenGroupMark")) {
 		mes "- You need to have an -";
 		mes "- ^4d4dff'Eden Group Mark'^000000 -";
 		mes "- to receive these missions. -";

+ 4 - 2
npc/re/quests/eden/26-40.txt

@@ -3,7 +3,7 @@
 //===== By: ==================================================
 //= L0ne_W0lf
 //===== Current Version: =====================================
-//= 1.2
+//= 1.4
 //===== Compatible With: =====================================
 //= rAthena Project
 //===== Description: =========================================
@@ -12,10 +12,12 @@
 //= 1.0 First Version.
 //= 1.1 Some little optimization here and there. [Masao]
 //= 1.2 Optimized. [Euphy]
+//= 1.3 Added support to Para_Team_Mark_ in Eden Group. [Ragno]
+//= 1.4 Added use of F_HasEdenGroupMark function. [Ragno]
 //============================================================
 
 moc_para01,38,38,3	script	Mission [26 - 40]	857,{
-	if (countitem(6219) < 1) {
+	if (!callfunc("F_HasEdenGroupMark")) {
 		mes "You are not a qualified member. You can not use the bulletin board.";
 		close;
 	}

+ 4 - 2
npc/re/quests/eden/41-55.txt

@@ -3,7 +3,7 @@
 //===== By: ==================================================
 //= L0ne_W0lf
 //===== Current Version: =====================================
-//= 1.2
+//= 1.4
 //===== Compatible With: =====================================
 //= rAthena Project
 //===== Description: =========================================
@@ -12,10 +12,12 @@
 //= 1.0 First Version.
 //= 1.1 Some little optimization here and there. [Masao]
 //= 1.2 Optimized. [Euphy]
+//= 1.3 Added support to Para_Team_Mark_ in Eden Group. [Ragno]
+//= 1.4 Added use of F_HasEdenGroupMark function. [Ragno]
 //============================================================
 
 moc_para01,40,38,3	script	Mission [41 - 55]	857,{
-	if (countitem(6219) < 1) {
+	if (!callfunc("F_HasEdenGroupMark")) {
 		mes "You are not an Eden group member. You are not qualified to access the bulletin board.";
 		close;
 	}

+ 4 - 2
npc/re/quests/eden/56-70.txt

@@ -3,7 +3,7 @@
 //===== By: ==================================================
 //= L0ne_W0lf
 //===== Current Version: =====================================
-//= 1.5
+//= 1.7
 //===== Compatible With: =====================================
 //= rAthena Project
 //===== Description: =========================================
@@ -15,10 +15,12 @@
 //= 1.3 Fixed Puppet Master's Agony Quest (12217 -> 3259). [Joseph]
 //= 1.4 Fixed invalid check (Magic Wand Quest). [Joseph]
 //= 1.5 Optimized, based on code by Zopokx. [Euphy]
+//= 1.6 Added support to Para_Team_Mark_ in Eden Group. [Ragno]
+//= 1.7 Added use of F_HasEdenGroupMark function. [Ragno]
 //============================================================
 
 moc_para01,42,38,3	script	Mission [56 - 70]	857,{
-	if (countitem(6219) < 1) {
+	if (!callfunc("F_HasEdenGroupMark")) {
 		mes "To get these missions, I need to Join the Eden Group first. I must find Secretary Lime Evenor and become a member.";
 		close;
 	}

+ 4 - 2
npc/re/quests/eden/71-85.txt

@@ -3,7 +3,7 @@
 //===== By: ==================================================
 //= L0ne_W0lf
 //===== Current Version: =====================================
-//= 1.3
+//= 1.5
 //===== Compatible With: =====================================
 //= rAthena Project
 //===== Description: =========================================
@@ -13,10 +13,12 @@
 //= 1.1 Some little optimization here and there. [Masao]
 //= 1.2 Optimized. [Euphy]
 //= 1.3 Updated to match the official scripts. [Euphy]
+//= 1.4 Added support to Para_Team_Mark_ in Eden Group. [Ragno]
+//= 1.5 Added use of F_HasEdenGroupMark function. [Ragno]
 //============================================================
 
 moc_para01,44,38,3	script	Mission [71 - 85]	857,{
-	if (countitem(6219) < 1) {
+	if (!callfunc("F_HasEdenGroupMark")) {
 		mes "- Only members of the -";
 		mes "- Eden Group can read -";
 		mes "- this bulletin board. -";

+ 4 - 2
npc/re/quests/eden/86-90.txt

@@ -3,7 +3,7 @@
 //===== By: ==================================================
 //= Chilly
 //===== Current Version: =====================================
-//= 1.3
+//= 1.5
 //===== Compatible With: =====================================
 //= rAthena Project
 //===== Description: =========================================
@@ -13,10 +13,12 @@
 //= 1.1 Some little improvements here and there. [Masao]
 //= 1.2 Optimized. [Euphy]
 //= 1.3 Updated to match the official script. [Euphy]
+//= 1.4 Added support to Para_Team_Mark_ in Eden Group. [Ragno]
+//= 1.5 Added use of F_HasEdenGroupMark function. [Ragno]
 //============================================================
 
 moc_para01,48,175,3	script	86-90 Mission Board	857,{
-	if (countitem(6219) < 1) {
+	if (!callfunc("F_HasEdenGroupMark")) {
 		mes "Wait a minute!";
 		mes "-You need to have an-";
 		mes "-^4d4dff'Eden Group Mark'^000000-";

+ 4 - 2
npc/re/quests/eden/91-99.txt

@@ -3,7 +3,7 @@
 //===== By: ==================================================
 //= Chilly
 //===== Current Version: =====================================
-//= 1.3
+//= 1.5
 //===== Compatible With: =====================================
 //= rAthena Project
 //===== Description: =========================================
@@ -13,10 +13,12 @@
 //= 1.1 Some little improvements here and there. [Masao]
 //= 1.2 Optimized. [Euphy]
 //= 1.3 Updated to match the official script. [Euphy]
+//= 1.4 Added support to Para_Team_Mark_ in Eden Group. [Ragno]
+//= 1.5 Added use of F_HasEdenGroupMark function. [Ragno]
 //============================================================
 
 moc_para01,48,177,3	script	91-99 Mission Board	857,{
-	if (countitem(6219) < 1) {
+	if (!callfunc("F_HasEdenGroupMark")) {
 		mes "Wait a minute!";
 		mes "-You need to have an-";
 		mes "-^4d4dff'Eden Group Mark'^000000-";

+ 5 - 3
npc/re/quests/eden/eden_100_111.txt

@@ -3,7 +3,7 @@
 //===== By: ==================================================
 //= Capuche
 //===== Current Version: =====================================
-//= 1.0
+//= 1.2
 //===== Compatible With: =====================================
 //= rAthena Project
 //===== Description: =========================================
@@ -11,6 +11,8 @@
 //= Repeatable quests for players between BaseLevel 100 - 111.
 //===== Additional Comments: =================================
 //= 1.0 First version.
+//= 1.1 Added support to Para_Team_Mark_ in Eden Group. [Ragno]
+//= 1.2 Added use of F_HasEdenGroupMark function. [Ragno]
 //============================================================
 
 moc_para01,37,95,5	script	Gelkah#1	4_F_GELKA,{
@@ -27,7 +29,7 @@ moc_para01,37,95,5	script	Gelkah#1	4_F_GELKA,{
 		end;
 	}
 	mes "[Gelkah]";
-	if (countitem(6219) == 0) {// Para_Team_Mark
+	if (!callfunc("F_HasEdenGroupMark")) {
 		mes "Show me proof that you're part of the Eden Group or I have no business with you.";
 		mes "I'm giving requests to base level ^FF0000100 - 110^000000 adventurers.";
 	}
@@ -1003,7 +1005,7 @@ S_Hunting:
 
 moc_para01,41,95,5	script	Rohtert#12	4_M_ROTERT,{
 	mes "[Rohtert]";
-	if (countitem(6219) == 0) {// Para_Team_Mark
+	if (!callfunc("F_HasEdenGroupMark")) {
 		cutin "rote01",2;
 		mes "You are not even a member of Eden Group. What are you doing here?";
 		mes "I'm only dealing with base level ^FF0000100 - 110^000000 adventurers.";

+ 4 - 2
npc/re/quests/eden/eden_111_120.txt

@@ -3,7 +3,7 @@
 //===== By: ==================================================
 //= Capuche
 //===== Current Version: =====================================
-//= 1.0
+//= 1.2
 //===== Compatible With: =====================================
 //= rAthena Project
 //===== Description: =========================================
@@ -11,11 +11,13 @@
 //= Repeatable quests for players between BaseLevel 111 - 120.
 //===== Additional Comments: =================================
 //= 1.0 First version.
+//= 1.1 Added support to Para_Team_Mark_ in Eden Group. [Ragno]
+//= 1.2 Added use of F_HasEdenGroupMark function. [Ragno]
 //============================================================
 
 moc_para01,17,95,5	script	Mingmin#1	4_F_GENETIC,{
 	mes "[Mingmin]";
-	if (countitem(6219) == 0) {// Para_Team_Mark
+	if (!callfunc("F_HasEdenGroupMark")) {
 		cutin "min02",0;
 		mes "A stranger. This place is supposed to be for Eden Group Members only.";
 		mes "I'm in need base level ^FF0000111 - 120^000000 adventurers to help my research.";

+ 5 - 3
npc/re/quests/eden/eden_121_130.txt

@@ -3,7 +3,7 @@
 //===== By: ==================================================
 //= Capuche
 //===== Current Version: =====================================
-//= 1.0
+//= 1.2
 //===== Compatible With: =====================================
 //= rAthena Project
 //===== Description: =========================================
@@ -11,11 +11,13 @@
 //= Repeatable quests for players between BaseLevel 121 - 130.
 //===== Additional Comments: =================================
 //= 1.0 First version.
+//= 1.1 Added support to Para_Team_Mark_ in Eden Group. [Ragno]
+//= 1.2 Added use of F_HasEdenGroupMark function. [Ragno]
 //============================================================
 
 moc_para01,44,81,3	script	Melody-Jack#1	4_M_MELODY,8,8,{
 	mes "[Melody-Jack]";
-	if (countitem(6219) < 1) {// Para_Team_Mark
+	if (!callfunc("F_HasEdenGroupMark")) {
 		mes "Who the hell are you? Get out of here!";
 		mes "I'm only talking to base level ^FF0000121-130^000000 adventurers.";
 	}
@@ -562,7 +564,7 @@ OnTouch:
 
 moc_para01,17,77,5	script	Aigu#1	4_F_IU,{
 	mes "[Aigu]";
-	if (countitem(6219) < 1) {// Para_Team_Mark
+	if (!callfunc("F_HasEdenGroupMark")) {
 		mes "Oh, why aren't you a part of Eden Group?";
 		mes "I'm only talking to base level ^FF0000121-130^000000 adventurers.";
 	}

+ 4 - 2
npc/re/quests/eden/eden_131_140.txt

@@ -3,7 +3,7 @@
 //===== By: ==================================================
 //= Capuche
 //===== Current Version: =====================================
-//= 1.0
+//= 1.2
 //===== Compatible With: =====================================
 //= rAthena Project
 //===== Description: =========================================
@@ -11,12 +11,14 @@
 //= Repeatable quests for players between BaseLevel 131 - 140.
 //===== Additional Comments: =================================
 //= 1.0 First version.
+//= 1.1 Added support to Para_Team_Mark_ in Eden Group. [Ragno]
+//= 1.2 Added use of F_HasEdenGroupMark function. [Ragno]
 //============================================================
 
 moc_para01,41,76,3	script	Ragi#1	4_M_RAGI,{
 	cutin "ragi01",0;
 	mes "[Ragi]";
-	if (countitem(6219) == 0) {// Para_Team_Mark
+	if (!callfunc("F_HasEdenGroupMark")) {
 		mes "Only adventurers from Eden Group are welcome here.";
 		mes "I'm giving requests to base level ^FF0000130-140^000000 adventurers only.";
 	}

+ 31 - 5
npc/re/quests/eden/eden_common.txt

@@ -3,7 +3,7 @@
 //===== By: ================================================== 
 //= L0ne_W0lf
 //===== Current Version: ===================================== 
-//= 1.8
+//= 2.0
 //===== Compatible With: ===================================== 
 //= rAthena Project
 //===== Description: ========================================= 
@@ -19,6 +19,8 @@
 //= 1.6 Added Izlude RE coordinates. [Euphy]
 //= 1.7 Added Malaya teleporter. [Euphy]
 //= 1.8 Updated to match the latest official script. [Euphy]
+//= 1.9 Added support to Para_Team_Mark_ in Eden Group. [AtlantisRO/Ragno]
+//= 2.0 Added use of F_HasEdenGroupMark function. [Ragno]
 //============================================================
 
 // Common NPCs :: lv_tre
@@ -32,6 +34,26 @@ moc_para01,27,35,5	script	Secretary Lime Evenor	952,{
 		mes "- after you loose some weight. -";
 		close;
 	}
+	if (countitem(6219) > 0) {
+		mes "[Lime Evenor]";
+		mes "Thanks to many adventurers visiting our Eden Group, we've recently prepared a new version of Eden Group Mark for our visitors.";
+		mes "And it is also possible to exchange old version of Eden Group Mark into a new one.";
+		next;
+		mes "[Lime Evenor]";
+		mes "Though it has a slight time delay, this new version of Eden Group Mark will send you back to current saved location.";
+		mes "Would you like to exchange yours?";
+		next;
+		if (select("Sure:I'm good.") == 2){
+			mes "[Lime Evenor]";
+			mes "What possible reason would you have... to not exchange?";
+			close;
+		}
+		delitem 6219,1;
+		getitem 22508,1;
+		mes "[Lime Evenor]";
+		mes "There you go. Come back again~";
+		close;
+	}
 	mes "[Lime Evenor]";
 	mes "People who follow their dreams and romances listen to me. We are representatives of the paradise called 'The garden of Eden' called the Eden group . There is no place like this anywhere.";
 	mes "Hello. Can I help you?";
@@ -55,7 +77,7 @@ moc_para01,27,35,5	script	Secretary Lime Evenor	952,{
 			next;
 			break;
 		case 2:
-			if (countitem(6219) < 1) {
+			if (!callfunc("F_HasEdenGroupMark")) {
 				mes "[Lime Evenor]";
 				mes "You can be a Eden's member by simply registering with me.";
 				mes "Would you like to join Eden Group?";
@@ -94,7 +116,7 @@ moc_para01,27,35,5	script	Secretary Lime Evenor	952,{
 					next;
 					mes "[Lime Evenor]";
 					mes "Hopefully you can do great work as an Eden's member.";
-					getitem 6219,1; //Para_Team_Mark
+					getitem 22508,1; //Para_Team_Mark_
 					next;
 					break;
 				case 2:
@@ -167,7 +189,7 @@ moc_para01,27,35,5	script	Secretary Lime Evenor	952,{
 			}
 			break;
 		case 4:
-			if (countitem(6219) > 0) {
+			if (callfunc("F_HasEdenGroupMark")) {
 				mes "[Lime Evenor]";
 				mes "Would like to try some missions as an Eden member?";
 				next;
@@ -294,7 +316,7 @@ OnTouch:
 }
 
 moc_para01,47,39,3	script	#warp_2_pass	111,{
-	if (countitem(6219) > 0) {
+	if (callfunc("F_HasEdenGroupMark")) {
 		mes "[Lime Evenor]";
 		mes "Oh, it is an exclusive place only for Eden's members.";
 		mes "If you are a member, you can come whenever you want!";
@@ -408,3 +430,7 @@ moc_para01,20,35,5	script	Office Assistant Neede	814,{
 	mes "Huh? Did you hear that? Gosh~!";
 	close;
 }
+
+function	script	F_HasEdenGroupMark	{
+	return (countitem(6219) > 0 || countitem(22508) > 0);
+}

+ 14 - 12
npc/re/quests/eden/eden_quests.txt

@@ -16,11 +16,13 @@
 //= 1.6 Kagerou/Oboro support (Class -> BaseClass) [Euphy]
 //= 2.0 Updated Instructor Ur's quests. [Capuche]
 //= 2.1 Updated Blacksmith Thorn and Weapons Expert NPC. [Capuche]
+//= 2.2 Added support to Para_Team_Mark_ in Eden Group. [Ragno]
+//= 2.3 Added use of F_HasEdenGroupMark function. [Ragno]
 //============================================================
 
 moc_para01,25,35,4	script	Instructor Boya#para01	4_M_KNIGHT_GOLD,{
 	mes "[Boya]";
-	if (countitem(6219) < 1) {
+	if (!callfunc("F_HasEdenGroupMark")) {
 		mes "You are not in my group are you?";
 		mes "I don't have anything to say to outsiders.";
 		mes "If you want something register with my group.";
@@ -819,7 +821,7 @@ moc_fild11,180,253,5	script	Talking Dog#para03	972,{
 	mes "Not a wolf.";
 	mes "I wasn't a dog originally...";
 	next;
-	if (countitem(6219) > 0) {
+	if (callfunc("F_HasEdenGroupMark")) {
 		mes "[Talking Dog]";
 		mes "Anyway are you a Eden Group member?";
 		mes "Oh good to see you.";
@@ -1027,7 +1029,7 @@ prt_sewb1,131,262,3	script	Timid Cat#para04	422,{
 
 pay_arche,41,136,3	script	Eden Member Karl#para05	904,{
 	if (para_suv01 < 13) {
-		if (countitem(6219) > 0) {
+		if (callfunc("F_HasEdenGroupMark")) {
 			mes "[Karl]";
 			mes "Hey, how are you?";
 			mes "Good to see you~";
@@ -1170,7 +1172,7 @@ pay_arche,41,136,3	script	Eden Member Karl#para05	904,{
 
 anthell01,29,264,5	script	Eden Member Cloud#para06	899,{
 	if (para_suv01 < 17) {
-		if (countitem(6219) > 0) {
+		if (callfunc("F_HasEdenGroupMark")) {
 			mes "[Cloud]";
 			mes "Oops.";
 			mes "You are a member of my group.";
@@ -1360,7 +1362,7 @@ anthell01,29,264,5	script	Eden Member Cloud#para06	899,{
 
 in_orcs01,38,175,3	script	Eden Member Hooksha	803,{
 	if (para_suv01 < 24) {
-		if (countitem(6219) > 0) {
+		if (callfunc("F_HasEdenGroupMark")) {
 			mes "[Hooksha]";
 			mes "Unbelievable why did you come here?";
 			mes "Um... You are not on the third step of the training?";
@@ -1629,7 +1631,7 @@ in_orcs01,38,175,3	script	Eden Member Hooksha	803,{
 
 iz_dun04,43,46,3	script	Eden Member Callandiva	745,{
 	if (para_suv01 < 33) {
-		if (countitem(6219) > 0) {
+		if (callfunc("F_HasEdenGroupMark")) {
 			mes "[Callandiva]";
 			mes "How did you get so deep in this ocean city?";
 			mes "Ah, that symbol is of our group.";
@@ -2225,7 +2227,7 @@ moc_para01,179,44,3	script	Chef	820,{
 			mes "Ah, Kim-dduck-soon.";
 			mes "It's the representative meal for normal citizens.";
 			next;
-			if (countitem(6219) > 0) {
+			if (callfunc("F_HasEdenGroupMark")) {
 				if (Zeny > 2699) {
 					mes "[Chef]";
 					mes "Hey, here you are.";
@@ -2264,7 +2266,7 @@ moc_para01,179,44,3	script	Chef	820,{
 			mes "Course meal B?";
 			mes "This food with meat and vegetables in hot soup has it's origins from nomadic life under the cold and dry nature.";
 			next;
-			if (countitem(6219) > 0) {
+			if (callfunc("F_HasEdenGroupMark")) {
 				if (Zeny > 3599) {
 					mes "[Chef]";
 					mes "Hey, here you are.";
@@ -2299,7 +2301,7 @@ moc_para01,179,44,3	script	Chef	820,{
 			mes "How many times do I have to tell you?";
 			close;
 		case 4:
-			if (countitem(6219) > 0) {
+			if (callfunc("F_HasEdenGroupMark")) {
 				if (Zeny > 4499) {
 					mes "[Chef]";
 					mes "Hey, here you are.";
@@ -2342,7 +2344,7 @@ moc_para01,179,44,3	script	Chef	820,{
 			close;
 		}
 	case 2:
-		if (countitem(6219) > 0) {
+		if (callfunc("F_HasEdenGroupMark")) {
 			mes "[Chef]";
 			mes "Most jobs should be managed by yourself. So it might be difficult, right?";
 			mes "Actually it's harmful so they have requested continuously.";
@@ -2451,7 +2453,7 @@ moc_para01,179,44,3	script	Chef	820,{
 
 moc_para01,23,35,5	script	Instructor Ur#2nd01	4_M_KNIGHT_BLACK,{
 	mes "[Instructor Ur]";
-	if (countitem(6219) < 1) {// Para_Team_Mark
+	if (!callfunc("F_HasEdenGroupMark")) {
 		mes "Hey there!";
 		mes "I see you're not one of our agents?";
 		mes "Are you interested in joining us?";
@@ -3734,7 +3736,7 @@ moc_para01,111,83,3	script	Blacksmith Thorn#2nd10	2_M_OLDBLSMITH,{
 		close;
 	}
 	mes "[Thorn]";
-	if (countitem(6219) < 1) {// Para_Team_Mark
+	if (!callfunc("F_HasEdenGroupMark")) {
 		mes "Hmm, are you a member of Eden Group?";
 		mes "You need to be one of our members to use my services.";
 		close;

+ 4 - 2
npc/re/quests/eden/eden_service.txt

@@ -3,7 +3,7 @@
 //===== By: ==================================================
 //= L0ne_W0lf
 //===== Current Version: =====================================
-//= 1.1
+//= 1.3
 //===== Compatible With: =====================================
 //= rAthena Project
 //===== Description: =========================================
@@ -11,6 +11,8 @@
 //===== Additional Comments: =================================
 //= 1.0 First Version.
 //= 1.1 Replaced 2nd NPC with duplicate function. [Masao]
+//= 1.2 Added support to Para_Team_Mark_ in Eden Group. [Ragno]
+//= 1.3 Added use of F_HasEdenGroupMark function. [Ragno]
 //============================================================
 
 // Goods Cabinets :: pare_service
@@ -32,7 +34,7 @@
 	mes "3.Cabinet fee is";
 	mes "  ^4d4dff500 zeny^000000!";
 	next;
-	if (countitem(6219) > 0) {
+	if (callfunc("F_HasEdenGroupMark")) {
 		mes "You need to insert zeny to use the cabinet.";
 		mes "Cost : 500 Zeny ";
 		mes "Would you like to use it?";

+ 0 - 8
npc/re/quests/quests_brasilis.txt

@@ -1890,16 +1890,12 @@ brasilis,185,246,5	script	Pedro#bra	1_M_SIZ,{
 		mes "[Pedro]";
 		mes "'^3131FFMother the door won't open!^000000'";
 		mes "'^FF0000Turn the key as many times as there are colors in the rainbow.^000000'";
-		mes "";
 		mes "'^3131FFMother the water is flooding!^000000'";
 		mes "'^FF0000If the moon disappears 3 times, don't worry.^000000'";
-		mes "";
 		mes "'^3131FFMother the drought has started!^000000'";
 		mes "'^FF0000Don't worry, the waterfall will help it.^000000'";
-		mes "";
 		mes "'^3131FFMother where are my friends?^000000'";
 		mes "'^FF0000Your 7 friends are sleeping. now it's time to wake them.^000000'";
-		mes "";
 		mes "'^3131FFWhere are you mom?^000000'";
 		next;
 		mes "[Mariana]";
@@ -1931,16 +1927,12 @@ brasilis,185,246,5	script	Pedro#bra	1_M_SIZ,{
 		mes "[Pedro]";
 		mes "'^3131FFMother the door won't open!^000000'";
 		mes "'^FF0000Turn the key as many times as there are colors in the rainbow.^000000'";
-		mes "";
 		mes "'^3131FFMother the water is flooding!^000000'";
 		mes "'^FF0000If the moon disappears 3 times, don't worry.^000000'";
-		mes "";
 		mes "'^3131FFMother the drought has started!^000000'";
 		mes "'^FF0000Don't worry, the waterfall will help it.^000000'";
-		mes "";
 		mes "'^3131FFMother where are my friends?^000000'";
 		mes "'^FF0000Your 7 friends are sleeping. now it's time to wake them.^000000'";
-		mes "";
 		mes "'^3131FFWhere are you mom?^000000'";
 		close;
 	}

+ 1 - 1
sql-files/item_db_re.sql

@@ -1401,7 +1401,7 @@ REPLACE INTO `item_db_re` VALUES (2186,'Great_Encyclopedia_Revision','Great Ency
 REPLACE INTO `item_db_re` VALUES (2187,'Shield_of_Gray','Shield of Gray',4,10,NULL,2000,NULL,75,NULL,1,0xFFFFFFFF,56,2,32,NULL,'120',1,3,'.@r = getrefine(); bonus2 bSubEle,Ele_Holy,30+.@r; bonus bMdef,9+.@r/3;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (2188,'Svalinn','Svalinn',4,10,NULL,500,NULL,80,NULL,1,0xFFFFFFFF,63,2,32,NULL,'65',1,3,'.@r = getrefine(); bonus bMaxHP,9+.@r/3; bonus2 bAddEle,Ele_Water,4+.@r/3*5;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (2189,'Mad_Bunny','Mad Bunny Shield',4,10,NULL,100,NULL,40,NULL,1,0xFFFFFFFF,63,2,32,NULL,'30',1,6,'bonus2 bSubEle,Ele_All,5; bonus bMdef,6; bonus bDex,1;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (2190,'Ancient_Shield_Of_Aeon','Ancient Shield Of Aeon',4,0,NULL,200,NULL,5,NULL,1,0x000FDF80,63,2,32,NULL,'130',1,2,'bonus2 bSubEle,Ele_Neutral,10; bonus2 bSubEle,Ele_Fire,10; bonus2 bSubEle,Ele_Water,10; bonus2 bSubEle,Ele_Wind,10; bonus2 bSubEle,Ele_Earth,10; bonus2 bSubEle,Ele_Dark,10; bonus2 bSubEle,Ele_Holy,10; bonus2 bSubEle,Ele_Ghost,10; bonus bMaxHP,500; bonus bMaxSP,50; if(getrefine()>=14) skill "MG_STONECURSE",5;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (2190,'Ancient_Shield_Of_Aeon','Ancient Shield Of Aeon',4,0,NULL,200,NULL,5,NULL,0,0x000FDF80,63,2,32,NULL,'130',1,2,'bonus2 bSubEle,Ele_Neutral,10; bonus2 bSubEle,Ele_Fire,10; bonus2 bSubEle,Ele_Water,10; bonus2 bSubEle,Ele_Wind,10; bonus2 bSubEle,Ele_Earth,10; bonus2 bSubEle,Ele_Dark,10; bonus2 bSubEle,Ele_Holy,10; bonus2 bSubEle,Ele_Ghost,10; bonus bMaxHP,500; bonus bMaxSP,50; if(getrefine()>=14) skill "MG_STONECURSE",5;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (2196,'White_Gold_Shield','White Gold Shield',4,0,NULL,1800,NULL,140,NULL,1,0xFFFFFFFF,63,2,32,NULL,NULL,1,NULL,'autobonus2 "{ bonus bMagicDamageReturn,20; }",100,2000,BF_MAGIC; /* Confirm: Success rate? */',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (2198,'Lapine_Shield','Lapine Shield',4,0,NULL,1000,NULL,25,NULL,1,0xFFFFFFFF,63,2,32,NULL,'100',1,NULL,'bonus bMdef,10; if (getrefine() > 7) { bonus bMatk,20; }',NULL,NULL);
 # GM Shield

+ 1 - 1
src/map/atcommand.c

@@ -1744,7 +1744,7 @@ ACMD_FUNC(bodystyle)
 	if (!((sd->class_&MAPID_THIRDMASK) == MAPID_GUILLOTINE_CROSS || (sd->class_&MAPID_THIRDMASK) == MAPID_GENETIC
 		|| (sd->class_&MAPID_THIRDMASK) == MAPID_MECHANIC || (sd->class_&MAPID_THIRDMASK) == MAPID_ROYAL_GUARD
 		|| (sd->class_&MAPID_THIRDMASK) == MAPID_ARCH_BISHOP)) {
-		clif_displaymessage(fd, msg_txt(sd,770));	// This job has no alternate body styles.
+		clif_displaymessage(fd, msg_txt(sd,740));	// This job has no alternate body styles.
 		return -1;
 	}
 

+ 13 - 35
src/map/battle.c

@@ -1306,23 +1306,11 @@ int64 battle_calc_damage(struct block_list *src,struct block_list *bl,struct Dam
 
 		// Compressed code, fixed by map.h [Epoque]
 		if (src->type == BL_MOB) {
-			int i;
-
-			if (sc->data[SC_MANU_DEF]) {
-				for (i=0;ARRAYLENGTH(mob_manuk)>i;i++) {
-					if (mob_manuk[i]==((TBL_MOB*)src)->mob_id) {
-						damage -= damage * sc->data[SC_MANU_DEF]->val1 / 100;
-						break;
-					}
-				}
+			if( sc->data[SC_MANU_DEF] && status_get_race2(src) == RC2_MANUK ){
+				damage -= damage * sc->data[SC_MANU_DEF]->val1 / 100;
 			}
-			if (sc->data[SC_SPL_DEF]) {
-				for (i=0;ARRAYLENGTH(mob_splendide)>i;i++) {
-					if (mob_splendide[i]==((TBL_MOB*)src)->mob_id) {
-						damage -= damage * sc->data[SC_SPL_DEF]->val1 / 100;
-						break;
-					}
-				}
+			if( sc->data[SC_SPL_DEF] && status_get_race2(src) == RC2_SPLENDIDE ){
+				damage -= damage * sc->data[SC_SPL_DEF]->val1 / 100;
 			}
 		}
 
@@ -1462,27 +1450,17 @@ int64 battle_calc_damage(struct block_list *src,struct block_list *bl,struct Dam
 
 		// [Epoque]
 		if (bl->type == BL_MOB) {
-			uint8 i;
-
-			if ( ((sce=sc->data[SC_MANU_ATK]) && (flag&BF_WEAPON)) ||
-				 ((sce=sc->data[SC_MANU_MATK]) && (flag&BF_MAGIC))
+			if ( (((sce=sc->data[SC_MANU_ATK]) && (flag&BF_WEAPON)) ||
+				 ((sce=sc->data[SC_MANU_MATK]) && (flag&BF_MAGIC))) &&
+				 status_get_race2(bl) == RC2_MANUK
 				) {
-				for (i=0;ARRAYLENGTH(mob_manuk)>i;i++) {
-					if (((TBL_MOB*)bl)->mob_id==mob_manuk[i]) {
-						damage += damage * sce->val1 / 100;
-						break;
-					}
-				}
+				damage += damage * sce->val1 / 100;
 			}
-			if ( ((sce=sc->data[SC_SPL_ATK]) && (flag&BF_WEAPON)) ||
-				 ((sce=sc->data[SC_SPL_MATK]) && (flag&BF_MAGIC))
+			if ( (((sce=sc->data[SC_SPL_ATK]) && (flag&BF_WEAPON)) ||
+				 ((sce=sc->data[SC_SPL_MATK]) && (flag&BF_MAGIC))) &&
+				 status_get_race2(bl) == RC2_SPLENDIDE
 				) {
-				for (i=0;ARRAYLENGTH(mob_splendide)>i;i++) {
-					if (((TBL_MOB*)bl)->mob_id==mob_splendide[i]) {
-						damage += damage * sce->val1 / 100;
-						break;
-					}
-				}
+				damage += damage * sce->val1 / 100;
 			}
 		}
 		/* Self Buff that destroys the armor of any target hit with melee or ranged physical attacks */
@@ -6203,7 +6181,7 @@ struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list
 			}
 		}
 
-		if (!(nk&NK_NO_ELEFIX))
+		if (!(nk&NK_NO_ELEFIX) && skill_id != ASC_BREAKER) // Soul Breaker's magic portion is non-elemental. [Secret]
 			ad.damage = battle_attr_fix(src, target, ad.damage, s_ele, tstatus->def_ele, tstatus->ele_lv);
 
 		//Apply the physical part of the skill's damage. [Skotlex]

+ 2 - 0
src/map/map.h

@@ -297,6 +297,8 @@ enum e_race2 {
 	RC2_BATTLEFIELD,
 	RC2_TREASURE,
 	RC2_BIOLAB,
+	RC2_MANUK,
+	RC2_SPLENDIDE,
 	RC2_MAX
 };
 

+ 6 - 5
src/map/mob.c

@@ -104,10 +104,6 @@ struct s_randomsummon_group {
 
 static DBMap *mob_summon_db; /// Random Summon DB. struct s_randomsummon_group -> group_id
 
-//Defines the Manuk/Splendide mob groups for the status reductions [Epoque]
-const int mob_manuk[8] = { MOBID_TATACHO, MOBID_CENTIPEDE, MOBID_NEPENTHES, MOBID_HILLSRION, MOBID_HARDROCK_MOMMOTH, MOBID_G_TATACHO, MOBID_G_HILLSRION, MOBID_CENTIPEDE_LARVA };
-const int mob_splendide[5] = { MOBID_TENDRILRION, MOBID_CORNUS, MOBID_NAGA, MOBID_LUCIOLA_VESPA, MOBID_PINGUICULA };
-
 /*==========================================
  * Local prototype declaration   (only required thing)
  *------------------------------------------*/
@@ -4572,7 +4568,12 @@ static bool mob_readdb_race2(char* fields[], int columns, int current)
 {
 	int race, i;
 
-	race = atoi(fields[0]);
+	if( ISDIGIT(fields[0][0]) )
+		race = atoi(fields[0]);
+	else if( !script_get_constant( fields[0], &race ) ){
+		ShowWarning("mob_readdb_race2: Unknown race2 constant \"%s\".\n", fields[0]);
+		return false;
+	}
 
 	if (!CHK_RACE2(race)) {
 		ShowWarning("mob_readdb_race2: Unknown race2 %d.\n", race);

+ 5 - 16
src/map/mob.h

@@ -61,19 +61,6 @@ enum MOBID {
 	MOBID_G_GEOGRAPHER		= 1590,
 	MOBID_GUARDIAN_STONE1	= 1907,
 	MOBID_GUARDIAN_STONE2,
-	MOBID_TATACHO			= 1986,
-	MOBID_CENTIPEDE,
-	MOBID_NEPENTHES,
-	MOBID_HILLSRION,
-	MOBID_HARDROCK_MOMMOTH,
-	MOBID_TENDRILRION,
-	MOBID_CORNUS,
-	MOBID_NAGA,
-	MOBID_LUCIOLA_VESPA,
-	MOBID_PINGUICULA,
-	MOBID_G_TATACHO			= 1997,
-	MOBID_G_HILLSRION,
-	MOBID_CENTIPEDE_LARVA,
 	MOBID_SILVERSNIPER		= 2042,
 	MOBID_MAGICDECOY_FIRE,
 	MOBID_MAGICDECOY_WATER,
@@ -117,9 +104,11 @@ enum size {
 
 /// Used hardcoded Random Monster group in src
 enum e_Random_Monster {
-	MOBG_Branch_Of_Dead_Tree = 0,
-	MOBG_Bloody_Dead_Branch  = 2,
-	MOBG_ClassChange         = 4,
+	MOBG_Branch_Of_Dead_Tree	= 0,
+	MOBG_Poring_Box				= 1,
+	MOBG_Bloody_Dead_Branch		= 2,
+	MOBG_Red_Pouch_Of_Surprise	= 3,
+	MOBG_ClassChange			= 4,
 };
 
 struct mob_skill {

+ 27 - 24
src/map/party.c

@@ -1020,16 +1020,26 @@ int party_send_xy_clear(struct party_data *p)
 	return 0;
 }
 
-// exp share and added zeny share [Valaris]
-int party_exp_share(struct party_data* p, struct block_list* src, unsigned int base_exp, unsigned int job_exp, int zeny)
+/** Party EXP and Zeny sharing
+ * @param p Party data
+ * @param src EXP source (for renewal level penalty)
+ * @param base_exp Base EXP gained from killed mob
+ * @param job_exp Job EXP gained from killed mob
+ * @param zeny Zeny gained from killed mob
+ * @author Valaris
+ **/
+void party_exp_share(struct party_data* p, struct block_list* src, unsigned int base_exp, unsigned int job_exp, int zeny)
 {
 	struct map_session_data* sd[MAX_PARTY];
 	unsigned int i, c;
 #ifdef RENEWAL_EXP
-	uint32 base_exp_bonus, job_exp_bonus;
+	TBL_MOB *md = BL_CAST(BL_MOB, src);
+
+	if (!md)
+		return;
 #endif
 
-	nullpo_ret(p);
+	nullpo_retv(p);
 
 	// count the number of players eligible for exp sharing
 	for (i = c = 0; i < MAX_PARTY; i++) {
@@ -1038,7 +1048,7 @@ int party_exp_share(struct party_data* p, struct block_list* src, unsigned int b
 		c++;
 	}
 	if (c < 1)
-		return 0;
+		return;
 
 	base_exp/=c;
 	job_exp/=c;
@@ -1055,33 +1065,26 @@ int party_exp_share(struct party_data* p, struct block_list* src, unsigned int b
 			zeny = (unsigned int) cap_value(zeny * bonus/100, INT_MIN, INT_MAX);
 	}
 
-#ifdef RENEWAL_EXP
-	base_exp_bonus = base_exp;
-	job_exp_bonus = job_exp;
-#endif
-
 	for (i = 0; i < c; i++) {
 #ifdef RENEWAL_EXP
-		if( !(src && src->type == BL_MOB && ((TBL_MOB*)src)->db->mexp) ) {
-			TBL_MOB *md = BL_CAST(BL_MOB, src);
-			int rate = 0;
-
-			if (!md)
-				return 0;
-
-			rate = pc_level_penalty_mod(md->db->lv - sd[i]->status.base_level, md->db->status.class_, md->db->status.mode, 1);
-			base_exp = (unsigned int)cap_value(base_exp_bonus * rate / 100, 1, UINT_MAX);
-			job_exp = (unsigned int)cap_value(job_exp_bonus * rate / 100, 1, UINT_MAX);
+		uint32 base_gained = base_exp, job_gained = job_exp;
+		if (base_exp || job_exp) {
+			int rate = pc_level_penalty_mod(md->level - sd[i]->status.base_level, md->db->status.class_, md->db->status.mode, 1);
+			if (rate != 100) {
+				if (base_exp)
+					base_gained = (unsigned int)cap_value(apply_rate(base_exp, rate), 1, UINT_MAX);
+				if (job_exp)
+					job_gained = (unsigned int)cap_value(apply_rate(job_exp, rate), 1, UINT_MAX);
+			}
 		}
-#endif
-
+		pc_gainexp(sd[i], src, base_gained, job_gained, 0);
+#else
 		pc_gainexp(sd[i], src, base_exp, job_exp, 0);
+#endif
 
 		if (zeny) // zeny from mobs [Valaris]
 			pc_getzeny(sd[i],zeny,LOG_TYPE_PICKDROP_MONSTER,NULL);
 	}
-
-	return 0;
 }
 
 //Does party loot. first_charid holds the charid of the player who has time priority to take the item.

+ 1 - 1
src/map/party.h

@@ -83,7 +83,7 @@ int party_send_message(struct map_session_data *sd,const char *mes,int len);
 int party_recv_message(int party_id,uint32 account_id,const char *mes,int len);
 int party_skill_check(struct map_session_data *sd, int party_id, uint16 skill_id, uint16 skill_lv);
 int party_send_xy_clear(struct party_data *p);
-int party_exp_share(struct party_data *p,struct block_list *src,unsigned int base_exp,unsigned int job_exp,int zeny);
+void party_exp_share(struct party_data *p,struct block_list *src,unsigned int base_exp,unsigned int job_exp,int zeny);
 int party_share_loot(struct party_data* p, struct map_session_data* sd, struct item* item, int first_charid);
 int party_send_dot_remove(struct map_session_data *sd);
 int party_sub_count(struct block_list *bl, va_list ap);

+ 30 - 5
src/map/pc.c

@@ -3045,7 +3045,12 @@ void pc_bonus(struct map_session_data *sd,int type,int val)
 				sd->bonus.weapon_matk_rate += val;
 			break;
 		default:
-			ShowWarning("pc_bonus: unknown type %d %d !\n",type,val);
+			if (running_npc_stat_calc_event) {
+				ShowWarning("pc_bonus: unknown bonus type %d %d in OnPCStatCalcEvent!\n", type, val);
+			}
+			else {
+				ShowWarning("pc_bonus: unknown bonus type %d %d in item #%d\n", type, val, current_equip_card_id ? current_equip_card_id : sd->inventory_data[current_equip_item_index]->nameid);
+			}
 			break;
 	}
 }
@@ -3692,7 +3697,12 @@ void pc_bonus2(struct map_session_data *sd,int type,int type2,int val)
 			sd->ignore_mdef_by_race2[type2] += val;
 		break;
 	default:
-		ShowWarning("pc_bonus2: unknown type %d %d %d!\n",type,type2,val);
+		if (running_npc_stat_calc_event) {
+			ShowWarning("pc_bonus2: unknown bonus type %d %d %d in OnPCStatCalcEvent!\n", type, type2, val);
+		}
+		else {
+			ShowWarning("pc_bonus2: unknown bonus type %d %d %d in item #%d\n", type, type2, val, current_equip_card_id ? current_equip_card_id : sd->inventory_data[current_equip_item_index]->nameid);
+		}
 		break;
 	}
 }
@@ -3807,7 +3817,12 @@ void pc_bonus3(struct map_session_data *sd,int type,int type2,int type3,int val)
 		sd->norecover_state_race[type2].tick = val;
 		break;
 	default:
-		ShowWarning("pc_bonus3: unknown type %d %d %d %d!\n",type,type2,type3,val);
+		if (running_npc_stat_calc_event) {
+			ShowWarning("pc_bonus3: unknown bonus type %d %d %d %d in OnPCStatCalcEvent!\n", type, type2, type3, val);
+		}
+		else {
+			ShowWarning("pc_bonus3: unknown bonus type %d %d %d %d in item #%d\n", type, type2, type3, val, current_equip_card_id ? current_equip_card_id : sd->inventory_data[current_equip_item_index]->nameid);
+		}
 		break;
 	}
 }
@@ -3882,7 +3897,12 @@ void pc_bonus4(struct map_session_data *sd,int type,int type2,int type3,int type
 		break;
 
 	default:
-		ShowWarning("pc_bonus4: unknown type %d %d %d %d %d!\n",type,type2,type3,type4,val);
+		if (running_npc_stat_calc_event) {
+			ShowWarning("pc_bonus4: unknown bonus type %d %d %d %d %d in OnPCStatCalcEvent!\n", type, type2, type3, type4, val);
+		}
+		else {
+			ShowWarning("pc_bonus4: unknown bonus type %d %d %d %d %d in item #%d\n", type, type2, type3, type4, val, current_equip_card_id ? current_equip_card_id : sd->inventory_data[current_equip_item_index]->nameid);
+		}
 		break;
 	}
 }
@@ -3923,7 +3943,12 @@ void pc_bonus5(struct map_session_data *sd,int type,int type2,int type3,int type
 		break;
 
 	default:
-		ShowWarning("pc_bonus5: unknown type %d %d %d %d %d %d!\n",type,type2,type3,type4,type5,val);
+		if (running_npc_stat_calc_event) {
+			ShowWarning("pc_bonus5: unknown bonus type %d %d %d %d %d %d in OnPCStatCalcEvent!\n", type, type2, type3, type4, type5, val);
+		}
+		else {
+			ShowWarning("pc_bonus5: unknown bonus type %d %d %d %d %d %d in item #%d\n", type, type2, type3, type4, type5, val, current_equip_card_id ? current_equip_card_id : sd->inventory_data[current_equip_item_index]->nameid);
+		}
 		break;
 	}
 }

+ 10 - 0
src/map/script_constants.h

@@ -2424,6 +2424,9 @@
 	export_constant(RC2_BATTLEFIELD);
 	export_constant(RC2_TREASURE);
 	export_constant(RC2_BIOLAB);
+	export_constant(RC2_MANUK);
+	export_constant(RC2_SPLENDIDE);
+	export_constant(RC2_MAX);
 
 	/* classes */
 	export_constant(CLASS_NORMAL);
@@ -3069,6 +3072,13 @@
 	export_constant(IM_PARTY);
 	export_constant(IM_GUILD);
 
+	/* mob random groups */
+	export_constant(MOBG_Branch_Of_Dead_Tree);
+	export_constant(MOBG_Poring_Box);
+	export_constant(MOBG_Bloody_Dead_Branch);
+	export_constant(MOBG_Red_Pouch_Of_Surprise);
+	export_constant(MOBG_ClassChange);
+
 	#undef export_constant
 
 #endif /* _SCRIPT_CONSTANTS_H_ */

+ 7 - 3
src/map/status.c

@@ -48,6 +48,7 @@ static struct status_data dummy_status;
 short current_equip_item_index; /// Contains inventory index of an equipped item. To pass it into the EQUP_SCRIPT [Lupus]
 unsigned int current_equip_combo_pos; /// For combo items we need to save the position of all involved items here
 int current_equip_card_id; /// To prevent card-stacking (from jA) [Skotlex]
+bool running_npc_stat_calc_event; /// Indicate if OnPCStatCalcEvent is running.
 // We need it for new cards 15 Feb 2005, to check if the combo cards are insrerted into the CURRENT weapon only to avoid cards exploits
 
 unsigned int SCDisabled[SC_MAX]; ///< List of disabled SC on map zones. [Cydh]
@@ -3205,7 +3206,9 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt)
 
 	pc_itemgrouphealrate_clear(sd);
 
+	running_npc_stat_calc_event = true;
 	npc_script_event(sd, NPCE_STATCALC);
+	running_npc_stat_calc_event = false;
 
 	// Parse equipment
 	for (i = 0; i < EQI_MAX; i++) {
@@ -3398,6 +3401,7 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt)
 			}
 		}
 	}
+	current_equip_card_id = 0; // Clear stored card ID [Secret]
 
 	if( sc->count && sc->data[SC_ITEMSCRIPT] ) {
 		struct item_data *data = itemdb_exists(sc->data[SC_ITEMSCRIPT]->val1);
@@ -9330,12 +9334,12 @@ int status_change_start(struct block_list* src, struct block_list* bl,enum sc_ty
 			//1st Transcendent Spirit works similar to Marionette Control
 			if(sd && val2 == SL_HIGH) {
 				int stat,max_stat;
-				// Fetch target's stats
-				struct status_data* status2 = status_get_status_data(bl); // Battle status
+				struct status_data *status2 = status_get_base_status(bl);
+
 				val3 = 0;
 				val4 = 0;
 				max_stat = (status_get_lv(bl)-10<50)?status_get_lv(bl)-10:50;
-				stat = max(0, max_stat - status2->str ); val3 |= cap_value(stat,0,0xFF)<<16;
+				stat = max(0, max_stat - status2->str); val3 |= cap_value(stat,0,0xFF)<<16;
 				stat = max(0, max_stat - status2->agi ); val3 |= cap_value(stat,0,0xFF)<<8;
 				stat = max(0, max_stat - status2->vit ); val3 |= cap_value(stat,0,0xFF);
 				stat = max(0, max_stat - status2->int_); val4 |= cap_value(stat,0,0xFF)<<16;

+ 1 - 0
src/map/status.h

@@ -1704,6 +1704,7 @@ enum e_joint_break
 extern short current_equip_item_index;
 extern unsigned int current_equip_combo_pos;
 extern int current_equip_card_id;
+extern bool running_npc_stat_calc_event;
 
 /// Mode definitions to clear up code reading. [Skotlex]
 enum e_mode {