Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Flyff > Flyff Private Server
You last visited: Today at 09:49

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



awakening command

Discussion on awakening command within the Flyff Private Server forum part of the Flyff category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jun 2008
Posts: 33
Received Thanks: 2
awakening command

Hello there, I have that /awaken command code and found out that you can use it when you trade/make a shop/mail too, I believe this can cause bugs and scams.. I've tried to fix the code up but as I'm not experienced enough I didn't succeed.. does anyone knows why? this is the code:

Quote:
BOOL TextCmd_GenRandomOption( CScanner & s )
{
#ifdef __WORLDSERVER
CUser* pUser = (CUser*)s.dwValue;
#ifndef __TAB_INVENTORY
CItemElem* pItemElem = pUser->m_Inventory.GetAt( 0 );
#else
DWORD dwObjId = s.GetNumber();
CItemElem* pItemElem = pUser->m_Inventory.GetAtId( dwObjId );
#endif // __TAB_INVENTORY
if( pItemElem ){
int nRandomOptionKind = g_xRandomOptionProperty->GetRandomOptionKind( pItemElem );
if( nRandomOptionKind >= 0 ){


if(pUser->HasActivatedSystemPet() && pItemElem->GetProp()->dwItemKind3 == IK3_EGG || pUser->HasActivatedEatPet() && pItemElem->GetProp()->dwItemKind3 == IK3_PET )
{
pUser->AddText( "Deactivate your pet" );
}


else
{
if (g_WndMng.IsOpenWnd(APP_TRADE) || g_WndMng.IsOpenWnd( APP_SHOP_ ) || g_WndMng.IsOpenWnd(APP_POST) )
{
pUser->AddText( "Close Shop or Trade to use command." );
}
}




else
{
if( pUser->GetGold() >= 1 )
{
g_xRandomOptionProperty->InitializeRandomOption( pItemElem->GetRandomOptItemIdPtr() );
g_xRandomOptionProperty->GenRandomOption( pItemElem->GetRandomOptItemIdPtr(), nRandomOptionKind, pItemElem->GetProp()->dwParts );
pUser->UpdateItemEx( (BYTE)( pItemElem->m_dwObjId ), UI_RANDOMOPTITEMID, pItemElem->GetRandomOptItemId() );
pUser->AddGold( 0 );
//pUser->AddText( "Dir wurden 100.000 Penya für das Erwecken abgezogen." );
}
else
{
pUser->AddText( "You need to have at least 1 Penya in order to awaken this item." );
}
}
}else{
pUser->AddText ( "Either your pet is not level C or your item doesn't suit the requirments of the scroll." );
}
}
#endif // __WORLDSERVER

#if defined(__CLIENT) && defined ( __TAB_INVENTORY)
if( g_WndMng.m_pWndUpgradeBase == NULL )
{
SAFE_DELETE( g_WndMng.m_pWndUpgradeBase );
g_WndMng.m_pWndUpgradeBase = new CWndUpgradeBase;
g_WndMng.m_pWndUpgradeBase->Initialize( &g_WndMng, APP_TEST );
return FALSE;
}

if( g_WndMng.m_pWndUpgradeBase )
{
if( g_WndMng.m_pWndUpgradeBase->m_pItemElem[0] )
{
DWORD dwObjId = g_WndMng.m_pWndUpgradeBase->m_pItemElem[0]->m_dwObjId;
char szSkillLevel[MAX_PATH];
sprintf( szSkillLevel, "/awaken %d", dwObjId);
s.SetProg( szSkillLevel );
}
else
{
return FALSE;
}
}
else
{
return FALSE;
}
#endif // __TAB_INVENTORY
return TRUE;
}



or


Quote:
OOL TextCmd_GenRandomOption( CScanner & s )
{
#ifdef __WORLDSERVER
CUser* pUser = (CUser*)s.dwValue;
#ifndef __TAB_INVENTORY
CItemElem* pItemElem = pUser->m_Inventory.GetAt( 0 );
#else
DWORD dwObjId = s.GetNumber();
CItemElem* pItemElem = pUser->m_Inventory.GetAtId( dwObjId );
#endif // __TAB_INVENTORY
if( pItemElem ){
int nRandomOptionKind = g_xRandomOptionProperty->GetRandomOptionKind( pItemElem );
if( nRandomOptionKind >= 0 ){



CWndShop* pWndShop = (CWndShop*)g_WndMng.GetWndBase( APP_SHOP_ );
if( pWndShop )
pWndShop->Destroy();

CWndTrade* pWndTrade = (CWndTrade*)g_WndMng.GetWndBase( APP_TRADE );
if( pWndTrade )
pWndTrade->Destroy();

CWndConfirmTrade* pWndConfirmTrade = (CWndConfirmTrade*)g_WndMng.GetApplet( APP_CONFIRM_TRADE );
if( pWndConfirmTrade )
pWndConfirmTrade->Destroy();

CWndTradeConfirm* pWndTradeConfirm = (CWndTradeConfirm*)g_WndMng.GetWndBase( APP_TRADE_CONFIRM );
if( pWndTradeConfirm )
pWndTradeConfirm->Destroy();

SAFE_DELETE( g_WndMng.m_pWndTradeGold );

g_pPlayer->OnTradeRemoveUser();
g_pPlayer->m_vtInfo.SetOther( NULL );







if(pUser->HasActivatedSystemPet() && pItemElem->GetProp()->dwItemKind3 == IK3_EGG || pUser->HasActivatedEatPet() && pItemElem->GetProp()->dwItemKind3 == IK3_PET )
{
pUser->AddText( "Deactivate your pet." );
}

else
{
if( pUser->GetGold() >= 1 )
{
g_xRandomOptionProperty->InitializeRandomOption( pItemElem->GetRandomOptItemIdPtr() );
g_xRandomOptionProperty->GenRandomOption( pItemElem->GetRandomOptItemIdPtr(), nRandomOptionKind, pItemElem->GetProp()->dwParts );
pUser->UpdateItemEx( (BYTE)( pItemElem->m_dwObjId ), UI_RANDOMOPTITEMID, pItemElem->GetRandomOptItemId() );
pUser->AddGold( 0 );
//pUser->AddText( "Dir wurden 100.000 Penya für das Erwecken abgezogen." );
}
else
{
pUser->AddText( "You need to have at least 1 Penya in order to awaken this item." );
}
}
}else{
pUser->AddText ( "Either your pet is not level C or your item doesn't suit the requirments of the scroll." );
}
}
#endif // __WORLDSERVER

#if defined(__CLIENT) && defined ( __TAB_INVENTORY)
if( g_WndMng.m_pWndUpgradeBase == NULL )
{
SAFE_DELETE( g_WndMng.m_pWndUpgradeBase );
g_WndMng.m_pWndUpgradeBase = new CWndUpgradeBase;
g_WndMng.m_pWndUpgradeBase->Initialize( &g_WndMng, APP_TEST );
return FALSE;
}

if( g_WndMng.m_pWndUpgradeBase )
{
if( g_WndMng.m_pWndUpgradeBase->m_pItemElem[0] )
{
DWORD dwObjId = g_WndMng.m_pWndUpgradeBase->m_pItemElem[0]->m_dwObjId;
char szSkillLevel[MAX_PATH];
sprintf( szSkillLevel, "/awaken %d", dwObjId);
s.SetProg( szSkillLevel );
}
else
{
return FALSE;
}
}
else
{
return FALSE;
}
#endif // __TAB_INVENTORY
return TRUE;
}




I will very appreciate any kind of reply to this thread, thanks a lot!
hackerfromhell is offline  
Old 05/19/2013, 18:59   #2
 
elite*gold: 0
Join Date: Jun 2008
Posts: 33
Received Thanks: 2
BUMP
hackerfromhell is offline  
Reply


Similar Threads Similar Threads
Command line interface working command
08/05/2012 - DarkOrbit - 27 Replies
I found only one working command: Enter "J" when you are in teleport Anyone know other commands?
Awakening Bot!?
05/22/2012 - Flyff Private Server - 27 Replies
Hey liebe E*PvPers ich wollte mal nachfragen, ob es inzwichen wieder ein Awakening Bot gibt?^^ Wenn ja, kann jemand den Namen bzw. link Posten??? Hab jetzt schon google benutzt... aber leider nix gefunden, was noch funktioniert, bzw zu langsam ist...^^ Falls es etwas gibt, lasst es mich bitte wissen, am besten per PN oder Answer hier im Forum ;)



All times are GMT +1. The time now is 09:49.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.