Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Flyff > Flyff Private Server
You last visited: Today at 14:32

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

Advertisement



[Help]ParsingCommand

Discussion on [Help]ParsingCommand within the Flyff Private Server forum part of the Flyff category.

Closed Thread
 
Old   #1
 
banktakung's Avatar
 
elite*gold: 0
Join Date: Dec 2008
Posts: 306
Received Thanks: 59
[Help]ParsingCommand

ParsingCommand( string.LockBuffer(), what is this parameter );


is it player id or what cause i try player id but it not work.
banktakung is offline  
Old 09/27/2016, 18:26   #2
 
elite*gold: 294
Join Date: Jun 2009
Posts: 407
Received Thanks: 587
Code:
int ParsingCommand( LPCTSTR lpszString, CMover* pMover, BOOL bItem )
it is CMover*
Avalion is offline  
Old 09/28/2016, 01:25   #3
 
banktakung's Avatar
 
elite*gold: 0
Join Date: Dec 2008
Posts: 306
Received Thanks: 59
Question

Quote:
Originally Posted by Avalion View Post
Code:
int ParsingCommand( LPCTSTR lpszString, CMover* pMover, BOOL bItem )
it is CMover*
is it just empty class or what ?
banktakung is offline  
Old 09/28/2016, 09:56   #4
 
elite*gold: 50
Join Date: Jun 2015
Posts: 100
Received Thanks: 210
No, it's an actual pointer to an instance of the CMover class.
ディオニュソス is offline  
Old 09/28/2016, 15:12   #5
 
banktakung's Avatar
 
elite*gold: 0
Join Date: Dec 2008
Posts: 306
Received Thanks: 59
Need help about CMover sir. i don't know what should i do with this CMover.
banktakung is offline  
Old 09/28/2016, 16:15   #6
 
elite*gold: 0
Join Date: Mar 2008
Posts: 333
Received Thanks: 284
What do you want to do in first place?
Nortix is offline  
Old 09/29/2016, 16:13   #7
 
banktakung's Avatar
 
elite*gold: 0
Join Date: Dec 2008
Posts: 306
Received Thanks: 59
Quote:
Originally Posted by Nortix View Post
What do you want to do in first place?

in Ondie() function i want a player auto command when monster die.




in Dpsrv.cpp it no problem to use ParsingCommand.
banktakung is offline  
Old 09/29/2016, 16:38   #8
 
elite*gold: 50
Join Date: Jun 2015
Posts: 100
Received Thanks: 210
Quote:
Originally Posted by banktakung View Post
in Ondie() function i want a player auto command when monster die.




in Dpsrv.cpp it no problem to use ParsingCommand.
I don't see a reason why one wanted to do this, but here you go.

In CAttackArbiter::OnDied(), add
Code:
if(m_pAttacker->IsPlayer() && !m_pDefender->IsPlayer())
{
    ParsingCommand("/yourRandomCommand", m_pAttacker);
}
ディオニュソス is offline  
Old 09/29/2016, 17:11   #9
 
banktakung's Avatar
 
elite*gold: 0
Join Date: Dec 2008
Posts: 306
Received Thanks: 59
Quote:
Originally Posted by ディオニュソス View Post
I don't see a reason why one wanted to do this, but here you go.

In CAttackArbiter::OnDied(), add
Code:
if(m_pAttacker->IsPlayer() && !m_pDefender->IsPlayer())
{
    ParsingCommand("/yourRandomCommand", m_pAttacker);
}
Thank you. you know how all party member use command ?

here is my code
PHP Code:
    CPartypParty g_PartyMng.GetPartym_pAttacker->GetPartyId() );
    if( 
pParty )
    {
        for( 
int i 1pParty->GetSizeofMember(); i++)
        {
            if( 
m_pDefender->GetProp()->dwID == monsterid )
            {
                
CUserpMember    g_UserMng.GetUserByPlayerIDpParty->m_aMember[i].m_uPlayerId );
                
//CUser* pParty r = g_UserMng.GetUserByPlayerID( pParty->m_aMember[i].m_uPlayerId );
                
                
ParsingCommand"/ci 21", (CMover*)pMember );
                return;
            }
        }
    } 
but the command is not run. or if i take out return. server will crash.
banktakung is offline  
Old 09/29/2016, 17:21   #10
 
elite*gold: 50
Join Date: Jun 2015
Posts: 100
Received Thanks: 210
Quote:
Originally Posted by banktakung View Post
Thank you. you know how all party member use command ?

here is my code
PHP Code:
    CPartypParty g_PartyMng.GetPartym_pAttacker->GetPartyId() );
    if( 
pParty )
    {
        for( 
int i 1pParty->GetSizeofMember(); i++)
        {
            if( 
m_pDefender->GetProp()->dwID == monsterid )
            {
                
CUserpMember    g_UserMng.GetUserByPlayerIDpParty->m_aMember[i].m_uPlayerId );
                
//CUser* pParty r = g_UserMng.GetUserByPlayerID( pParty->m_aMember[i].m_uPlayerId );
                
                
ParsingCommand"/ci 21", (CMover*)pMember );
                return;
            }
        }
    } 
but the command is not run. or if i take out return. server will crash.
1. Sanitize what you get from GetUserByPlayerID
2. Pass TRUE as the third argument if you want to skip the authorization in ParsingCommand
ディオニュソス is offline  
Thanks
1 User
Old 09/29/2016, 17:40   #11
 
banktakung's Avatar
 
elite*gold: 0
Join Date: Dec 2008
Posts: 306
Received Thanks: 59
Quote:
Originally Posted by ディオニュソス View Post
1. Sanitize what you get from GetUserByPlayerID
2. Pass TRUE as the third argument if you want to skip the authorization in ParsingCommand

do you have example for Sanitize for GetUserByPlayerID sir ??
banktakung is offline  
Old 09/29/2016, 17:46   #12
 
elite*gold: 50
Join Date: Jun 2015
Posts: 100
Received Thanks: 210
Quote:
Originally Posted by banktakung View Post
do you have example for Sanitize for GetUserByPlayerID sir ??
if(IsValidObj(pMember))

You REALLY should learn basic programming before working with any source code
ディオニュソス is offline  
Old 09/29/2016, 18:37   #13
 
banktakung's Avatar
 
elite*gold: 0
Join Date: Dec 2008
Posts: 306
Received Thanks: 59
Quote:
Originally Posted by ディオニュソス View Post
if(IsValidObj(pMember))

You REALLY should learn basic programming before working with any source code
sorry i fixed. may be command that call app_ is not work.
banktakung is offline  
Closed Thread




All times are GMT +2. The time now is 14:32.


Powered by vBulletin®
Copyright ©2000 - 2024, 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 ©2024 elitepvpers All Rights Reserved.