Jump to content

notbugme

Banned
  • Posts

    50
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by notbugme

  1. Dnia 12.11.2018 o 17:20, xUniverse napisał:

    Thanks, 

    This part of my function was good, but I found the problem in: if (CItemData::WEAPON_ARROW == pItemData->GetSubType()). 

    Solved. 

    ### If someone has the same problem (and has NEW_ARROW_SYSTEM enabled), this is my fixed __HasEnoughArrow() function (in PythonPlayerSkill.cpp?

    
    bool CPythonPlayer::__HasEnoughArrow()
    {
    	CItemData * pItemData;
    	if (CItemManager::Instance().GetItemDataPointer(GetItemIndex(TItemPos(INVENTORY, c_Equipment_Arrow)), &pItemData))
    	if (CItemData::ITEM_TYPE_WEAPON == pItemData->GetType())
    #ifdef ENABLE_NEW_ARROW_SYSTEM
    	if (CItemData::WEAPON_ARROW == pItemData->GetSubType() || CItemData::WEAPON_UNLIMITED_ARROW == pItemData->GetSubType())
    #else
    	if (CItemData::WEAPON_ARROW == pItemData->GetSubType())
    #endif
    	{
    		return true;
    	}
    
    	PyCallClassMemberFunc(m_ppyGameWindow, "OnCannotShotError", Py_BuildValue("(is)", GetMainCharacterIndex(), "EMPTY_ARROW"));
    	return false;
    }

     

    Thank you bro.

  2. 15 godzin temu, Caramelito napisał:

    Ok, let's say somebody will answer you to that question. But mine is: what the f* you gonna do with it once you know that? You gonna ask for more and more and more. This is not a "how to" topic as penger said above. 

    No, I don't want any more. How you work without just pressing the button. Thanks you.

  3. Dnia 11.09.2018 o 5:46 PM, ѕeмa™ napisał:

     

    U mean this right?

    https://metin2.download/picture/yNIj3Wv5U09p00seMD8h5xRuS6BqRb4A/.gif

     

    Well i did this:

    Onupdate:

    
    		if self.max_hp > self.actual_hp:
    			if app.GetTime() > self.time:
    				self.max_hp -= 1
    				dbg.TraceError(str(self.actual_hp)+"_"+str(self.max_hp))
    				self.hpGauge.SetPercentage(self.max_hp, 100)
    				self.time = app.GetTime() + 0.005

    def sethp
     

    
    	def SetHP(self, hpPercentage):
    		if not self.hpGauge.IsShow():
    		
    			self.SetSize(200 + 7*self.nameLength, self.GetHeight())
    			self.name.SetHorizontalAlignCenter()
    			self.name.SetWindowHorizontalAlignCenter()
    			self.name.SetPosition(0, 8)
    			self.hpGauge.SetWindowHorizontalAlignCenter()
    			self.hpGauge.SetPosition(0, 23)
    			self.hpGauge.Show()
    			self.percent.Show()
    			self.UpdatePosition()
    			self.max_hp = hpPercentage
    	
    		self.hpGauge.SetPercentage(hpPercentage, 100)
    		self.actual_hp = hpPercentage

     

    def init

    
    		self.actual_hp = 0
    		self.max_hp = 100
    		self.time = 0

    I did this fast, if it's bugged i dont know but if u find a bug, tell me.

     

    You can play with this code, example: if the difference is too high u can make the hp goes faster and if the difference is not too much goes slower.

    Good luck

    .....py ?

  4. 2 godziny temu, Dobrescu Sebastian napisał:
    
    Serach in char_state.cpp:
      m_pkParty->SendMessage(this, PM_ATTACKED_BY, 0, 0);
    
    Add after:
    
    if (m_pkMobData->m_table.dwVnum == 1111) // mob that attack vnum
    {
    	LPCHARACTER the_object = FindVictim(5555, m_pkMobData->m_table.wAggressiveSight); // 5555 = object vnum
    	SetVictim(the_object);
    	return;				
    }

    It's not tested, i just writed it.

     

    2aMqJA.png

     

    g6Np65.png

    • Love 1
  5. 18 godzin temu, WeedHex napisał:

    Show a video, i can misunderstand the problem...

    j6EpBJ.png

     

    The monsters are attacking the object.

    2 godziny temu, Dobrescu Sebastian napisał:
    
    Serach in char_state.cpp:
      m_pkParty->SendMessage(this, PM_ATTACKED_BY, 0, 0);
    
    Add after:
    
    if (m_pkMobData->m_table.dwVnum == 1111) // mob that attack vnum
    {
    	LPCHARACTER the_object = FindVictim(5555, m_pkMobData->m_table.wAggressiveSight); // 5555 = object vnum
    	SetVictim(the_object);
    	return;				
    }

    It's not tested, i just writed it.

    char_state.cpp: In member function 'virtual void CHARACTER::StateBattle()':
    char_state.cpp:1115: error: invalid conversion from 'int' to 'CHARACTER*'
    char_state.cpp:1115: error:   initializing argument 1 of 'CHARACTER* FindVictim(CHARACTER*, int)'
    gmake: *** [OBJDIR_GAME/char_state.o] Error 1
    root@host:/usr/aSource/Server/game/src #
     

  6. Dnia 18.05.2018 o 16:00, Adrian1997 napisał:

    char.cpp için arama:

     

        Eğer (m_bCharType == CHAR_TYPE_HORSE ||
                GetRaceNum () == 20101 ||
                GetRaceNum () == 20102 ||
                GetRaceNum () == 20103 ||
                GetRaceNum () == 20104 ||
                GetRaceNum () == 20105 ||
                GetRaceNum ( ) == 20106 ||
                GetRaceNum () == 20107 ||
                GetRaceNum () == 20108 ||
                GetRaceNum () == 20109
          )

     

     

    Yes Attached

     

    	if (m_bCharType == CHAR_TYPE_HORSE || 
    			GetRaceNum() == 20101 ||
    			GetRaceNum() == 20102 ||
    			GetRaceNum() == 20103 ||
    			GetRaceNum() == 20104 ||
    			GetRaceNum() == 20105 ||
    			GetRaceNum() == 20106 ||
    			GetRaceNum() == 20107 ||
    			GetRaceNum() == 20108 ||
    			GetRaceNum() == 20109
    	  )

     

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