Jump to content
  • 0

Set a specific immune on one map


Question

Posted (edited)

Hi,

 

I was wondering if it was possible to set a specific immune only on one map. For exemple let's say my server immunity is set to 25 instead of 100 (so we need 400 VIT to be immune stun in that exemple). Is it possible to set immunity to stun to only 100 vit on one map specifically ? 

 

Thanks in advance ,

Edited by RandomKey1

2 answers to this question

Recommended Posts

  • 0
Posted

Only by doing some coding.
 
Look at status.c --> status_get_sc_def.

	if (sd) {
		if (battle_config.pc_sc_def_rate != 100) {
			sc_def = sc_def*battle_config.pc_sc_def_rate/100;
			sc_def2 = sc_def2*battle_config.pc_sc_def_rate/100;
		}

		sc_def = min(sc_def, battle_config.pc_max_sc_def*100);
		sc_def2 = min(sc_def2, battle_config.pc_max_sc_def*100);

		if (battle_config.pc_sc_def_rate != 100) {
			tick_def = tick_def*battle_config.pc_sc_def_rate/100;
			tick_def2 = tick_def2*battle_config.pc_sc_def_rate/100;
		}
	} else {
		if (battle_config.mob_sc_def_rate != 100) {
			sc_def = sc_def*battle_config.mob_sc_def_rate/100;
			sc_def2 = sc_def2*battle_config.mob_sc_def_rate/100;
		}

		sc_def = min(sc_def, battle_config.mob_max_sc_def*100);
		sc_def2 = min(sc_def2, battle_config.mob_max_sc_def*100);

		if (battle_config.mob_sc_def_rate != 100) {
			tick_def = tick_def*battle_config.mob_sc_def_rate/100;
			tick_def2 = tick_def2*battle_config.mob_sc_def_rate/100;
		}
	}

This is where it currently applies the configs. To check for a specific map you could take the map ID from the block list of easier the attacker or target (bl->m). If you run it via the debugger and then attack once on the map you want to implement it while putting a breakpoint there, you could read what value "m" has and then check for it.
 
You could also retrieve the map data from "m" via "struct map_data *md = &map[bl->m];" and work with that...

  • Upvote 1

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