Jump to content

Heathcliff

Member
  • Posts

    72
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by Heathcliff

  1. I think this will help you:
     

    Spoiler

    In your battle.cpp - "CalcArrowDamage" method:

    
    	int iGap = (iDist / 100) - 5 - pkAttacker->GetPoint(POINT_BOW_DISTANCE);
    	int iPercent = 100 - (iGap * 5);

     

    In the first line you can change the usage range of your arrow.
    In the second line you can change the damage you do, what depends on how much is the distance between you and your enemy, if I'm correct.

    Btw. I haven't  changed it yet.

  2. In root/uiMinimap.py:

    Spoiler

    If you don't have, add to the imports:

    
    import time

     

    Search:

    
    def __Initialize(self):

    Add under:

    
    self.localTime = 0

     

    Search:

    
    self.serverInfo = self.GetChild("ServerInfo")

    Add under:

    
    self.localTime = self.GetChild("localTime")

     

    Search:

    
    if constInfo.MINIMAP_POSITIONINFO_ENABLE==0:

    Add under:

    
    self.localTime.Hide()

     

    Search :

    
    if self.tooltipInfo:

    Add under:

    
    self.localTime.SetText(time.strftime("|[%H:%M:%S]"))

     

     

    Then  uiScript/minimap.py:

    Spoiler

    Search:

    
    				## ServerInfo
    				{
    					"name" : "ServerInfo",
    					"type" : "text",
    					
    					"text_horizontal_align" : "center",
    
    					"outline" : 1,
    
    					"x" : 70,
    					"y" : 140,
    
    					"text" : "",
    				},

    Add under:

    
    				## Local Time
    				{
    					"name" : "localTime",
    					"type" : "text",
    					
    					"text_horizontal_align" : "center",
    
    					"outline" : 1,
    
    					"x" : 70,
    					"y" : 155,
    
    					"text" : "",
    				},

     

     

    PS: Btw this will show your local time that has been set in your windows and not your server time. Care with tabs.

    • Good 1
  3. Search this:

        for (int i = 0; i < _countof(strMapListGlobal); i++)
        {       
            if (strMapListGlobal == stringName)
            {
                for (int i = 0; i < _countof(pListGlobal); i++)
                {
                    if (rVictim.GetRace() == pListGlobal || 0 <= rVictim.GetRace() && rVictim.GetRace() <= 7 )
                        return FALSE;                       
                }
            }   
        }  

    Replace with this:
     

        for (int i = 0; i < _countof(strMapListGlobal); i++)
        {       
            if (strMapListGlobal[i] == stringName)
            {
                for (int i = 0; i < _countof(pListGlobal); i++)
                {
                    if (rVictim.GetRace() == pListGlobal[i])
                        return FALSE;                       
                }
            }   
        }   

    It will working fine, but I think is no need to make a condition for every type of npc with vnums. I suggest you to use condition with IsNPC instead of one by one checking, because it will apply for all of your npcs includes shops, pets, and of course mounts. 
     

    • Good 1
    • Love 1
  4. 1 hour ago, KavMira said:

    If you use the command /a /setskillother and /set to a character who will not exist, the core goes down.

    How can I adjust it so that it also asks if it exists, if not, you get the answer

    	if (!tch)
    	{
    		ch->ChatPacket(CHAT_TYPE_INFO,  LC_TEXT("CHAR_DOES_NOT_EXIST"));
    		return;
    	}

     

  5. In GameLib/ActorInstanceCollisionDetection.cpp :

     

    Add this to includes: 

    #include "../UserInterface/AbstractPlayer.h"

    Then in this function: 

    BOOL CActorInstance::TestActorCollision(CActorInstance & rVictim)

    Add this condition:

    	if (IAbstractPlayer::GetSingleton().IsSamePartyMember(GetVirtualID(), rVictim.GetVirtualID()))
    		return FALSE;

    Not a big deal but it can be useful on guild wars and in some dungeons I think.

     

    Regards

    • Love 6
  6. This way:
     

    		else if (pItem->GetSubType() == CItemData::WEAPON_TWO_HANDED)
    		{
    			if (vnum == 9619)
    				m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_RIB_MDE;
    			else if (vnum == 9679)
    				m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_HARAG_MDE;
    			else if (vnum == 9739)
    				m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_SARGASARKANY_MDE;
    		}
    		else if (pItem->GetSubType() == CItemData::WEAPON_DAGGER)
    		{
    			if (vnum == 9629)
    			{
    				m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_FLT_MDE;
    				m_swordRefineEffectLeft = EFFECT_REFINED + EFFECT_FLT_2_MDE;
    			}
    			else if (vnum == 9689)
    			{
    				m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_DWC_MDE;
    				m_swordRefineEffectLeft = EFFECT_REFINED + EFFECT_DWC_2_MDE;
    			}
    			else if (vnum == 9749)
    			{ 
    				m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_LELEKTELEN_MDE;
    				m_swordRefineEffectLeft = EFFECT_REFINED + EFFECT_LELEKTELEN_2_MDE;
    			}
    		}

     

    • Love 1
  7. I think the solution to your problem is:
    Open: "YourNpc".msm file
    Search for the bones and try to replace with this:
     

     Group AttachingData00
        {
            AttachingDataType    1
            
            isAttaching          1
            AttachingModelIndex  0
            AttachingBoneName    "Bip01"
            
            CollisionType        1
            
            SphereDataCount      1
            Group SphereData00
            {
                Radius           23.000000
                Position         0.000000 0.000000 0.000000
            }
        }
        
        Group AttachingData01
        {
            AttachingDataType    1
            
            isAttaching          1
            AttachingModelIndex  0
            AttachingBoneName    "Bip01"
            
            CollisionType        3
            
            SphereDataCount      1
            Group SphereData00
            {
                Radius           50.000000
                Position         0.000000 0.000000 0.000000
            }
        }


    Try it! If I misunderstood your problem, then try to make a gif, or upload your npc's files here and we can give more precise solution.

    • Love 2
  8. 20 hours ago, .Incredible™ said:

    I know, but i want a Cooldown becouse i think you can Crash a core when you Go outside The map with wallhack

    Sorry, my first post was buggy. I've corrected so, it works fine for me.
    do the char.h part again, then go to char_item.cpp and search this:

    	if (iWearCell < 0)
    		return false;

    Paste this under:

    	int equipTime = 5;
    	int iPulse = thecore_pulse();
    	
    	if (iWearCell == WEAR_BODY)
    	{
    		if (iPulse - GetArmorUseTime() < PASSES_PER_SEC(equipTime))
    		{
    			ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You can't equip armor so fast"));
    			return false;
    		}
    		else
    			SetArmorUseTime();
    	}

    Regards

    • Love 1
  9. Hi!
    Try this:
    char.h search:

    		//PREVENT_REFINE_HACK
    		int		GetRefineTime() const { return m_iRefineTime; }
    		void	SetRefineTime() { m_iRefineTime = thecore_pulse(); } 
    		int		m_iRefineTime;
    		//END_PREVENT_REFINE_HACK

    Add this under:

    		//PREVENT_ARMOR_WALLHACK
    		int		GetArmorUseTime() const { return m_iArmorUseTime; }
    		void	SetArmorUseTime() { m_iArmorUseTime = thecore_pulse(); }
    		int		m_iArmorUseTime;
    		//END_PREVENT_ARMOR_WALLHACK

    Then open char_item.cpp and search this in "CHARACTER::EquipItem" function:
     

    	if (iWearCell < 0)
    		return false;

    Add this under:
     

    	int equipTime = 5;
    	int iPulse = thecore_pulse();
    
    	if (iWearCell == WEAR_BODY)
    		SetArmorUseTime();
    
    	if (iWearCell == WEAR_BODY && iPulse - GetArmorUseTime() < PASSES_PER_SEC(equipTime))
    	{
    		ChatPacket(CHAT_TYPE_INFO, "You can't equip armor so fast");
    		return false;
    	}

    Not tested so I'm not sure it works!
    Regards

  10. 4 minutes ago, .SchneeFlocke' said:

    still the same problem :x

    Then try this:
     

    def RefreshBagSlotWindow(self):
    	getItemVNum=player.GetItemIndex
    	getItemCount=player.GetItemCount
    	setItemVNum=self.wndItem.SetItemSlot
    	
    	for i in xrange(player.INVENTORY_PAGE_SIZE):
    		slotNumber = self.__InventoryLocalSlotPosToGlobalSlotPos(i)
    		
    		itemCount = getItemCount(slotNumber)
    		# itemCount == 0AI¸é 1OÄIA» onî´U.
    		if 0 == itemCount:
    			self.wndItem.ClearSlot(i)
    			continue
    		elif 1 == itemCount:
    			itemCount = 0
    			
    		itemVnum = getItemVNum(slotNumber)
    		setItemVNum(i, itemVnum, itemCount)
    		
    		## AÚµ1°3a (HP: #72723 ~ #72726, SP: #72727 ~ #72730) A—1öA3¸® - 3AAIAUAεYµµ 11·Ô! E°1oE­/onE°1oE­ ÇY1A¸¦ A§ÇN AU3÷AÓ - [hyo]
    		if constInfo.IS_AUTO_POTION(itemVnum):
    			# metinSocket - [0] : E°1oE­ ©oÎ, [1] : »çëÇN 3ç, [2] : AÖ´ë ë·®
    			metinSocket = [player.GetItemMetinSocket(slotNumber, j) for j in xrange(player.METIN_SOCKET_MAX_NUM)]	
    			
    			if slotNumber >= player.INVENTORY_PAGE_SIZE*self.inventoryPageIndex:
    				slotNumber -= player.INVENTORY_PAGE_SIZE*self.inventoryPageIndex
    				
    			isActivated = 0 != metinSocket[0]
    			
    			if isActivated:
    				self.wndItem.ActivateSlot(slotNumber)
    				potionType = 0;
    				if constInfo.IS_AUTO_POTION_HP(itemVnum):
    					potionType = player.AUTO_POTION_TYPE_HP
    				elif constInfo.IS_AUTO_POTION_SP(itemVnum):
    					potionType = player.AUTO_POTION_TYPE_SP						
    				
    				usedAmount = int(metinSocket[1])
    				totalAmount = int(metinSocket[2])					
    				player.SetAutoPotionInfo(potionType, isActivated, (totalAmount - usedAmount), totalAmount, self.__InventoryLocalSlotPosToGlobalSlotPos(i))
    				
    			else:
    				self.wndItem.DeactivateSlot(slotNumber)
    		else:
    			self.wndItem.DeactivateSlot(i)
    				
    	self.wndItem.RefreshSlot()

    Careful with tabs!

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