Jump to content
  • 0
Sign in to follow this  
hauren

Adding a new skill

Question

heya!

 

so i was messing around with source and skills and sh*t but i cant understand some parts and get many errors, i made almost* like this guide: https://github.com/HerculesWS/Hercules/wiki/Adding-new-skills

 

i appreciate any help =]

 

image.png.49be3aabc959ef519391c2956bea97f2.png

 

image.png.0f80a5d7c443fb7bcf8d5c700a04514b.png
 

i tried many things but no luck

status.c

// status->set_sc( AB_VITUPERATUM	, SC_LEXAETERNA	, SCB_NONE );
add_sc( AB_VITUPERATUM	, SC_LEXAETERNA );

skill.h

// used that id cuz is the one used by rathena
AB_VITUPERATUM = 5072,

skill.c

case AB_VITUPERATUM:
	map->foreachinrange(skill->area_sub, src, skill->get_splash(skill_id, skill_lv), BL_CHAR,
		src, PR_LEXAETERNA, skill_lv, tick, flag|BCT_ENEMY|1, skill->castend_nodamage_id);
	clif->skill_nodamage(src, bl, skill_id, skill_lv, 1);
	break;

 

it says that have something about id range(?) so i tried to add in this part also in skill.c:
 

skill_idx_ranges[] = {
	{ NV_BASIC, NPC_LEX_AETERNA },
	{ KN_CHARGEATK, SA_ELEMENTWIND },
	{ RK_ENCHANTBLADE, AB_SILENTIUM },
	{ WL_WHITEIMPRISON, SC_FEINTBOMB },
	{ LG_CANNONSPEAR, SR_GENTLETOUCH_REVITALIZE },
	{ WA_SWING_DANCE, WA_MOONLIT_SERENADE },
	{ MI_RUSH_WINDMILL, MI_HARMONIZE },
	{ WM_LESSON, WM_UNLIMITED_HUMMING_VOICE },
	{ SO_FIREWALK, SO_EARTH_INSIGNIA },
	{ GN_TRAINING_SWORD, GN_SLINGITEM_RANGEMELEEATK },
	{ AB_SECRAMENT, LG_OVERBRAND_PLUSATK },
	{ ALL_ODINS_RECALL, ALL_LIGHTGUARD },
	{ RL_GLITTERING_GREED, RL_GLITTERING_GREED_ATK },
	{ KO_YAMIKUMO, OB_AKAITSUKI },
	{ ECL_SNOWFLIP, ALL_THANATOS_RECALL },
	{ GC_DARKCROW, NC_MAGMA_ERUPTION_DOTDAMAGE },
	{ SU_BASIC_SKILL, SU_SPIRITOFSEA },
	{ HLIF_HEAL, MH_VOLCANIC_ASH },
	{ MS_BASH, MER_INVINCIBLEOFF2 },
	{ EL_CIRCLE_OF_FIRE, EL_STONE_RAIN },
	{ GD_APPROVAL, GD_DEVELOPMENT },
	CUSTOM_SKILL_RANGES
};

actually make the things worse =[

 

 

Edited by hauren
file duplicated

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Start your new skill at 1600

 

you have hundreds of free slots your just playing in the no no area 

 

btw your gonna have issues simply writing 

case NEW_SKILL; 

at the bottom of your skill.h

 

gonna have to write it like this

 

case NEW_SKILL = 1600;

 

 

Edited by Naruto

Share this post


Link to post
Share on other sites
  • 0

The problem was, aparently u have to add a new range like { AB_VITUPERATUM. AB_VITUPERATUM }

but my problem now is: i simple copy silentium behavior right? but why i can loop through mobs around the target one ( now is looping around me  )

Share this post


Link to post
Share on other sites
  • 0

i did it that way and its working:

 

case AB_VITUPERATUM:
			if (flag&1)
				clif->skill_nodamage(src, bl, skill_id, skill_lv, sc_start(src, bl, type, 100, skill_lv, skill_get_time(skill_id, skill_lv)));
			else {
				map->foreachinrange(skill->area_sub, bl, skill->get_splash(skill_id, skill_lv), BL_CHAR,
					src, skill_id, skill_lv, tick, flag|BCT_ENEMY|1, skill->castend_nodamage_id);
				clif->skill_nodamage(src, bl, skill_id, skill_lv, 1);
			}
			break;

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.