Jump to content

Xerneas

Inactive Member
  • Posts

    84
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by Xerneas

  1. Hello,

     

    ive tried to edit the transmutate system to transmutate weapons to costume weapons/costume weapons, armor to costume/costume to armes like official it has.

     

    But sadly, i didnt have success.

     

    This is the Code:


     

    Spoiler
    
    LPITEM pkItem = GetItem(tPos);
    	if (!pkItem)
    		return;
    	else if ((pkItem->GetCell() >= INVENTORY_MAX_NUM) || (tPos.IsBeltInventoryPosition()))
    		return;
    	else if (pkItem->IsEquipped())
    	{
    		ChatPacket(CHAT_TYPE_INFO, LC_TEXT("[Transmutation] You cannot transmute an item while it is equipped."));
    		return;
    	}
    	else if ((pkItem->GetType() != ITEM_WEAPON) && (pkItem->GetType() != ITEM_ARMOR) && (pkItem->GetType() != ITEM_COSTUME))
    	{
    		ChatPacket(CHAT_TYPE_INFO, LC_TEXT("[Transmutation] This item cannot be transmuted."));
    		return;
    	}
    	else if ((pkItem->GetType() == ITEM_WEAPON) && ((pkItem->GetSubType() == WEAPON_ARROW) || (pkItem->GetSubType() == WEAPON_MOUNT_SPEAR)))
    
    	{
    		ChatPacket(CHAT_TYPE_INFO, LC_TEXT("[Transmutation] This item cannot be transmuted."));
    		return;
    	}
    	else if ((pkItem->GetType() == ITEM_ARMOR) && (pkItem->GetSubType() != ARMOR_BODY))
    	{
    		ChatPacket(CHAT_TYPE_INFO, LC_TEXT("[Transmutation] This item cannot be transmuted."));
    		return;
    	}
    	else if ((pkItem->GetType() == ITEM_COSTUME) && (pkItem->GetSubType() != COSTUME_BODY) && (pkItem->GetSubType() != COSTUME_HAIR))
    	{
    		ChatPacket(CHAT_TYPE_INFO, LC_TEXT("[Transmutation] This item cannot be transmuted."));
    		return;
    	}
    
    	else if (pkItem->isLocked())
    	{
    		ChatPacket(CHAT_TYPE_INFO, LC_TEXT("[Transmutation] You can't add locked items."));
    		return;
    	}
    	else if (pkItem->GetTransmutation() != 0)
    	{
    		ChatPacket(CHAT_TYPE_INFO, LC_TEXT("[Transmutation] You can't add items which are transmuted yet."));
    		return;
    	}
    	
    	LPITEM * pkItemMaterial;
    	pkItemMaterial = GetClWindowMaterials();
    	if ((bPos == 1) && (!pkItemMaterial[0]))
    		return;
    	
    	if (pkItemMaterial[bPos])
    		return;
    	
    	if (bPos == 1)
    	{
    		bool bStop = false;
    		if (pkItemMaterial[0]->GetType() != pkItem->GetType())
    			bStop = true;
    		else if (pkItemMaterial[0]->GetSubType() != pkItem->GetSubType())
    			bStop = true;
    		else if (pkItemMaterial[0]->GetOriginalVnum() == pkItem->GetOriginalVnum())
    			bStop = true;
    		else if (((IS_SET(pkItemMaterial[0]->GetAntiFlag(), ITEM_ANTIFLAG_FEMALE)) && (!IS_SET(pkItem->GetAntiFlag(), ITEM_ANTIFLAG_FEMALE))) || ((IS_SET(pkItemMaterial[0]->GetAntiFlag(), ITEM_ANTIFLAG_MALE)) && (!IS_SET(pkItem->GetAntiFlag(), ITEM_ANTIFLAG_MALE))))
    			bStop = true;
    		else if ((pkItem->GetAntiFlag() & ITEM_ANTIFLAG_WARRIOR) && (!IS_SET(pkItemMaterial[0]->GetAntiFlag(), ITEM_ANTIFLAG_WARRIOR)))
    			bStop = true;
    		else if ((pkItem->GetAntiFlag() & ITEM_ANTIFLAG_ASSASSIN) && (!IS_SET(pkItemMaterial[0]->GetAntiFlag(), ITEM_ANTIFLAG_ASSASSIN)))
    			bStop = true;
    		else if ((pkItem->GetAntiFlag() & ITEM_ANTIFLAG_SHAMAN) && (!IS_SET(pkItemMaterial[0]->GetAntiFlag(), ITEM_ANTIFLAG_SHAMAN)))
    			bStop = true;
    		else if ((pkItem->GetAntiFlag() & ITEM_ANTIFLAG_SURA) && (!IS_SET(pkItemMaterial[0]->GetAntiFlag(), ITEM_ANTIFLAG_SURA)))
    			bStop = true;
    
    		
    		if (bStop)
    		{
    			ChatPacket(CHAT_TYPE_INFO, LC_TEXT("[Transmutation] You cannot submit this item."));
    			return;
    		}
    	}

     

     

     

     

    I´ve tried the following steps:

     

    try to expand the if step:

     

    else if ((pkItem->GetType() == ITEM_COSTUME) && (pkItem->GetType() == ITEM_WEAPON) && (pkItem->GetSubType() != COSTUME_BODY) && (pkItem->GetSubType() != COSTUME_HAIR) && (pkItem->GetSubType() != COSTUME_WEAPON) && (pkItem->GetType() != ITEM_WEAPON))

    doesnt work

     

    edit bstop = false and make a whiteliste for weapons and costumes... no success... maybe you want to help?

     

     

     

  2. Hey, guys

    i´ve implemented the new sashes from the 17.5 Update.

    All works fine, but if i wear a 19% absorbtion rate it will set a other sashes as the icon it says...

    Here is a screen of that:

    18% ( the original sash)

    Spoiler

    Iui8fab.jpg

    and here is the same sash but with 19%

    Spoiler

    XFawdab.jpg

    If you know or if you need something example a code of my source, tell me.

     

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