Jump to content

Necro

Premium
  • Posts

    236
  • Joined

  • Last visited

  • Days Won

    3
  • Feedback

    0%

Posts posted by Necro

  1. At client src:

    Change this(InstanceBase.cpp):

    m_dwLevel = c_rkCreateData.m_dwLevel

    To this:

    	BYTE level_mob = CPythonNonPlayer::Instance().GetMobLevel(c_rkCreateData.m_dwRace);
    
    	m_dwLevel = ((c_rkCreateData.m_dwRace > 8 && c_rkCreateData.m_bType == CActorInstance::TYPE_ENEMY) ? level_mob : c_rkCreateData.m_dwLevel);

    Ah and don't forget to include PythonNonPlayer.h

    After that open PythonNonPlayer.h and add this:

    		std::map<DWORD, BYTE> LevelByVnum;

    Next we need to open PythonNonPlayer.cpp:

    Find this line:

    m_NonPlayerDataMap.insert(TNonPlayerDataMap::value_type(pNonPlayerData->dwVnum, pNonPlayerData));

    Under that line add this:

    LevelByVnum[pNonPlayerData->dwVnum] = pNonPlayerData->bLevel;

    And finally add this event:

    BYTE CPythonNonPlayer::GetMobLevel(DWORD dwVnum)
    {
    	map<DWORD, BYTE>::iterator it;
    	it = LevelByVnum.find(dwVnum);
    	if (it != LevelByVnum.end()) {
    		return it->second;
    	}
    	return 0;
    }

    It's untested but it will probably work.

    ​ One more thing -> PythonNonPlayer.h -> difine DWORD GetMobLevel;   i hope that is right :D

    • Love 1
  2. Open "char.cpp"

    Search

    if (IsPC() == true && (LC_IsEurope() == true || LC_IsCanada() == true || LC_IsSingapore() == true))

     

    replace if so it looks like this:

    if (IsPC() == true && (LC_IsEurope() == true || LC_IsCanada() == true || LC_IsSingapore() == true))
    		{
    			addPacket.dwLevel = GetLevel();
    		}
    		else
    		{
                        if(IsPet()){
                            addPacket.dwLevel = GetLevel();
                        }else{
    			addPacket.dwLevel = 0;
                        }
    		}

     

    Then open "PetSystem.cpp" and Search

    m_pkChar->SetPet();

    is added below

    m_pkChar->SetLevel(100);

    ​This tutorial is for pet´s....

  3. Hi, devs

    Is that necessary because of the loading items or ymir only made some fun? :) Thanks

    	if (iPulse - GetSafeboxLoadTime()  < PASSES_PER_SEC(10))
    	{
    		ChatPacket(CHAT_TYPE_INFO, LC_TEXT("<â°í> â°í¸¦ ´ÝŔşÁö 10ĂĘ ľČżˇ´Â ż­ Ľö ľř˝Ŕ´Ď´Ů."));
    		return;
    	}
    

    Because i am still nervous like a player wait for 10 seconds to open 

  4. Hi, can i do code like this? 

     

    if (pkAttacker->IsPC() == true)
    {
    switch (pkAttacker->GetJob())
    {
    case JOB_WARRIOR:
    iAtk -= (iAtk * pkVictim->GetPoint(POINT_RESIST_WARRIOR)) / 100;
    break;
    
    
    case JOB_ASSASSIN:
    iAtk -= (iAtk * pkVictim->GetPoint(POINT_RESIST_ASSASSIN)) / 100;
    break;
    
    
    case JOB_SURA:
    iAtk -= (iAtk * pkVictim->GetPoint(POINT_RESIST_SURA)) / 100;
    break;
    
    
    case JOB_SHAMAN:
    iAtk -= (iAtk * pkVictim->GetPoint(POINT_RESIST_SHAMAN)) / 100;
    break;
    }
    
    
    switch (pkAttacker->GetEmpire())
    {
    case 1:
    iAtk -= (iAtk * pkVictim->GetPoint(POINT_RESIST_SHINSO)) / 100;
    break;
    
    
    case 2:
    iAtk -= (iAtk * pkVictim->GetPoint(POINT_RESIST_CHUNJO)) / 100;
    break;
    
    
    case 3:
    iAtk -= (iAtk * pkVictim->GetPoint(POINT_RESIST_JINNO)) / 100;
    break;
    } 
    }

    two times switch?

     

×
×
  • 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.