Jump to content

[HELP] GameMaster Restriction


Recommended Posts

Hello, i tried to restrict the GM permissions.. that the implementor can do anything but lower gm  not
I tried out this "system" https://metin2.dev/topic/24089-gamemaster-restriction-without-sql/#comment-129214 with the IsLowGM function, but didn't work
What can i do now?
sorry for my bad englis if it is.

Edited by FuveZeq
Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

  • Contributor
Quote

return m_pointsInstant.gm_level > GM_PLAYER && m_pointsInstant.gm_level > GM_HIGH_WIZARD && m_pointsInstant.gm_level < GM_IMPLEMENTOR;

That means higher then a player and HIGH_WIZARD but lower then GM_IMPLEMENTOR. Modify it to your needs. If you want to restrict every GM except Impelentor, do this:

BOOL CHARACTER::IsLowGM() const
{
	return m_pointsInstant.gm_level > GM_PLAYER && m_pointsInstant.gm_level < GM_IMPLEMENTOR;
}
Link to comment
Share on other sites

Ha már úgyis magyar vagy.. 😄 az volt a baja nem tudom miért most nézem hogy mikor a funkciót hozzáadtam az IsGM alá kapta a blokkot, és valamiért nem tetszett neki szóval úgy let megoldva hogy char.cpp char.h IsLowGM felül IsGM alul
Már csak annyi a problémám hogy ha meg is adom neki így az értékeket:

return m_pointsInstant.gm_level > GM_PLAYER && m_pointsInstant.gm_level > GM_LOW_WIZARD && m_pointsInstant.gm_level < GM_IMPLEMENTOR;

Akkor IMPLEMENTOR alatt tudnak kereskedni egymással, de implementor nem tud velük csak playerekkel, erre tudnál valamit mondani?

sorry for litle hungary 

Link to comment
Share on other sites

  • Contributor
15 hours ago, FuveZeq said:

Ha már úgyis magyar vagy.. 😄 az volt a baja nem tudom miért most nézem hogy mikor a funkciót hozzáadtam az IsGM alá kapta a blokkot, és valamiért nem tetszett neki szóval úgy let megoldva hogy char.cpp char.h IsLowGM felül IsGM alul
Már csak annyi a problémám hogy ha meg is adom neki így az értékeket:

return m_pointsInstant.gm_level > GM_PLAYER && m_pointsInstant.gm_level > GM_LOW_WIZARD && m_pointsInstant.gm_level < GM_IMPLEMENTOR;

Akkor IMPLEMENTOR alatt tudnak kereskedni egymással, de implementor nem tud velük csak playerekkel, erre tudnál valamit mondani?

sorry for litle hungary 

It's against the rules to write in non-english. (His question was why implementors can't trade with LowGMs)

Implementors can't trade with LowGMs because of this line: if (!IsLowGM() && victim->IsLowGM())
If you want to enable implementors trading with LowGMs add an exclusion for the checks for implementors like this:

//exchange.cpp
bool CHARACTER::ExchangeStart(LPCHARACTER victim)
{
   if (GetGMLevel() != GM_IMPLEMENTOR) {
      if (!IsLowGM() && victim->IsLowGM())
      {
          ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You cannot trade items with a Game Master."));
          return false;
      }
      if (IsLowGM() && !victim->IsLowGM())
      {
          ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Game Masters cannot trade items with players."));
          return false;
      }
   }
//...
Edited by TMP4
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.