Jump to content
  • 0

Set a specific immune on one map


RandomKey1

Question


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  27
  • Reputation:   0
  • Joined:  12/08/15
  • Last Seen:  

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

2 answers to this question

Recommended Posts

  • 0

  • Group:  Developer
  • Topic Count:  35
  • Topics Per Day:  0.01
  • Content Count:  818
  • Reputation:   237
  • Joined:  01/30/13
  • Last Seen:  

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

  • 0

  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  27
  • Reputation:   0
  • Joined:  12/08/15
  • Last Seen:  

Thanks a lot i'll try to work with that and really thanks you ! Have a great day :)

Edited by RandomKey1
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...