Jump to content

Status overflow with autoclicker


Recommended Posts

  • Honorable Member

You can try to add a pulse for that.
 

/// 1. @ common/service.h
// Add
#define __CHANGE_STAT_PULSE__

/// 2. @ game/char.h
// Search
};

ESex GET_SEX(LPCHARACTER ch);

// Add above
#if defined(__CHANGE_STAT_PULSE__)
public:
	int GetChangeStatPulse() { return m_iChangeStatPulse; }
	void SetChangeStatPulse(int iPulse) { m_iChangeStatPulse = iPulse; }

protected:
	int m_iChangeStatPulse;
#endif

/// 3. @ char.cpp
// Search @ void CHARACTER::Initialize
	m_dwNextStatePulse = 0;

// Add below
#if defined(__CHANGE_STAT_PULSE__)
	m_iChangeStatPulse = 0;
#endif

/// 4. @ cmd_general.cpp
// Search @ ACMD(do_stat)
	if (ch->GetRealPoint(idx) >= MAX_STAT)
		return;

// Add below
#if defined(__CHANGE_STAT_PULSE__)
	if (ch->GetChangeStatPulse() > thecore_pulse())
	{
		if (test_server)
			ch->ChatPacket(CHAT_TYPE_INFO, "Slow down, you're changing stats to fast!");
		return;
	}
	ch->SetChangeStatPulse(thecore_pulse() + PASSES_PER_SEC(10 * 1));
#endif

 

Edited by Owsap
  • Metin2 Dev 1
  • Love 1
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.