Jump to content
  • 0

Question

Posted

Good day, how can i adjust the Skill Damage on Instance? i already adjust the skill on  db/import/skill_damage_db.txt ex.

GC_CROSSIMPACT,BL_PC,31,-70,600,800,600

this one  includes
  1    - Normal
  2    - PVP
  4    - GVG
  8    - Battlegrounds
  16   - 'skill_damage' mapflag
----------
  31 ? right correct me if i'm wrong.

so at the rAthena/npc/mapflag/skill_damage.txt
 

1@air1	mapflag	skill_damage

for example this one Airship Instance, i put the map instance <TAB>mapflag<TAB>skill_damage
so after restarting the server. it's not working.

 

question is , am i doing it correctly? Please help ASAP

5 answers to this question

Recommended Posts

  • 0
Posted (edited)
11 hours ago, Haruka Mayumi said:

you must use setmapflag script command at OnInstanceInit

can you elaborate it more ? sorry @Haruka Mayumi im not the experience one.

 

OnInstanceInit:
	setmapflag skill_damage <----- am i doing it correct
    setmapflag "1@air1",MF_SKILL_DAMAGE; <----
	setmapflag "1@air2",MF_SKILL_DAMAGE; <---- or it should be this one?
    setmapflag "1@air1",SKILLDMG_MOB;  <---- or this one?
	'airship_status = 0;

	'map_air1$ = instance_mapname("1@air1");
	'map_air2$ = instance_mapname("1@air2");

	// Warps
	disablenpc instance_npcname("warp1#air1");
	disablenpc instance_npcname("warp2a#air1");
	disablenpc instance_npcname("warp2b#air1");
	disablenpc instance_npcname("warp3a#air1");
	disablenpc instance_npcname("warp3b#air1");
	disablenpc instance_npcname("warp4a#air2");
	disablenpc instance_npcname("warp5a#air2");

 

Edited by AyenPanda
  • 0
Posted (edited)

I think there is something wrong with setmapflag for MF_SKILL_DAMAGE. It's causing error always -> map_setmapflag: Skill damage adjustment without casting type for map <map_name> because the caster is not set in script.cpp

Anyway back to topic

1. Apply the diff attached

2. Try below sample npc. -100 (means no damage)

prontera,150,150,6	script	Instance Create	100,{
	.@instance_name$ = "Old Glast Heim";
	if (instance_create(.@instance_name$, IM_CHAR, getcharid(0)) < 0 ) {
		message strcharinfo(0), "Failed to create instance";
		end;
	}
	instance_enter(.@instance_name$, 150, 20, getcharid(0), instance_id(IM_CHAR));
	doevent strnpcinfo(3) + "::OnEnter";
	end;
	
	OnEnter:
		.@map$ = instance_mapname("1@gl_k", instance_id(IM_CHAR));
		if (!getmapflag(.@map$, MF_SKILL_DAMAGE, SKILLDMG_MOB))
			setmapflag .@map$, MF_SKILL_DAMAGE, -100, SKILLDMG_MOB;
		monster .@map$, 150, 20, "Poring", 1002, 10;
		end;
}

prontera,153,153,6	script	Instance Destroy	100,{
	instance_destroy instance_id(IM_CHAR);
	end;
}

 

 

skill_damage.patch

Edited by Patskie
  • 0
Posted
On 5/19/2020 at 10:10 AM, Patskie said:

I think there is something wrong with setmapflag for MF_SKILL_DAMAGE. It's causing error always -> map_setmapflag: Skill damage adjustment without casting type for map <map_name> because the caster is not set in script.cpp

Anyway back to topic

1. Apply the diff attached

2. Try below sample npc. -100 (means no damage)


prontera,150,150,6	script	Instance Create	100,{
	.@instance_name$ = "Old Glast Heim";
	if (instance_create(.@instance_name$, IM_CHAR, getcharid(0)) < 0 ) {
		message strcharinfo(0), "Failed to create instance";
		end;
	}
	instance_enter(.@instance_name$, 150, 20, getcharid(0), instance_id(IM_CHAR));
	doevent strnpcinfo(3) + "::OnEnter";
	end;
	
	OnEnter:
		.@map$ = instance_mapname("1@gl_k", instance_id(IM_CHAR));
		if (!getmapflag(.@map$, MF_SKILL_DAMAGE, SKILLDMG_MOB))
			setmapflag .@map$, MF_SKILL_DAMAGE, -100, SKILLDMG_MOB;
		monster .@map$, 150, 20, "Poring", 1002, 10;
		end;
}

prontera,153,153,6	script	Instance Destroy	100,{
	instance_destroy instance_id(IM_CHAR);
	end;
}

 

 

skill_damage.patch 621 B · 5 downloads

 

When i tried it:

image.png.84f134402457a024d0d68bf3122450a9.png

 

  • 0
Posted
On 5/19/2020 at 3:10 PM, Patskie said:

I think there is something wrong with setmapflag for MF_SKILL_DAMAGE. It's causing error always -> map_setmapflag: Skill damage adjustment without casting type for map <map_name> because the caster is not set in script.cpp

Anyway back to topic

1. Apply the diff attached

2. Try below sample npc. -100 (means no damage)

prontera,150,150,6	script	Instance Create	100,{
	.@instance_name$ = "Old Glast Heim";
	if (instance_create(.@instance_name$, IM_CHAR, getcharid(0)) < 0 ) {
		message strcharinfo(0), "Failed to create instance";
		end;
	}
	instance_enter(.@instance_name$, 150, 20, getcharid(0), instance_id(IM_CHAR));
	doevent strnpcinfo(3) + "::OnEnter";
	end;
	
	OnEnter:
		.@map$ = instance_mapname("1@gl_k", instance_id(IM_CHAR));
		if (!getmapflag(.@map$, MF_SKILL_DAMAGE, SKILLDMG_MOB))
			setmapflag .@map$, MF_SKILL_DAMAGE, -100, SKILLDMG_MOB;
		monster .@map$, 150, 20, "Poring", 1002, 10;
		end;
}

prontera,153,153,6	script	Instance Destroy	100,{
	instance_destroy instance_id(IM_CHAR);
	end;
}

 

 

skill_damage.patch 621 B · 17 downloads

sorry for the noob question how can I apply that patch?

 

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