Add Enchant Item

Page 1 of 2 12 LastLast
Results 1 to 15 of 18
  1. #1
    Member Slime is offline
    MemberRank
    Jul 2011 Join Date
    HenesysLocation
    79Posts

    Add Enchant Item(edit)

    Hello.

    Well...Many people add my code, then have error.

    I don't know why others get the error.

    BTW, I want others to use this code.

    So i retry post.

    Ok. let's go

    Add red text!!!

    Stable\CSCommon\

    Source\MMatchItem.cpp
    Code:
    1.
    			// enchant
    			else if (!stricmp(szAttrValue, MICTOK_WEAPON_ENCHANT_FIRE))			pNewDesc->m_nWeaponType.Set(MWT_ENCHANT_FIRE);
    			else if (!stricmp(szAttrValue, MICTOK_WEAPON_ENCHANT_COLD))			pNewDesc->m_nWeaponType.Set(MWT_ENCHANT_COLD);
    			else if (!stricmp(szAttrValue, MICTOK_WEAPON_ENCHANT_LIGHTNING))	pNewDesc->m_nWeaponType.Set(MWT_ENCHANT_LIGHTNING);
    			else if (!stricmp(szAttrValue, MICTOK_WEAPON_ENCHANT_POISION))		pNewDesc->m_nWeaponType.Set(MWT_ENCHANT_POISON);
    			else if (!stricmp(szAttrValue, MICTOK_WEAPON_ENCHANT_RAINBOW))		pNewDesc->m_nWeaponType.Set(MWT_ENCHANT_RAINBOW);
    
    
    
    2.
    MMatchWeaponType GetWeaponType(MMatchCustomItemType nCustomItemType)
    {
    	switch (nCustomItemType)
    	{
    	case MMCIT_MED_KIT:				return MWT_MED_KIT;
    	case MMCIT_REPAIR_KIT:			return MWT_REPAIR_KIT;
    	case MMCIT_BULLET_KIT:			return MWT_BULLET_KIT;
    	case MMCIT_FLASH_BANG:			return MWT_FLASH_BANG;
    	case MMCIT_FRAGMENTATION:		return MWT_FRAGMENTATION;
    	case MMCIT_SMOKE_GRENADE:		return MWT_SMOKE_GRENADE;
    	case MMCIT_ENCHANT_FIRE:		return MWT_ENCHANT_FIRE;
    	case MMCIT_ENCHANT_COLD:		return MWT_ENCHANT_COLD;
    	case MMCIT_ENCHANT_LIGHTNING:	return MWT_ENCHANT_LIGHTNING;
    	case MMCIT_ENCHANT_POISON:		return MWT_ENCHANT_POISON;
    	case MMCIT_ENCHANT_RAINBOW:		return MWT_ENCHANT_RAINBOW;
    	case MMCIT_FOOD:				return MWT_FOOD;
    	case MMCIT_POTION:				return MWT_POTION;
    
    	default:
    		{
    			// 없는 타입
    			_ASSERT(0);
    		}
    	}
    	return MWT_NONE;
    }
    
    
    
    3.
    bool IsEnchantItem(MMatchItemDesc* pItemDesc)
    {
    	if (pItemDesc->m_nType.Ref() == MMIT_CUSTOM)
    	{
    		MMatchWeaponType t = pItemDesc->m_nWeaponType.Ref();
    		if ((t == MWT_ENCHANT_FIRE) || 
    			(t == MWT_ENCHANT_COLD) || 
    			(t == MWT_ENCHANT_LIGHTNING) || 
    			(t == MWT_ENCHANT_POISON)  || 
    			(t == MWT_ENCHANT_RAINBOW) )
    			return true;
    	}
    
    	return false;
    }
    Include/MMatchItem.h
    Code:
    1.
    // 커스텀 아이템 타입
    enum MMatchCustomItemType
    {
    	MMCIT_MED_KIT		= 0,
    	MMCIT_REPAIR_KIT,
    	MMCIT_BULLET_KIT,
    	MMCIT_DYNAMITE,
    	MMCIT_REMOTE_CHARGE,
    	MMCIT_DEMOLITION_TOOLS,
    	MMCIT_FLASH_BANG,
    	MMCIT_FRAGMENTATION,
    	MMCIT_SMOKE_GRENADE,
    	MMCIT_TEARGAS_GRENADE,
    	MMCIT_FOOD,
    
    	MMCIT_ENCHANT_FIRE,			// 인챈트 아이템 - fire
    	MMCIT_ENCHANT_COLD,			// 인챈트 아이템 - cold
    	MMCIT_ENCHANT_LIGHTNING,	// 인챈트 아이템 - lightning
    	MMCIT_ENCHANT_POISON,		// 인챈트 아이템 - poison
    	MMCIT_ENCHANT_RAINBOW,		// 인챈트 아이템 - rainbow
    
    	MMCIT_POTION,				// 소모성 아이템 중 회복 계열 + 가속 포션
    
    	MMCIT_END
    };
    
    
    
    2.
    // Melee, Range, Custom을 합친 무기 타입 .. 한손 양손의 구분은 없다..
    enum MMatchWeaponType
    {
    	MWT_NONE	= 0,
    
    	// melee
    	MWT_DAGGER,
    	MWT_DUAL_DAGGER,
    	MWT_KATANA,
    	MWT_GREAT_SWORD,
    	MWT_DOUBLE_KATANA,
    
    	// range
    	MWT_PISTOL,
    	MWT_PISTOLx2,
    	MWT_REVOLVER,
    	MWT_REVOLVERx2,
    	MWT_SMG,
    	MWT_SMGx2,
    	MWT_SHOTGUN,
    	MWT_SAWED_SHOTGUN,
    	MWT_RIFLE,
    	MWT_MACHINEGUN,
    	MWT_ROCKET,
    	MWT_SNIFER,
    
    	// custom
    	MWT_MED_KIT,
    	MWT_REPAIR_KIT,
    	MWT_BULLET_KIT,
    	MWT_FLASH_BANG,
    	MWT_FRAGMENTATION,
    	MWT_SMOKE_GRENADE,
    	MWT_FOOD,
    	MWT_SKILL,				// NPC용 - skill.xml에 기술되어 있는 걸로 공격한다.
    
    	// custom - enchant
    	MWT_ENCHANT_FIRE,			
    	MWT_ENCHANT_COLD,
    	MWT_ENCHANT_LIGHTNING,
    	MWT_ENCHANT_POISON,
    	MWT_ENCHANT_RAINBOW,
    
    	// custom
    	MWT_POTION,
    	MWT_TRAP,
    	MWT_DYNAMITYE,
    
    	MWT_END
    };
    
    
    
    
    3.
    	int GetSellBountyValue(int nCnt = 1) { return int(m_nBountyPrice.Ref() * 0.25) * nCnt; }
    
    	bool IsCashItem()		{ if ((m_bIsCashItem)) return true; return false; }
    	bool IsEnchantItem()	{ if (m_nWeaponType.Ref() >= MWT_ENCHANT_FIRE && m_nWeaponType.Ref() <= MWT_ENCHANT_RAINBOW) return true; 
    								return false; }
    	bool IsUnLimitItem()		{ return RENT_PERIOD_UNLIMITED == m_nMaxRentPeriod.Ref(); }	
    	bool IsSpendableItem()		{ return m_bIsSpendableItem; }
    Stable\Gunz/

    ZCharacterObject.cpp
    Code:
    1
    void ZCharacterObject::UpdateEnchant()
    {
    	ZC_ENCHANT etype = GetEnchantType();
    	REnchantType retype = REnchantType_None;
    
    		 if(etype==ZC_ENCHANT_FIRE)			retype = REnchantType_Fire;
    	else if(etype==ZC_ENCHANT_COLD)			retype = REnchantType_Cold;
    	else if(etype==ZC_ENCHANT_LIGHTNING)	retype = REnchantType_Lightning;
    	else if(etype==ZC_ENCHANT_POISON)		retype = REnchantType_Poison;
    	else if(etype==ZC_ENCHANT_RAINBOW)		retype = REnchantType_Rainbow;
    	else									retype = REnchantType_None;
    	
    	if(m_pVMesh) {
    		m_pVMesh->SetEnChantType(retype);
    	}
    }
    
    
    
    2
    void ZCharacterObject::DrawEnchantSub(ZC_ENCHANT etype,rvector& pos)
    {
    	if(etype==ZC_ENCHANT_FIRE)
    		ZGetEffectManager()->AddTrackFire( pos );
    	else if(etype==ZC_ENCHANT_COLD)
    		ZGetEffectManager()->AddTrackCold( pos );
    	else if(etype==ZC_ENCHANT_POISON)
    		ZGetEffectManager()->AddTrackPoison( pos );
    	else if(etype==ZC_ENCHANT_RAINBOW)  /* Thanks to Tannous (http://forum.ragezone.com/f245/elements-combination-1-5-a-1013570/)*/
    	{
    		ZGetEffectManager()->AddTrackFire( pos );
    		ZGetEffectManager()->AddTrackCold( pos );
    		ZGetEffectManager()->AddTrackPoison( pos );
    	}
    //	else if(etype==ZC_ENCHANT_LIGHTNING)
    }
    
    3
    ZC_ENCHANT	ZCharacterObject::GetEnchantType()
    {
    //	return ZC_ENCHANT_FIRE;
    
    	MMatchItemDesc* pDesc = GetEnchantItemDesc();
    	if(pDesc)
    	{
    		switch(pDesc->m_nWeaponType.Ref())
    		{
    			case MWT_ENCHANT_FIRE : return ZC_ENCHANT_FIRE;
    			case MWT_ENCHANT_COLD : return ZC_ENCHANT_COLD;
    			case MWT_ENCHANT_LIGHTNING: return ZC_ENCHANT_LIGHTNING;
    			case MWT_ENCHANT_POISON: return ZC_ENCHANT_POISON;
    			case MWT_ENCHANT_RAINBOW: return ZC_ENCHANT_RAINBOW;
    		}
    	}
    
    	return ZC_ENCHANT_NONE;
    }
    ZEffectBulletMarkList.cpp(National) or RealSpace2\Source\RVisualMesh.cpp(Original)
    Code:
    1
    void RVisualMesh::DrawEnchant(RVisualMesh* pVWMesh,int mode,rmatrix& m)
    {
    	return;
    
    	if(m_EnchantType==REnchantType_None)
    		return;
    
    	if(m_EnchantType==REnchantType_Fire) {
    		DrawEnchantFire(pVWMesh,mode,m);
    	}
    	else if(m_EnchantType==REnchantType_Cold) {
    		DrawEnchantCold(pVWMesh,mode,m);
    	}
    	else if(m_EnchantType==REnchantType_Lightning) {
    		DrawEnchantLighting(pVWMesh,mode,m);
    	}
    	else if(m_EnchantType==REnchantType_Poison) {
    		DrawEnchantPoison(pVWMesh,mode,m);
    	}
    	else if(m_EnchantType==REnchantType_Poison) {
    		DrawEnchantRainbow(pVWMesh,mode,m);
    	}
    }
    
    2.
    void RVisualMesh::DrawEnchantCold(RVisualMesh* pVWMesh,int mode,rmatrix& m)
    {
    
    }
    
    void RVisualMesh::DrawEnchantLighting(RVisualMesh* pVWMesh,int mode,rmatrix& m)
    {
    
    }
    
    void RVisualMesh::DrawEnchantPoison(RVisualMesh* pVWMesh,int mode,rmatrix& m)
    {
    
    }
    void RVisualMesh::DrawEnchantRainbow(RVisualMesh* pVWMesh,int mode,rmatrix& m)
    {
    }
    
    3.
    void RVisualMesh::GetEnChantColor(DWORD* color)
    {
    	if(!color) return;
    
    	if(m_EnchantType==REnchantType_Fire) {
    		color[0] = 0x4fff6666;
    		color[1] = 0x0fff6666;
    	}
    	else if(m_EnchantType==REnchantType_Cold) {
    		color[0] = 0x4f6666ff;
    		color[1] = 0x0f6666ff;
    	}
    	else if(m_EnchantType==REnchantType_Lightning) {
    		color[0] = 0x4f66ffff;
    		color[1] = 0x0f66ffff;
    	}
    	else if(m_EnchantType==REnchantType_Poison) {
    		color[0] = 0x4f66ff66;
    		color[1] = 0x0f66ff66;
    	}
    	
    	else if(m_EnchantType==REnchantType_Rainbow) {
    		color[0] = 0x4f66ffff;
    		color[1] = 0x0f66ffff;
    	}
    	else {
    		color[0] = 0x4fffffff;
    		color[1] = 0x0fffffff;
    	}
    }

    ZEffectManager.cpp
    Code:
    1
    	m_pWeaponEnchant[ZC_ENCHANT_NONE]		= NULL;
    	m_pWeaponEnchant[ZC_ENCHANT_FIRE]		= new ZEffectWeaponEnchant( m_pSwordFire  ,veczero,veczero, NULL );
    	m_pWeaponEnchant[ZC_ENCHANT_COLD]		= new ZEffectWeaponEnchant( m_pSwordCold  ,veczero,veczero, NULL );
    	m_pWeaponEnchant[ZC_ENCHANT_LIGHTNING]	= new ZEffectWeaponEnchant( m_pSwordElec  ,veczero,veczero, NULL );
    	m_pWeaponEnchant[ZC_ENCHANT_POISON]		= new ZEffectWeaponEnchant( m_pSwordPoison,veczero,veczero, NULL );
    	m_pWeaponEnchant[ZC_ENCHANT_RAINBOW]		= new ZEffectWeaponEnchant( m_pSwordElec,veczero,veczero, NULL );
    
    
    
    2
    void ZEffectManager::AddSwordEnchantEffect(ZC_ENCHANT type,const rvector& Target,DWORD start_time, float fScale)
    {
    	ZEffect* pNew = NULL;
    
    	rvector dir = rvector(0.f,1.f,0.f);
    
    	RMesh* pMesh = NULL;
    
    		 if( type ==  ZC_ENCHANT_FIRE )			pMesh = m_pSwordEnchantEffect[0];
    	else if( type ==  ZC_ENCHANT_COLD )			pMesh = m_pSwordEnchantEffect[1];
    	else if( type ==  ZC_ENCHANT_LIGHTNING )	pMesh = m_pSwordEnchantEffect[2];
    	else if( type ==  ZC_ENCHANT_POISON )		pMesh = m_pSwordEnchantEffect[3];
    	else if( type ==  ZC_ENCHANT_RAINBOW )		pMesh = m_pSwordEnchantEffect[4];
    	else 
    		return;
    ZGameAction.cpp
    Code:
    1
    bool ZGameAction::OnEnchantDamage(MCommand* pCommand)
    {
    	MUID ownerUID;
    	MUID targetUID;
    	pCommand->GetParameter(&ownerUID,	0, MPT_UID);
    	pCommand->GetParameter(&targetUID,	1, MPT_UID);
    
    	ZCharacter* pOwnerCharacter = ZGetCharacterManager()->Find(ownerUID);
    	ZObject* pTarget= ZGetObjectManager()->GetObject(targetUID);
    
    	if (pOwnerCharacter == NULL || pTarget == NULL ) return true;
    
    	MMatchItemDesc* pDesc = pOwnerCharacter->GetEnchantItemDesc();
    	if(pDesc)
    	{
    		switch(pOwnerCharacter->GetEnchantType())
    		{
    			case ZC_ENCHANT_FIRE :
    				ApplyFireEnchantDamage(pTarget, pOwnerCharacter, pDesc->m_nDamage.Ref(), pDesc->m_nDelay.Ref());
    				break;
    			case ZC_ENCHANT_COLD :
    				ApplyColdEnchantDamage(pTarget, pDesc->m_nLimitSpeed.Ref(), pDesc->m_nDelay.Ref());
    				break;
    			case ZC_ENCHANT_POISON :
    				ApplyPoisonEnchantDamage(pTarget, pOwnerCharacter, pDesc->m_nDamage.Ref(), pDesc->m_nDelay.Ref());
    				break;
    			case ZC_ENCHANT_LIGHTNING : 
    				ApplyLightningEnchantDamage(pTarget, pOwnerCharacter, pDesc->m_nDamage.Ref(), pDesc->m_nDelay.Ref());
    				break;
    			case ZC_ENCHANT_RAINBOW :  /* Thanks to Tannous (http://forum.ragezone.com/f245/elements-combination-1-5-a-1013570/)*/
    				{
    				ApplyFireEnchantDamage(pTarget, pOwnerCharacter, pDesc->m_nDamage.Ref(), pDesc->m_nDelay.Ref());
    				ApplyColdEnchantDamage(pTarget, pDesc->m_nLimitSpeed.Ref(), pDesc->m_nDelay.Ref());
    				ApplyPoisonEnchantDamage(pTarget, pOwnerCharacter, pDesc->m_nDamage.Ref(), pDesc->m_nDelay.Ref());
    				ApplyLightningEnchantDamage(pTarget, pOwnerCharacter, pDesc->m_nDamage.Ref(), 1000/*pDesc->m_nDelay.Ref()*/);
    				}
    				break;
    		};
    	}
    
    	return true;
    }
    ZGameInput_Debug.cpp
    Code:
    			case 'U': {
    
    				ZC_ENCHANT zctype;
    //				int Module = 20;
    
    				if(ZGetGame() && ZGetGame()->m_pMyCharacter ) {
    
    					zctype = ZGetGame()->m_pMyCharacter->GetEnchantType();
    
    //						 if(zctype==ZC_ENCHANT_FIRE)		Module = ZMID_FIREDAMAGE;
    //					else if(zctype==ZC_ENCHANT_COLD)		Module = ZMID_COLDDAMAGE;
    //					else if(zctype==ZC_ENCHANT_LIGHTNING)	Module = ZMID_LIGHTNINGDAMAGE;
    //					else if(zctype==ZC_ENCHANT_POISON)		Module = ZMID_POISONDAMAGE;
    
    					if(zctype==ZC_ENCHANT_FIRE) {
    						ZModule_FireDamage *pModule = (ZModule_FireDamage*)ZGetGame()->m_pMyCharacter->GetModule(ZMID_FIREDAMAGE);
    						pModule->BeginDamage(ZGetGame()->m_pMyCharacter,5,10);
    					}
    					else if(zctype==ZC_ENCHANT_COLD) {
    						ZModule_ColdDamage *pModule = (ZModule_ColdDamage*)ZGetGame()->m_pMyCharacter->GetModule(ZMID_COLDDAMAGE);
    						pModule->BeginDamage(10,50);
    					}
    					else if(zctype==ZC_ENCHANT_LIGHTNING) {
    						ZModule_LightningDamage *pModule = (ZModule_LightningDamage*)ZGetGame()->m_pMyCharacter->GetModule(ZMID_LIGHTNINGDAMAGE);
    						pModule->BeginDamage(ZGetGame()->m_pMyCharacter,5,10);
    					}
    					else if(zctype==ZC_ENCHANT_POISON) {
    						ZModule_PoisonDamage *pModule = (ZModule_PoisonDamage*)ZGetGame()->m_pMyCharacter->GetModule(ZMID_POISONDAMAGE);
    						pModule->BeginDamage(ZGetGame()->m_pMyCharacter,5,10);
    					}
    					else if(zctype==ZC_ENCHANT_RAINBOW) {
    						ZModule_FireDamage *pModule = (ZModule_FireDamage*)ZGetGame()->m_pMyCharacter->GetModule(ZMID_FIREDAMAGE);
    						pModule->BeginDamage(ZGetGame()->m_pMyCharacter,5,10);
    					}
    				}
    
    				//g_pGame->m_pMyCharacter->ShotBlocked();
    //				ZApplication::GetSoundEngine()->StopMusic();
    				//ZApplication::GetSoundEngine()->load_preset();
    					  }break;
    ZItemIconBitmap.cpp
    Code:
    	case MMIST_CUSTOM:
    		{
    			MMatchWeaponType nWeaponType = pItemDesc->m_nWeaponType.Ref();
    
    			switch (nWeaponType)
    			{
    			case MWT_FRAGMENTATION:		strcpy(szFileName, "slot_icon_grenade");		break;
    			case MWT_FLASH_BANG:
    			case MWT_SMOKE_GRENADE:		strcpy(szFileName, "slot_icon_flashbang");		break;
    			case MWT_MED_KIT:			strcpy(szFileName, "slot_icon_medikit");		break;				
    			case MWT_FOOD:				strcpy(szFileName, "slot_icon_food");			break;
    			case MWT_REPAIR_KIT:		strcpy(szFileName, "slot_icon_repairkit");		break;
    			case MWT_BULLET_KIT:		strcpy(szFileName, "slot_icon_magazine");		break;
    			case MWT_ENCHANT_FIRE:		strcpy(szFileName, "slot_icon_en_fire");		break;
    			case MWT_ENCHANT_COLD:		strcpy(szFileName, "slot_icon_en_cold");		break;
    			case MWT_ENCHANT_LIGHTNING:	strcpy(szFileName, "slot_icon_en_lightning");	break;
    			case MWT_ENCHANT_POISON:	strcpy(szFileName, "slot_icon_en_poison");		break;
    			case MWT_ENCHANT_RAINBOW:	strcpy(szFileName, "slot_icon_en_rainbow");		break;
    			case MWT_POTION:			strcpy(szFileName, GetItemIconBitmap_Potion(pItemDesc));	break;
    			case MWT_TRAP:				strcpy(szFileName, GetItemIconBitmap_Trap(pItemDesc));		break;
    			case MWT_DYNAMITYE:			strcpy(szFileName, "slot_icon_exgrenade");		break;
    
    			default:
    				_ASSERT(0);
    				break;
    			}
    		}
    		break;
    ZMessages.h
    Code:
    #define MSG_WORD_PROHIBIT						9348		///< 금지
    
    #define MSG_WORD_ATTRIBUTE_RAINBOW				9349		///< 무지개속성
    ZObject.h
    Code:
    1
    enum ZC_ENCHANT {
    	ZC_ENCHANT_NONE = 0,
    	ZC_ENCHANT_FIRE,
    	ZC_ENCHANT_COLD,
    	ZC_ENCHANT_LIGHTNING,
    	ZC_ENCHANT_POISON,
    	ZC_ENCHANT_RAINBOW,
    
    	ZC_ENCHANT_END
    };

    Stable\RealSpace2\

    Include\RVisualMesh.h
    Code:
    	void DrawEnchantFire(RVisualMesh* pVWMesh,int mode,rmatrix& m);
    	void DrawEnchantCold(RVisualMesh* pVWMesh,int mode,rmatrix& m);
    	void DrawEnchantLighting(RVisualMesh* pVWMesh,int mode,rmatrix& m);
    	void DrawEnchantPoison(RVisualMesh* pVWMesh,int mode,rmatrix& m);
    	void DrawEnchantRainbow(RVisualMesh* pVWMesh,int mode,rmatrix& m);
    Include\RVisualMeshUtil.h
    Code:
    enum REnchantType {
    
    	REnchantType_None = 0,
    	REnchantType_Fire,
    	REnchantType_Cold,
    	REnchantType_Lightning,
    	REnchantType_Poison,
    	REnchantType_Rainbow,
    	REnchantType_End,
    };
    Stable\StringLiteral\MMatchItem.cxr
    Code:
    // enchant
    #define MICTOK_WEAPON_ENCHANT_FIRE		_CXR("enchant_fire")
    #define MICTOK_WEAPON_ENCHANT_COLD		_CXR("enchant_cold")
    #define MICTOK_WEAPON_ENCHANT_LIGHTNING	_CXR("enchant_lightning")
    #define MICTOK_WEAPON_ENCHANT_POISION	_CXR("enchant_poison")
    #define MICTOK_WEAPON_ENCHANT_RAINBOW	_CXR("enchant_rainbow")
    Stable\StringLiteral\cxr_MMatchItem.h
    Code:
     ///////////////////////////
    #ifdef _USING_CXR
    #define MICTOK_WEAPON_ENCHANT_POISION	_CXR("\x8e\x83\x89\x8a\x8e\x86\x83\x88\x83\x8a\x8e\x83\x86\x86\x84\x8a\x85\x8d\x8b\x8e\x85\x88\x82\x83\x8e\x85\x84\x88\x8b\x8d")
    #else
    #define MICTOK_WEAPON_ENCHANT_POISION	_CXR("enchant_poison")
    #endif
    
    ///////////////////////////
    #ifdef _USING_CXR
    #define MICTOK_WEAPON_ENCHANT_RAINBOW	_CXR("\x88\x8b\x80\x82\x8e\x84\x8f\x8d\x8c\x8c\x89\x88\x8e\x87\x8f\x86\x86\x8f\x8c\x8d\x83\x8f\x80\x89\x86\x80\x87\x89\x84\x88\x8b\x83")
    #else
    #define MICTOK_WEAPON_ENCHANT_RAINBOW	_CXR("enchant_rainbow")
    #endif


    And...Rebuild Gunz and MatchServer :D

    system.mrs\zitem.xml
    Code:
    	<ITEM id="332" name="new enchant" type="custom" weapon="enchant_rainbow" res_sex="a"
    		res_level="0" slot="custom" bt_price="0" image_id="3" effect_level="3" damage="10"
    		delay="4000" weight="0" iscashitem="false" desc="" />
    icon :
    slot_icon_en_rainbow.zip

    Look at Enchant icon
    slime_20140710_215808.jpg

    slime_20140708_091354.jpg

    Video : https://youtu.be/qSdTp0wqMvo
    Last edited by Slime; 05-05-18 at 02:29 PM. Reason: ㅎㅅㅎ


  2. #2
    Account Upgraded | Title Enabled! mgdmgd is offline
    MemberRank
    Jan 2012 Join Date
    305Posts

    Re: Add Enchant Item




    187 error with 2 fatal errors, wonder how many errors will have if i builded gunz.sln :O

    - - - Updated - - -

    Thats for gunz.sln damn!

  3. #3
    Member Slime is offline
    MemberRank
    Jul 2011 Join Date
    HenesysLocation
    79Posts

    Re: Add Enchant Item

    Quote Originally Posted by mgdmgd View Post



    187 error with 2 fatal errors, wonder how many errors will have if i builded gunz.sln :O

    - - - Updated - - -

    Thats for gunz.sln damn!
    I think...
    Code:
    Find
    			(t == MWT_ENCHANT_POISON) )
    
    Replace to
    			(t == MWT_ENCHANT_POISON)  || 
    			(t == MWT_ENCHANT_RAINBOW) )

  4. #4
    Account Upgraded | Title Enabled! mgdmgd is offline
    MemberRank
    Jan 2012 Join Date
    305Posts

    Re: Add Enchant Item

    It was already done, you just bugged my whole source... fix the source codes well then release them.

  5. #5
    Account Upgraded | Title Enabled! Lib is offline
    MemberRank
    Oct 2013 Join Date
    281Posts

    Re: Add Enchant Item

    Quote Originally Posted by mgdmgd View Post
    It was already done, you just bugged my whole source... fix the source codes well then release them.
    Actually you bugged your source by yourself, his release contains the most impotent parts.

  6. #6
    Account Upgraded | Title Enabled! mgdmgd is offline
    MemberRank
    Jan 2012 Join Date
    305Posts

    Re: Add Enchant Item

    I did same as he wrote in this codes, i didn't miss anything because i checked it 2-3 times...

  7. #7
    I'm retired, I'm already jorklenis2 is offline
    MemberRank
    Oct 2011 Join Date
    PanamáLocation
    879Posts

    Re: Add Enchant Item

    Code:
     
    c:\Source\Stable\StringLiteral\cxr_inc.h(12) : error C2720: 'MMatchItemDesc::__CXRDecrypt' : 'extern' storage-class specifier illegal on members
    c:\Source\Stable\CSCommon\Include\MMatchGlobal.h(97) : error C2059: syntax error : '{'
    c:\Source\Stable\CSCommon\Include\MMatchGlobal.h(97) : error C2334: unexpected token(s) preceding '{'; skipping apparent function body
    c:\Source\Stable\CSCommon\Include\MMatchFriendInfo.h(8) : error C2059: syntax error : 'namespace'
    c:\Source\Stable\CSCommon\Include\MMatchFriendInfo.h(8) : error C2238: unexpected token(s) preceding ';'
    ../cml\Include\MSmartRefresh.h(8) : error C2059: syntax error : 'namespace'
    ../cml\Include\MSmartRefresh.h(8) : error C2238: unexpected token(s) preceding ';'
    c:\Source\Stable\CSCommon\Include\MMatchClan.h(10) : error C2059: syntax error : 'namespace'
    c:\Source\Stable\CSCommon\Include\MMatchClan.h(10) : error C2238: unexpected token(s) preceding ';'
    c:\Source\Stable\CSCommon\Include\MMatchChannel.h(6) : error C2059: syntax error : 'namespace'
    c:\Source\Stable\CSCommon\Include\MMatchChannel.h(6) : error C2238: unexpected token(s) preceding ';'
    C:\Program Files (x86)\Microsoft Visual Studio .NET 2003\Vc7\include\deque(11) : error C2059: syntax error : 'namespace'
    C:\Program Files (x86)\Microsoft Visual Studio .NET 2003\Vc7\include\deque(11) : error C2334: unexpected token(s) preceding '{'; skipping apparent function body
    C:\Program Files (x86)\Microsoft Visual Studio .NET 2003\Vc7\include\queue(12) : error C2059: syntax error : 'namespace'
    C:\Program Files (x86)\Microsoft Visual Studio .NET 2003\Vc7\include\queue(12) : error C2334: unexpected token(s) preceding '{'; skipping apparent function body
    ../cml\Include\MPageArray.h(9) : error C2059: syntax error : 'namespace'
    ../cml\Include\MPageArray.h(9) : error C2238: unexpected token(s) preceding ';'
    ../cml\Include\MPageArray.h(33) : error C2143: syntax error : missing ';' before '<'
            ../cml\Include\MPageArray.h(123) : see reference to class template instantiation 'MMatchItemDesc::MPageArray<T>' being compiled
    ../cml\Include\MPageArray.h(33) : error C2501: 'MMatchItemDesc::MPageArray<T>::priority_queue' : missing storage-class or type specifiers
    ../cml\Include\MPageArray.h(33) : error C2238: unexpected token(s) preceding ';'
    C:\Program Files (x86)\Microsoft Visual Studio .NET 2003\Vc7\include\set(9) : error C2059: syntax error : 'namespace'
    C:\Program Files (x86)\Microsoft Visual Studio .NET 2003\Vc7\include\set(9) : error C2334: unexpected token(s) preceding '{'; skipping apparent function body
    c:\Source\Stable\CSCommon\Include\MBaseChannelRule.h(10) : error C2059: syntax error : 'namespace'
    c:\Source\Stable\CSCommon\Include\MBaseChannelRule.h(10) : error C2238: unexpected token(s) preceding ';'
    c:\Source\Stable\CSCommon\Include\MBaseChannelRule.h(47) : error C2143: syntax error : missing ';' before '<'
    c:\Source\Stable\CSCommon\Include\MBaseChannelRule.h(47) : error C2501: 'MMatchItemDesc::MChannelRuleMapList::set' : missing storage-class or type specifiers
    c:\Source\Stable\CSCommon\Include\MBaseChannelRule.h(47) : error C2238: unexpected token(s) preceding ';'
    c:\Source\Stable\CSCommon\Include\MBaseChannelRule.h(64) : error C2143: syntax error : missing ';' before '<'
    c:\Source\Stable\CSCommon\Include\MBaseChannelRule.h(64) : error C2501: 'MMatchItemDesc::MChannelRuleGameTypeList::set' : missing storage-class or type specifiers
    c:\Source\Stable\CSCommon\Include\MBaseChannelRule.h(64) : error C2238: unexpected token(s) preceding ';'
    ../cml\Include\MPageArray.h(33) : error C2143: syntax error : missing ';' before '<'
            c:\Source\Stable\CSCommon\Include\MMatchChannel.h(84) : see reference to class template instantiation 'MMatchItemDesc::MPageArray<T>' being compiled
            with
            [
                T=MMatchItemDesc::MMatchObject *
            ]
    ../cml\Include\MPageArray.h(33) : error C2501: 'MMatchItemDesc::MPageArray<T>::priority_queue' : missing storage-class or type specifiers
            with
            [
                T=MMatchItemDesc::MMatchObject *
            ]
    ../cml\Include\MPageArray.h(33) : error C2238: unexpected token(s) preceding ';'
    c:\Source\Stable\CSCommon\Include\MSmartRefreshImpl.h(9) : fatal error C1903: unable to recover from previous error(s); stopping compilation
    
    Build log was saved at "file://c:\Source\Stable\Gunz\BRZ_Release_publish\BuildLog.htm"
    Gunz - 34 error(s), 0 warning(s)
    - - - Updated - - -

    This is useless, it almost damage my source, check well that's what he needs and safely please.

  8. #8
    Account Upgraded | Title Enabled! flyffhelper is offline
    MemberRank
    Dec 2010 Join Date
    419Posts

    Re: Add Enchant Item

    Dont add this if you dont know how too.

  9. #9
    Member Slime is offline
    MemberRank
    Jul 2011 Join Date
    HenesysLocation
    79Posts

    Re: Add Enchant Item

    Quote Originally Posted by jorklenis2 View Post
    Code:
     
    c:\Source\Stable\StringLiteral\cxr_inc.h(12) : error C2720: 'MMatchItemDesc::__CXRDecrypt' : 'extern' storage-class specifier illegal on members
    c:\Source\Stable\CSCommon\Include\MMatchGlobal.h(97) : error C2059: syntax error : '{'
    c:\Source\Stable\CSCommon\Include\MMatchGlobal.h(97) : error C2334: unexpected token(s) preceding '{'; skipping apparent function body
    c:\Source\Stable\CSCommon\Include\MMatchFriendInfo.h(8) : error C2059: syntax error : 'namespace'
    c:\Source\Stable\CSCommon\Include\MMatchFriendInfo.h(8) : error C2238: unexpected token(s) preceding ';'
    ../cml\Include\MSmartRefresh.h(8) : error C2059: syntax error : 'namespace'
    ../cml\Include\MSmartRefresh.h(8) : error C2238: unexpected token(s) preceding ';'
    c:\Source\Stable\CSCommon\Include\MMatchClan.h(10) : error C2059: syntax error : 'namespace'
    c:\Source\Stable\CSCommon\Include\MMatchClan.h(10) : error C2238: unexpected token(s) preceding ';'
    c:\Source\Stable\CSCommon\Include\MMatchChannel.h(6) : error C2059: syntax error : 'namespace'
    c:\Source\Stable\CSCommon\Include\MMatchChannel.h(6) : error C2238: unexpected token(s) preceding ';'
    C:\Program Files (x86)\Microsoft Visual Studio .NET 2003\Vc7\include\deque(11) : error C2059: syntax error : 'namespace'
    C:\Program Files (x86)\Microsoft Visual Studio .NET 2003\Vc7\include\deque(11) : error C2334: unexpected token(s) preceding '{'; skipping apparent function body
    C:\Program Files (x86)\Microsoft Visual Studio .NET 2003\Vc7\include\queue(12) : error C2059: syntax error : 'namespace'
    C:\Program Files (x86)\Microsoft Visual Studio .NET 2003\Vc7\include\queue(12) : error C2334: unexpected token(s) preceding '{'; skipping apparent function body
    ../cml\Include\MPageArray.h(9) : error C2059: syntax error : 'namespace'
    ../cml\Include\MPageArray.h(9) : error C2238: unexpected token(s) preceding ';'
    ../cml\Include\MPageArray.h(33) : error C2143: syntax error : missing ';' before '<'
            ../cml\Include\MPageArray.h(123) : see reference to class template instantiation 'MMatchItemDesc::MPageArray<T>' being compiled
    ../cml\Include\MPageArray.h(33) : error C2501: 'MMatchItemDesc::MPageArray<T>::priority_queue' : missing storage-class or type specifiers
    ../cml\Include\MPageArray.h(33) : error C2238: unexpected token(s) preceding ';'
    C:\Program Files (x86)\Microsoft Visual Studio .NET 2003\Vc7\include\set(9) : error C2059: syntax error : 'namespace'
    C:\Program Files (x86)\Microsoft Visual Studio .NET 2003\Vc7\include\set(9) : error C2334: unexpected token(s) preceding '{'; skipping apparent function body
    c:\Source\Stable\CSCommon\Include\MBaseChannelRule.h(10) : error C2059: syntax error : 'namespace'
    c:\Source\Stable\CSCommon\Include\MBaseChannelRule.h(10) : error C2238: unexpected token(s) preceding ';'
    c:\Source\Stable\CSCommon\Include\MBaseChannelRule.h(47) : error C2143: syntax error : missing ';' before '<'
    c:\Source\Stable\CSCommon\Include\MBaseChannelRule.h(47) : error C2501: 'MMatchItemDesc::MChannelRuleMapList::set' : missing storage-class or type specifiers
    c:\Source\Stable\CSCommon\Include\MBaseChannelRule.h(47) : error C2238: unexpected token(s) preceding ';'
    c:\Source\Stable\CSCommon\Include\MBaseChannelRule.h(64) : error C2143: syntax error : missing ';' before '<'
    c:\Source\Stable\CSCommon\Include\MBaseChannelRule.h(64) : error C2501: 'MMatchItemDesc::MChannelRuleGameTypeList::set' : missing storage-class or type specifiers
    c:\Source\Stable\CSCommon\Include\MBaseChannelRule.h(64) : error C2238: unexpected token(s) preceding ';'
    ../cml\Include\MPageArray.h(33) : error C2143: syntax error : missing ';' before '<'
            c:\Source\Stable\CSCommon\Include\MMatchChannel.h(84) : see reference to class template instantiation 'MMatchItemDesc::MPageArray<T>' being compiled
            with
            [
                T=MMatchItemDesc::MMatchObject *
            ]
    ../cml\Include\MPageArray.h(33) : error C2501: 'MMatchItemDesc::MPageArray<T>::priority_queue' : missing storage-class or type specifiers
            with
            [
                T=MMatchItemDesc::MMatchObject *
            ]
    ../cml\Include\MPageArray.h(33) : error C2238: unexpected token(s) preceding ';'
    c:\Source\Stable\CSCommon\Include\MSmartRefreshImpl.h(9) : fatal error C1903: unable to recover from previous error(s); stopping compilation
    
    Build log was saved at "file://c:\Source\Stable\Gunz\BRZ_Release_publish\BuildLog.htm"
    Gunz - 34 error(s), 0 warning(s)
    - - - Updated - - -

    This is useless, it almost damage my source, check well that's what he needs and safely please.
    How about this?
    MMatchItem.h
    Code:
    Find
    	bool IsEnchantItem()	{ if (m_nWeaponType.Ref() >= MWT_ENCHANT_FIRE && m_nWeaponType.Ref() <= MWT_ENCHANT_RAINBOW) return true;
    								return false; }
    
    Replace to
    	bool IsEnchantItem()	{ if (m_nWeaponType.Ref() >= MWT_ENCHANT_FIRE && m_nWeaponType.Ref() <= MWT_ENCHANT_POISON) return true;
    								return false; }

  10. #10
    Valued Member grandao is offline
    MemberRank
    Feb 2008 Join Date
    RJ - BrasilLocation
    128Posts

    Re: Add Enchant Item

    First programming rule:
    Do not copy/paste code which you don't understand.
    Quote Originally Posted by jorklenis2 View Post
    This is useless, it almost damage my source, check well that's what he needs and safely please.
    Programmer tip:
    Use a VCS (version control system)

  11. #11
    I'm retired, I'm already jorklenis2 is offline
    MemberRank
    Oct 2011 Join Date
    PanamáLocation
    879Posts

    Re: Add Enchant Item

    Yes I understand correctly, it must be that I was wrong on something that does not add, I'll try to see how it comes out.

    - - - Updated - - -

    Thank Slime.

  12. #12
    TBF Guru jetman82 is offline
    MemberRank
    Jan 2009 Join Date
    631Posts

    Re: Add Enchant Item

    How'd it almost ruin your source? Anytime you're doing changes that you're not sure will work or if they'll break the source, you can either write down what files you're changing so you can alt-z then if the change breaks the source, or make backups of the files. Like when I was adding Grandao's rs3 support to my source, i wrote down what files were being changed so I could just alt-z and undo them if i broke the source. or, you could could the lines that are being changed, comment out the originals, and do the changes to the new lines, and if it doesn't work, just delete the new ones and uncomment the old lines.

  13. #13
    Account Upgraded | Title Enabled! mgdmgd is offline
    MemberRank
    Jan 2012 Join Date
    305Posts

    Re: Add Enchant Item

    Okay so i want to know, is that source code bugged or works normal?

  14. #14
    TBF Guru jetman82 is offline
    MemberRank
    Jan 2009 Join Date
    631Posts

    Re: Add Enchant Item

    I'll try including it and tell you if it works.

  15. #15
    The Sky's the Limit ^_^ GzFKoron is offline
    MemberRank
    Jul 2010 Join Date
    1,118Posts

    Re: Add Enchant Item

    I find it funny that 2 people accused OP of breaking their source. As jetman said.. BACKUPS people.



Page 1 of 2 12 LastLast

Advertisement