summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
authormasao87 <masao87@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-07-14 15:52:49 +0000
committermasao87 <masao87@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-07-14 15:52:49 +0000
commit9ca7fe72868a501e35b4e0545280cbef4aac5c4f (patch)
treec18df14b4de46a9e7997bee5f2da74107b84b63f /src/map/script.c
parent5641020eb4684b3898fe4f35cf5391977abd4ea8 (diff)
downloadhercules-9ca7fe72868a501e35b4e0545280cbef4aac5c4f.tar.gz
hercules-9ca7fe72868a501e35b4e0545280cbef4aac5c4f.tar.bz2
hercules-9ca7fe72868a501e35b4e0545280cbef4aac5c4f.tar.xz
hercules-9ca7fe72868a501e35b4e0545280cbef4aac5c4f.zip
- Added new script command hommutate which changes an Homunculus into an Homunculus S Class. Super special thanks to Xantara for doing the command!
- Added 2 new configs to homunc.conf to set the Max. Level for Homunculus and homunculus. - Updated homun_exp.txt table with values from Lvl. 99 to 150 for Homnunculus S. - Updated script_commands.txt with description of the new script command. - Added Homunculus S Quest. bugreport:5641 git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16427 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/map/script.c b/src/map/script.c
index a1bc94bc4..68baecc23 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -9551,6 +9551,36 @@ BUILDIN_FUNC(homunculus_evolution)
return 0;
}
+/*==========================================
+ * [Xantara]
+ *------------------------------------------*/
+BUILDIN_FUNC(homunculus_mutate)
+{
+ int homun_id, m_class, m_id;
+ int homun_array[5] = {6048,6049,6050,6051,6052};
+ TBL_PC *sd;
+
+ sd = script_rid2sd(st);
+ if( sd == NULL )
+ return 0;
+
+ if(script_hasdata(st,2))
+ homun_id = script_getnum(st,2);
+ else
+ homun_id = homun_array[rnd() % 5];
+
+ if(merc_is_hom_active(sd->hd)) {
+ m_class = hom_class2mapid(sd->hd->homunculus.class_);
+ m_id = hom_class2mapid(homun_id);
+
+ if ( m_class&HOM_EVO && m_id&HOM_S && sd->hd->homunculus.level >= 99 )
+ hom_mutate(sd->hd, homun_id);
+ else
+ clif_emotion(&sd->hd->bl, E_SWT);
+ }
+ return 0;
+}
+
// [Zephyrus]
BUILDIN_FUNC(homunculus_shuffle)
{
@@ -16676,6 +16706,7 @@ struct script_function buildin_func[] = {
BUILDIN_DEF(getvariableofnpc,"rs"),
BUILDIN_DEF(warpportal,"iisii"),
BUILDIN_DEF2(homunculus_evolution,"homevolution",""), //[orn]
+ BUILDIN_DEF2(homunculus_mutate,"hommutate","?"),
BUILDIN_DEF2(homunculus_shuffle,"homshuffle",""), //[Zephyrus]
BUILDIN_DEF(eaclass,"?"), //[Skotlex]
BUILDIN_DEF(roclass,"i?"), //[Skotlex]