Jump to content
  • 0

Berserk + Dispell = Instant Death


Question

8 answers to this question

Recommended Posts

Posted

skill.c

find

case SA_DISPELL:
......
if(i==SC_BERSERK || i==SC_SATURDAYNIGHTFEVER) tsc->data[i]->val2=0; //Mark a dispelled berserk to avoid setting hp to 100 by setting hp penalty to 0.
replace with
if(i==SC_BERSERK || i==SC_SATURDAYNIGHTFEVER) {
	tsc->data[i]->val2=0; //Mark a dispelled berserk to avoid setting hp to 100 by setting hp penalty to 0.
	status_damage(NULL, bl, status_get_hp(bl), 0, 0, 1);
}
Posted (edited)

I did exactly as it is and it gave me this bunch of errors when compiling it. Im using latest revision

 

It's found in here, and actually there are two of them, here's the first one:

				case SC_ASSUMPTIO:
					if( bl->type == BL_MOB )
						continue;
					break;
				}
				if(i==SC_BERSERK || i==SC_SATURDAYNIGHTFEVER) {
					tsc->data[i]->val2=0; //Mark a dispelled berserk to avoid setting hp to 100 by setting hp penalty to 0.
					status_damage(NULL, bl, status_get_hp(bl), 0, 0, 1);
				}
			break;
		}
		//Affect all targets on splash area.
		map_foreachinrange(skill_area_sub, bl, i, BL_CHAR,
			src, skill_id, skill_lv, tick, flag|1,
			skill_castend_damage_id);
		break;


 

and another one found in skill.c

continue;
				case SC_ASSUMPTIO:
					if( bl->type == BL_MOB )
						continue;
					break;
				}
				if(i==SC_BERSERK || i==SC_SATURDAYNIGHTFEVER) tsc->data[i]->val2=0; //Mark a dispelled berserk to avoid setting hp to 100 by setting hp penalty to 0.
				status_change_end(bl,(sc_type)i,INVALID_TIMER);
			}
			break;
		}
		map_foreachinrange(skill_area_sub, bl, i, BL_CHAR, src, skill_id, skill_lv, tick, flag|1, skill_castend_damage_id);
		break;

 

Okay, so I tried placing your code either of the two but still shows the error below. I even tried to put the code on both but still gives me the error below.

skill.c: In function âskill_castend_nodamage_idâ:
skill.c:9768: error: invalid storage class for function âskill_count_wosâ
skill.c:10617: error: invalid storage class for function âskill_dance_overlap_subâ
skill.c:10666: error: invalid storage class for function âskill_dance_switchâ
skill.c:10719: error: invalid storage class for function âskill_icewall_blockâ
skill.c:11218: error: invalid storage class for function âskill_unit_onplaceâ
skill.c:12366: error: invalid storage class for function âskill_unit_effectâ
skill.c:12447: error: invalid storage class for function âskill_check_condition_char_subâ
skill.c:12598: error: invalid storage class for function âskill_check_condition_mob_master_subâ
skill.c:14301: error: invalid storage class for function âskill_brandishspear_firstâ
skill.c:14404: error: invalid storage class for function âskill_brandishspear_dirâ
skill.c:14660: error: invalid storage class for function âskill_sit_countâ
skill.c:14678: error: invalid storage class for function âskill_sit_inâ
skill.c:14701: error: invalid storage class for function âskill_sit_outâ
skill.c:14790: error: invalid storage class for function âskill_unitsetmapcellâ
skill.c:14988: error: invalid storage class for function âskill_cell_overlapâ
skill.c:15114: error: invalid storage class for function âskill_trap_splashâ
skill.c:15405: error: invalid storage class for function âskill_get_new_group_idâ
skill.c:15698: error: invalid storage class for function âskill_unit_timer_subâ
skill.c:16865: error: invalid storage class for function âskill_toggle_magicpowerâ
skill.c:17114: error: invalid storage class for function âskill_destroy_trapâ
skill.c:17792: error: invalid storage class for function âskill_parse_row_skilldamageâ
skill.c:17816: error: invalid storage class for function âskill_parse_row_skilldbâ
skill.c:17864: error: invalid storage class for function âskill_parse_row_requiredbâ
skill.c:17947: error: invalid storage class for function âskill_parse_row_castdbâ
skill.c:17966: error: invalid storage class for function âskill_parse_row_castnodexdbâ
skill.c:17980: error: invalid storage class for function âskill_parse_row_nocastdbâ
skill.c:17992: error: invalid storage class for function âskill_parse_row_unitdbâ
skill.c:18033: error: invalid storage class for function âskill_parse_row_producedbâ
skill.c:18054: error: invalid storage class for function âskill_parse_row_createarrowdbâ
skill.c:18071: error: invalid storage class for function âskill_parse_row_spellbookdbâ
skill.c:18094: error: invalid storage class for function âskill_parse_row_improvisedbâ
skill.c:18119: error: invalid storage class for function âskill_parse_row_magicmushroomdbâ
skill.c:18138: error: invalid storage class for function âskill_parse_row_reproducedbâ
skill.c:18151: error: invalid storage class for function âskill_parse_row_abradbâ
skill.c:18172: error: invalid storage class for function âskill_parse_row_changematerialdbâ
skill.c:18216: error: invalid storage class for function âskill_readdbâ
skill.c:18309: error: expected declaration or statement at end of input

 

But when I try to put it back to default, it compiles normally.

Edited by retroflav
Posted (edited)

Oh at first it still fails.. But I tried to analyze your code to mine and there are some differences..

 

I need to add this line :

 

 				status_change_end(bl, (sc_type)i, INVALID_TIMER);
 			}

and it worked. no more compilation errors, let's see if it works in game



confirmed. It works now. Sweet!

Edited by retroflav
Posted (edited)

Help! it doesn't work anymore on the latest svn :( please I need this very badly.

 

-edit: I was able to make it work by adding a closing bracket at the end.

Edited by retroflav

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...