|
You last visited: Today at 10:18
Advertisement
[Question] Font Color/PetGlow
Discussion on [Question] Font Color/PetGlow within the Flyff Private Server forum part of the Flyff category.
10/21/2016, 04:37
|
#1
|
elite*gold: 0
Join Date: Aug 2016
Posts: 99
Received Thanks: 3
|
[Question] Font Color/PetGlow
Hi I'am here again.
Please help me I'am having a problem with my Info Drop everythings ok when it comes to source but when I try it ingame the item is not showing in the box.
so I think there is a problem with the font color. My question is how can I change the font color?
Here is the sample image
I think this is where I need to edit but I tried to change the "0xff000000" to "0xffffffff" but nothings change :3 hope you can help me
#ifdef __INFO_DROP
if( pWnd->GetWndId() == APP_INFO_DROP )
{
CWndInfoDrop *pWndInfoDrop = (CWndInfoDrop*)pWnd;
m_nFontHeight = 40;
CPoint pt( 2, 3 );
CString str;
CTexture *pIcon = NULL;
char szBuf[MAX_NAME] = {0,};
vector<t_info> tmp = pWndInfoDrop->GetInfoDrop();
CRect rectClient = GetClientRect();
int nPage = rectClient.Height() / m_nFontHeight;
for( size_t i = 0; i < tmp.size(); ++i )
{
if( tmp.size() > 1 )
{
if( ( tmp[i].dwIndex && tmp[i + 1].dwIndex ) && ( ( tmp[i].dwIndex == tmp[i + 1].dwIndex ) && ( tmp[i].dwProbability == tmp[i + 1].dwProbability ) ) )
tmp.erase( tmp.begin() + i );
else if( ( tmp[i + 1].dwIndex && tmp[i + 2].dwIndex ) && ( ( tmp[i + 1].dwIndex == tmp[i + 2].dwIndex ) && ( tmp[i + 1].dwProbability == tmp[i + 2].dwProbability ) ) )
tmp.erase( tmp.begin() + ( i + 1 ) );
}
}
if( tmp.size() == 0 )
{
p2DRender->TextOut( pt.x, pt.y, "Aucun drop", 0xff000000 );
}
for( size_t i = 0; i < tmp.size(); ++i )
{
if( i < static_cast<unsigned>( m_wndScrollBar.GetScrollPos() ) )
continue;
if( i > static_cast<unsigned>( m_wndScrollBar.GetScrollPos() + nPage ) )
break;
ItemProp* pItem = prj.GetItemProp( tmp[i].dwIndex );
if( pItem )
{
p2DRender->RenderLine( CPoint( -2, pt.y + 35 ), CPoint( rectClient.right - 8, pt.y + 35 ), 0xff000000);
if( strlen( pItem->szIcon ) )
{
pIcon = CWndBase::m_textureMng.AddTexture( p2DRender->m_pd3dDevice, MakePath( DIR_ITEM, pItem->szIcon ),0xffff00ff );
pIcon->Render( p2DRender, pt );
}
CRect rectToolTip( pt.x, pt.y, pt.x + 182, pt.y + 35 );
if( rectToolTip.PtInRect( m_ptMouse ) )
{
CPoint pt2 = m_ptMouse;
ClientToScreen( &pt2 );
ClientToScreen( &rectToolTip );
CItemElem Item;
Item.m_dwItemId = pItem->dwID;
g_WndMng.PutToolTip_Item( &Item, pt2, &rectToolTip, APP_INFO_DROP );
}
pt.x += 34;
pt.y += 10;
str.Format( "%s", pItem->szName );
memset( szBuf, 0, sizeof(CHAR)*MAX_NAME );
GetStrCut( str, szBuf, 12 );
if( 12 <= GetStrLen( str ) )
strcat( szBuf, "..." );
else
strcpy( szBuf, str );
str.Format( "%s", szBuf );
p2DRender->TextOut( pt.x, pt.y, str, 0xff000000 );
pt.x += 105;
str.Format( "%.2f%%", pWndInfoDrop->GetProbability( tmp[i].dwProbability ) > 0.01 ? pWndInfoDrop->GetProbability( tmp[i].dwProbability ) : 0.01 );
p2DRender->TextOut( pt.x, pt.y, str, 0xff000000 );
pt.x = 2;
pt.y += m_nFontHeight - 2;
}
}
m_wndScrollBar.SetScrollRange( 0, tmp.size() );
m_wndScrollBar.SetScrollPage( nPage );
}
else
{
#endif // __INFO_DROP
here's my Resdata.inc
APP_INFO_DROP "WndTile00.tga" "" 1 255 260 0x2410000 26
{
// Title String
""
}
{
// ToolTip
""
}
{
WTYPE_STATIC WIDC_STATIC1 "" 0 22 15 68 34 0x220000 0 0 0 0 46 112 169
{
// Title String
"Item"
}
{
// ToolTip
""
}
WTYPE_STATIC WIDC_STATIC2 "" 0 167 15 226 34 0x220000 0 0 0 0 46 112 169
{
// Title String
"Drop Rate"
}
{
// ToolTip
""
}
WTYPE_LISTBOX WIDC_LISTBOX1 "WndEditTile00.tga" 1 18 35 232 172 0x20020000 0 0 0 0 46 112 169
{
// Title String
""
}
{
// ToolTip
""
}
WTYPE_TEXT WIDC_TEXT1 "WndEditTile00.tga" 1 18 184 213 213 0x20000 0 0 0 0 46 112 169
{
// Title String
"F12 To Disable"
}
{
// ToolTip
""
}
}
and I think because of my __INFO_DROP I got a problem with the Boxes everytime i open box I only Get the Head part after I relog the other parts will come out.
About the Pet_Glow I successfully compile the source with no errors but everytime I summon a "Buff-pet" it makes me very very very "LAG" and I cant put the CS Pet inside the box. I dont have any idea how to fix this please help me.
Sample picture
|
|
|
10/22/2016, 23:29
|
#2
|
elite*gold: 0
Join Date: Aug 2016
Posts: 99
Received Thanks: 3
|
bump
|
|
|
10/26/2016, 10:44
|
#3
|
elite*gold: 0
Join Date: Jan 2012
Posts: 147
Received Thanks: 24
|
For the Info Drop system: Have you tried to select a monster with many drops like for example Kheldor or Vempain? Scrollbars should appear if items are really listed. If not you know that the font color is not the problems, instead no items are listed.
|
|
|
10/26/2016, 12:10
|
#4
|
elite*gold: 0
Join Date: Aug 2016
Posts: 99
Received Thanks: 3
|
Quote:
Originally Posted by Offspringfan1234
For the Info Drop system: Have you tried to select a monster with many drops like for example Kheldor or Vempain? Scrollbars should appear if items are really listed. If not you know that the font color is not the problems, instead no items are listed.
|
owww Yeah right I'am wrong lol you are right there is no item listed in the box. can you help me with his? thank you!!
|
|
|
10/26/2016, 14:34
|
#5
|
elite*gold: 0
Join Date: Jan 2012
Posts: 147
Received Thanks: 24
|
Hm, did you code it yourself or do you have a link for me as reference? If you did it yourself you could post some of the code or write it to me via pm. Then I'll try to check it in the next days.
If its from a release then just post the link and your sourcecode
|
|
|
10/26/2016, 22:42
|
#6
|
elite*gold: 0
Join Date: Aug 2016
Posts: 99
Received Thanks: 3
|
Quote:
Originally Posted by Offspringfan1234
Hm, did you code it yourself or do you have a link for me as reference? If you did it yourself you could post some of the code or write it to me via pm. Then I'll try to check it in the next days.
If its from a release then just post the link and your sourcecode 
|
I just copy and paste I think the code is from the Origin flyff define as _INFO_DROP Credits to Saley for the release & Snowers #FR Dev
Download Link
I think there is a different code here in the DPSrvr.cpp
*JUST FOR COMPARING*
Here's my Lottery code
#ifdef __SYS_LOTTERY
void CDPSrvr::OnRouletteStart(CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE, u_long)
{
CUser *pUser = g_UserMng.GetUser(dpidCache,dpidUser);
if( IsInvalidObj(pUser) )
return;
if( !pUser->CanUseRoulette() )
return;
pUser->AddRouletteStart();
}
void CDPSrvr::OnRouletteInit(CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE, u_long)
{
CUser *pUser = g_UserMng.GetUser(dpidCache,dpidUser);
if( IsInvalidObj(pUser) )
return;
if( !pUser->CanUseRoulette() )
{
CTimeSpan tsNext = pUser->GetNextRouletteUseTime() - CTime::GetCurrentTime();
CString strError;
strError.Format("You can use the roulette again in %s", tsNext.Format("%D days, %H hours and %M Minutes"));
pUser->AddText(strError);
return;
}
pUser->AddRouletteInit();
}
void CDPSrvr::OnRouletteEnd(CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE, u_long)
{
CUser *pUser = g_UserMng.GetUser(dpidCache,dpidUser);
if( IsInvalidObj(pUser) )
return;
if( !pUser->CanUseRoulette() )
return;
DWORD dwItemId = pUser->GetRouletteWin();
if( !prj.GetItemProp(dwItemId) )
return;
CItemElem itemElem;
itemElem.m_dwItemId = dwItemId;
itemElem.m_nItemNum = 1;
itemElem.SetFlag(2);
itemElem.SetSerialNumber();
if( pUser->m_Inventory.IsFull(&itemElem,prj.GetItemProp(dwIt emId),1) )
{
pUser->AddDefinedText(TID_GAME_LACKSPACE);
pUser->SetRouletteWin(NULL_ID);
return;
}
pUser->CreateItem(&itemElem);
pUser->EndRoulette();
}
void CDPSrvr::OnScratchCardInit(CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE, u_long)
{
CUser *pUser = g_UserMng.GetUser(dpidCache,dpidUser);
if( IsInvalidObj(pUser) )
return;
OBJID objidScratchCard;
CItemElem *pScratchElem = NULL;
ar >> objidScratchCard;
pScratchElem = pUser->m_Inventory.GetAtId(objidScratchCard);
if( !pScratchElem )
return;
if( pScratchElem->GetProp()->dwItemKind3 != IK3_SCRATCH )
return;
pUser->InitScratchCard(pScratchElem->m_dwItemId);
pUser->RemoveItem((BYTE)objidScratchCard,1);
}
void CDPSrvr::OnScratchCardGet(CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE, u_long)
{
CUser *pUser = g_UserMng.GetUser(dpidCache,dpidUser);
if( IsInvalidObj(pUser) )
return;
DWORD dwItemId;
DWORD dwCount;
int nIndex;
ar >> nIndex;
if( pUser->GetScratchCardWin(&dwItemId,&dwCount,nIndex) )
{
CItemElem itemElem;
itemElem.m_dwItemId = dwItemId;
itemElem.m_nItemNum = dwCount;
itemElem.SetFlag(2);
itemElem.SetSerialNumber();
if( pUser->m_Inventory.IsFull(&itemElem,itemElem.GetProp(),( short)dwCount) )
{
g_dpDBClient.SendQueryPostMail(pUser->m_idPlayer,0,itemElem,0,"Lottery","Your scratch card win!");
}else
{
pUser->CreateItem(&itemElem);
}
pUser->SetScratchCardWin(NULL_ID,NULL_ID,nIndex);
}
}
#endif
Origin Source Code for Lottery
#ifdef __SYS_LOTTERY
void CDPSrvr::OnRouletteStart(CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE, u_long)
{
CUser *pUser = g_UserMng.GetUser(dpidCache,dpidUser);
if( IsInvalidObj(pUser) )
return;
if( !pUser->CanUseRoulette() )
return;
pUser->AddRouletteStart();
}
void CDPSrvr::OnRouletteInit(CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE, u_long)
{
CUser *pUser = g_UserMng.GetUser(dpidCache,dpidUser);
if( IsInvalidObj(pUser) )
return;
if( !pUser->CanUseRoulette() )
{
CTimeSpan tsNext = pUser->GetNextRouletteUseTime() - CTime::GetCurrentTime();
CString strError;
strError.Format("Vous pouvez ?nouveau tourner la roue dans %s", tsNext.Format("%D jours, %H heures et %M Minutes"));
pUser->AddText(strError);
return;
}
pUser->AddRouletteInit();
}
void CDPSrvr::OnRouletteEnd(CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE, u_long)
{
try{
CUser *pUser = g_UserMng.GetUser(dpidCache,dpidUser);
if( IsInvalidObj(pUser) )
return;
if( !pUser->CanUseRoulette() )
return;
DWORD dwItemId = pUser->GetRouletteWin();
if( !prj.GetItemProp(dwItemId) )
return;
CItemElem itemElem;
itemElem.m_dwItemId = dwItemId;
itemElem.m_nItemNum = 1;
itemElem.SetFlag(2);
itemElem.SetSerialNumber();
if( pUser->m_Inventory.IsFull(&itemElem,prj.GetItemProp(dwIt emId),1) )
{
pUser->AddDefinedText(TID_GAME_LACKSPACE);
pUser->SetRouletteWin(NULL_ID);
return;
}
pUser->CreateItem(&itemElem);
pUser->EndRoulette();
}
catch(...)
{
Error("Une erreur s'est produite avec la fonction OnRouletteEnd");
}
}
void CDPSrvr::OnScratchCardInit(CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE, u_long)
{
try{
CUser *pUser = g_UserMng.GetUser(dpidCache,dpidUser);
if( IsInvalidObj(pUser) )
return;
OBJID objidScratchCard;
CItemElem *pScratchElem = NULL;
ar >> objidScratchCard;
pScratchElem = pUser->m_Inventory.GetAtId(objidScratchCard);
if( !pScratchElem )
return;
if( pScratchElem->GetProp()->dwItemKind3 != IK3_SCRATCH )
return;
pUser->InitScratchCard(pScratchElem->m_dwItemId);
pUser->RemoveItem((BYTE)objidScratchCard,1);
}
catch(...)
{
Error("Une erreur s'est produite avec la fonction OnScratchCardInit");
}
}
void CDPSrvr::OnScratchCardGet(CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE, u_long)
{
try{
CUser *pUser = g_UserMng.GetUser(dpidCache,dpidUser);
if( IsInvalidObj(pUser) )
return;
DWORD dwItemId;
DWORD dwCount;
int nIndex;
ar >> nIndex;
if( pUser->GetScratchCardWin(&dwItemId,&dwCount,nIndex) )
{
CItemElem itemElem;
itemElem.m_dwItemId = dwItemId;
itemElem.m_nItemNum = dwCount;
itemElem.SetFlag(2);
itemElem.SetSerialNumber();
if( pUser->m_Inventory.IsFull(&itemElem,itemElem.GetProp(),( short)dwCount) )
{
g_dpDBClient.SendQueryPostMail(pUser->m_idPlayer,0,itemElem,0,"Lotterie","Vos gains !");
}else
{
pUser->CreateItem(&itemElem);
}
pUser->SetScratchCardWin(NULL_ID,NULL_ID,nIndex);
}
}
catch(...)
{
Error("Une erreur s'est produite avec la fonction OnScratchCardGet");
}
}
#endif
_INFO_DROP
#ifdef __INFO_DROP
void CDPSrvr::OnInfoDrop( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
{
try{
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );
if( IsValidObj( pUser ) )
{
DWORD dwID;
ar >> dwID;
if( dwID == NULL_ID)
return;
MoverProp* pMover = prj.GetMoverProp( dwID );
if( !pMover)
return;
vector<t_info> info;
size_t nSize = 0;
for( vector<t_info>::const_iterator it = CInfoDrop::GetInstance()->GetInfoDrop().begin(); it != CInfoDrop::GetInstance()->GetInfoDrop().end(); ++it )
{
if( dwID == it->dwID )
{
t_info tmp;
memset( &tmp, 0, sizeof( tmp ) );
tmp.dwID = it->dwID;
tmp.dwIndex = it->dwIndex;
tmp.dwProbability = it->dwProbability;
info.push_back( tmp );
nSize++;
}
}
if( info.size() > 0 && info.size() < 80 )
pUser->AddInfoDrop( info, nSize );
info.clear();
}
}
catch(...)
{
Error("Une erreur s'est produite avec la fonction OnInfoDrop");
}
}
#endif //__INFO_DROP
I there something to change? or let say compatible? sorry I've got not Idea about this thing
|
|
|
10/27/2016, 13:23
|
#7
|
elite*gold: 0
Join Date: Jan 2012
Posts: 147
Received Thanks: 24
|
Quote:
if( info.size() > 0 && info.size() < 80 )
pUser->AddInfoDrop( info, nSize );
info.clear();
|
how do you add the items to the InfoDialog? So especially show the function puser->AddInfoDrop(info, nSize); I think the error is maybe there the rest seems logic to me if I didnt skipped any part of code to fast
|
|
|
10/27/2016, 13:31
|
#8
|
elite*gold: 0
Join Date: Aug 2016
Posts: 99
Received Thanks: 3
|
Quote:
Originally Posted by Offspringfan1234
how do you add the items to the InfoDialog? So especially show the function puser->AddInfoDrop(info, nSize); I think the error is maybe there the rest seems logic to me if I didnt skipped any part of code to fast 
|
I really dont have an idea about this im sorry :3 can I ask what do you mean? Im really sorry
|
|
|
10/27/2016, 13:33
|
#9
|
elite*gold: 0
Join Date: Jan 2012
Posts: 147
Received Thanks: 24
|
Check the class pUser and search the function AddInfoDrop ( size_t nSize, vector<t_info> info )
then show what it does
|
|
|
Similar Threads
|
[Help] How to Fix v19 Font Color ?
09/21/2013 - Flyff Private Server - 2 Replies
Hellow I need help !
How to Fix here ?
V19 Font Color :(
Help me please Tnx !
Screenshot by Lightshot
|
Help Font Color ??
04/26/2013 - Flyff Private Server - 0 Replies
how can i make the font color white ??
ImageShack® - Online Photo and Video Hosting
please help me !!
this is my las question promise hehehe
:handsdown: :handsdown: :handsdown:
|
[FONT="Arial Black"][B][COLOR="Black"]Undected LnL_Legendhax[/COLOR][/B][/FONT]
01/07/2013 - Soldier Front Hacks, Bots, Cheats & Exploits - 2 Replies
Follow this Step !!
1. Download the "dll"
2. Open your Injector.
3. Browse the LnL_LegendHax
4.Launch your Special Force.
5. Log in Your Account !!
6. DLLs will auto Inject .
7.cLick ok when the pop up Appears.
Enjoy Walling !!
|
All times are GMT +1. The time now is 10:18.
|
|