Question about Setvendortype NPC's

08/28/2015 16:15 laitila#1
Hello EPVP

So i have a question about the Setvendortype in npc's, for instance setvendortype is penya and setvendortype1 is often red chips guys likes waforu have that. How can i set so a npc sell items for a new currency i made? called colosseum chips what vendortype do i put and where can i edit thoose kind of things?
08/28/2015 17:01 Marc~#2
WndManager.cpp

Search for
Code:
void CWndMgr::PutItemGold( CMover* pMover, CItemElem* pItemElem, CEditString* pEdit, int flag )
Code:
#if __VER >= 11 // __CSC_VER11_3
			if(lpCharacter && lpCharacter->m_nVenderType == 1)
			{
				CString temp;
				temp.Format(" %s", prj.GetText(TID_GAME_REDCHIP));
				strTemp += temp;
			}
#endif //__CSC_VER11_3

and WndItemCtrl.cpp

Search for:
Code:
void CWndItemCtrl::RanderIcon( C2DRender* p2DRender, CItemElem* pItemElem, int x, int y, int nParent, int nalpha )
Code:
#if __VER >= 11 // __CSC_VER11_3
		if( nParent == APP_SHOP_ )
		{
			CWndShop* pWndBase = (CWndShop*)g_WndMng.GetWndBase( APP_SHOP_ );
			LPCHARACTER lpCharacter = pWndBase->m_pMover->GetCharacter();
			if(lpCharacter && lpCharacter->m_nVenderType == 1)
			{
				if( bRander == 0 && g_pPlayer->m_Inventory.GetAtItemNum( II_CHP_RED ) < (int)pItemElem->GetChipCost() )
					bRander = 1;
			}
		}
		else
		{
			if( bRander == 0 && g_pPlayer->GetGold() < (int)pItemProp->dwCost )
				bRander = 1;
		}
#else //__CSC_VER11_3
		if( bRander == 0 && g_pPlayer->GetGold() < (int)pItemProp->dwCost )
			bRander = 1;
#endif //__CSC_VER11_3
I guess you've to add:
Code:
if(lpCharacter && lpCharacter->m_nVenderType == 2)
			{
				if( bRander == 0 && g_pPlayer->m_Inventory.GetAtItemNum( II_CHP_COLOSSEUM ) < (int)pItemElem->GetChipCost() )
					bRander = 1;
			}
And you've to add a new currency at propitem/specitem.txt
Code:
(int)pItemElem->GetChipCost() )
08/28/2015 18:32 alfredico#3
I sell a good system for do all this in resource and not in source. PM me if interested.
09/22/2015 02:48 sonbaotvk#4
And you've to add a new currency at propitem/specitem.txt
Code:
(int)pItemElem->GetChipCost() )

how to add new column ?
09/27/2015 08:54 Burdenz2007#5
Its easy to add new currency without the source. Please roam around your resource folder. :)
There's no need to buy those systems. Already discovered the trick behind it. :P