Jump to content

Recommended Posts

LOL, forget this $....  :facepalm:

like python:

Quote


        if gamemasta.find("(VIP1)")!=-1:
            if self.lastupdate == 0:
                self.lastupdate = app.GetGlobalTimeStamp()
            if app.GetGlobalTimeStamp() - self.lastupdate >= 5:
                self.lastupdate = app.GetGlobalTimeStamp()
                net.SendEmoticon(29)

        if gamemasta.find("(VIP2)")!=-1:
            if self.lastupdate == 0:
                self.lastupdate = app.GetGlobalTimeStamp()
            if app.GetGlobalTimeStamp() - self.lastupdate >= 5:
                self.lastupdate = app.GetGlobalTimeStamp()
                net.SendEmoticon(30)


        if gamemasta.find("(VIP3)")!=-1:
            if self.lastupdate == 0:
                self.lastupdate = app.GetGlobalTimeStamp()
            if app.GetGlobalTimeStamp() - self.lastupdate >= 5:
                self.lastupdate = app.GetGlobalTimeStamp()
                net.SendEmoticon(31)

        if gamemasta.find("(VIP4)")!=-1:
            if self.lastupdate == 0:
                self.lastupdate = app.GetGlobalTimeStamp()
            if app.GetGlobalTimeStamp() - self.lastupdate >= 5:
                self.lastupdate = app.GetGlobalTimeStamp()
                net.SendEmoticon(32)


        if gamemasta.find("(VIP5)")!=-1:
            if self.lastupdate == 0:
                self.lastupdate = app.GetGlobalTimeStamp()
            if app.GetGlobalTimeStamp() - self.lastupdate >= 5:
                self.lastupdate = app.GetGlobalTimeStamp()
                net.SendEmoticon(33)

        if gamemasta.find("(VIP6)")!=-1:
            if self.lastupdate == 0:
                self.lastupdate = app.GetGlobalTimeStamp()
            if app.GetGlobalTimeStamp() - self.lastupdate >= 5:
                self.lastupdate = app.GetGlobalTimeStamp()
                net.SendEmoticon(34)


        if gamemasta.find("(VIP7)")!=-1:
            if self.lastupdate == 0:
                self.lastupdate = app.GetGlobalTimeStamp()
            if app.GetGlobalTimeStamp() - self.lastupdate >= 5:
                self.lastupdate = app.GetGlobalTimeStamp()
                net.SendEmoticon(35)

        if gamemasta.find("(VIP8)")!=-1:
            if self.lastupdate == 0:
                self.lastupdate = app.GetGlobalTimeStamp()
            if app.GetGlobalTimeStamp() - self.lastupdate >= 5:
                self.lastupdate = app.GetGlobalTimeStamp()
                net.SendEmoticon(36)


        if gamemasta.find("(VIP9)")!=-1:
            if self.lastupdate == 0:
                self.lastupdate = app.GetGlobalTimeStamp()
            if app.GetGlobalTimeStamp() - self.lastupdate >= 5:
                self.lastupdate = app.GetGlobalTimeStamp()
                net.SendEmoticon(37)

        if gamemasta.find("(VIP10)")!=-1:
            if self.lastupdate == 0:
                self.lastupdate = app.GetGlobalTimeStamp()
            if app.GetGlobalTimeStamp() - self.lastupdate >= 5:
                self.lastupdate = app.GetGlobalTimeStamp()
                net.SendEmoticon(38)

 

make new item.
ittem in quest rename player with add (vip1-2-3-4-5-6-7-8-9-10)
And this python work wery vell :D

Where is problem? XD

for request i made tutorial how it's work

  • Lmao 1
  • Love 1

787292068_Nvtelen.png.6faa7b0bbb3398fd29

Link to comment
Share on other sites

  • Premium
On 8/21/2017 at 12:54 PM, [007]DawisHU said:

LOL, forget this $....  :facepalm:

like python:

make new item.
ittem in quest rename player with add (vip1-2-3-4-5-6-7-8-9-10)
And this python work wery vell :D

Where is problem? XD

for request i made tutorial how it's work

for python`s sake

 

mylist = ["(VIP1)","(VIP2)","(VIP3)","(VIP4)","(VIP5)","(VIP6)","(VIP7)","(VIP8)","(VIP9)","(VIP10)"]
enumeratelist = list(enumerate(mylist, start=29))
 
for e_value,vip in enumeratelist:
    if gamemasta.find(str(vip))!=-1:
        if self.lastupdate == 0:
            self.lastupdate = app.GetGlobalTimeStamp()
        if app.GetGlobalTimeStamp() - self.lastupdate >= 5:
            self.lastupdate = app.GetGlobalTimeStamp()
net.SendEmoticon(int(e_value))
  • Love 1
Link to comment
Share on other sites

20 hours ago, Fleon said:

for python`s sake

 

mylist = ["(VIP1)","(VIP2)","(VIP3)","(VIP4)","(VIP5)","(VIP6)","(VIP7)","(VIP8)","(VIP9)","(VIP10)"]
enumeratelist = list(enumerate(mylist, start=29))
 
for e_value,vip in enumeratelist:
if gamemasta.find(str(vip))!=-1:
if self.lastupdate == 0:
self.lastupdate = app.GetGlobalTimeStamp()
if app.GetGlobalTimeStamp() - self.lastupdate >= 5:
self.lastupdate = app.GetGlobalTimeStamp()
net.SendEmoticon(int(e_value))

Nice.
I just give example  for beginner's in python :)
You python code awesome.
 

On 2016. 08. 17. at 10:42 PM, Lehel said:

Where can I find the interface (taskbar) you're using? Please tell me.

This is illumina V3.0 interface :D
It's better

My work

 

  • Metin2 Dev 2
  • Lmao 1
  • Love 2

787292068_Nvtelen.png.6faa7b0bbb3398fd29

Link to comment
Share on other sites

On 8/29/2017 at 1:39 PM, Fleon said:

for python`s sake

 

mylist = ["(VIP1)","(VIP2)","(VIP3)","(VIP4)","(VIP5)","(VIP6)","(VIP7)","(VIP8)","(VIP9)","(VIP10)"]
enumeratelist = list(enumerate(mylist, start=29))
 
for e_value,vip in enumeratelist:
if gamemasta.find(str(vip))!=-1:
if self.lastupdate == 0:
self.lastupdate = app.GetGlobalTimeStamp()
if app.GetGlobalTimeStamp() - self.lastupdate >= 5:
self.lastupdate = app.GetGlobalTimeStamp()
net.SendEmoticon(int(e_value))

We can do it like this too.

for (key, value) in enumerate(["(VIP1)","(VIP2)","(VIP3)","(VIP4)","(VIP5)","(VIP6)","(VIP7)","(VIP8)","(VIP9)","(VIP10)"]):
	if gamemasta.find(value) != -1:
		if (not self.lastupdate):
			self.lastupdate = app.GetGlobalTimeStamp()
		if (app.GetGlobalTimeStamp() - self.lastupdate) >= 5:
			self.lastupdate = app.GetGlobalTimeStamp()
			net.SendEmoticon(key + 29)

 

  • Love 1
Link to comment
Share on other sites

  • 4 months later...
  • 1 month later...
  • 4 months later...
  • 4 weeks later...
  • 2 months later...
  • Developer
On ‎12‎/‎12‎/‎2018 at 5:51 PM, rawn3cr0 said:

How i can make to don't show VIP / GM emblem.

Just normal player without VIP sign.

Well, just delete the Client Part and you are done.

On ‎8‎/‎19‎/‎2018 at 4:52 PM, filippos- said:

How u do a player VIP.

From Common/gmlist.

r

Link to comment
Share on other sites

  • 2 weeks later...
  • 3 months later...
  • Premium

How fix:

 

char.cpp: In member function 'void CHARACTER::SetPlayerProto(const TPlayerTable*)':
char.cpp:2048:28: error: 'GM_VIP' was not declared in this scope
   else if (GetGMLevel() == GM_VIP)
                            ^
char.cpp:2050:29: error: 'AFF_VIP' was not declared in this scope
          m_afAffectFlag.Set(AFF_VIP);
                             ^
char.cpp:2093:1: error: a function-definition is not allowed here before '{' token
 {
 ^
char.cpp:9733:1: error: expected '}' at end of input
 }
 ^
gmake[1]: *** [Makefile:198: .obj/char.o] Error 1


Thank ?

 

#ifndef ENABLE_GM_FLAG_IF_TEST_SERVER
	if (!test_server)
#endif
	{
#ifdef ENABLE_GM_FLAG_FOR_LOW_WIZARD
		if (GetGMLevel() > GM_PLAYER)
#else
		if (GetGMLevel() > GM_LOW_WIZARD)
#endif
		{
			m_afAffectFlag.Set(AFF_YMIR);
			m_bPKMode = PK_MODE_PROTECT;
		}
		
		else if (GetGMLevel() == GM_VIP)
		
	    {
	        m_afAffectFlag.Set(AFF_VIP);
		
	    }

	if (GetLevel() < PK_PROTECT_LEVEL)
		m_bPKMode = PK_MODE_PROTECT;

 

Link to comment
Share on other sites

  • 1 month later...
  • Developer
9 hours ago, AlCapone said:

Soo 3 years later I test it =)) 

1º The logo dont disapper after time expire you need to reboot server for that

2º Then if you reboot logo disapper but then he put the GM logo xd

3º Back of vip logo shows gm too

Well, the tutorial I made does not include the time part

P.S: I'm impressed that you remembered after three years to test it xD

r

Link to comment
Share on other sites

  • 3 months later...
On 5/22/2016 at 2:57 PM, Wahmon said:

Hello everyone, today I`m going to show to how to make a VIP system from SRC.

You need Launcher SRC, Server SRC.

So, let`s begin.

1.Launcher:

Go to UserInterface/InstanceBase.h and search 

  Reveal hidden contents

AFFECT_CHINA_FIREWORK,            // 38

After that add:

  Reveal hidden contents

AFFECT_VIP = 39,

Search

  Reveal hidden contents

BOOL                    IsGameMaster();

After that add: 

  Reveal hidden contents

BOOL                    IsVIP();

1.2 Go to InstanceBase.cpp and search

  Reveal hidden contents

BOOL CInstanceBase::IsGameMaster()
{
    if (m_kAffectFlagContainer.IsSet(AFFECT_YMIR))
        return true;
    return false;
}

After that add: 

  Reveal hidden contents

BOOL CInstanceBase::IsVIP()
{
    if (m_kAffectFlagContainer.IsSet(AFFECT_VIP))
        return true;
    return false;
}

In same file search:

  Reveal hidden contents

if (IsGameMaster())
        return TRUE;

And after that add: 

  Reveal hidden contents

if (IsVIP())
        return TRUE;

//if you got bugs don`t add this line.

Search: 

  Reveal hidden contents

if (rkInstDst.IsGameMaster())
        return TRUE;

After that add:

  Reveal hidden contents

if (rkInstDst.IsVIP())
        return TRUE;

1.3: In file InstanceBaseEffect.cpp search

  Reveal hidden contents

if (pkInstMain->IsGameMaster())
    {
    }

After that add:

  Reveal hidden contents

else if (pkInstMain->IsVIP())
    {
    }

Search: 

  Reveal hidden contents

if (IsGameMaster())
        return;

After that add:

  Reveal hidden contents

if (IsVIP())
        return;

Search:

  Reveal hidden contents

case AFFECT_YMIR:
            if (IsAffect(AFFECT_INVISIBILITY))
                return;
            break;

After that add:

  Reveal hidden contents

case AFFECT_VIP:
            if (IsAffect(AFFECT_INVISIBILITY))
                return;
            break;
/*

1.4 In fine PythonCharacterModule.cpp search:

  Reveal hidden contents

PyObject * chrIsGameMaster(PyObject* poSelf, PyObject* poArgs)
{
    int iVirtualID;
    if (!PyTuple_GetInteger(poArgs, 0, &iVirtualID))
        return Py_BuildException();

    CInstanceBase * pInstance = CPythonCharacterManager::Instance().GetInstancePtr(iVirtualID);
    if (!pInstance)
        return Py_BuildValue("i", 0);

    return Py_BuildValue("i", pInstance->IsGameMaster());
}

And after that add: 

  Reveal hidden contents

PyObject * chrIsVIP(PyObject* poSelf, PyObject* poArgs)
{
    int iVirtualID;
    if (!PyTuple_GetInteger(poArgs, 0, &iVirtualID))
        return Py_BuildException();

    CInstanceBase * pInstance = CPythonCharacterManager::Instance().GetInstancePtr(iVirtualID);
    if (!pInstance)
        return Py_BuildValue("i", 0);

    return Py_BuildValue("i", pInstance->IsVIP());
}

Search: 

  Reveal hidden contents

{ "IsGameMaster",                chrIsGameMaster,                    METH_VARARGS },

And after that add:

  Reveal hidden contents

{ "IsVIP",                        chrIsVIP,                            METH_VARARGS },

Launcher part done.

2.SERVER

2.1 In file common/length.h search:

  Reveal hidden contents

GM_PLAYER,

And after that add: 

  Reveal hidden contents

GM_VIP,

2.2 In file game/src/affect.h search:

  Reveal hidden contents

AFF_CHINA_FIREWORK,

And after add: 

  Reveal hidden contents

AFF_VIP = 39,

2.3 In file game/src/char.cpp search: 

  Reveal hidden contents

if (GetGMLevel() > GM_LOW_WIZARD)
        {
            m_afAffectFlag.Set(AFF_YMIR);
            m_bPKMode = PK_MODE_PROTECT;
        }

And after add: 

  Reveal hidden contents

else if (GetGMLevel() == GM_VIP)
        {
            m_afAffectFlag.Set(AFF_VIP);
            //m_bPKMode = PK_MODE_PROTECT; //delete '//' if you want GM protection for VIP.
        

}

Search 

  Reveal hidden contents

if (GetLevel() < PK_PROTECT_LEVEL)
        m_bPKMode = PK_MODE_PROTECT;

And after that add: 

  Reveal hidden contents

else if (GetGMLevel() == GM_VIP)
    {
        m_afAffectFlag.Set(AFF_VIP);
        //m_bPKMode = PK_MODE_PROTECT; //delete '//' if you want GM protection for VIP.
    }

2.4 In file game/src/config.cpp search

  Reveal hidden contents

if (!strcasecmp(levelname, "LOW_WIZARD"))
                level = GM_LOW_WIZARD;

And mofify like that:

  Reveal hidden contents

if (!strcasecmp(levelname, "VIP"))
                level = GM_VIP;
            
            else if (!strcasecmp(levelname, "LOW_WIZARD"))
                level = GM_LOW_WIZARD;

2.5 In file db/src/ClientManager.cpp search:

  Reveal hidden contents

else if (!stAuth.compare("WIZARD"))
            Info.m_Authority = GM_WIZARD;

And after that add:

  Reveal hidden contents

else if (!stAuth.compare("VIP"))
            Info.m_Authority = GM_VIP;

3.MYSQL

3.1 Go to your database->COMMON->RIGHT CLICK ON gmlist->DESIGN TABLE->SELECT mAuthority from Fields TAB->VALUES->ADD VIP AFTER PLAYER.

4.CLIENT

4.1. In file ROOT/PlayerSettingModule.py search 

  Reveal hidden contents

chrmgr.RegisterEffect(chrmgr.EFFECT_AFFECT+37, "", "d:/ymir work/effect/etc/guild_war_flag/flag_yellow.mse")

And after that add:

  Reveal hidden contents

chrmgr.RegisterEffect(chrmgr.EFFECT_AFFECT+38, "Bip01", "locale/en/effect/vip.mse")

Edit locale/en with your locale : ex locale/ro || locale/de

4.2 In locale go to effect folder(WHERE YOU HAVE GM.MSE) and add THIS FILES:

This is the hidden content, please

In game will be like that:

kTKlbja.jpg
   Post any problems/bugs and we will solve them tohether ;)

Sorry for my bad english..:(

whisper font color and icon have problem how do i fix it?

vip speaks as gm how do i fix it ?

 

Adsiz.png

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

  • 6 months later...
On 9/4/2019 at 7:23 PM, TheR3LAX13 said:

whisper font color and icon have problem how do i fix it?

vip speaks as gm how do i fix it ?

 

Adsiz.png

 

input_main.cpp

 

if (ch->GetGMLevel() > GM_GOD)
	bType = (bType & 0xF0) | WHISPER_TYPE_GM;
	int len = snprintf(chatbuf, sizeof(chatbuf), "%s %s : %s", (ch->GetGMLevel() > GM_GOD ?colorbuf[0]:colorbuf[MINMAX(0, ch->GetEmpire(), 3)]), ch->GetName(), buf);

 

Edited by Metin2 Dev
Core X - External 2 Internal
  • Metin2 Dev 1
Link to comment
Share on other sites

  • 4 weeks later...
  • 1 year later...
  • 3 months later...

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.