Jump to content

amosth

Inactive Member
  • Posts

    163
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by amosth

  1. 3 hours ago, WeedHex said:

    MapEditor  -> Block-PvP on the zone that you want block.

     

    Or if you can't use W.E. you can make new checks from battle files.

    You make a bool  IsInPvpMap(GetMapIndex()) and block in every damage function if is there.

    Example in source code

     

    bool battle_is_attackable(LPCHARACTER ch, LPCHARACTER victim)
    {
    	if (victim->IsDead())
    		return false;
    
    	switch(ch->GetMapIndex())
    	{
    		case 4:
    		case 113:
    		case 351:
    		case 352:
    		{
    		if (victim->IsPC())
    			return false;
    		}
    	}
    
    	// ¾ÈÀüÁö´ë¸é Áß´Ü
    	{
    		SECTREE	*sectree = NULL;
    
    		sectree	= ch->GetSectree();
    		if (sectree && sectree->IsAttr(ch->GetX(), ch->GetY(), ATTR_BANPK))
    			return false;
    
    		sectree = victim->GetSectree();
    		if (sectree && sectree->IsAttr(victim->GetX(), victim->GetY(), ATTR_BANPK))
    			return false;
    	}
    #ifdef NEW_ICEDAMAGE_SYSTEM
    	if (!battle_is_icedamage(ch, victim))
    		return false;
    #endif
    	// ³»°¡ Á×¾úÀ¸¸é Áß´ÜÇÑ´Ù.
    	if (ch->IsStun() || ch->IsDead())
    		return false;
    
    	if (ch->IsPC() && victim->IsPC())
    	{
    		CGuild* g1 = ch->GetGuild();
    		CGuild* g2 = victim->GetGuild();
    
    		if (g1 && g2)
    		{
    			if (g1->UnderWar(g2->GetID()))
    				return true;
    		}
    	}
    
    	if (IS_CASTLE_MAP(ch->GetMapIndex()) && false==castle_can_attack(ch, victim))
    			return false;
    
    	if (CArenaManager::instance().CanAttack(ch, victim) == true)
    		return true;
    
    	return CPVPManager::instance().CanAttack(ch, victim);
    }

     

    Function bloq duel

     

        switch(ch->GetMapIndex())
        {
            case 4:
            case 113:
            case 351:
            case 352:
            {
            if (victim->IsPC())
                return false;
            }
        }

     

    is correct?

  2. 22 hours ago, WeedHex said:

    Packet.h is included so i  think that the problem is on  packet.h.

    Share also it please.

    Thank you very much.

     

    Now it shows this error in syserr:

    0606 23:41:18845 :: cannot find " in shaman_w.msm:1612
    0606 23:41:20692 :: invalid idx 0
    0606 23:41:03044 :: Failed to load script file : locale/it/ui/InventoryWindow.py
    0606 23:41:03048 :: 
    ui.py(line:2763) LoadScriptFile
    system.py(line:192) execfile
    system.py(line:163) Run
    locale/it/ui/InventoryWindow.py(line:131) <module>
    
    LoadScriptFile!!!!!!!!!!!!!! - <type 'exceptions.AttributeError'>:'module' object has no attribute 'TASKBAR_OFFLINE_SHOP'
    
    0606 23:41:03048 :: ============================================================================================================
    0606 23:41:03048 :: Abort!!!!
    
    
    0606 23:41:03051 :: 
    uiInventory.py(line:295) __LoadWindow
    ui.py(line:2780) LoadScriptFile
    exception.py(line:36) Abort
    
    InventoryWindow.LoadWindow.LoadObject - <type 'exceptions.SystemExit'>:
    
    0606 23:41:03051 :: ============================================================================================================
    0606 23:41:03051 :: Abort!!!!
    
    

     

    My inventorywindow.py

    https://pastebin.com/GHyBT3bz

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