Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Flyff > Flyff Private Server
You last visited: Today at 22:28

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

Advertisement



calling CMover::IsUsing(CItemElem* pItemElem) and IsUsingItem(CItemBase* pItem)

Discussion on calling CMover::IsUsing(CItemElem* pItemElem) and IsUsingItem(CItemBase* pItem) 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
calling CMover::IsUsing(CItemElem* pItemElem) and IsUsingItem(CItemBase* pItem)

Hey guys, I've asked for help in some other forum cause I couldn't stop the /awake function from being used while the item is being used in trade or shops.. and some guy told me to call these two:

PHP Code:
IsUsingItem(CItemBasepItem
and

PHP Code:
CMover::IsUsing(CItemElempItemElem
and I've got no idea of how to call these two inside my /awaken command...
here is the /awaken bool:

PHP Code:




BOOL TextCmd_GenRandomOption
CScanner )
{

#ifdef __WORLDSERVER 
    
CUserpUser = (CUser*)s.dwValue;
#ifndef __TAB_INVENTORY  
    
CItemElempItemElem    pUser->m_Inventory.GetAt);
#else
    
DWORD dwObjId s.GetNumber();
    
CItemElempItemElem    pUser->m_Inventory.GetAtIddwObjId );
#endif // __TAB_INVENTORY
    
if( pItemElem ){
        
int nRandomOptionKind    g_xRandomOptionProperty->GetRandomOptionKindpItemElem );
        if( 
nRandomOptionKind >= ){
        
        
        
//    if( pUser->IsUsing( (CItemElem*)pItemElem ) )    might need pItem and not pItemElem
        //    {
    //    pUser->AddText( "Item is currently being used." );
    //        }

    
    
        
        
            
if(pUser->HasActivatedSystemPet() && pItemElem->GetProp()->dwItemKind3 == IK3_EGG || pUser->HasActivatedEatPet() && pItemElem->GetProp()->dwItemKind3 == IK3_PET  ){ // nein work
                
pUser->AddText"Item must not be used and your pet must be in your inventory." );
                return 
FALSE;
            }else{
                if( 
pUser->GetGold() >= ){
                    
g_xRandomOptionProperty->InitializeRandomOptionpItemElem->GetRandomOptItemIdPtr() );
                    
g_xRandomOptionProperty->GenRandomOptionpItemElem->GetRandomOptItemIdPtr(), nRandomOptionKindpItemElem->GetProp()->dwParts );
                    
pUser->UpdateItemEx( (BYTE)( pItemElem->m_dwObjId ), UI_RANDOMOPTITEMIDpItemElem->GetRandomOptItemId() );
                    
pUser->AddGold);
                    
//pUser->AddText( "Dir wurden 100.000 Penya für das Erwecken abgezogen." );
                
}else{
                    
pUser->AddText"You must have at least 1 Penya in order to have the abillity to awaken an 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_DELETEg_WndMng.m_pWndUpgradeBase );
        
g_WndMng.m_pWndUpgradeBase = new CWndUpgradeBase;
        
g_WndMng.m_pWndUpgradeBase->Initialize( &g_WndMngAPP_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];
            
sprintfszSkillLevel"/awaken %d"dwObjId);
            
s.SetProgszSkillLevel );        
        }
        else
        {
            return 
FALSE;
        }
    }
    else
    {
        return 
FALSE;
    }
#endif // __TAB_INVENTORY
    
return TRUE;

If anyone could help me out doing it I would appreciate that, thanks!
hackerfromhell is offline  
Reply


Similar Threads Similar Threads
CItemBase::SetTexture GetProp() NULL Return 0
05/12/2014 - Flyff Private Server - 7 Replies
Hi Epvpers I have an problem today i was recompiling my source cause i did an modification on an small part. When launching the server files everything went ok. But when launching the neuz.exe it crashes and its providing me with the following error. CItemBase::SetTexture GetProp() NULL Return 0 CItemBase::SetTexture()+0114 byte(s), official source\_common\item.cpp, line 0092+0003 byte(s)
[Src-Problem] DWORD eines CItemElem's in DB Speichern + Lesen
06/23/2012 - Flyff Private Server - 0 Replies
Hey, ich habe ein Problem dabei, ein DWORD in die DB zu schreiben und dieses wieder auszulesen. Ich will das DWORD m_dwChangedItem der Klasse CItemElem in die DB schreiben und dieses nachher wieder auslesen. Ich habe das ganze also erstmal serialisiert: void CItemElem::Serialize( CAr & ar ) ar << m_dwChangedItem; weiter unten dann ar >> m_dwChangedItem; Und dann versucht (^^), es folgendermaßen in der DB zu speichern:
CaLLing hackers
01/05/2011 - Grand Chase - 3 Replies
CaLLing anyone out there.!. who knows how board freezer works.?? sir noine can you help us? :handsdown::handsdown::handsdown:
Help with calling this function!
03/13/2010 - 12Sky2 - 6 Replies
First off: sorry for my poor english! Im trying with my dll to set off the "set stat function". The one that u press when you add a stat point to str, dex or what ever. My goal is to make players able to set there Stats to whatever they use to have from an earlier saved point. So if you play against different sort of mobs or players you reform your stats to be suetable for that sertan task in just 1 second right where you stand. Im thinking this is very useful for many ppl here. So now i...
Calling all Devs
01/21/2010 - Aion Private Server - 0 Replies
Hello everyone and DarkAion is looking for some devs if you wanna be partbof DarkAion please add me on msn [email protected] m thank you and have a nice day.



All times are GMT +1. The time now is 22:28.


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.