* Implemented NPC_TALK (Credit to SnakeDrak and Daegaladh)

- Also added in the ability to use '@npctalkc' as a GM command.
- Added supporting information to the databases.
- Sneaking in a fix to the Refined Ballista.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14270 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
L0ne_W0lf 2010-03-24 03:49:39 +00:00
parent 888d6384f4
commit 7a0e11a502
14 changed files with 5763 additions and 5539 deletions

View File

@ -3,6 +3,9 @@ Date Added
AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2010/03/23
* Rev. 14270 Implemented NPC_TALK (Credit to SnakeDrak and Daegaladh) [L0ne_W0lf]
- Also added in the ability to use '@npctalkc' as a GM command.
2010/03/21
* Added missing checks to stop an infinite free cash point exploit. (bugreport:4139) [ultramage]
2010/03/02

View File

@ -9,6 +9,9 @@
13005 Angelic Wing Dagger: NEED INFO.
=======================
2010/03/23
* Rev. 14269 Added support for server-side NPC_TALK. [L0ne_W0lf]
- New column in the mob_skill_db/2, and new database to hold monster dialog.
- Sneaking in a fix to balister_c.
* Rev. 14269 More bugfixing here, too! [L0ne_W0lf]
- Corrected the mode of the crystal monsters (removed MD_CANATTRACK). (bugreport:3962)
- Implemented the full ice pick effect on the BG assassin damascus. (bugreport:4137)

View File

@ -911,7 +911,7 @@
1725,Bow_Of_Minstrel,Minstrel Bow,4,20,,1700,120,,5,1,0x00080800,7,2,34,4,70,1,11,{ bonus bInt,2; bonus bSPrecovRate,10; },{},{}
1726,Hunter_Bow_,Hunter Bow,4,64000,,1500,125,,5,1,0x00000800,7,2,34,3,33,1,11,{},{},{}
1727,Balistar_,Ballista,4,124000,,3500,145,,5,1,0x00080800,7,2,34,4,77,1,11,{},{},{}
1728,Balistar_C,Refined Ballista,4,1,,0,194,,5,0,0x00080800,7,2,34,4,1,0,11,{ bonus bLongAtkRate,40; },{},{}
1728,Balistar_C,Refined Ballista,4,1,,0,194,,5,0,0x00080800,7,2,34,4,1,0,11,{ bonus bLongAtkRate,20; },{},{}
1729,Bow_Of_Rudra_C,Refined Rudra Bow,4,2,,0,185,,5,0,0x000A0808,7,2,34,4,1,0,11,{ bonus bAtkEle,Ele_Holy; bonus bInt,5; skill "AL_CURE",1; skill "AL_HEAL",1; },{},{}
1730,Burning_Bow,Burning Bow,4,20,,1400,95,,5,1,0x000A0808,7,2,34,3,55,1,11,{ bonus2 bSubEle,Ele_Fire,10; if(isequipped(1752)) bonus bLongAtkRate,25; },{},{}
1731,Frozen_Bow,Freezing Bow,4,20,,1400,100,,5,1,0x000A0808,7,2,34,3,55,1,11,{ bonus2 bAddEff,Eff_Freeze,1000; if(isequipped(1754)) bonus bLongAtkRate,25; },{},{}

30
db/mob_chat_db.txt Normal file
View File

@ -0,0 +1,30 @@
// Monster Chat Database
//
// Structure of Database:
// Line_ID,Color_Code,Dialog
1,0xFF0000,Weakling! Challenge me if you have any courage!
2,0xFF0000,Impressive! I wonder how far your recklessness will take you.
3,0xFF0000,I almost pity how outmatched you are against me. Now prepare for my attack!
4,0xFF0000,My loyal servants! Welcome them with a painful death!
5,0xFF0000,Don't you run away!
6,0xFF0000,You worthless humans. Your so-called holy powers have no effect on me!
7,0xFF0000,Useless underlings!...Well, that's fine, I have more weapons to use and dispose.
8,0xFF0000,Pray to your gods!
9,0xFF0000,Do you still think you're a match to me?!
10,0xFF0000,Vanish!
11,0xFF0000,Let's see how long you can endure my power!
12,0xFF0000,Is this all you've got?!
13,0xFF0000,You're tickling me!
14,0xFF0000,This is how you attack? Watch and learn, weaklings!
15,0xFF0000,It's time to finish the game!
16,0xFF0000,Oh, you're stronger than I thought!
17,0xFF0000,No, this can't be happening! I'm Satan Morroc, Demon King of Destruction!
18,0xFF0000,I can never die! I'll be coming back for you!
19,0xFF0000,I was born to conquer this world! None shall stop me!
20,0xFF0000,Your days are numbered!
21,0xFF0000,Pulse Strike! My fingers tear steel!
22,0xFF0000,Hahaha, tell me who I am! I'm Baphomet, the Heir of Hell!
23,0xFF0000,Enjoy your time on the mortal plane while you can, your hope will soon turn into despair!
24,0xFF0000,When are you going to learn your lesson? In death?
25,0xFF0000,No... I can't lose! I won't beg for my life! I'm not running away! I don't accept this as defeat!
26,0xFF0000,Argh... I... I'm weakening...

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
// Custom mob skills
//MOB_ID, a unused dummy character sequence (for information only), STATE, SKILL_ID, SKILL_LV,
// rate (10000 = 100%), casttime, delay, cancelable, a target, a condition type, a condition value,
// a value 1, a value 2, a value 3, a value 4, a value 5, emotion
// a value 1, a value 2, a value 3, a value 4, a value 5, emotion, chat
//Example
//1001,Poring@TF_POISON,attack,52,3,100,1500,10000,no,target,always,0,,,,,7
//
@ -57,84 +57,84 @@
// sight condition of being in unhidden state
// eAthena Dev Team
//1900,Valaris@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
//1900,Valaris@AL_TELEPORT,walk,26,1,500,0,5000,yes,self,rudeattacked,,,,,,,
//1900,Valaris@KN_BRANDISHSPEAR,attack,57,10,2000,500,5000,no,target,always,0,,,,,,29
//1900,Valaris@MO_BODYRELOCATION,chase,264,1,200,200,1000,yes,target,always,0,,,,,,
//1900,Valaris@NPC_ARMORBRAKE,attack,344,10,2000,0,5000,no,target,always,0,,,,,,
//1900,Valaris@NPC_CALLSLAVE,attack,352,1,10000,0,30000,yes,target,always,0,,,,,,
//1900,Valaris@NPC_CALLSLAVE,idle,352,1,10000,0,30000,yes,self,always,0,,,,,,
//1900,Valaris@NPC_DARKBREATH,attack,202,5,2000,800,5000,no,target,always,0,,,,,,29
//1900,Valaris@NPC_DARKSTRIKE,chase,340,10,200,0,1000,yes,target,always,0,,,,,,
//1900,Valaris@NPC_GUIDEDATTACK,attack,172,5,500,0,20000,no,target,always,0,,,,,,
//1900,Valaris@NPC_POWERUP,attack,349,5,10000,0,30000,yes,self,myhpltmaxrate,30,,,,,,6
//1900,Valaris@NPC_SUMMONSLAVE,attack,196,6,10000,700,10000,no,self,slavele,3,1902,,,,,
//1900,Valaris@NPC_SUMMONSLAVE,idle,196,6,10000,700,10000,no,self,slavele,3,1902,,,,,
//1900,Valaris@WZ_VERMILION,attack,85,10,2000,500,2000,no,target,always,0,,,,,,29
//1900,Valaris@WZ_VERMILION,chase,85,10,200,500,2000,no,target,always,0,,,,,,29
//1900,Valaris@WZ_VERMILION,chase,85,10,500,500,2000,no,target,skillused,18,,,,,,29
//1901,Valaris's Worshipper@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
//1901,Valaris's Worshipper@NPC_CURSEATTACK,attack,181,3,500,800,5000,no,target,always,0,,,,,,29
//1901,Valaris's Worshipper@NPC_DARKNESSATTACK,attack,190,2,500,500,5000,no,target,always,0,,,,,,6
//1901,Valaris's Worshipper@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,129,,,,
//1901,Valaris's Worshipper@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,6,1173,,,,
//1901,Valaris's Worshipper@NPC_EMOTION,walk,197,1,200,0,5000,yes,self,always,0,2,,,,,
//1901,Valaris's Worshipper@NPC_HALLUCINATION,attack,207,1,500,500,5000,yes,target,always,0,,,,,,29
//1901,Valaris's Worshipper@NPC_HALLUCINATION,chase,207,1,50,500,5000,yes,target,always,0,,,,,,29
//1901,Valaris's Worshipper@SA_DISPELL,attack,289,1,0,0,30000,yes,target,always,0,,,,,,29
//1902,MC Cameri@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
//1902,MC Cameri@AL_TELEPORT,walk,26,1,500,0,5000,yes,self,rudeattacked,,,,,,,
//1902,MC Cameri@KN_BRANDISHSPEAR,attack,57,10,2000,500,5000,no,target,always,0,,,,,,29
//1902,MC Cameri@MO_BODYRELOCATION,chase,264,1,200,200,1000,yes,target,always,0,,,,,,
//1902,MC Cameri@NPC_ARMORBRAKE,attack,344,10,2000,0,5000,no,target,always,0,,,,,,
//1902,MC Cameri@NPC_DARKBREATH,attack,202,5,2000,800,5000,no,target,always,0,,,,,,29
//1902,MC Cameri@NPC_DARKSTRIKE,chase,340,10,200,0,1000,yes,target,always,0,,,,,,
//1902,MC Cameri@NPC_GUIDEDATTACK,attack,172,5,500,0,20000,no,target,always,0,,,,,,
//1902,MC Cameri@NPC_POWERUP,attack,349,5,10000,0,30000,yes,self,myhpltmaxrate,30,,,,,,6
//1902,MC Cameri@WZ_VERMILION,attack,85,10,2000,500,2000,no,target,always,0,,,,,,29
//1902,MC Cameri@WZ_VERMILION,chase,85,10,200,500,2000,no,target,always,0,,,,,,29
//1902,MC Cameri@WZ_VERMILION,chase,85,10,500,500,2000,no,target,skillused,18,,,,,,29
//1903,Poki#3@AC_DOUBLE,attack,46,10,500,1000,5000,no,target,always,0,,,,,,
//1903,Poki#3@AC_SHOWER,attack,47,8,2000,1000,5000,no,target,attackpcgt,2,,,,,,
//1903,Poki#3@BS_MAXIMIZE,chase,114,5,500,1000,5000,no,self,always,0,,,,,,
//1903,Poki#3@BS_MAXIMIZE,attack,114,5,500,1000,5000,no,self,always,0,,,,,,
//1903,Poki#3@NPC_AGIUP,chase,350,5,2500,0,5000,no,self,always,0,,,,,,
//1903,Poki#3@NPC_POWERUP,attack,349,5,500,0,30000,yes,self,myhpltmaxrate,30,,,,,,
//1903,Poki#3@SN_SHARPSHOOTING,attack,382,5,500,1000,5000,no,target,always,0,,,,,,
//1903,Poki#3@HT_SKIDTRAP,idle,115,5,50,0,5000,yes,self,always,0,,,,,,29
//1903,Poki#3@HT_FREEZINGTRAP,idle,120,5,50,0,300000,yes,self,always,0,,,,,,
//1903,Poki#3@HT_FREEZINGTRAP,idle,121,5,50,0,300000,yes,self,always,0,,,,,,
//1903,Poki#3@AC_CHARGEARROW,attack,148,1,500,0,5000,yes,target,always,0,,,,,,
//1903,Poki#3@HT_FLASHER,idle,120,5,50,0,300000,yes,self,always,0,,,,,,
//1903,Poki#3@NPC_SUMMONSLAVE,idle,196,5,10000,2000,120000,no,self,slavele,1,1659,1660,1661,1662,1663,0
//1903,Poki#3@NPC_CALLSLAVE,attack,352,1,2000,0,10000,yes,target,always,0,,,,,,
//1903,Poki#3@NPC_CALLSLAVE,idle,352,1,2000,0,10000,yes,self,always,0,,,,,,
//1903,Poki#3@NPC_CHANGEWATER,attack,162,1,10000,2000,600000,no,self,myhpltmaxrate,30,,,,,,
//1903,Poki#3@NPC_CHANGETELEKINESIS,attack,169,1,500,2000,5000,no,self,myhpltmaxrate,10,,,,,,7
//1903,Poki#3@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
//1900,Valaris@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,,
//1900,Valaris@AL_TELEPORT,walk,26,1,500,0,5000,yes,self,rudeattacked,,,,,,,,
//1900,Valaris@KN_BRANDISHSPEAR,attack,57,10,2000,500,5000,no,target,always,0,,,,,,29,
//1900,Valaris@MO_BODYRELOCATION,chase,264,1,200,200,1000,yes,target,always,0,,,,,,,
//1900,Valaris@NPC_ARMORBRAKE,attack,344,10,2000,0,5000,no,target,always,0,,,,,,,
//1900,Valaris@NPC_CALLSLAVE,attack,352,1,10000,0,30000,yes,target,always,0,,,,,,,
//1900,Valaris@NPC_CALLSLAVE,idle,352,1,10000,0,30000,yes,self,always,0,,,,,,,
//1900,Valaris@NPC_DARKBREATH,attack,202,5,2000,800,5000,no,target,always,0,,,,,,29,
//1900,Valaris@NPC_DARKSTRIKE,chase,340,10,200,0,1000,yes,target,always,0,,,,,,,
//1900,Valaris@NPC_GUIDEDATTACK,attack,172,5,500,0,20000,no,target,always,0,,,,,,,
//1900,Valaris@NPC_POWERUP,attack,349,5,10000,0,30000,yes,self,myhpltmaxrate,30,,,,,,6,
//1900,Valaris@NPC_SUMMONSLAVE,attack,196,6,10000,700,10000,no,self,slavele,3,1902,,,,,,
//1900,Valaris@NPC_SUMMONSLAVE,idle,196,6,10000,700,10000,no,self,slavele,3,1902,,,,,,
//1900,Valaris@WZ_VERMILION,attack,85,10,2000,500,2000,no,target,always,0,,,,,,29,
//1900,Valaris@WZ_VERMILION,chase,85,10,200,500,2000,no,target,always,0,,,,,,29,
//1900,Valaris@WZ_VERMILION,chase,85,10,500,500,2000,no,target,skillused,18,,,,,,29,
//1901,Valaris's Worshipper@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,,
//1901,Valaris's Worshipper@NPC_CURSEATTACK,attack,181,3,500,800,5000,no,target,always,0,,,,,,29,
//1901,Valaris's Worshipper@NPC_DARKNESSATTACK,attack,190,2,500,500,5000,no,target,always,0,,,,,,6,
//1901,Valaris's Worshipper@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,129,,,,,
//1901,Valaris's Worshipper@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,6,1173,,,,,
//1901,Valaris's Worshipper@NPC_EMOTION,walk,197,1,200,0,5000,yes,self,always,0,2,,,,,,
//1901,Valaris's Worshipper@NPC_HALLUCINATION,attack,207,1,500,500,5000,yes,target,always,0,,,,,,29,
//1901,Valaris's Worshipper@NPC_HALLUCINATION,chase,207,1,50,500,5000,yes,target,always,0,,,,,,29,
//1901,Valaris's Worshipper@SA_DISPELL,attack,289,1,0,0,30000,yes,target,always,0,,,,,,29,
//1902,MC Cameri@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,,
//1902,MC Cameri@AL_TELEPORT,walk,26,1,500,0,5000,yes,self,rudeattacked,,,,,,,,
//1902,MC Cameri@KN_BRANDISHSPEAR,attack,57,10,2000,500,5000,no,target,always,0,,,,,,29,
//1902,MC Cameri@MO_BODYRELOCATION,chase,264,1,200,200,1000,yes,target,always,0,,,,,,,
//1902,MC Cameri@NPC_ARMORBRAKE,attack,344,10,2000,0,5000,no,target,always,0,,,,,,,
//1902,MC Cameri@NPC_DARKBREATH,attack,202,5,2000,800,5000,no,target,always,0,,,,,,29,
//1902,MC Cameri@NPC_DARKSTRIKE,chase,340,10,200,0,1000,yes,target,always,0,,,,,,,
//1902,MC Cameri@NPC_GUIDEDATTACK,attack,172,5,500,0,20000,no,target,always,0,,,,,,,
//1902,MC Cameri@NPC_POWERUP,attack,349,5,10000,0,30000,yes,self,myhpltmaxrate,30,,,,,,6,
//1902,MC Cameri@WZ_VERMILION,attack,85,10,2000,500,2000,no,target,always,0,,,,,,29,
//1902,MC Cameri@WZ_VERMILION,chase,85,10,200,500,2000,no,target,always,0,,,,,,29,
//1902,MC Cameri@WZ_VERMILION,chase,85,10,500,500,2000,no,target,skillused,18,,,,,,29,
//1903,Poki#3@AC_DOUBLE,attack,46,10,500,1000,5000,no,target,always,0,,,,,,,
//1903,Poki#3@AC_SHOWER,attack,47,8,2000,1000,5000,no,target,attackpcgt,2,,,,,,,
//1903,Poki#3@BS_MAXIMIZE,chase,114,5,500,1000,5000,no,self,always,0,,,,,,,
//1903,Poki#3@BS_MAXIMIZE,attack,114,5,500,1000,5000,no,self,always,0,,,,,,,
//1903,Poki#3@NPC_AGIUP,chase,350,5,2500,0,5000,no,self,always,0,,,,,,,
//1903,Poki#3@NPC_POWERUP,attack,349,5,500,0,30000,yes,self,myhpltmaxrate,30,,,,,,,
//1903,Poki#3@SN_SHARPSHOOTING,attack,382,5,500,1000,5000,no,target,always,0,,,,,,,
//1903,Poki#3@HT_SKIDTRAP,idle,115,5,50,0,5000,yes,self,always,0,,,,,,29,
//1903,Poki#3@HT_FREEZINGTRAP,idle,120,5,50,0,300000,yes,self,always,0,,,,,,,
//1903,Poki#3@HT_FREEZINGTRAP,idle,121,5,50,0,300000,yes,self,always,0,,,,,,,
//1903,Poki#3@AC_CHARGEARROW,attack,148,1,500,0,5000,yes,target,always,0,,,,,,,
//1903,Poki#3@HT_FLASHER,idle,120,5,50,0,300000,yes,self,always,0,,,,,,,
//1903,Poki#3@NPC_SUMMONSLAVE,idle,196,5,10000,2000,120000,no,self,slavele,1,1659,1660,1661,1662,1663,0,
//1903,Poki#3@NPC_CALLSLAVE,attack,352,1,2000,0,10000,yes,target,always,0,,,,,,,
//1903,Poki#3@NPC_CALLSLAVE,idle,352,1,2000,0,10000,yes,self,always,0,,,,,,,
//1903,Poki#3@NPC_CHANGEWATER,attack,162,1,10000,2000,600000,no,self,myhpltmaxrate,30,,,,,,,
//1903,Poki#3@NPC_CHANGETELEKINESIS,attack,169,1,500,2000,5000,no,self,myhpltmaxrate,10,,,,,,7,
//1903,Poki#3@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,,
// Easter Bunny (not in the db?? it's in db2!)
//1921,Easter Bunny@NPC_SUMMONSLAVE,attack,196,5,10000,3000,10000,no,self,slavele,2,1063,,,,,
//1921,Easter Bunny@NPC_SUMMONSLAVE,idle,196,5,5000,2000,40000,no,self,always,2,1920,,,,,
//1921,Easter Bunny@NPC_SUMMONSLAVE,attack,196,5,10000,3000,10000,no,self,slavele,2,1063,,,,,,
//1921,Easter Bunny@NPC_SUMMONSLAVE,idle,196,5,5000,2000,40000,no,self,always,2,1920,,,,,,
//Custom Fire Poring. Warning, Colides with META_DENIRO
//1239,Fire Poring@AL_HEAL,idle,28,10,10000,0,2000,yes,self,always,0,,,,,,4
//1239,Fire Poring@AL_HEAL,walk,28,10,10000,0,2000,yes,self,always,0,,,,,,4
//1239,Fire Poring@AL_TELEPORT,attack,26,1,1000,5000,60000,no,self,myhpltmaxrate,30,,,,,,
//1239,Fire Poring@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
//1239,Fire Poring@NPC_DARKBLESSING,attack,203,1,1000,2000,5000,no,target,always,0,,,,,,18
//1239,Fire Poring@NPC_SUMMONSLAVE,attack,196,16,10000,2000,10000,no,self,slavele,3,1491,1431,1433,,,18
//1239,Fire Poring@NPC_SUMMONSLAVE,idle,196,16,10000,2000,10000,no,self,slavele,3,1491,1431,1433,,,18
//1239,Fire Poring@RG_INTIMIDATE,attack,219,5,1000,0,3000,yes,target,always,0,,,,,,
//1239,Fire Poring@RG_STRIPARMOR,attack,217,5,2000,0,3000,yes,target,always,0,,,,,,
//1239,Fire Poring@RG_STRIPHELM,attack,218,5,2000,0,3000,yes,target,always,0,,,,,,
//1239,Fire Poring@RG_STRIPSHIELD,attack,216,5,2000,0,3000,yes,target,always,0,,,,,,
//1239,Fire Poring@RG_STRIPWEAPON,attack,215,5,2000,0,3000,yes,target,always,0,,,,,,
//1239,Fire Poring@AL_HEAL,idle,28,10,10000,0,2000,yes,self,always,0,,,,,,4,
//1239,Fire Poring@AL_HEAL,walk,28,10,10000,0,2000,yes,self,always,0,,,,,,4,
//1239,Fire Poring@AL_TELEPORT,attack,26,1,1000,5000,60000,no,self,myhpltmaxrate,30,,,,,,,
//1239,Fire Poring@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,,
//1239,Fire Poring@NPC_DARKBLESSING,attack,203,1,1000,2000,5000,no,target,always,0,,,,,,18,
//1239,Fire Poring@NPC_SUMMONSLAVE,attack,196,16,10000,2000,10000,no,self,slavele,3,1491,1431,1433,,,18,
//1239,Fire Poring@NPC_SUMMONSLAVE,idle,196,16,10000,2000,10000,no,self,slavele,3,1491,1431,1433,,,18,
//1239,Fire Poring@RG_INTIMIDATE,attack,219,5,1000,0,3000,yes,target,always,0,,,,,,,
//1239,Fire Poring@RG_STRIPARMOR,attack,217,5,2000,0,3000,yes,target,always,0,,,,,,,
//1239,Fire Poring@RG_STRIPHELM,attack,218,5,2000,0,3000,yes,target,always,0,,,,,,,
//1239,Fire Poring@RG_STRIPSHIELD,attack,216,5,2000,0,3000,yes,target,always,0,,,,,,,
//1239,Fire Poring@RG_STRIPWEAPON,attack,215,5,2000,0,3000,yes,target,always,0,,,,,,,
//iRO Halloween Event 2009
//3014,Halloween Whisper@AS_CLOAKING,idle,135,1,2000,200,5000,yes,self,always,0,,,,,,
//3014,Halloween Whisper@AS_CLOAKING,chase,135,1,2000,200,5000,yes,self,always,0,,,,,,
//3014,Halloween Whisper@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,,,,,,
//3014,Halloween Whisper@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,19,0x81,,,,
//3014,Halloween Whisper@AS_CLOAKING,idle,135,1,2000,200,5000,yes,self,always,0,,,,,,,
//3014,Halloween Whisper@AS_CLOAKING,chase,135,1,2000,200,5000,yes,self,always,0,,,,,,,
//3014,Halloween Whisper@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,,,,,,,
//3014,Halloween Whisper@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,19,0x81,,,,,
// Here you can place your custom mob skills

View File

@ -621,7 +621,7 @@
681,0,0,0,0,0,0,10,0,no,0,0x1,0,none,0, ALL_INCCARRY,Increase Weight Limit R
// Additional NPC skill (Episode 12)
//682,0,0,0,0,0,0,9,0,no,0,0,0,none,0, NPC_TALK,Talk
682,0,0,4,0,0x1,0,1,1,no,0,0x2,0,none,0, NPC_TALK,Talk
683,-9,6,1,-1,0,0,1,1,no,0,0x2,0,none,0, NPC_HELLPOWER,Hell Power
684,0,6,4,0,0x3,-1,1,1,no,0,0x2,0,none,0, NPC_WIDEHELLDIGNITY,Hell Dignity
685,0,0,4,0,0x1,0,1,1,no,0,0x2,0,none,0, NPC_INVINCIBLE,Invincible

View File

@ -6343,20 +6343,31 @@ int atcommand_cleanmap(const int fd, struct map_session_data* sd, const char* co
/*==========================================
* make a NPC/PET talk
* @npctalkc [SnakeDrak]
*------------------------------------------*/
int atcommand_npctalk(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
char name[NAME_LENGTH],mes[100],temp[100];
struct npc_data *nd;
bool ifcolor=(*(command + 8) != 'c' && *(command + 8) != 'C')?0:1;
unsigned long color=0;
if (sd->sc.count && //no "chatting" while muted.
(sd->sc.data[SC_BERSERK] ||
(sd->sc.data[SC_NOCHAT] && sd->sc.data[SC_NOCHAT]->val1&MANNER_NOCHAT)))
return -1;
if (!message || !*message || sscanf(message, "%23[^,], %99[^\n]", name, mes) < 2) {
clif_displaymessage(fd, "Please, enter the correct info (usage: @npctalk <npc name>, <message>).");
return -1;
if(!ifcolor) {
if (!message || !*message || sscanf(message, "%23[^,], %99[^\n]", name, mes) < 2) {
clif_displaymessage(fd, "Please, enter the correct info (usage: @npctalk <npc name>, <message>).");
return -1;
}
}
else {
if (!message || !*message || sscanf(message, "%lx %23[^,], %99[^\n]", &color, name, mes) < 3) {
clif_displaymessage(fd, "Please, enter the correct info (usage: @npctalkc <color> <npc name>, <message>).");
return -1;
}
}
if (!(nd = npc_name2id(name))) {
@ -6366,7 +6377,9 @@ int atcommand_npctalk(const int fd, struct map_session_data* sd, const char* com
strtok(name, "#"); // discard extra name identifier if present
snprintf(temp, sizeof(temp), "%s : %s", name, mes);
clif_message(&nd->bl, temp);
if(ifcolor) clif_messagecolor(&nd->bl,color,temp);
else clif_message(&nd->bl, temp);
return 0;
}
@ -8733,6 +8746,7 @@ AtCommandInfo atcommand_info[] = {
{ "mobsearch", 10,10, atcommand_mobsearch },
{ "cleanmap", 40,40, atcommand_cleanmap },
{ "npctalk", 20,20, atcommand_npctalk },
{ "npctalkc", 20,20, atcommand_npctalk },
{ "pettalk", 10,10, atcommand_pettalk },
{ "users", 40,40, atcommand_users },
{ "reset", 40,40, atcommand_reset },

View File

@ -7381,6 +7381,29 @@ void clif_specialeffect_single(struct block_list* bl, int type, int fd)
WFIFOSET(fd,10);
}
/******************************************************
* W.<packet> W.<LENGTH> L.<ID> L.<COLOR> S.<TEXT>
* Mob/NPC Color Talk [SnakeDrak]
******************************************************/
int clif_messagecolor(struct block_list* bl, unsigned long color, const char* msg)
{
unsigned short msg_len = strlen(msg) + 1;
uint8 buf[256];
color = (color & 0x0000FF) << 16 | (color & 0x00FF00) | (color & 0xFF0000) >> 16; // RGB to BGR
nullpo_retr(0, bl);
WBUFW(buf,0) = 0x2C1;
WBUFW(buf,2) = msg_len + 12;
WBUFL(buf,4) = bl->id;
WBUFL(buf,8) = color;
memcpy(WBUFP(buf,12), msg, msg_len);
clif_send(buf, WBUFW(buf,2), bl, AREA_CHAT_WOC);
return 0;
}
// messages (from mobs/npcs) [Valaris]
int clif_message(struct block_list* bl, const char* msg)
{

View File

@ -371,6 +371,7 @@ int clif_mob_hp(struct mob_data *md);
void clif_weather(int m); // [Valaris]
int clif_specialeffect(struct block_list* bl, int type, enum send_target target); // special effects [Valaris]
void clif_specialeffect_single(struct block_list* bl, int type, int fd);
int clif_messagecolor(struct block_list* bl, unsigned long color, const char* msg); // Mob/Npc color talk [SnakeDrak]
int clif_message(struct block_list *bl, const char* msg); // messages (from mobs/npcs) [Valaris]
int clif_GM_kickack(struct map_session_data *sd,int id);

View File

@ -51,6 +51,7 @@
#define MOB_MAX_DELAY (24*3600*1000)
#define MAX_MINCHASE 30 //Max minimum chase value to use for mobs.
#define RUDE_ATTACKED_COUNT 2 //After how many rude-attacks should the skill be used?
#define MAX_MOB_CHAT 250 //Max Skill's messages
//Dynamic mob database, allows saving of memory when there's big gaps in the mob_db [Skotlex]
struct mob_db *mob_db_data[MAX_MOB_DB+1];
@ -58,6 +59,10 @@ struct mob_db *mob_dummy = NULL; //Dummy mob to be returned when a non-existant
struct mob_db *mob_db(int index) { if (index < 0 || index > MAX_MOB_DB || mob_db_data[index] == NULL) return mob_dummy; return mob_db_data[index]; }
//Dynamic mob chat database
struct mob_chat *mob_chat_db[MAX_MOB_CHAT+1];
struct mob_chat *mob_chat(short id) { if(id<=0 || id>MAX_MOB_CHAT || mob_chat_db[id]==NULL) return (struct mob_chat*)NULL; return mob_chat_db[id]; }
static struct eri *item_drop_ers; //For loot drops delay structures.
static struct eri *item_drop_list_ers;
@ -2978,6 +2983,13 @@ int mobskill_use(struct mob_data *md, unsigned int tick, int event)
if (!flag)
continue; //Skill requisite failed to be fulfilled.
if (ms[i].msg_id){ //Display color message [SnakeDrak]
struct mob_chat *mc = mob_chat(ms[i].msg_id);
char temp[CHAT_SIZE_MAX];
snprintf(temp, sizeof temp,"%s : %s", md->name, mc->msg);
clif_messagecolor(&md->bl, mc->color, temp);
}
//Execute skill
if (skill_get_casttype(ms[i].skill_id) == CAST_GROUND)
{ //Ground skill.
@ -3868,6 +3880,103 @@ static int mob_read_randommonster(void)
return 0;
}
/*==========================================
* processes one mob_chat_db entry [SnakeDrak]
* @param last_msg_id ensures that only one error message per mob id is printed
*------------------------------------------*/
static bool mob_parse_row_chatdb(char** str, const char* source, int line, int* last_msg_id)
{
struct mob_chat *ms;
int msg_id;
msg_id = atoi(str[0]);
if (msg_id <= 0 || msg_id > MAX_MOB_CHAT)
{
if (msg_id != *last_msg_id) {
ShowError("mob_chat: Invalid chat ID: %d at %s, line %d\n", msg_id, source, line);
*last_msg_id = msg_id;
}
return false;
}
if (mob_chat_db[msg_id] == NULL)
mob_chat_db[msg_id] = (struct mob_chat*)aCalloc(1, sizeof (struct mob_chat));
ms = mob_chat_db[msg_id];
//MSG ID
ms->msg_id=msg_id;
//Color
ms->color=strtoul(str[1],NULL,0);
//Message
if(strlen(str[2])>(CHAT_SIZE_MAX-1)){
if (msg_id != *last_msg_id) {
ShowError("mob_chat: readdb: Message too long! Line %d, id: %d\n", line, msg_id);
*last_msg_id = msg_id;
}
return false;
}
strncpy(ms->msg, str[2], CHAT_SIZE_MAX);
return true;
}
/*==========================================
* mob_chat_db.txt reading [SnakeDrak]
*-------------------------------------------------------------------------*/
static void mob_readchatdb(void)
{
char arc[]="mob_chat_db.txt";
uint32 lines=0, count=0;
char line[1024], path[256];
int i, tmp=0;
FILE *fp;
sprintf(path, "%s/%s", db_path, arc);
fp=fopen(path, "r");
if(fp == NULL)
{
ShowWarning("mob_readchatdb: File not found \"%s\", skipping.\n", path);
return;
}
while(fgets(line, sizeof(line), fp))
{
char *str[3], *p, *np;
int j=0;
lines++;
if(line[0] == '/' && line[1] == '/')
continue;
memset(str, 0, sizeof(str));
p=line;
while(ISSPACE(*p))
++p;
if(*p == '\0')
continue;// empty line
for(i = 0; i <= 2; i++)
{
str[i] = p;
if(i<2 && (np = strchr(p, ',')) != NULL) {
*np = '\0'; p = np + 1; j++;
}
}
if( j < 2 || str[2]==NULL)
{
ShowError("mob_readchatdb: Insufficient number of fields for skill at %s, line %d\n", arc, lines);
continue;
}
if( !mob_parse_row_chatdb(str, path, lines, &tmp) )
continue;
count++;
}
fclose(fp);
ShowStatus("Done reading '"CL_WHITE"%s"CL_RESET"'.\n", arc);
}
/*==========================================
* processes one mob_skill_db entry
* @param last_mob_id ensures that only one error message per mob id is printed
@ -4092,6 +4201,12 @@ static bool mob_parse_row_mobskilldb(char** str, const char* source, int line, i
ms->emotion=atoi(str[17]);
else
ms->emotion=-1;
if(str[18]!=NULL && mob_chat_db[atoi(str[18])]!=NULL)
ms->msg_id=atoi(str[18]);
else
ms->msg_id=0;
if (mob_id < 0)
{ //Set this skill to ALL mobs. [Skotlex]
mob_id *= -1;
@ -4156,6 +4271,7 @@ static int mob_readskilldb(void)
while(fgets(line, sizeof(line), fp))
{
char *str[20], *p, *np;
int j=0;
lines++;
if(line[0] == '/' && line[1] == '/')
@ -4167,15 +4283,15 @@ static int mob_readskilldb(void)
++p;
if( *p == '\0' )
continue;// empty line
for(i = 0; i < 18; i++)
for(i = 0; i < 19; i++)
{
str[i] = p;
if((np = strchr(p, ',')) != NULL) {
*np = '\0'; p = np + 1;
*np = '\0'; p = np + 1; j++;
}
}
if( i < 18 )
if ( j < 18 || str[18]==NULL )
{
ShowError("mob_readskilldb: Insufficient number of fields for skill at %s, line %d\n", filename[fi], lines);
continue;
@ -4262,6 +4378,7 @@ void mob_reload(void)
memset(&mob_db_data[i]->skill,0,sizeof(mob_db_data[i]->skill));
mob_db_data[i]->maxskill=0;
}
mob_readchatdb();
mob_readskilldb();
mob_readdb_race();
}
@ -4294,6 +4411,7 @@ int do_init_mob(void)
mob_readdb_mobavail();
mob_read_randommonster();
mob_readchatdb();
mob_readskilldb();
mob_readdb_race();
@ -4329,6 +4447,14 @@ int do_final_mob(void)
mob_db_data[i] = NULL;
}
}
for (i = 0; i <= MAX_MOB_CHAT; i++)
{
if (mob_chat_db[i] != NULL)
{
aFree(mob_chat_db[i]);
mob_chat_db[i] = NULL;
}
}
ers_destroy(item_drop_ers);
ers_destroy(item_drop_list_ers);
return 0;

View File

@ -62,6 +62,13 @@ struct mob_skill {
short target;
int val[5];
short emotion;
unsigned short msg_id;
};
struct mob_chat {
unsigned short msg_id;
unsigned long color;
char msg[CHAT_SIZE_MAX];
};
struct spawn_info {

View File

@ -5701,6 +5701,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
skill_castend_nodamage_id);
}
break;
case NPC_TALK:
case ALL_WEWISH:
clif_skill_nodamage(src,bl,skillid,skilllv,1);
break;

View File

@ -965,9 +965,9 @@ enum e_skill {
NPC_VAMPIRE_GIFT,
NPC_WIDESOULDRAIN,
ALL_INCCARRY = 681,
//NPC_TALK = 682,
NPC_HELLPOWER = 683,
ALL_INCCARRY,
NPC_TALK,
NPC_HELLPOWER,
NPC_WIDEHELLDIGNITY,
NPC_INVINCIBLE,
NPC_INVINCIBLEOFF,