Jump to content
  • 0
AyenPanda

Skill_Damage Mapflag on Instance

Question

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
 

[email protected]	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

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0
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 "[email protected]",MF_SKILL_DAMAGE; <----
	setmapflag "[email protected]",MF_SKILL_DAMAGE; <---- or it should be this one?
    setmapflag "[email protected]",SKILLDMG_MOB;  <---- or this one?
	'airship_status = 0;

	'map_air1$ = instance_mapname("[email protected]");
	'map_air2$ = instance_mapname("[email protected]");

	// 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
Link to comment
Share on other sites

  • 0

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,{
	[email protected]_name$ = "Old Glast Heim";
	if (instance_create([email protected]_name$, IM_CHAR, getcharid(0)) < 0 ) {
		message strcharinfo(0), "Failed to create instance";
		end;
	}
	instance_enter([email protected]_name$, 150, 20, getcharid(0), instance_id(IM_CHAR));
	doevent strnpcinfo(3) + "::OnEnter";
	end;
	
	OnEnter:
		[email protected]$ = instance_mapname("[email protected]_k", instance_id(IM_CHAR));
		if (!getmapflag([email protected]$, MF_SKILL_DAMAGE, SKILLDMG_MOB))
			setmapflag [email protected]$, MF_SKILL_DAMAGE, -100, SKILLDMG_MOB;
		monster [email protected]$, 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
Link to comment
Share on other sites

  • 0
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,{
	[email protected]_name$ = "Old Glast Heim";
	if (instance_create([email protected]_name$, IM_CHAR, getcharid(0)) < 0 ) {
		message strcharinfo(0), "Failed to create instance";
		end;
	}
	instance_enter([email protected]_name$, 150, 20, getcharid(0), instance_id(IM_CHAR));
	doevent strnpcinfo(3) + "::OnEnter";
	end;
	
	OnEnter:
		[email protected]$ = instance_mapname("[email protected]_k", instance_id(IM_CHAR));
		if (!getmapflag([email protected]$, MF_SKILL_DAMAGE, SKILLDMG_MOB))
			setmapflag [email protected]$, MF_SKILL_DAMAGE, -100, SKILLDMG_MOB;
		monster [email protected]$, 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

 

Link to comment
Share on other sites

  • 0
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,{
	[email protected]_name$ = "Old Glast Heim";
	if (instance_create([email protected]_name$, IM_CHAR, getcharid(0)) < 0 ) {
		message strcharinfo(0), "Failed to create instance";
		end;
	}
	instance_enter([email protected]_name$, 150, 20, getcharid(0), instance_id(IM_CHAR));
	doevent strnpcinfo(3) + "::OnEnter";
	end;
	
	OnEnter:
		[email protected]$ = instance_mapname("[email protected]_k", instance_id(IM_CHAR));
		if (!getmapflag([email protected]$, MF_SKILL_DAMAGE, SKILLDMG_MOB))
			setmapflag [email protected]$, MF_SKILL_DAMAGE, -100, SKILLDMG_MOB;
		monster [email protected]$, 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?

 

Link to comment
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.   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.



×
×
  • Create New...

Important Information

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