diff options
-rw-r--r-- | AUTHORS | 1 | ||||
-rwxr-xr-x | configure | 38 | ||||
-rw-r--r-- | configure.in | 21 | ||||
-rw-r--r-- | db/re/skill_cast_db.txt | 612 | ||||
-rw-r--r-- | npc/custom/test.txt | 184 | ||||
-rw-r--r-- | src/common/atomic.h | 4 | ||||
-rw-r--r-- | src/common/cbasetypes.h | 12 | ||||
-rw-r--r-- | src/common/grfio.c | 18 | ||||
-rw-r--r-- | src/common/mmo.h | 15 | ||||
-rw-r--r-- | src/map/battle.c | 3 | ||||
-rw-r--r-- | src/map/script.c | 54 | ||||
-rw-r--r-- | src/map/script.h | 3 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc | 4 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking.HookingPoints.inc | 1 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking.Hooks.inc | 25 |
15 files changed, 625 insertions, 370 deletions
@@ -41,6 +41,7 @@ Brainstorm brianluau celest CG +Chilly chloe CHRIS Chunglyeng @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in 284a163. +# From configure.in 8801585. # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69. # @@ -4867,8 +4867,44 @@ if ac_fn_c_try_run "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -march=i686 (and we can run it)" >&5 +$as_echo_n "checking whether $CC supports -march=i686 (and we can run it)... " >&6; } + OLD_CFLAGS="$CFLAGS" + OLD_LDFLAGS="$LDFLAGS" CFLAGS="$CFLAGS -march=i686" LDFLAGS="$LDFLAGS -march=i686" + if test "$cross_compiling" = yes; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: guessing no" >&5 +$as_echo "guessing no" >&6; } + CFLAGS="$OLD_CFLAGS" + LDFLAGS="$OLD_LDFLAGS" + + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + int main(int argc, char **argv) { return 0; } + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + CFLAGS="$OLD_CFLAGS" + LDFLAGS="$OLD_LDFLAGS" + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + else diff --git a/configure.in b/configure.in index 1fc2d0e29..6755e3ca5 100644 --- a/configure.in +++ b/configure.in @@ -481,8 +481,29 @@ AC_RUN_IFELSE( ])], [ AC_MSG_RESULT([yes]) + AC_MSG_CHECKING([whether $CC supports -march=i686 (and we can run it)]) + OLD_CFLAGS="$CFLAGS" + OLD_LDFLAGS="$LDFLAGS" CFLAGS="$CFLAGS -march=i686" LDFLAGS="$LDFLAGS -march=i686" + AC_RUN_IFELSE( + [AC_LANG_SOURCE([ + int main(int argc, char **argv) { return 0; } + ])], + [ + AC_MSG_RESULT([yes]) + ], + [ + AC_MSG_RESULT([no]) + CFLAGS="$OLD_CFLAGS" + LDFLAGS="$OLD_LDFLAGS" + ], + [ + AC_MSG_RESULT([guessing no]) + CFLAGS="$OLD_CFLAGS" + LDFLAGS="$OLD_LDFLAGS" + ] + ) ], [ AC_MSG_RESULT([no]) diff --git a/db/re/skill_cast_db.txt b/db/re/skill_cast_db.txt index 0ac81340a..8e3496284 100644 --- a/db/re/skill_cast_db.txt +++ b/db/re/skill_cast_db.txt @@ -20,91 +20,91 @@ //===== Swordman =========================== //-- SM_PROVOKE -6,0,0,0,30000,0,0,-1 +6,0,0,0,30000,0,0,0 //-- SM_MAGNUM -7,0,2000,0,2000,10000,0,-1 +7,0,2000,0,2000,10000,0,0 //-- SM_ENDURE -8,0,0,0,10000:13000:16000:19000:22000:25000:28000:31000:34000:37000,10000,10000,-1 +8,0,0,0,10000:13000:16000:19000:22000:25000:28000:31000:34000:37000,10000,10000,0 //========================================== //===== Mage =============================== //-- MG_SIGHT -10,0,0,0,10000,0,0,-1 +10,0,0,0,10000,0,0,0 //-- MG_NAPALMBEAT -11,500,1000:1000:1000:900:900:800:800:700:600:500,0,0,0,0,0 +11,400,1000:1000:1000:900:900:800:800:700:600:500,0,0,0,0,100 //-- MG_SAFETYWALL -12,4000:3600:3200:2800:2400:2000:1600:1200:800:400,0,0,5000:10000:15000:20000:25000:30000:35000:40000:45000:50000,0,0,0 +12,3200:2880:2560:2240:1920:1600:1280:960:640:320,0,0,5000:10000:15000:20000:25000:30000:35000:40000:45000:50000,0,0,800:720:640:560:480:400:320:240:160:80 //-- MG_SOULSTRIKE -13,500,1200:1200:1600:1600:2000:2000:2400:2400:2800:2500,0,0,0,0,0 +13,400,1200:1200:1600:1600:2000:2000:2400:2400:2800:2500,0,0,0,0,100 //-- MG_COLDBOLT -14,800:1200:1600:2000:2400:3600:4000:4400,1000:1200:1400:1600:1800:2000:2200:2400:2600:2800,0,0,0,0,0 +14,640:960:1280:1600:1920:2100:1560:2880:3200:3520,1000:1200:1400:1600:1800:2000:2200:2400:2600:2800,0,0,0,0,160:240:320:400:480:700:640:720:800:880 //-- MG_FROSTDIVER -15,800,1500,0,0,3000:6000:9000:12000:15000:18000:21000:24000:27000:30000,0,0 +15,640,1500,0,0,3000:6000:9000:12000:15000:18000:21000:24000:27000:30000,0,160 //-- MG_STONECURSE -16,1000,0,0,5000,20000,0,0 +16,800,0,0,5000,20000,0,200 //-- MG_FIREBALL -17,1600:1600:1600:1600:1600:1000:1000:1000:1000:1000,1500:1500:1500:1500:1500:1000:1000:1000:1000:1000,0,0,0,0,0 +17,1280:1280:1280:1280:1280:800:800:800:800:800,1500:1500:1500:1500:1500:1000:1000:1000:1000:1000,0,0,0,0,320:320:320:320:320:200:200:200:200:200 //-- MG_FIREWALL -18,2000:1800:1600:1400:1200:1100:1000:900:800:700,0,0,5000:6000:7000:8000:9000:10000:11000:12000:13000:14000,0,0,0 +18,1600:1440:1280:1120:960:880:800:720:640:560,0,0,5000:6000:7000:8000:9000:10000:11000:12000:13000:14000,0,0,400:360:320:280:240:220:200:180:160:140 //-- MG_FIREBOLT -19,800:1200:1600:2000:2400:3600:4000:4400,1000:1200:1400:1600:1800:2000:2200:2400:2600:2800,0,0,0,0,0 +19,640:960:1280:1600:1920:2100:1560:2880:3200:3520,1000:1200:1400:1600:1800:2000:2200:2400:2600:2800,0,0,0,0,160:240:320:400:480:700:640:720:800:880 //-- MG_LIGHTNINGBOLT -20,800:1200:1600:2000:2400:3600:4000:4400,1000:1200:1400:1600:1800:2000:2200:2400:2600:2800,0,0,0,0,0 +20,640:960:1280:1600:1920:2100:1560:2880:3200:3520,1000:1200:1400:1600:1800:2000:2200:2400:2600:2800,0,0,0,0,160:240:320:400:480:700:640:720:800:880 //-- MG_THUNDERSTORM -21,800:1600:2400:3200:4000:4800:5600:6400:7200:8000,2000,0,500,0,0,0 +21,640:1280:1920:2560:3200:3840:4480:5120:5760:6400,2000:2000:2000:2000:2000:2000:2000:2000:2000:2000,0,500,0,0,160:320:480:640:800:960:1120:1280:1440:1600 //========================================== //===== Acolyte ============================ //-- AL_RUWACH -24,0,0,0,10000,0,0,-1 +24,0,0,0,10000,0,0,0 //-- AL_PNEUMA -25,0,0,0,10000,0,0,-1 +25,0,0,0,10000,0,0,0 //-- AL_TELEPORT -26,0,0,0,0,0,0,-1 +26,0,0,0,0,0,0,0 //-- AL_WARP 27,0,0,0,5000:10000:15000:20000:25000:30000:35000:40000:45000:50000,0,0,1000 //-- AL_HEAL -28,0,1000,0,0,0,0,-1 +28,0,1000,0,0,0,0,0 //-- AL_INCAGI -29,1000,1000,0,60000:80000:100000:120000:140000:160000:180000:200000:220000:240000,0,0,0 +29,800,1000,0,60000:80000:100000:120000:140000:160000:180000:200000:220000:240000,0,0,200 //-- AL_DECAGI 30,750,1000,0,40000:50000:60000:70000:80000:90000:100000:110000:120000:130000,0,0,250 //-- AL_HOLYWATER -31,1000,500,0,0,0,0,0 +31,800,500,0,0,0,0,200 //-- AL_CRUCIS 32,350,2000,0,0,0,0,150 //-- AL_ANGELUS 33,350,3500,0,30000:60000:90000:120000:150000:180000:210000:240000:270000:300000,0,0,150 //-- AL_BLESSING -34,0,0,0,60000:80000:100000:120000:140000:160000:180000:200000:220000:240000,0,0,-1 +34,0,0,0,60000:80000:100000:120000:140000:160000:180000:200000:220000:240000,0,0,0 //-- AL_CURE -35,0,1000,0,0,6000,0,-1 +35,0,1000,0,0,6000,0,0 //========================================== //===== Archer ============================= //-- AC_CONCENTRATION -45,0,0,0,60000:80000:100000:120000:140000:160000:180000:200000:220000:240000,0,0,-1 +45,0,0,0,60000:80000:100000:120000:140000:160000:180000:200000:220000:240000,0,0,0 //-- AC_DOUBLE -46,0,100,0,100,0,0,-1 +46,0,100,0,100,0,0,0 //-- AC_SHOWER -47,0,100,0,100,0,0,-1 +47,0,100,0,100,0,0,0 //========================================== //===== Thief ============================== //-- TF_HIDING -51,0,0,0,30000:60000:90000:120000:150000:180000:210000:240000:270000:300000,0,0,-1 +51,0,0,0,30000:60000:90000:120000:150000:180000:210000:240000:270000:300000,0,0,0 //-- TF_POISON -52,0,0,0,0,15000:20000:25000:30000:35000:40000:45000:50000:55000:60000,0,-1 +52,0,0,0,0,15000:20000:25000:30000:35000:40000:45000:50000:55000:60000,0,0 //========================================== //===== First planned to be shared ========= //-- ALL_RESURRECTION -54,6000:4000:2000:0,0:1000:2000:3000,0,0,0,0,0 +54,4800:3200:1600:0,0:1000:2000:3000,0,0,0,0,1200:800:400:0 //========================================== @@ -112,11 +112,11 @@ //-- KN_BRANDISHSPEAR 57,350,0,0,0,0,0,350 //-- KN_SPEARBOOMERANG -59,0,1000,0,0,0,0,-1 +59,0,1000,0,0,0,0,0 //-- KN_TWOHANDQUICKEN -60,0,0,0,30000:60000:90000:120000:150000:180000:210000:240000:270000:300000,0,0,-1 +60,0,0,0,30000:60000:90000:120000:150000:180000:210000:240000:270000:300000,0,0,0 //-- KN_AUTOCOUNTER -61,0,0,0,400:800:1200:1600:2000,0,0,-1 +61,0,0,0,400:800:1200:1600:2000,0,0,0 //-- KN_BOWLINGBASH 62,350,0,0,0,0,0,350 //========================================== @@ -124,62 +124,62 @@ //===== Priest ============================= //-- PR_IMPOSITIO -66,0,3000,0,60000,0,0,-1 +66,0,3000,0,60000,0,0,0 //-- PR_SUFFRAGIUM -67,0,2000,0,30000:20000:10000,0,0,-1 +67,0,2000,0,30000:20000:10000,0,0,0 //-- PR_ASPERSIO -68,0,2000,0,60000:90000:120000:150000:180000,0,0,-1 +68,0,2000,0,60000:90000:120000:150000:180000,0,0,0 //-- PR_BENEDICTIO -69,0,0,0,40000:80000:120000:160000:200000,0,0,-1 +69,0,0,0,40000:80000:120000:160000:200000,0,0,0 //-- PR_SANCTUARY -70,5000,0,0,4000:7000:10000:13000:16000:19000:22000:25000:28000:31000,0,0,0 +70,4000,0,0,4000:7000:10000:13000:16000:19000:22000:25000:28000:31000,0,0,1000 //-- PR_SLOWPOISON -71,0,0,0,10000:20000:30000:40000,0,0,-1 +71,0,0,0,10000:20000:30000:40000,0,0,0 //-- PR_STRECOVERY -72,0,2000,0,0,30000,0,-1 +72,0,2000,0,0,30000,0,0 //-- PR_KYRIE -73,2000,2000,0,120000,0,0,0 +73,1600,2000,0,120000,0,0,400 //-- PR_MAGNIFICAT -74,4000,2000,0,30000:45000:60000:75000:90000,0,0,0 +74,3200,2000,0,30000:45000:60000:75000:90000,0,0,800 //-- PR_GLORIA -75,0,2000,0,10000:15000:20000:25000:30000,0,0,-1 +75,0,2000,0,10000:15000:20000:25000:30000,0,0,0 //-- PR_LEXDIVINA -76,0,3000,0,30000:35000:40000:45000:50000:60000:60000:60000:60000:60000,0,0,-1 +76,0,3000,0,30000:35000:40000:45000:50000:60000:60000:60000:60000:60000,0,0,0 //-- PR_TURNUNDEAD -77,1000,3000,0,0,0,0,0 +77,800,3000,0,0,0,0,200 //-- PR_LEXAETERNA -78,0,3000,0,600000,0,0,-1 +78,0,3000,0,600000,0,0,0 //-- PR_MAGNUS -79,15000,4000,0,5000:6000:7000:8000:9000:10000:11000:12000:13000:14000,0,0,0 +79,12000,4000,0,5000:6000:7000:8000:9000:10000:11000:12000:13000:14000,0,0,3000 //========================================== //===== Wizard ============================= //-- WZ_FIREPILLAR -80,2400:2160:1920:1680:1440:1200:960:720:480:240,1000,0,30000,600:800:1000:1200:1400:1600:1800:2000:2200:2400,0,0 +80,1920:1728:1536:1344:1152:960:768:576:384:192,1000,0,30000,600:800:1000:1200:1400:1600:1800:2000:2200:2400,0,480:432:384:336:288:240:192:144:96:48 //-- WZ_SIGHTRASHER -81,400,2000,0,500,0,0,0 +81,0,2000,0,500,0,0,80 //-- WZ_METEOR -83,12000,2000:3000:3000:4000:4000:5000:5000:6000:6000:7000,0,500,5000,0,0 +83,9600,2000:3000:3000:4000:4000:5000:5000:6000:6000:7000,0,500,5000,0,2400 //-- WZ_JUPITEL -84,2000:2400:2800:3200:3600:4000:4400:4800:5200:5600,0,0,0,0,0,0 +84,1600:1920:2240:2560:2880:3200:3520:3840:4160:4480,0,0,0,0,0,400:480:560:640:720:800:880:960:1040:1120 //-- WZ_VERMILION -85,12000:11600:11200:10800:10400:10000:9600:9200:8800:8400,5000,0,4000,5500:6000:6500:7000:7500:8000:8500:9000:9500:10000,0,0 +85,9600:9280:8960:8640:8320:8000:7680:7360:7040:6720,5000,0,4000,5500:6000:6500:7000:7500:8000:8500:9000:9500:10000,0,2400:2320:2240:2160:2080:2000:1920:1840:1760:1680 //-- WZ_WATERBALL -86,800:1600:2400:3200:4000:4000:4000:4000:4000:4000,0,0,0,0,0,0 +86,640:1280:1920:2560:3200:3200:3200:3200:3200:3200,0,0,0,0,0,160:320:480:640:800:800:800:800:800:800 //-- WZ_ICEWALL -87,0,0,0,5000:10000:15000:20000:25000:30000:35000:40000:45000:50000,0,0,-1 +87,0,0,0,5000:10000:15000:20000:25000:30000:35000:40000:45000:50000,0,0,0 //-- WZ_FROSTNOVA -88,800:800:720:720:640:640:560:560:480:480,200,0,0,4000:5000:6000:8000:10000:12000:13000:15000:16000:17000,0,0 +88,640:640:576:576:512:512:448:448:384:384,200,0,0,4000:5000:6000:8000:10000:12000:13000:15000:16000:17000,0,160:160:144:144:128:128:112:112:96:96 //-- WZ_STORMGUST -89,4800:5600:6400:7200:8000:8800:9600:10400:11200:12000,5000,0,4600,12000,0,0 +89,3840:4480:5120:5760:6400:7040:7680:8320:8960:9600,5000,0,4600,12000,0,960:1120:1280:1440:1600:1760:1920:2080:2240:2400 //-- WZ_EARTHSPIKE -90,560:1120:1680:2240:2800:2800:2800:2800:2800:2800,1000:1200:1400:1600:1800:2000:2200:2400:2600:2800,0,0,0,0,0 +90,448:896:1344:1792:2240:2240:2240:2240:2240:2240,1000:1200:1400:1600:1800:2000:2200:2400:2600:2800,0,0,0,0,112:224:336:448:560:560:560:560:560:560 //-- WZ_HEAVENDRIVE -91,800:1600:2400:3200:4000:4000:4000:4000:4000:4000,1000,0,500,0,0,0 +91,640:1280:1920:2560:3200:3200:3200:3200:3200:3200,1000,0,500,0,0,160:320:480:640:800:800:800:800:800:800 //-- WZ_QUAGMIRE -92,0,1000,0,5000:10000:15000:20000:25000,5000:10000:15000:20000:25000,0,-1 +92,0,1000,0,5000:10000:15000:20000:25000,5000:10000:15000:20000:25000,0,0 //========================================== @@ -187,55 +187,55 @@ //-- BS_REPAIRWEAPON 108,2500,0,0,0,0,0,2500 //-- BS_HAMMERFALL -110,0,0,0,0,5000,0,-1 +110,0,0,0,0,5000,0,0 //-- BS_ADRENALINE -111,0,0,0,30000:60000:90000:120000:150000,0,0,-1 +111,0,0,0,30000:60000:90000:120000:150000,0,0,0 //-- BS_WEAPONPERFECT -112,0,0,0,10000:20000:30000:40000:50000,0,0,-1 +112,0,0,0,10000:20000:30000:40000:50000,0,0,0 //-- BS_OVERTHRUST -113,0,0,0,20000:40000:60000:80000:100000,0,0,-1 +113,0,0,0,20000:40000:60000:80000:100000,0,0,0 //-- BS_MAXIMIZE -114,0,0,0,1000:2000:3000:4000:5000,0,0,-1 +114,0,0,0,1000:2000:3000:4000:5000,0,0,0 //========================================== //===== Hunter ============================= //-- HT_SKIDTRAP -115,0,0,0,300000:240000:180000:120000:60000,0,0,-1 +115,0,0,0,300000:240000:180000:120000:60000,0,0,0 //-- HT_LANDMINE -116,0,0,0,200000:160000:120000:80000:40000,5000,0,-1 +116,0,1000,0,200000:160000:120000:80000:40000,5000,0,1000 //-- HT_ANKLESNARE -117,0,0,0,250000:200000:150000:100000:50000,4000:8000:12000:16000:20000,0,-1 +117,0,0,0,250000:200000:150000:100000:50000,4000:8000:12000:16000:20000,0,0 //-- HT_SHOCKWAVE -118,0,0,0,200000:160000:120000:80000:40000,0,0,-1 +118,0,0,0,200000:160000:120000:80000:40000,0,0,0 //-- HT_SANDMAN -119,0,0,0,150000:120000:90000:60000:30000,12000:14000:16000:18000:20000,0,-1 +119,0,0,0,150000:120000:90000:60000:30000,12000:14000:16000:18000:20000,0,0 //-- HT_FLASHER -120,0,0,0,150000:120000:90000:60000:30000,10000:11000:12000:13000:14000,0,-1 +120,0,0,0,150000:120000:90000:60000:30000,10000:11000:12000:13000:14000,0,0 //-- HT_FREEZINGTRAP -121,0,0,0,150000:120000:90000:60000:30000,3000:6000:9000:12000:15000,0,-1 +121,0,0,0,150000:120000:90000:60000:30000,3000:6000:9000:12000:15000,0,0 //-- HT_BLASTMINE -122,2000,0,0,25000:20000:15000:10000:5000,0,0,0 +122,0,1000,0,25000:20000:15000:10000:5000,0,0,1000 //-- HT_CLAYMORETRAP -123,2000,0,0,20000:40000:60000:80000:100000,0,0,0 +123,0,1000,0,20000:40000:60000:80000:100000,0,0,1000 //-- HT_TALKIEBOX -125,0,0,0,600000,0,0,-1 +125,0,0,0,600000,0,0,0 //-- HT_BLITZBEAT -129,1000,1000,0,0,0,0,0 +129,800,1000,0,0,0,0,200 //========================================== //===== Assassin =========================== //-- AS_CLOAKING -135,0,0,0,500:1000:2000:3000:4000:5000:6000:7000:8000:9000,0,0,-1 +135,0,0,0,500:1000:2000:3000:4000:5000:6000:7000:8000:9000,0,0,0 //-- AS_SONICBLOW -136,0,0,2000,0,5000,0,-1 +136,0,0,2000,0,5000,0,0 //-- AS_ENCHANTPOISON -138,0,0,0,30000:45000:60000:75000:90000:105000:120000:135000:150000:165000,10000:20000:30000:40000:50000:60000:70000:80000:90000:100000,0,-1 +138,0,0,0,30000:45000:60000:75000:90000:105000:120000:135000:150000:165000,10000:20000:30000:40000:50000:60000:70000:80000:90000:100000,0,0 //-- AS_POISONREACT -139,0,0,0,20000:25000:30000:35000:40000:45000:50000:55000:60000:65000,0,0,-1 +139,0,0,0,20000:25000:30000:35000:40000:45000:50000:55000:60000:65000,0,0,0 //-- AS_VENOMDUST -140,0,0,0,5000:10000:15000:20000:25000:30000:35000:40000:45000:50000,15000:20000:25000:30000:35000:40000:45000:50000:55000:60000,0,-1 +140,0,0,0,5000:10000:15000:20000:25000:30000:35000:40000:45000:50000,15000:20000:25000:30000:35000:40000:45000:50000:55000:60000,0,0 //-- AS_SPLASHER 141,500,0,0,5000:5500:6000:6500:7000:7500:8000:8500:9000:9500,15000:20000:25000:30000:35000:40000:45000:50000:55000:60000,7500:8000:8500:9000:9500:10000:10500:11000:11500:12000,500 //========================================== @@ -243,26 +243,26 @@ //===== 1st Jobs Quest Skills=============== //-- NV_TRICKDEAD -143,0,0,0,600000,0,0,-1 +143,0,0,0,600000,0,0,0 //-- SM_FATALBLOW -145,0,0,0,0,5000,0,-1 +145,0,0,0,0,5000,0,0 //-- AC_CHARGEARROW 148,0,0,0,0,0,0,1500 //-- TF_SPRINKLESAND -149,0,0,0,0,10000,0,-1 +149,0,0,0,0,10000,0,0 //-- TF_PICKSTONE 151,0,0,0,0,0,0,500 //-- TF_THROWSTONE -152,0,100,0,5000,8000,0,-1 +152,0,100,0,5000,8000,0,0 //-- MC_LOUD -155,0,0,0,300000,0,0,-1 +155,0,0,0,300000,0,0,0 //-- AL_HOLYLIGHT -156,2000,0,0,0,0,0,0 +156,1600,0,0,0,0,0,400 //-- MG_ENERGYCOAT 157,0,0,0,300000,0,0,5000 @@ -271,87 +271,87 @@ //===== NPC Skills Part 1 ================== //-- NPC_ATTRICHANGE -161,0,0,0,1800000,0,0,-1 +161,0,0,0,1800000,0,0,0 //-- NPC_CHANGEWATER -162,0,0,0,1800000,0,0,-1 +162,0,0,0,1800000,0,0,0 //-- NPC_CHANGEGROUND -163,0,0,0,1800000,0,0,-1 +163,0,0,0,1800000,0,0,0 //-- NPC_CHANGEFIRE -164,0,0,0,1800000,0,0,-1 +164,0,0,0,1800000,0,0,0 //-- NPC_CHANGEWIND -165,0,0,0,1800000,0,0,-1 +165,0,0,0,1800000,0,0,0 //-- NPC_CHANGEPOISON -166,0,0,0,1800000,0,0,-1 +166,0,0,0,1800000,0,0,0 //-- NPC_CHANGEHOLY -167,0,0,0,1800000,0,0,-1 +167,0,0,0,1800000,0,0,0 //-- NPC_CHANGEDARKNESS -168,0,0,0,1800000,0,0,-1 +168,0,0,0,1800000,0,0,0 //-- NPC_CHANGETELEKINESIS -169,0,0,0,1800000,0,0,-1 +169,0,0,0,1800000,0,0,0 //-- NPC_SELFDESTRUCTION -173,0,0,0,3500,0,0,-1 +173,0,0,0,3500,0,0,0 //-- NPC_POISON -176,0,0,0,0,60000,0,-1 +176,0,0,0,0,60000,0,0 //-- NPC_BLINDATTACK -177,0,0,0,0,30000,0,-1 +177,0,0,0,0,30000,0,0 //-- NPC_SILENCEATTACK -178,0,0,0,0,30000,0,-1 +178,0,0,0,0,30000,0,0 //-- NPC_STUNATTACK -179,0,0,0,0,5000,0,-1 +179,0,0,0,0,5000,0,0 //-- NPC_PETRIFYATTACK -180,0,0,0,0,20000,0,-1 +180,0,0,0,0,20000,0,0 //-- NPC_CURSEATTACK -181,0,0,0,0,30000,0,-1 +181,0,0,0,0,30000,0,0 //-- NPC_SLEEPATTACK -182,0,0,0,0,30000,0,-1 +182,0,0,0,0,30000,0,0 //-- NPC_MAGICALATTACK -192,0,0,0,15000,0,0,-1 +192,0,0,0,15000,0,0,0 //-- NPC_KEEPING -201,0,0,0,60000:70000:80000:90000:100000:110000:120000:130000:140000:150000,0,0,-1 +201,0,0,0,60000:70000:80000:90000:100000:110000:120000:130000:140000:150000,0,0,0 //-- NPC_BARRIER -204,0,0,0,60000:70000:80000:90000:100000:110000:120000:130000:140000:150000,0,0,-1 +204,0,0,0,60000:70000:80000:90000:100000:110000:120000:130000:140000:150000,0,0,0 //-- NPC_DEFENDER -205,0,0,0,60000:70000:80000:90000:100000:110000:120000:130000:140000:150000,0,0,-1 +205,0,0,0,60000:70000:80000:90000:100000:110000:120000:130000:140000:150000,0,0,0 //-- NPC_LICK -206,0,0,0,0,3000,0,-1 +206,0,0,0,0,3000,0,0 //-- NPC_HALLUCINATION -207,0,0,0,30000:40000:50000:60000:70000:80000:90000:100000:110000:120000,0,0,-1 +207,0,0,0,30000:40000:50000:60000:70000:80000:90000:100000:110000:120000,0,0,0 //========================================== //===== Rogue ============================== //-- RG_BACKSTAP -212,0,500,0,5000,0,0,-1 +212,0,500,0,5000,0,0,0 //-- RG_RAID -214,0,0,0,5000,8000:9000:10000:11000:12000,0,-1 +214,0,0,0,5000,8000:9000:10000:11000:12000,0,0 //-- RG_STRIPWEAPON -215,700:900:1100:1500:1500:1500:1500:1500:1500,1000,0,75000:90000:105000:120000:135000,0,0,0 +215,560:720:880:1140:1200:1200:1200:1200:1200:1200,1000,0,75000:90000:105000:120000:135000,0,0,140:180:220:260:300:300:300:300:300:300 //-- RG_STRIPSHIELD -216,700:900:1100:1500:1500:1500:1500:1500:1500,1000,0,75000:90000:105000:120000:135000,0,0,0 +216,560:720:880:1140:1200:1200:1200:1200:1200:1200,1000,0,75000:90000:105000:120000:135000,0,0,140:180:220:260:300:300:300:300:300:300 //-- RG_STRIPARMOR -217,700:900:1100:1500:1500:1500:1500:1500:1500,1000,0,75000:90000:105000:120000:135000,0,0,0 +217,560:720:880:1140:1200:1200:1200:1200:1200:1200,1000,0,75000:90000:105000:120000:135000,0,0,140:180:220:260:300:300:300:300:300:300 //-- RG_STRIPHELM -218,700:900:1100:1500:1500:1500:1500:1500:1500,1000,0,75000:90000:105000:120000:135000,0,0,0 +218,560:720:880:1140:1200:1200:1200:1200:1200:1200,1000,0,75000:90000:105000:120000:135000,0,0,140:180:220:260:300:300:300:300:300:300 //-- RG_GRAFFITI -220,0,0,0,180000,0,0,-1 +220,0,0,0,180000,0,0,0 //========================================== //===== Alchemist ========================== //-- AM_DEMONSTRATION -229,1000,500,0,40000:45000:50000:55000:60000,0,0,0 +229,800,500,0,40000:45000:50000:55000:60000,0,0,200 //-- AM_ACIDTERROR 230,500,500,0,3:7:10:12:13,120000,0,500 //-- AM_POTIONPITCHER -231,0,500,0,0,0,0,-1 +231,0,500,0,0,0,0,0 //-- AM_CANNIBALIZE -232,2000,500,0,300000:240000:180000:120000:60000,0,0,0 +232,1600,500,0,300000:240000:180000:120000:60000,0,0,400 //-- AM_SPHEREMINE -233,2000,500,0,30000,0,0,0 +233,1600,500,0,30000,0,0,400 //-- AM_CP_WEAPON 234,0,500,0,120000:240000:360000:480000:600000,0,0,2000 //-- AM_CP_SHIELD @@ -367,15 +367,15 @@ //===== Crusader =========================== //-- CR_AUTOGUARD -249,0,0,0,300000,0,0,-1 +249,0,0,0,300000,0,0,0 //-- CR_SHIELDCHARGE -250,0,0,0,0,5000,0,-1 +250,0,0,0,0,5000,0,0 //-- CR_SHIELDBOOMERANG -251,0,700,0,0,0,0,-1 +251,0,700,0,0,0,0,0 //-- CR_REFLECTSHIELD -252,0,0,0,300000,0,0,-1 +252,0,0,0,300000,0,0,0 //-- CR_HOLYCROSS -253,0,0,0,0,10000:11000:12000:13000:14000:15000:16000:17000:18000:19000,0,-1 +253,0,0,0,0,10000:11000:12000:13000:14000:15000:16000:17000:18000:19000,0,0 //-- CR_GRANDCROSS 254,1500,1500,900,900,10000:11000:12000:13000:14000:15000:16000:17000:18000:19000,0,1500 //-- CR_DEVOTION @@ -383,9 +383,9 @@ //-- CR_PROVIDENCE 256,1500,0,0,180000,0,0,1500 //-- CR_DEFENDER -257,0,800,0,180000,0,0,-1 +257,0,800,0,180000,0,0,0 //-- CR_SPEARQUICKEN -258,0,0,0,30000:60000:90000:120000:150000:180000:210000:240000:270000:300000,0,0,-1 +258,0,0,0,30000:60000:90000:120000:150000:180000:210000:240000:270000:300000,0,0,0 //========================================== @@ -395,7 +395,7 @@ //-- MO_ABSORBSPIRITS 262,1000,0,0,0,0,0,1000 //-- MO_TRIPLEATTACK -263,0,0,0,0,0,0,-1 +263,0,0,0,0,0,0,0 //-- MO_INVESTIGATE 266,500,500,0,0,0,0,500 //-- MO_FINGEROFFENSIVE @@ -403,18 +403,18 @@ //-- MO_STEELBODY 268,2500,0,0,30000:60000:90000:120000:150000,0,0,2500 //-- MO_BLADESTOP -269,0,500,0,500:700:900:1100:1300,20000:30000:40000:50000:60000,0,-1 +269,0,500,0,500:700:900:1100:1300,20000:30000:40000:50000:60000,0,0 //-- MO_EXPLOSIONSPIRITS -270,0,0,0,180000,0,0,-1 +270,0,0,0,180000,0,0,0 //-- MO_EXTREMITYFIST -271,2000:1750:1500:1250:1000,3000:2500:2000:1500:1000,0,10000,300000,0,2000:1750:1500:1250:1000 +271,2000:1750:1500:1250:1000:500:1000:1000:1000:1000,3000:2500:2000:1500:1000,0,10000,300000,0,2000:1750:1500:1250:1000:500:1000:1000:1000:1000 //========================================== //===== Sage =============================== //-- SA_MAGICROD -276,0,1000,0,400:600:800:1000:1200,0,0,-1 +276,0,1000,0,400:600:800:1000:1200,0,0,0 //-- SA_SPELLBREAKER -277,700,0,0,0,0,0,0 +277,560,0,0,0,0,0,140 //-- SA_AUTOSPELL 279,0,0,0,120000:150000:180000:210000:240000:270000:300000:330000:360000:390000,0,0,3000 //-- SA_FLAMELAUNCHER @@ -426,75 +426,75 @@ //-- SA_SEISMICWEAPON 283,0,0,0,1200000:1200000:1200000:1200000:1800000,0,0,3000 //-- SA_VOLCANO -285,5000,0,0,60000:120000:180000:240000:300000,0,0,0 +285,4000,0,0,60000:120000:180000:240000:300000,0,0,1000 //-- SA_DELUGE -286,5000,0,0,60000:120000:180000:240000:300000,0,0,0 +286,4000,0,0,60000:120000:180000:240000:300000,0,0,1000 //-- SA_VIOLENTGALE -287,5000,0,0,60000:120000:180000:240000:300000,0,0,0 +287,4000,0,0,60000:120000:180000:240000:300000,0,0,1000 //-- SA_LANDPROTECTOR -288,5000,0,0,165000:210000:255000:300000:345000,0,0,0 +288,4000,0,0,165000:210000:255000:300000:345000,0,0,1000 //-- SA_DISPELL -289,2000,0,0,0,0,0,0 +289,1600,0,0,0,0,0,400 //-- SA_REVERSEORCISH -294,0,0,0,1200000,0,0,-1 +294,0,0,0,1200000,0,0,0 //========================================== //===== Bard & Dancer (Ensemble Skills) ==== //-- BD_ADAPTATION -304,0,0,0,0,5000,0,-1 +304,0,0,0,0,5000,0,0 //-- BD_LULLABY -306,0,0,0,60000,15000,0,-1 +306,0,0,0,60000,15000,0,0 //-- BD_RICHMANKIM -307,0,0,0,60000,60000,0,-1 +307,0,0,0,60000,60000,0,0 //-- BD_ETERNALCHAOS -308,0,0,0,60000,60000,0,-1 +308,0,0,0,60000,60000,0,0 //-- BD_DRUMBATTLEFIELD -309,0,0,0,60000,60000,0,-1 +309,0,0,0,60000,60000,0,0 //-- BD_RINGNIBELUNGEN -310,0,0,0,60000,60000,0,-1 +310,0,0,0,60000,60000,0,0 //-- BD_ROKISWEIL -311,0,0,0,60000,60000,0,-1 +311,0,0,0,60000,60000,0,0 //-- BD_INTOABYSS -312,0,0,0,60000,60000,0,-1 +312,0,0,0,60000,60000,0,0 //-- BD_SIEGFRIED -313,0,0,0,60000,60000,0,-1 +313,0,0,0,60000,60000,0,0 //========================================== //===== Bard =============================== //-- BA_MUSICALSTRIKE -316,1500,0,0,0,0,0,0 +316,1200,0,0,0,0,0,300 //-- BA_DISSONANCE -317,0,0,0,30000,3000,0,-1 +317,0,0,0,30000,3000,0,0 //-- BA_FROSTJOKER -318,0,4000,0,0,10000:11000:12000:13000:14000,0,-1 +318,0,4000,0,0,10000:11000:12000:13000:14000,0,0 //-- BA_WHISTLE -319,0,0,0,60000,20000,0,-1 +319,0,0,0,60000,20000,0,0 //-- BA_ASSASSINCROSS -320,0,0,0,120000,20000,0,-1 +320,0,0,0,120000,20000,0,0 //-- BA_POEMBRAGI -321,0,0,0,180000,20000,0,-1 +321,0,0,0,180000,20000,0,0 //-- BA_APPLEIDUN -322,0,0,0,180000,20000,0,-1 +322,0,0,0,180000,20000,0,0 //========================================== //===== Dancer ============================= //-- DC_THROWARROW -324,1500,0,0,0,0,0,0 +324,1200,0,0,0,0,0,300 //-- DC_UGLYDANCE -325,0,0,0,30000,3000,0,-1 +325,0,0,0,30000,3000,0,0 //-- DC_SCREAM -326,0,4000,0,0,5000,0,-1 +326,0,4000,0,0,5000,0,0 //-- DC_HUMMING -327,0,0,0,60000,20000,0,-1 +327,0,0,0,60000,20000,0,0 //-- DC_DONTFORGETME -328,0,0,0,180000,20000,0,-1 +328,0,0,0,180000,20000,0,0 //-- DC_FORTUNEKISS -329,0,0,0,120000,20000,0,-1 +329,0,0,0,120000,20000,0,0 //-- DC_SERVICEFORYOU -330,0,0,0,180000,20000,0,-1 +330,0,0,0,180000,20000,0,0 //========================================== @@ -504,89 +504,89 @@ //-- WE_FEMALE 335,1500,0,0,0,0,0,1500 //-- WE_CALLPARTNER -336,0,0,0,20000,0,0,-1 +336,0,0,0,20000,0,0,0 //========================================== //===== NPC Skills Part 2 ================== //-- NPC_GRANDDARKNESS -339,2000,1500,900,900,10000:11000:12000:13000:14000:15000:16000:17000:18000:19000,0,-1 +339,0,0,900,900,10000:11000:12000:13000:14000:15000:16000:17000:18000:19000,0,0 //-- NPC_STOP -342,0,0,0,10000,0,0,-1 +342,0,0,0,10000,0,0,0 //-- NPC_CHANGEUNDEAD -348,0,0,0,30000,0,0,-1 +348,0,0,0,30000,0,0,0 //-- NPC_POWERUP -349,0,0,0,10000:15000:20000:25000:30000,0,0,-1 +349,0,0,0,10000:15000:20000:25000:30000,0,0,0 //-- NPC_AGIUP -350,0,0,0,10000:15000:20000:25000:30000,0,0,-1 +350,0,0,0,10000:15000:20000:25000:30000,0,0,0 //-- NPC_INVISIBLE -353,0,0,0,30000,0,0,-1 +353,0,0,0,30000,0,0,0 //-- NPC_RUN -354,0,0:500:1000:1500:2000:2500,0,0,0,0,-1 +354,0,0,0,0,0,0,0 //========================================== //===== Lord Knight ======================== //-- LK_AURABLADE -355,0,0,0,40000:60000:80000:100000:120000,0,0,-1 +355,0,0,0,40000:60000:80000:100000:120000,0,0,0 //-- LK_PARRYING -356,0,0,0,15000:20000:25000:30000:35000:40000:45000:50000:55000:60000,0,0,-1 +356,0,0,0,15000:20000:25000:30000:35000:40000:45000:50000:55000:60000,0,0,0 //-- LK_CONCENTRATION -357,0,0,0,25000:30000:35000:40000:45000,0,0,-1 +357,0,0,0,25000:30000:35000:40000:45000,0,0,0 //-- LK_TENSIONRELAX -358,0,0,0,180000,0,0,-1 +358,0,0,0,180000,0,0,0 //-- LK_BERSERK -359,0,0,0,300000,15000,0,-1 +359,0,0,0,300000,15000,0,0 //-- LK_FURY -360,0,0,0,300000,0,0,-1 +360,0,0,0,300000,0,0,0 //========================================== //===== High Priest ======================== //-- HP_ASSUMPTIO -361,1000:1500:2000:2500:3000:3000:3000:3000:3000:3000,1100:1200:1300:1400:1500,0,20000:40000:60000:80000:100000,0,0,0 +361,800:1200:1600:2000:2400:2400:2400:2400:2400:2400,1100:1200:1300:1400:1500,0,20000:40000:60000:80000:100000,0,0,200:300:400:500:600 //-- HP_BASILICA -362,0,2000:3000:4000:5000:6000,0,20000:25000:30000:35000:40000,20000:25000:30000:35000:40000,0,5000:6000:7000:8000:9000:9000:9000:9000:9000:9000 +362,0,2000:3000:4000:5000:6000,0,20000:25000:30000:35000:40000,20000:25000:30000:35000:40000,0,5000:6000:7000:8000:9000 //========================================== //===== High Wzard ========================= //-- HW_MAGICCRASHER -365,300,300,0,0,0,0,0 +365,240,300,0,0,0,0,60 //-- HW_MAGICPOWER -366,0,0,0,30000,0,0,700 +366,0,0,0,30000,0,0, //========================================== //===== Paladin ============================ //-- PA_PRESSURE -367,2000,2000:2500:3000:3500:4000,0,0,2000:3000:4000:5000:6000,0,0 +367,1600,2000:2500:3000:3500:4000,0,0,2000:3000:4000:5000:6000,0,400 //-- PA_GOSPEL -369,0,0,0,60000,60000,0,-1 +369,0,0,0,60000,60000,0, //========================================== //===== Champion =========================== //-- CH_PALMSTRIKE -370,0,300,0,0,0,0,-1 +370,300,0,0,0,0,0, //-- CH_TIGERFIST -371,0,0,0,0,2000:4000:6000:8000:10000,0,-1 +371,0,0,0,0,2000:4000:6000:8000:10000,0, //========================================== //===== Professor ========================== //-- PF_HPCONVERSION -373,0,1000:1200:1400:1600:1800,0,0,0,0,-1 +373,1000:1200:1400:1600:1800,0,0,0,0,0, //-- PF_SOULCHANGE 374,0,0,0,0,0,0,3000 //-- PF_SOULBURN -375,0,0,0,0,0,10000:10000:10000:10000:15000,-1 +375,0,0,0,0,0,10000:10000:10000:10000:15000,0 //========================================== //===== Assassin Cross ===================== //-- ASC_EDP -378,0,2000,0,40000:45000:50000:55000:60000,20000:30000:40000:50000:60000,0,-1 +378,0,2000,0,40000:45000:50000:55000:60000,20000:30000:40000:50000:60000,0,0 //-- ASC_BREAKER 379,250,1000:1200:1400:1600:1800:2000:2200:2400:2600:2800,0,0,0,0,250 //========================================== @@ -594,7 +594,7 @@ //===== Sniper ============================= //-- SN_SIGHT -380,0,0,0,30000,0,0,-1 +380,0,0,0,30000,0,0,0 //-- SN_FALCONASSAULT 381,500,3000,0,0,0,0,500 //-- SN_SHARPSHOOTING @@ -608,7 +608,7 @@ //-- WS_MELTDOWN 384,0,0,0,15000:20000:25000:30000:35000:40000:45000:50000:55000:60000,5000,0,5:5:6:6:7:7:8:8:9:10 //-- WS_CARTBOOST -387,0,0,0,60000,0,0,-1 +387,0,0,0,60000,0,0,0 //========================================== @@ -616,46 +616,46 @@ //-- ST_CHASEWALK 389,500,0,0,10000,30000,0,500 //-- ST_REJECTSWORD -390,0,0,0,300000,0,0,-1 +390,0,0,0,300000,0,0, //========================================== //===== Clown / Gypsy ====================== //-- CG_ARROWVULCAN -394,2000:2200:2400:2600:2800:3000:3200:3400:3600:3800,2000,2000,0,0,0,0 +394,1600:1760:1920:2080:2240:2400:2560:2720:2880:3040,2000,2000,0,0,0,400:440:480:520:560:600:640:680:720:760 //-- CG_MOONLIT -395,0,0,0,20000:25000:30000:35000:40000,0,0,-1 +395,0,0,0,20000:25000:30000:35000:40000,0,0,0 //-- CG_MARIONETTE -396,0,0,0,1000,0,0,-1 +396,0,0,0,1000,0,0,0 //========================================== //===== Mixed Advanced Skills ============== //-- LK_SPIRALPIERCE -397,150:250:350:450:500,1200:1400:1600:1800:2000,0,0,1000,0,150:250:350:450:500 +397,150:250:350:450:500:500:500:500:500:500,1200:1400:1600:1800:2000,0,0,1000,0,150:250:350:450:500:500:500:500:500:500 //-- LK_HEADCRUSH -398,0,500,0,0,120000,0,-1 +398,0,500,0,0,120000,0,0 //-- LK_JOINTBEAT -399,0,800:800:800:800:1000,0,0,30000,0,-1 +399,0,800:800:800:800:1000,0,0,30000,0,0 //-- HW_NAPALMVULCAN -400,1000,1000,0,0,45000,0,0 +400,800,1000,0,0,45000,0,200 //-- CH_SOULCOLLECT 401,0,0,0,600000,0,0,2000 //-- PF_MINDBREAKER -402,0,800:900:1000:1100:1200,0,30000,0,0,-1 +402,0,800:900:1000:1100:1200,0,30000,0,0,0 //-- PF_MEMORIZE 403,0,0,0,0,0,0,5000 //-- PF_FOGWALL -404,0,0,0,20000,10000,0,-1 +404,0,0,0,20000,10000,0,0 //-- PF_SPIDERWEB -405,0,0,0,30000,8000,0,-1 +405,0,0,0,30000,8000,0,0 -//-- ASC_METEORASSAULT (Upkeep2 times are duration of: blind(lv1), stun(lv2) or bleeding (lv3)) +//-- ASC_METEORASSAULT (Upkeep2 times are duration of: blind(lv1), stun(lv2) or bleeding (lv3)),,,,,, 406,250,500,0,0,10000:5000:120000,0,250 //-- ASC_CDP -407,0,5000,0,0,0,0,-1 +407,0,5000,0,0,0,0,0 //========================================== @@ -663,23 +663,23 @@ //-- WE_BABY 408,0,0,0,300000,0,0,2000 //-- WE_CALLPARENT -409,0,0,0,20000,0,0,-1 +409,0,0,0,20000,0,0,0 //-- WE_CALLBABY -410,0,0,0,20000,0,0,-1 +410,0,0,0,20000,0,0,0 //========================================== //===== Taekwon ============================ //-- TK_RUN -411,3000:2500:2000:1500:100:500:0:0:0:0,300,0,1000,150000,0,3000:2500:2000:1500:100:500:0:0:0:0 +411,3000:2500:2000:1500:100:500:0:0:0:0,300,0,1000,150000,0,3000:2500:2000:1500:1000:500:0:0:0:0 //-- TK_DOWNKICK -415,0,0,0,0,3000,0,-1 +415,0,0,0,0,3000,0,0 //-- TK_TURNKICK -417,0,0,0,0,2000,0,-1 +417,0,0,0,0,2000,0,0 //-- TK_SPTIME -423,0,0,0,1800000,0,0,-1 +423,0,0,0,1800000,0,0,0 //-- TK_SEVENWIND -425,0,0,0,300000,0,0,-1 +425,0,0,0,300000,0,0,0 //-- TK_HIGHJUMP 426,2500:2000:1500:1000:500:500:500:500:500:500,0,0,0,0,0,2500:2000:1500:1000:500:500:500:500:500:500 //========================================== @@ -688,25 +688,25 @@ //-- SG_FEEL 427,0,0,0,0,0,0,3000 //-- SG_SUN_WARM -428,0,0,0,10000:20000:60000,0,0,-1 +428,0,0,0,10000:20000:60000,0,0,0 //-- SG_MOON_WARM -429,0,0,0,10000:20000:60000,0,0,-1 +429,0,0,0,10000:20000:60000,0,0,0 //-- SG_STAR_WARM -430,0,0,0,10000:20000:60000,0,0,-1 +430,0,0,0,10000:20000:60000,0,0,0 //-- SG_SUN_COMFORT -431,0,0,0,80000:160000:240000:320000,0,0,-1 +431,0,0,0,80000:160000:240000:320000,0,0,0 //-- SG_MOON_COMFORT -432,0,0,0,80000:160000:240000:320000,0,0,-1 +432,0,0,0,80000:160000:240000:320000,0,0,0 //-- SG_STAR_COMFORT -433,0,0,0,80000:160000:240000:320000,0,0,-1 +433,0,0,0,80000:160000:240000:320000,0,0,0 //-- SG_HATE 434,0,0,0,0,0,0,3000 //-- SG_FRIEND -442,0,0,0,10000,0,0,-1 +442,0,0,0,10000,0,0,0 //-- SG_KNOWLEDGE -443,0,0,0,600000,0,0,-1 +443,0,0,0,600000,0,0,0 //-- SG_FUSION -444,0,0,0,600000,0,0,-1 +444,0,0,0,600000,0,0,0 //========================================== //===== Soul Linker ======================== @@ -719,7 +719,7 @@ //-- SL_MONK 447,0,0,0,150000:200000:250000:300000:350000,0,0,1000 //-- SL_STAR -448,1000,0,0,150000:200000:250000:300000:350000,0,0,0 +448,800,0,0,150000:200000:250000:300000:350000,0,0,200 //-- SL_SAGE 449,0,0,0,150000:200000:250000:300000:350000,0,0,1000 //-- SL_CRUSADER @@ -742,41 +742,41 @@ 458,0,0,0,150000:200000:250000:300000:350000,0,0,1000 //-- BS_ADRENALINE2 -459,0,0,0,150000,0,0,-1 +459,0,0,0,150000,0,0,0 //-- SL_HUNTER 460,0,0,0,150000:200000:250000:300000:350000,0,0,1000 //-- SL_SOULLINKER 461,0,0,0,150000:200000:250000:300000:350000,0,0,1000 //-- SL_KAIZEL -462,4500:4000:3500:3000:2500:2500:2500:2500:2500:2500,0,0,1800000,2000,0,0 +462,3600:3200:2800:2400:2000:2000:2000:2000:2000:2000,0,0,1800000,2000,0,900:800:700:600:500:500:500:500:500:500 //-- SL_KAAHI -463,0,0,0,1800000,500,0,-1 +463,0,0,0,1800000,500,0,0 //-- SL_KAUPE -464,500,0,0,600000,0,0,0 +464,400,0,0,600000,0,0,100 //-- SL_KAITE -465,6000:5500:5000:4500:4000:3500:3000:3000:3000:3000,0,0,60000:120000:180000:240000:300000:360000:600000,0,0,0 +465,4800:4400:4000:3600:3200:2800:2400:2400:2400:2400,0,0,60000:120000:180000:240000:300000:360000:600000,0,0,1200:1100:1000:900:800:700:600:600:600:600 //-- SL_STIN -467,100,500,0,0,0,0,0 +467,80,500,0,0,0,0,20 //-- SL_STUN -468,100,500,0,2000,0,0,0 +468,80,500,0,2000,0,0,20 //-- SL_SMA -469,2000,500,0,3000,0,0,0 +469,1600,500,0,3000,0,0,400 //-- SL_SWOO -470,1000,500,0,1000:2000:3000:4000:5000:6000:7000,0,0,0 +470,800,500,0,1000:2000:3000:4000:5000:6000:7000,0,0,200 //-- SL_SKE -471,3000:2000:1000:1000:1000:1000:1000:1000:1000:1000,500,0,10000:20000:30000,3000,0,0 +471,2400:1600:800:800:800:800:800:800:800:800,500,0,10000:20000:30000,3000,0,600:400:200:200:200:200:200:200:200:200 //-- SL_SKA -472,3000:2000:1000:1000:1000:1000:1000:1000:1000:1000,500,0,10000:20000:30000,0,0,0 +472,2400:1600:800:800:800:800:800:800:800:800,500,0,10000:20000:30000,0,0,600:400:200:200:200:200:200:200:200:200 //========================================== //-- SM_SELFPROVOKE -473,0,0,0,30000,0,0,-1 +473,0,0,0,30000,0,0, //===== Mixed Advanced Skills ============== //-- ST_PRESERVE 475,0,0,0,600000,0,0,1000 //-- ST_FULLSTRIP -476,0,1000,0,75000:90000:105000:120000:135000,0,0,-1 +476,0,1000,0,75000:90000:105000:120000:135000,0,0,0 //-- CR_SLIMPITCHER 478,1000,1000,0,0,0,0,1000 @@ -784,46 +784,46 @@ 479,0,500,0,120000:240000:360000:480000:600000,0,0,1000 //-- PA_SHIELDCHAIN -480,1000,1000,0,0,0,0,0 +480,800,1000,0,0,0,0,200 //-- PF_DOUBLECASTING -482,2000,0,0,90000,0,0,0 +482,1600,0,0,90000,0,0,400 //-- HW_GANBANTEIN 483,0,5000,0,0,0,0,3000 //-- HW_GRAVITATION -484,0,5000:6000:7000:8000:9000,0,5000:6000:7000:8000:9000,0,0,5000 +484,0,0,0,5000:6000:7000:8000:9000,0,0,5000 //-- WS_CARTTERMINATION -485,0,0,0,0,5000,0,-1 +485,0,0,0,0,5000,0,0 //-- WS_OVERTHRUSTMAX -486,0,0,0,180000,0,0,-1 +486,0,0,0,180000,0,0,0 //-- CG_LONGINGFREEDOM -487,0,0,0,180000,0,0,-1 +487,0,0,0,180000,0,0,0 //-- CG_HERMODE -488,0,0,0,10000:15000:20000:25000:30000,10000:15000:20000:25000:30000,0,-1 +488,0,0,0,10000:15000:20000:25000:30000,10000:15000:20000:25000:30000,0,0 //-- CG_TAROTCARD 489,500,3000,0,0,30000,0,500 //-- CR_ACIDDEMONSTRATION 490,0,1000,0,0,0,0,1000 //-- CR_CULTIVATION -491,0,0,0,300000,0,0,-1 +491,0,0,0,300000,0,0,0 //========================================== //-- ITEM_ENCHANTARMS -492,0,0,0,180000,0,0,-1 +492,0,0,0,180000,0,0,0 //===== Mixed Taekwon Skills =============== //-- TK_MISSION 493,0,0,0,0,0,0,1000 //-- SL_HIGH -494,0,0,0,150000:200000:250000:300000:350000,0,0,1000 +494,0,0,0,150000:200000:250000:300000:350000,0,0,0 //-- KN_ONEHAND -495,0,0,0,300000,0,0,-1 +495,0,0,0,300000,0,0,0 //-- AM_TWILIGHT1 496,0,0,0,0,0,0,3000 @@ -833,103 +833,103 @@ 498,0,0,0,0,0,0,3000 //-- HT_POWER -499,0,100,0,100,0,0,-1 +499,0,100,0,100,0,0,0 //========================================== //===== Gunslinger ========================= //-- GS_GLITTERING -500,0,0,0,600000,0,0,-1 +500,0,0,0,600000,0,0,0 //-- GS_FLING -501,0,0,0,30000,0,0,-1 +501,0,0,0,30000,0,0,0 //-- GS_BULLSEYE -503,1000,1000,0,0,0,0,0 +503,800,1000,0,0,0,0,200 //-- GS_MADNESSCANCEL -504,2000,3000,0,15000,0,0,0 +504,1600,3000,0,15000,0,0,400 //-- GS_ADJUSTMENT -505,1000,2000,0,30000,0,0,0 +505,800,2000,0,30000,0,0,200 //-- GS_INCREASING -506,0,1000,0,60000,0,0,-1 +506,0,1000,0,60000,0,0,0 //-- GS_CRACKER -508,0,1000,0,0,5000,0,-1 +508,0,1000,0,0,5000,0,0 //-- GS_TRACKING 512,600:700:800:900:1000:1100:1200:1300:1400:1500,1500,0,0,0,0,600:700:800:900:1000:1100:1200:1300:1400:1500 //-- GS_DISARM -513,2000,1000,0,30000,0,0,0 +513,1600,1000,0,30000,0,0,400 //-- GS_PIERCINGSHOT -514,1500,500,0,0,120000,0,0 +514,1200,500,0,0,120000,0,300 //-- GS_RAPIDSHOWER -515,0,1500,0,0,0,0,-1 +515,0,1500,0,0,0,0,0 //-- GS_DESPERADO -516,0,1000,1000,1000,0,0,-1 +516,0,1000,1000,1000,0,0,0 //-- GS_GATLINGFEVER -517,1000,1000,0,30000:45000:60000:75000:90000:105000:120000:135000:150000:165000,0,0,0 +517,800,1000,0,30000:45000:60000:75000:90000:105000:120000:135000:150000:165000,0,0,200 //-- GS_DUST -518,1500,1000,0,0,0,0,0 +518,1200,1000,0,0,0,0,300 //-- GS_FULLBUSTER -519,1000,1200:1400:1600:1800:2000:2200:2400:2600:2800:3000,0,0,10000,0,0 +519,800,1200:1400:1600:1800:2000:2200:2400:2600:2800:3000,0,0,10000,0,200 //-- GS_GROUNDDRIFT -521,1000,1000,0,3000:6000:9000:12000:15000:18000:21000:24000:27000:30000,10000,0,0 +521,800,1000,0,3000:6000:9000:12000:15000:18000:21000:24000:27000:30000,10000,0,200 //========================================== //===== Ninja ============================== //-- NJ_KUNAI -524,0,1000,0,0,0,0,-1 +524,0,1000,0,0,0,0,0 //-- NJ_HUUMA -525,3000,2000,0,100,0,0,0 +525,2400:2400:2400:2400:2400:2400:2400:2400:2400:2400,2000,0,100,0,0,600 //-- NJ_ZENYNAGE -526,0,5000,0,0,0,0,-1 +526,0,5000,0,0,0,0,0 //-- NJ_TATAMIGAESHI -527,0,3000,0,3000,3000,0,-1 +527,0,3000,0,3000,3000,0,0 //-- NJ_KASUMIKIRI -528,0,1000,0,30000:60000:90000:120000:150000:180000:210000:240000:270000:300000,0,0,-1 +528,0,1000,0,30000:60000:90000:120000:150000:180000:210000:240000:270000:300000,0,0,0 //-- NJ_SHADOWJUMP -529,0,1000,0,0,0,0,-1 +529,0,1000,0,0,0,0,0 //-- NJ_UTSUSEMI -531,0,1000,0,20000:30000:40000:50000:60000,0,0,-1 +531,0,1000,0,20000:30000:40000:50000:60000,0,0,0 //-- NJ_BUNSINJYUTSU -532,4000:3500:3000:2500:2000:1500:1000:1000:1000:1000,1000,0,60000:80000:100000:120000:140000:160000:180000:200000:220000:240000,0,0,0 +532,3200:2800:2400:2000:1600:1200:800:800:800:800,1000,0,60000:80000:100000:120000:140000:160000:180000:200000:220000:240000,0,0,800:700:600:500:400:300:200:200:200:200 //-- NJ_KOUENKA -534,700:1400:2100:2800:3500:4200:4800:5600:6300:7000,0,0,0,0,0,0 +534,560:1120:1680:2240:2800:3360:3840:4480:5040:5600,0,0,0,0,0,140:280:420:560:700:840:960:1120:1260:1400 //-- NJ_KAENSIN -535,6000:5500:5000:4500:4000:3500:3000:2500:2000:1500,1000,0,20000,0,0,0 +535,4800:4400:4000:3600:3200:2800:2400:2000:1600:1200,1000,0,20000,0,0,1200:1100:1000:900:800:700:600:500:400:300 //-- NJ_BAKUENRYU -536,3000,2000,0,0,0,0,0 +536,2400,2000,0,0,0,0,600 //-- NJ_HYOUSENSOU -537,700:1400:2100:2800:3500:4200:4800:5600:6300:7000,0,0,0,0,0,0 +537,560:1120:1680:2240:2800:3360:3840:4480:5040:5600,0,0,0,0,0,140:280:420:560:700:840:960:1120:1260:1400 //-- NJ_SUITON -538,3000,2000,0,15000:20000:25000:30000:35000:40000:45000:50000:55000:60000,15000:20000:25000:30000:35000:40000:45000:50000:55000:60000,0,0 +538,2400,2000,0,15000:20000:25000:30000:35000:40000:45000:50000:55000:60000,15000:20000:25000:30000:35000:40000:45000:50000:55000:60000,0,600 //-- NJ_HYOUSYOURAKU -539,2000:2500:3000:3500:4000:4000:4000:4000:4000:4000,2000,0,0,10000:11000:12000:13000:14000:15000:16000:17000:18000:19000,0,0 +539,1600:2000:2400:2800:3200:3200:3200:3200:3200:3200,2000,0,0,10000:11000:12000:13000:14000:15000:16000:17000:18000:19000,0,400:500:600:700:800:800:800:800:800:800 //-- NJ_HUUJIN -540,1000:1500:2000:2500:3000:3500:4000:4500:5000:5500,1000,0,0,0,0,0 +540,800:1200:1600:2000:2400:2800:3200:3600:4000:4400,1000,0,0,0,0,200:300:400:500:600:700:800:900:1000:1100 //-- NJ_RAIGEKISAI -541,4000,0,0,100,0,0,0 +541,3200,0,0,100,0,0,800 //-- NJ_KAMAITACHI -542,4000,0,0,0,0,0,0 +542,3200,0,0,0,0,0,800 //-- NJ_NEN -543,5000:4000:3000:2000:1000:1000:1000:1000:1000:1000,0,0,30000:45000:60000:75000:90000,0,0,0 +543,4000:3200:2400:1600:800:800:800:800:800:800,0,0,30000:45000:60000:75000:90000,0,0,1000:800:600:400:200:200:200:200:200:200 //========================================== //===== Gangsi Branch and Other Skills ===== //-- MB_PETPITCHER -//551,1000:1000:1000:1000:1000:500:500:500:500:500,0,0,0,0,0 +//551,1000:1000:1000:1000:1000:500:500:500:500:500,0,0,0,0,0, //-- MB_B_GAIN -//556,2200:2000:1800:1600:1400:1200:1000,0,0,0,0,0 +//556,2200:2000:1800:1600:1400:1200:1000,0,0,0,0,0, //-- MB_MUNAKBALL -//560,1500:1500:1500:1500:1000:1000:1000:1000:500:500,0,0,0,0,0 +//560,1500:1500:1500:1500:1000:1000:1000:1000:500:500,0,0,0,0,0, //-- MB_B_GATHERING -//562,10000,0,0,0,0,0 +//562,10000,0,0,0,0,0, //-- MB_B_EXCLUDE -//564,30000:25000:20000:15000:10000,0,0,0,0,0 +//564,30000:25000:20000:15000:10000,0,0,0,0,0, //-- MB_B_WALLSHIFT -//568,1000:800:600:400:200,0,0,0,0,0 +//568,1000:800:600:400:200,0,0,0,0,0, //-- SL_DEATHKNIGHT 572,0,0,0,150000:200000:250000:300000:350000,0,0,1000 @@ -941,24 +941,24 @@ 575,0,0,0,150000:200000:250000:300000:350000,0,0,1000 //-- AM_TWILIGHT4 -//576,3000,10000,0,0,0,0 +//576,0,10000,0,0,0,0,3000 //-- DE_WINDATTACK -//617,1000:1000:1000:1000:1000:0:0:0:0:0,0,0,0,0,0 +//617,1000:1000:1000:1000:1000:0:0:0:0:0,0,0,0,0,0, //-- DA_EXPLOSION -//625,7000:6000:5000:4000:3000,0,0,0,0,0 +//625,7000:6000:5000:4000:3000,0,0,0,0,0, //-- DA_MAGICCART -//640,5000:4000:3000:2000:1000,0,0,0,0,0 +//640,5000:4000:3000:2000:1000,0,0,0,0,0, //-- DA_COPY -//641,20000,0,0,0,0,0 +//641,20000,0,0,0,0,0, //-- DA_EDARKNESS -//647,13000:11000:9000:7000:5000,0,0,0,0,0 +//647,13000:11000:9000:7000:5000,0,0,0,0,0, //-- DA_TIMEOUT -//649,5000:3000:1000,0,0,0,0,0 +//649,5000:3000:1000,0,0,0,0,0, //-- ALL_TIMEIN //650,0,0,0,0,0,0,1000 //========================================== @@ -1048,19 +1048,19 @@ 1005,0,0,0,10000,0,0,-1 //-- WZ_SIGHTBLASTER -1006,1600,0,0,120000,0,0,0 +1006,1280,0,0,120000,0,0,320 //-- SA_ELEMENTWATER 1008,0,1000,0,1800000,0,0,2000 //-- BA_PANGVOICE -1010,1000,2000,0,17000,0,0,0 +1010,800,2000,0,17000,0,0,200 //-- DC_WINKCHARM (time1: Charm, time2: Confusion) -1011,1000,2000,0,10000,17000,0,0 +1011,800,2000,0,10000,17000,0,200 //-- PR_REDEMPTIO -1014,4000,0,0,0,0,0,0 +1014,3200,0,0,0,0,0,800 //-- MO_KITRANSLATION 1015,1000,1000,0,600000,0,0,1000 //-- MO_BALKYOUNG @@ -1807,9 +1807,9 @@ //===== Mercenary Skills =================== //-- MS_MAGNUM -8202,0,0,2000,2000,10000,0,0 +8202,0,1500,2000,2000,10000,0,0 //-- KN_BOWLINGBASH -8203,700,0,0,0,0,0,0 +8203,700,2500,0,0,0,0,0 //-- LK_PARRYING 8204,0,0,0,15000:20000:25000:30000:35000:40000:45000:50000:55000:60000,0,0,0 //-- CR_REFLECTSHIELD @@ -1817,9 +1817,9 @@ //-- MS_BERSERK 8206,0,0,0,300000,15000,0,0 //-- MA_DOUBLE -8207,0,0,0,100,0,0,0 +8207,0,1000,0,100,0,0,0 //-- MA_SHOWER -8208,0,0,0,100,0,0,0 +8208,0,1200,0,100,0,0,0 //-- MA_SKIDTRAP 8209,0,0,0,300000:240000:180000:120000:60000,0,0,0 //-- MA_LANDMINE @@ -1829,21 +1829,21 @@ //-- MA_FREEZINGTRAP 8212,0,0,0,150000:120000:90000:60000:30000,3000:6000:9000:12000:15000,0,0 //-- MA_CHARGEARROW -8214,1500,0,0,0,0,0,0 +8214,750,1000,0,0,0,0,750 //-- MA_SHARPSHOOTING -8215,2000,1500,0,0,0,0,0 +8215,1000,2500,0,0,0,0,1000 //-- ML_BRANDISHSPEAR -8217,700,0,0,0,0,0,0 +8217,350,1200,0,0,0,0,350 //-- ML_SPIRALPIERCE -8218,300:500:700:900:1000,1200:1400:1600:1800:2000,0,0,1000,0,0 +8218,150:250:350:450:500:500:500:500:500:500,2500,0,0,1000,0,150:250:350:450:500:500:500:500:500:500 //-- ML_DEFENDER 8219,0,800,0,180000,0,0,0 //-- ML_AUTOGUARD 8220,0,0,0,300000,0,0,0 //-- ML_DEVOTION -8221,3000,0,0,0,30000:45000:60000:75000:90000,0,0 +8221,1500,0,0,0,30000:45000:60000:75000:90000,0,1500 //-- MER_MAGNIFICAT -8222,4000,2000,0,30000:45000:60000:75000:90000,0,0,0 +8222,3200,2000,0,30000:45000:60000:75000:90000,0,0,800 //-- MER_QUICKEN 8223,0,0,0,30000:60000:90000:120000:150000:180000:210000:240000:270000:300000,0,0,0 //-- MER_SIGHT @@ -1853,7 +1853,7 @@ //-- MER_PROVOKE 8232,0,0,0,30000,0,0,0 //-- MER_DECAGI -8234,1000,1000,0,40000:50000:60000:70000:80000:90000:100000:110000:120000:130000,0,0,0 +8234,800,1000,0,40000:50000:60000:70000:80000:90000:100000:110000:120000:130000,0,0,200 //-- MER_SCAPEGOAT 8235,3000,0,0,0,0,0,0 //-- MER_LEXDIVINA @@ -1943,7 +1943,7 @@ //-- GD_REGENERATION 10011,0,0,0,60000,300000,0,-1 //-- GD_RESTORE -10012,10000,0,0,0,300000,0,0 +10012,0,0,0,0,300000,0,10000 //-- GD_EMERGENCYCALL -10013,5000,0,0,0,300000,0,0 +10013,0,0,0,0,300000,0,5000 //========================================== diff --git a/npc/custom/test.txt b/npc/custom/test.txt index d13570135..00f9c376e 100644 --- a/npc/custom/test.txt +++ b/npc/custom/test.txt @@ -8,9 +8,115 @@ //= Script to test operators and possibly other elements of //= the script engine, useful for regression testing. +function script F_TestReturnValue { + return getarg(0); +} + +function script F_TestScopeVars { + .@x = 2; + return .@x+1; +} + +function script F_TestNPCVars { + .x = 2; + return .x+1; +} + +function script F_TestDeepNestedScope { + if (getarg(0) <= 0) + return getarg(1); // Stop recursion + if (getarg(1)) + return callfunc("F_TestDeepNestedScope", getarg(0)-1, getarg(1)); // Recursion step + .@x = 1; + return callfunc("F_TestDeepNestedScope", getarg(0)-1, .@x); // First step +} + +function script F_TestDeepNestedScopeNPC2 { + if (getarg(0) <= 0) + return getarg(1); // Stop recursion + if (getarg(1)) + return callfunc("F_TestDeepNestedScopeNPC", getarg(0)-1, getarg(1)); // Recursion step + .x = 1; + return callfunc("F_TestDeepNestedScopeNPC", getarg(0)-1, .x); // First step +} + +function script F_TestDeepNestedScopeNPC { + if (getarg(0) <= 0) + return getarg(1); // Stop recursion + if (getarg(1)) + return callfunc("F_TestDeepNestedScopeNPC2", getarg(0)-1, getarg(1)); // Recursion step + .x = 1; + return callfunc("F_TestDeepNestedScopeNPC2", getarg(0)-1, .x); // First step +} + +function script F_TestNestedScope { + .@x = 1; + .@y = callfunc("F_TestReturnValue", .@x); + return .@y; +} + +function script F_TestNestedScopeNPC { + .x = 1; + .y = callfunc("F_TestReturnValue", .x); + return .y; +} + +function script F_TestArrayRefs { + return getelementofarray(getarg(0), getarraysize(getarg(0)) - 1); +} + +function script F_TestReturnArrayRef { + setarray getarg(0), 5, 6, 7, 8; + return getarraysize(getarg(0)); +} + +function script F_TestScopeArrays { + setarray .@x, 1, 2, 3, 4; + copyarray .@y, getarg(0), getarraysize(getarg(0)); + return getarraysize(.@y); +} + +function script F_TestNPCArrays { + setarray .x, 1, 2, 3, 4; + copyarray .y, getarg(0), getarraysize(getarg(0)); + return getarraysize(.y); +} + - script HerculesSelfTest -1,{ end; +OnTestReturnValue: + return getarg(0); + +OnTestScopeVars: + .@x = 2; + return .@x+1; + +OnTestDeepNestedScope: + if (getarg(0) <= 0) + return getarg(1); // Stop recursion + if (getarg(1)) + return callsub(OnTestDeepNestedScope, getarg(0)-1, getarg(1)); // Recursion step + .@x = 1; + return callsub(OnTestDeepNestedScope, getarg(0)-1, .@x); // First step + +OnTestNestedScope: + .@x = 1; + .@y = callsub(OnTestReturnValue, .@x); + return .@y; + +OnTestArrayRefs: + return getelementofarray(getarg(0), getarraysize(getarg(0)) - 1); + +OnTestReturnArrayRef: + setarray getarg(0), 5, 6, 7, 8; + return getarraysize(getarg(0)); + +OnTestScopeArrays: + setarray .@x, 1, 2, 3, 4; + copyarray .@y, getarg(0), getarraysize(getarg(0)); + return getarraysize(.@y); + OnReportError: .@msg$ = getarg(0,"Unknown Error"); .@val$ = getarg(1,""); @@ -546,7 +652,53 @@ OnInit: setarray .@y, 5, 6, 7, 8, 9; callsub(OnCheck, "Callsub (copyarray from reference with the same name)", getarraysize(.@y), callsub(OnTestScopeArrays, .@y)); callsub(OnCheck, "Callsub (parent array vars isolation)", getarraysize(.@x), .@z); + deletearray .@x; + deletearray .@y; + // Callfunc + callsub(OnCheck, "Callfunc return value", callfunc("F_TestReturnValue", 1)); + .@x = 1; + callsub(OnCheck, "Callfunc return with scope variables", callfunc("F_TestScopeVars"), 3); + callsub(OnCheck, "Callfunc (parent scope vars isolation)", .@x, 1); + callsub(OnCheck, "Callfunc (nested scopes)", callfunc("F_TestNestedScope"), 1); + callsub(OnCheck, "Callfunc (deeply nested scopes)", callfunc("F_TestDeepNestedScope", 30, 0), 1); + deletearray .@x; + setarray .@x, 1, 2, 3, 4; + callsub(OnCheck, "Callfunc (array references)", callfunc("F_TestArrayRefs", .@x), 4); + deletearray .@x; + .@y = callfunc("F_TestReturnArrayRef", .@x); + callsub(OnCheck, "Callfunc return array references (size check)", getarraysize(.@x), .@y); + callsub(OnCheck, "Callfunc return array references", getelementofarray(.@x, 3), 8); + deletearray .@x; + deletearray .@y; + setarray .@x, 1, 2; + .@z = getarraysize(.@x); + setarray .@y, 5, 6, 7, 8, 9; + callsub(OnCheck, "Callfunc (copyarray from reference with the same name)", getarraysize(.@y), callfunc("F_TestScopeArrays", .@y)); + callsub(OnCheck, "Callfunc (parent array vars isolation)", getarraysize(.@x), .@z); + deletearray .@x; + deletearray .@y; + .x = 1; + callsub(OnCheck, "Callfunc return with NPC variables", callfunc("F_TestNPCVars"), 3); // FIXME: segfault + callsub(OnCheck, "Callfunc (parent NPC vars isolation)", .x, 1); + callsub(OnCheck, "Callfunc (nested scopes and NPC variables)", callfunc("F_TestNestedScopeNPC"), 1); // FIXME: segfault + callsub(OnCheck, "Callfunc (deeply nested scopes and NPC variables)", callfunc("F_TestDeepNestedScopeNPC", 30, 0), 1); // FIXME: segfault + deletearray .x; + setarray .x, 1, 2, 3, 4; + callsub(OnCheck, "Callfunc (array references and NPC variables)", callfunc("F_TestArrayRefs", .x), 4); // FIXME: segfault + deletearray .x; + .y = callfunc("F_TestReturnArrayRef", .x); + callsub(OnCheck, "Callfunc return array references with NPC variables (size check)", getarraysize(.x), .y); + callsub(OnCheck, "Callfunc return array references wuth NPC variables", getelementofarray(.x, 3), 8); + deletearray .x; + deletearray .y; + setarray .x, 1, 2; + .@z = getarraysize(.@x); + setarray .y, 5, 6, 7, 8, 9; + callsub(OnCheck, "Callfunc (copyarray from NPC variable reference with the same name)", getarraysize(.@y), callfunc("F_TestNPCArrays", .@y)); // FIXME: segfault + callsub(OnCheck, "Callfunc (parent array NPC vars isolation)", getarraysize(.@x), .@z); + deletearray .x; + deletearray .y; if (.errors) { debugmes "Script engine self-test [ \033[0;31mFAILED\033[0m ]"; @@ -555,37 +707,5 @@ OnInit: debugmes "Script engine self-test [ \033[0;32mPASSED\033[0m ]"; } end; - -OnTestReturnValue: - return getarg(0); - -OnTestScopeVars: - .@x = 2; - return .@x+1; - -OnTestDeepNestedScope: - if (getarg(0) <= 0) - return getarg(1); // Stop recursion - if (getarg(1)) - return callsub(OnTestDeepNestedScope, getarg(0)-1, getarg(1)); // Recursion step - .@x = 1; - return callsub(OnTestDeepNestedScope, getarg(0)-1, .@x); // First step - -OnTestNestedScope: - .@x = 1; - .@y = callsub(OnTestReturnValue, .@x); - return .@y; - -OnTestArrayRefs: - return getelementofarray(getarg(0), getarraysize(getarg(0)) - 1); - -OnTestReturnArrayRef: - setarray getarg(0), 5, 6, 7, 8; - return getarraysize(getarg(0)); - -OnTestScopeArrays: - setarray .@x, 1, 2, 3, 4; - copyarray .@y, getarg(0), getarraysize(getarg(0)); - return getarraysize(.@y); } diff --git a/src/common/atomic.h b/src/common/atomic.h index c2227a9d4..8c01943e7 100644 --- a/src/common/atomic.h +++ b/src/common/atomic.h @@ -87,7 +87,9 @@ forceinline volatile int64 InterlockedExchange64(volatile int64 *target, int64 v #elif defined(__GNUC__) -#if !defined(__x86_64__) && !defined(__i386__) +// The __sync functions are available on x86 or ARMv6+ +#if !defined(__x86_64__) && !defined(__i386__) \ + && ( !defined(__ARM_ARCH_VERSION__) || __ARM_ARCH_VERSION__ < 6 ) #error Your Target Platfrom is not supported #endif diff --git a/src/common/cbasetypes.h b/src/common/cbasetypes.h index 654334a9b..f44e80413 100644 --- a/src/common/cbasetypes.h +++ b/src/common/cbasetypes.h @@ -42,6 +42,18 @@ #define __DARWIN__ #endif +// Standardize the ARM platform version, if available (the only values we're interested in right now are >= ARMv6) +#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 +#define __ARM_ARCH_VERSION__ 7 +#elif defined(_M_ARM) // MSVC +#define __ARM_ARCH_VERSION__ _M_ARM +#else +#define __ARM_ARCH_VERSION__ 0 +#endif + // Necessary for __NetBSD_Version__ (defined as VVRR00PP00) on NetBSD #ifdef __NETBSD__ #include <sys/param.h> diff --git a/src/common/grfio.c b/src/common/grfio.c index 57e8a5187..bde0ed720 100644 --- a/src/common/grfio.c +++ b/src/common/grfio.c @@ -21,15 +21,15 @@ // file entry table struct //---------------------------- typedef struct _FILELIST { - int srclen; // compressed size - int srclen_aligned; - int declen; // original size - int srcpos; // position of entry in grf - int next; // index of next filelist entry with same hash (-1: end of entry chain) - char type; - char fn[128-4*5]; // file name - char* fnd; // if the file was cloned, contains name of original file - char gentry; // read grf file select + int srclen; ///< compressed size + int srclen_aligned; + int declen; ///< original size + int srcpos; ///< position of entry in grf + int next; ///< index of next filelist entry with same hash (-1: end of entry chain) + char type; + char fn[128-4*5]; ///< file name + char *fnd; ///< if the file was cloned, contains name of original file + int8 gentry; ///< read grf file select } FILELIST; #define FILELIST_TYPE_FILE 0x01 // entry is a file diff --git a/src/common/mmo.h b/src/common/mmo.h index 2b66c516c..cf3933d40 100644 --- a/src/common/mmo.h +++ b/src/common/mmo.h @@ -334,14 +334,13 @@ struct s_homunculus { //[orn] unsigned int exp; short rename_flag; short vaporize; //albator - int str ; - int agi ; - int vit ; - int int_ ; - int dex ; - int luk ; - - char spiritball; //for homun S [lighta] + int str; + int agi; + int vit; + int int_; + int dex; + int luk; + int8 spiritball; //for homun S [lighta] }; struct s_mercenary { diff --git a/src/map/battle.c b/src/map/battle.c index 40f3d2482..24f39a35d 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -4657,6 +4657,9 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list #endif switch(skill_id){ case SR_GATEOFHELL: + #ifdef RENEWAL + RE_SKILL_REDUCTION(); + #endif // RENEWAL if (wd.dmg_lv != ATK_FLEE) ATK_RATE(battle->calc_skillratio(BF_WEAPON, src, target, skill_id, skill_lv, skillratio, wflag)); else diff --git a/src/map/script.c b/src/map/script.c index bef5f37e0..fef25b927 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -3130,8 +3130,7 @@ struct script_data* push_copy(struct script_stack* stack, int pos) { /// Removes the values in indexes [start,end[ from the stack. /// Adjusts all stack pointers. -void pop_stack(struct script_state* st, int start, int end) -{ +void pop_stack(struct script_state* st, int start, int end) { struct script_stack* stack = st->stack; struct script_data* data; int i; @@ -3153,6 +3152,10 @@ void pop_stack(struct script_state* st, int start, int end) { struct script_retinfo* ri = data->u.ri; if( ri->scope.vars ) { + // Note: This is necessary evern if we're also doing it in run_func + // (in the RETFUNC block) because not all functions return. If a + // function (or a sub) has an 'end' or a 'close', it'll reach this + // block with its scope vars still to be freed. script->free_vars(ri->scope.vars); ri->scope.vars = NULL; } @@ -3224,6 +3227,8 @@ struct script_state* script_alloc_state(struct script_code* rootscript, int pos, st = ers_alloc(script->st_ers, struct script_state); st->stack = ers_alloc(script->stack_ers, struct script_stack); + st->pending_refs = NULL; + st->pending_ref_count = 0; st->stack->sp = 0; st->stack->sp_max = 64; CREATE(st->stack->stack_data, struct script_data, st->stack->sp_max); @@ -3280,6 +3285,12 @@ void script_free_state(struct script_state* st) { } } st->pos = -1; + if (st->pending_ref_count > 0) { + while (st->pending_ref_count > 0) + aFree(st->pending_refs[--st->pending_ref_count]); + aFree(st->pending_refs); + st->pending_refs = NULL; + } idb_remove(script->st_db, st->id); ers_free(script->st_ers, st); if( --script->active_scripts == 0 ) { @@ -3288,6 +3299,19 @@ void script_free_state(struct script_state* st) { } } +/** + * Adds a pending reference entry to the current script. + * + * @see struct script_state::pending_refs + * + * @param st[in] Script state. + * @param ref[in] Reference to be added. + */ +void script_add_pending_ref(struct script_state *st, struct reg_db *ref) { + RECREATE(st->pending_refs, struct reg_db*, ++st->pending_ref_count); + st->pending_refs[st->pending_ref_count-1] = ref; +} + // // Main execution unit // @@ -4883,7 +4907,10 @@ BUILDIN(callfunc) st->stack->defsp = st->stack->sp; st->state = GOTO; st->stack->scope.vars = i64db_alloc(DB_OPT_RELEASE_DATA); - st->stack->scope.arrays = i64db_alloc(DB_OPT_BASE); + st->stack->scope.arrays = idb_alloc(DB_OPT_BASE); + + if( !st->script->local.vars ) + st->script->local.vars = i64db_alloc(DB_OPT_RELEASE_DATA); return true; } @@ -4934,7 +4961,7 @@ BUILDIN(callsub) st->stack->defsp = st->stack->sp; st->state = GOTO; st->stack->scope.vars = i64db_alloc(DB_OPT_RELEASE_DATA); - st->stack->scope.arrays = i64db_alloc(DB_OPT_BASE); + st->stack->scope.arrays = idb_alloc(DB_OPT_BASE); return true; } @@ -4977,30 +5004,30 @@ BUILDIN(getarg) /// /// return; /// return <value>; -BUILDIN(return) -{ +BUILDIN(return) { if( script_hasdata(st,2) ) {// return value struct script_data* data; script_pushcopy(st, 2); data = script_getdatatop(st, -1); - if( data_isreference(data) ) - { + if( data_isreference(data) ) { const char* name = reference_getname(data); - if( name[0] == '.' && name[1] == '@' ) - {// scope variable + if( name[0] == '.' && name[1] == '@' ) { + // scope variable if( !data->ref || data->ref->vars == st->stack->scope.vars ) script->get_val(st, data);// current scope, convert to value if( data->ref && data->ref->vars == st->stack->stack_data[st->stack->defsp-1].u.ri->scope.vars ) data->ref = NULL; // Reference to the parent scope, remove reference pointer - } - else if( name[0] == '.' && !data->ref ) - {// script variable, link to current script + } else if( name[0] == '.' && !data->ref ) { + // script variable without a reference set, link to current script data->ref = (struct reg_db *)aCalloc(sizeof(struct reg_db), 1); + script->add_pending_ref(st, data->ref); data->ref->vars = st->script->local.vars; if( !st->script->local.arrays ) st->script->local.arrays = idb_alloc(DB_OPT_BASE); data->ref->arrays = st->script->local.arrays; + } else if ( name[0] == '.' /* && data->ref != NULL */ ) { + data->ref = NULL; // Reference to the parent scope's script, remove reference pointer. } } } @@ -19231,6 +19258,7 @@ void script_defaults(void) { script->free_vars = script_free_vars; script->alloc_state = script_alloc_state; script->free_state = script_free_state; + script->add_pending_ref = script_add_pending_ref; script->run_autobonus = script_run_autobonus; script->cleararray_pc = script_cleararray_pc; script->setarray_pc = script_setarray_pc; diff --git a/src/map/script.h b/src/map/script.h index ff947bf79..73ba7303e 100644 --- a/src/map/script.h +++ b/src/map/script.h @@ -401,6 +401,8 @@ struct hQueueIterator { struct script_state { struct script_stack* stack; + struct reg_db **pending_refs; ///< References to .vars returned by sub-functions, pending deletion. + int pending_ref_count; ///< Amount of pending_refs currently stored. int start,end; int pos; enum e_script_state state; @@ -589,6 +591,7 @@ struct script_interface { void (*free_vars) (struct DBMap *var_storage); struct script_state* (*alloc_state) (struct script_code* rootscript, int pos, int rid, int oid); void (*free_state) (struct script_state* st); + void (*add_pending_ref) (struct script_state *st, struct reg_db *ref); void (*run_autobonus) (const char *autobonus,int id, int pos); void (*cleararray_pc) (struct map_session_data* sd, const char* varname, void* value); void (*setarray_pc) (struct map_session_data* sd, const char* varname, uint32 idx, void* value, int* refcache); diff --git a/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc index fa9b04d39..4f37743f6 100644 --- a/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc @@ -4081,6 +4081,8 @@ struct { struct HPMHookPoint *HP_script_alloc_state_post; struct HPMHookPoint *HP_script_free_state_pre; struct HPMHookPoint *HP_script_free_state_post; + struct HPMHookPoint *HP_script_add_pending_ref_pre; + struct HPMHookPoint *HP_script_add_pending_ref_post; struct HPMHookPoint *HP_script_run_autobonus_pre; struct HPMHookPoint *HP_script_run_autobonus_post; struct HPMHookPoint *HP_script_cleararray_pc_pre; @@ -9112,6 +9114,8 @@ struct { int HP_script_alloc_state_post; int HP_script_free_state_pre; int HP_script_free_state_post; + int HP_script_add_pending_ref_pre; + int HP_script_add_pending_ref_post; int HP_script_run_autobonus_pre; int HP_script_run_autobonus_post; int HP_script_cleararray_pc_pre; diff --git a/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc index b90bb6a88..dd8c603d3 100644 --- a/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc @@ -2074,6 +2074,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(script->free_vars, HP_script_free_vars) }, { HP_POP(script->alloc_state, HP_script_alloc_state) }, { HP_POP(script->free_state, HP_script_free_state) }, + { HP_POP(script->add_pending_ref, HP_script_add_pending_ref) }, { HP_POP(script->run_autobonus, HP_script_run_autobonus) }, { HP_POP(script->cleararray_pc, HP_script_cleararray_pc) }, { HP_POP(script->setarray_pc, HP_script_setarray_pc) }, diff --git a/src/plugins/HPMHooking/HPMHooking.Hooks.inc b/src/plugins/HPMHooking/HPMHooking.Hooks.inc index 49d276edb..78987f81a 100644 --- a/src/plugins/HPMHooking/HPMHooking.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking.Hooks.inc @@ -52614,6 +52614,31 @@ void HP_script_free_state(struct script_state *st) { } return; } +void HP_script_add_pending_ref(struct script_state *st, struct reg_db *ref) { + int hIndex = 0; + if( HPMHooks.count.HP_script_add_pending_ref_pre ) { + void (*preHookFunc) (struct script_state *st, struct reg_db *ref); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_add_pending_ref_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_add_pending_ref_pre[hIndex].func; + preHookFunc(st, ref); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.script.add_pending_ref(st, ref); + } + if( HPMHooks.count.HP_script_add_pending_ref_post ) { + void (*postHookFunc) (struct script_state *st, struct reg_db *ref); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_add_pending_ref_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_add_pending_ref_post[hIndex].func; + postHookFunc(st, ref); + } + } + return; +} void HP_script_run_autobonus(const char *autobonus, int id, int pos) { int hIndex = 0; if( HPMHooks.count.HP_script_run_autobonus_pre ) { |