You would want to define the vector, m_nCost or you would just want to alternate prices using the same variable. I suggest the second. Also, you should do prices in WorldServer rather than the neuz. Sure, to display the price, you could add another string for penya cost in the neuz, in that function.
Anyway, void CDPSrvr::OnTeleportByAPP( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE, u_long ) is a place where you could do it perfectly. In fact, since you looked at the Tower for pricing (m_nCost.push_back), just look at the tower in the Worldserver. You'd want to define the money variable and then set prices to each one, and remove the gold.
CDPSrvr::OnTeleportByAPP
Code:
ar >> nCurSel;
DWORD dwWorldID;
D3DXVECTOR3 vPos;
int nCost = 0;
switch( nCurSel )
{
case 0: vPos = D3DXVECTOR3(6973.0F, 100.0F, 3328.0F); dwWorldID = 1; nCost = 1000; break;
}
if( pUser->GetGold() < nCost )
{
pUser->AddDefinedText( TID_GAME_LACKMONEY );
return;
}
if(pUser->REPLACE( g_uIdofMulti, dwWorldID, vPos, REPLACE_NORMAL, nDefaultLayer ))
{
pUser->AddGold( -nCost );
PutPenyaLog( pUser, "h", "Costed", nCost );
}