Jump to content

set CRITICAL_PCT to 0 when I enter a map


Recommended Posts

  • Forum Moderator

If you want to do this in quest, you've to do a boolean variable in source and set it to true or false from quest functions like:

pc.set_active_critical(true)
pc.set_active_critical(false)

If you don't know how to do it, you should use a simple pc quest flag.

This is the hidden content, please

Not tested.

  • Metin2 Dev 1
  • Love 3
Link to comment
Share on other sites

vor 10 Stunden schrieb VegaS™:

If you want to do this in quest, you've to do a boolean variable in source and set it to true or false from quest functions like:


pc.set_active_critical(true)
pc.set_active_critical(false)

If you don't know how to do it, you should use a simple pc quest flag.

Quest:


quest player begin
	state start begin
		when 20092.chat."Test Critical" with pc.get_map_index() == 100 begin
			pc.setqf('disabled_critical_pct', select("Disable critical", "Enable critical") - 1)
		end
	end
end
-- or
quest player begin
	state start begin
		when login with pc.get_map_index() == 100 begin
			pc.setqf('disabled_critical_pct', 1)
		end
		
		when logout with pc.get_map_index() == 100 begin
			pc.setqf('disabled_critical_pct', 0)
		end
	end
end

Srcs/Server/game/src/char_battle.cpp (Line: 1745, 1889)


// Search for:
			if (number(1, 100) <= iCriticalPct)
// Change with:
			const bool isDisabledCriticalPct = pAttacker->GetQuestFlag("player.disabled_critical_pct") > 0;
			if (!isDisabledCriticalPct && number(1, 100) <= iCriticalPct)

Not tested.

 

thanks needed this too!

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.