Jump to content
  • 0

how to make Spider web works like Ankle Snare? and Soul link that adds max HP?


Question

Posted

anyone knows how to change how it works?.

i have change spider web in skill_db but it doesn't work well.

yes i can cast it on ground but when players step onto it, it doesn't trap them..

and about the soul link..

its there anyway to add HP (Hit Points) when you soul link a specific character? eg: High Wizard.

Thank you guys.

17 answers to this question

Recommended Posts

Posted (edited)

For the Spider Web (I took this from a code I had, ps: I'm not really good with src edits).

src > map > skill.c

find:

   	 case UNT_ANKLESNARE:
	case UNT_MANHOLE:
		if( sg->val2 == 0 && tsc && (sg->unit_id == UNT_ANKLESNARE || bl->id != sg->src_id) )

add before:

  	 case UNT_SPIDERWEB:
		if(sg->val2==0 && tsc){
			int sec = skill_get_time2(sg->skill_id,sg->skill_lv);
			{
				struct TimerData* td = tsc->data[type]?get_timer(tsc->data[type]->timer):NULL;
				if (td) sec = DIFF_TICK(td->tick, tick);
				map_moveblock(bl, src->bl.x, src->bl.y, tick);
				clif_fixpos(bl);
				sg->val2=bl->id;
			}
			break;

So it will be like this:

  	 case UNT_SPIDERWEB:
		if(sg->val2==0 && tsc){
			int sec = skill_get_time2(sg->skill_id,sg->skill_lv);
			{
				struct TimerData* td = tsc->data[type]?get_timer(tsc->data[type]->timer):NULL;
				if (td) sec = DIFF_TICK(td->tick, tick);
				map_moveblock(bl, src->bl.x, src->bl.y, tick);
				clif_fixpos(bl);
				sg->val2=bl->id;
			}
			break;
	case UNT_ANKLESNARE:
	case UNT_MANHOLE:
		if( sg->val2 == 0 && tsc && (sg->unit_id == UNT_ANKLESNARE || bl->id != sg->src_id) )
		{

for the spirit thing, in status.c

I think it's something like this:

	if(sc->data[sC_SPIRIT])
{
	if( bl->type == BL_PC )
	{
		vit += ((TBL_PC*)bl)->status.vit*5/100 > 5 ? ((TBL_PC*)bl)->status.vit*5/100: 5;
	}
	else
		vit += 5;
}

This adds VIT though. Not sure how with HP, but it would be about the same. Just that defense would increase as well.

Edited by Noah
Posted (edited)

That's my problem too.
BUMP!

I got the same problem long time ago, and fixed by my co-dev. As much I want to share how, I didn't asked him.

Edited by Aeia
Posted (edited)

You want HIT POINTS, not HEALTH POINTS, right?(Say just hit next time, hp is the life bar)

So, in your src/map/status.c

Find the function: static signed short status_calc_hit

Find within the function:

if(!sc || !sc->count)
 return cap_value(hit,1,SHRT_MAX);

After ADD:

if(sc && sc->data[sC_SPIRIT] && sc->data[sC_SPIRIT]->val2 == SL_WIZARD)
 hit += Number_You_Want;

In this case, it will work for who have wizard spirits only.

If you want it to work with other sipirit, just replace SL_WIZARD by one of these:

SL_ALCHEMIST, SL_MONK, SL_STAR, SL_SAGE, SL_CRUSADER, SL_SUPERNOVICE, SL_KNIGHT, SL_WIZARD, SL_PRIEST, SL_BARDDANCER, SL_ROGUE, SL_ASSASIN, SL_BLACKSMITH, SL_HUNTER, SL_SOULLINKER

If you want it to work in any spirit, just remove the:

&& sc->data[sC_SPIRIT]->val2 == SL_WIZARD

Don't set this value to high as the sum of the total function, it includes buffs etc can't be higher than 32,767 and lower than -32,768.

Edited by MarkZD
Posted

You want HIT POINTS, not HEALTH POINTS, right?(Say just hit next time, hp is the life bar)

So, in your src/map/status.c

Find the function: static signed short status_calc_hit

Find within the function:

if(!sc || !sc->count)
  return cap_value(hit,1,SHRT_MAX);
After ADD:

if(sc && sc->data[SC_SPIRIT] && sc->data[SC_SPIRIT]->val2 == SL_WIZARD)
  hit += Number_You_Want;

In this case, it will work for who have wizard spirits only.

If you want it to work with other sipirit, just replace SL_WIZARD by one of these:

SL_ALCHEMIST, SL_MONK, SL_STAR, SL_SAGE, SL_CRUSADER, SL_SUPERNOVICE, SL_KNIGHT, SL_WIZARD, SL_PRIEST, SL_BARDDANCER, SL_ROGUE, SL_ASSASIN, SL_BLACKSMITH, SL_HUNTER, SL_SOULLINKER

If you want it to work in any spirit, just remove the:

&& sc->data[SC_SPIRIT]->val2 == SL_WIZARD

Don't set this value to high as the sum of the total function, it includes buffs etc can't be higher than 32,767 and lower than -32,768.

Does not work please it says [x] eathena\src\map\status.c(3207) : error C2065: 'hit' : undeclared identifier

Posted

skill.c: In function âskill_unit_onplace_timerâ:
skill.c:11381: warning: initialization discards qualifiers from pointer target type
skill.c:11962: error: invalid storage class for function âskill_unit_onleftâ
skill.c:12082: error: invalid storage class for function âskill_unit_effectâ
skill.c:12156: error: invalid storage class for function âskill_check_condition_char_subâ
skill.c:12305: error: invalid storage class for function âskill_check_condition_mob_master_subâ
skill.c:13908: error: invalid storage class for function âskill_brandishspear_firstâ
skill.c:14011: error: invalid storage class for function âskill_brandishspear_dirâ
skill.c:14267: error: invalid storage class for function âskill_sit_countâ
skill.c:14285: error: invalid storage class for function âskill_sit_inâ
skill.c:14308: error: invalid storage class for function âskill_sit_outâ
skill.c:14397: error: invalid storage class for function âskill_unitsetmapcellâ
skill.c:14597: error: invalid storage class for function âskill_cell_overlapâ
skill.c:14723: error: invalid storage class for function âskill_trap_splashâ
skill.c:15030: error: invalid storage class for function âskill_get_new_group_idâ
skill.c:15329: error: invalid storage class for function âskill_unit_timer_subâ
skill.c:16488: error: invalid storage class for function âskill_toggle_magicpowerâ
skill.c:16735: error: invalid storage class for function âskill_destroy_trapâ
skill.c:17380: error: invalid storage class for function âskill_parse_row_skilldbâ
skill.c:17428: error: invalid storage class for function âskill_parse_row_requiredbâ
skill.c:17520: error: invalid storage class for function âskill_parse_row_castdbâ
skill.c:17539: error: invalid storage class for function âskill_parse_row_castnodexdbâ
skill.c:17553: error: invalid storage class for function âskill_parse_row_nocastdbâ
skill.c:17565: error: invalid storage class for function âskill_parse_row_unitdbâ
skill.c:17606: error: invalid storage class for function âskill_parse_row_producedbâ
skill.c:17628: error: invalid storage class for function âskill_parse_row_createarrowdbâ
skill.c:17646: error: invalid storage class for function âskill_parse_row_spellbookdbâ
skill.c:17670: error: invalid storage class for function âskill_parse_row_improvisedbâ
skill.c:17695: error: invalid storage class for function âskill_parse_row_magicmushroomdbâ
skill.c:17714: error: invalid storage class for function âskill_parse_row_reproducedbâ
skill.c:17728: error: invalid storage class for function âskill_parse_row_abradbâ
skill.c:17749: error: invalid storage class for function âskill_parse_row_changematerialdbâ
skill.c:17794: error: invalid storage class for function âskill_readdbâ
skill.c:17877: error: expected declaration or statement at end of input

Hi I tried to input this

   	 case UNT_SPIDERWEB:
			if(sg->val2==0 && tsc){
				int sec = skill_get_time2(sg->skill_id,sg->skill_lv);
				{
					struct TimerData* td = tsc->data[type]?get_timer(tsc->data[type]->timer):NULL;
					if (td) sec = DIFF_TICK(td->tick, tick);
					map_moveblock(bl, src->bl.x, src->bl.y, tick);
					clif_fixpos(bl);
					sg->val2=bl->id;
				}
				break;
		case UNT_ANKLESNARE:
		case UNT_MANHOLE:
			if( sg->val2 == 0 && tsc && (sg->unit_id == UNT_ANKLESNARE || bl->id != sg->src_id) )
			{

and I got error

Posted

 

skill_db.txt

405,7,6,2,0,0x1,0,1,1,no,0,0,4,magic,0,        PF_SPIDERWEB,Fiber Lock

skill_unit_db.txt

405,0xb7, , 0, 1,1000,enemy, 0x000    //PF_SPIDERWEB

 

Insufficient collumns for skill_db.txt need at least 18 sir, whats missing?

Posted

 

@Anakid I tried that but easily bypass by just walking

Then you should change the skill duration in skill_cast_db.txt

 

Hi Anakid what should be the proper setting in skill_cast_db

 

 

@Anakid I tried that but easily bypass by just walking

Then you should change the skill duration in skill_cast_db.txt

 

Hi Anakid what is the setting in skill_cast_db.txt? we have same case that it is bypass by walking on the trap

Nevermind Solved Already.

Posted

Any Good explanation to fix the spider web like ANKLESNARE


 

 

@Anakid I tried that but easily bypass by just walking

Then you should change the skill duration in skill_cast_db.txt

 

Hi Anakid what should be the proper setting in skill_cast_db

 

 

@Anakid I tried that but easily bypass by just walking

Then you should change the skill duration in skill_cast_db.txt

 

Hi Anakid what is the setting in skill_cast_db.txt? we have same case that it is bypass by walking on the trap


Nevermind Solved Already.

 

how did u solve

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.   Paste as plain text instead

  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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...