Some Source Edits

Results 1 to 3 of 3
  1. #1
    Account Upgraded | Title Enabled! Tweek is online now
    MemberRank
    Dec 2009 Join Date
    AustriaLocation
    207Posts

    information Some Source Edits

    Improvement of the KeepConnect events
    items do not come any more only by post, but are laid(put) in the inventory provided that this Item in the inventory burst finds, if not, it comes by post

    EventLua.cpp: Searches & substituted(replaced)
    Code:
    g_dpDBClient.SendQueryPostMail( idPlayer, 0, itemElem, 0, "", "" );
    This line(row) substituted(replaced) with:
    Code:
             CUser* pUserLap    = (CUser*)prj.GetUserByID( idPlayer );
                if(pUserLap->CreateItem( &itemElem )){
                }else{
                g_dpDBClient.SendQueryPostMail( idPlayer, 0, itemElem, 0, "", "" );
                }
    PVP EVENT EXP !
    In this system being able you begin the event by GM Command.
    It is announced(prefigured) in the Systemshout and from then one agrees for killing of players EXP. Also those who are killed got a little EXP in addition.
    How many Exp and the Exp formula can and should be still adapted(adjusted).
    Of course one can insert there still dropps/rewards, with interest, I can still explain(declare) this.

    Worldmng.h
    over
    Code:
    void        Free();
    CWorld*        GetWorld( DWORD dwWorldID );
    if her(their) following(resulting) inserts:
    Code:
    #ifdef __PVPEXP
    BOOL        PvPEventExp;
    #endif
    ----------------------------------------------------
    mover.cpp: under
    Code:
    #ifdef __EVENTLUA_SPAWN
        if( IsNPC() )
            prj.m_EventLua.RemoveSpawnedMonster( GetId() );
    #endif // __EVENTLUA_SPAWN


    inserts
    Code:
    #ifdef __PVPEXP
    
        if( g_WorldMng.PvPEventExp){
            if( IsPlayer() && pAttacker->IsPlayer()){
    
                CUser * pAttackUser = (CUser*)pAttacker;
                CUser * pDefendUser = (CUser*)this;
                int pXPfactor = 100; //ggf für exp scrolls und so
                EXPINTEGER maxExpATK = prj.m_aExpCharacter[pAttackUser->m_nLevel].nLimitExp;
                EXPINTEGER maxExpDEF = prj.m_aExpCharacter[pDefendUser->m_nLevel].nLimitExp;
    
    
    
    
    
    
                if( pAttackUser->AddExperience( (pXPfactor *  (maxExpATK / pAttackUser->m_nLevel ) * pDefendUser->m_nLevel) / 100 , TRUE, TRUE, TRUE ) ){ //exp formel bei kill
                        pAttackUser->LevelUpSetting();
                    }else{
                        pAttackUser->ExpUpSetting();}
                pAttackUser->AddSetExperience( pAttackUser->GetExp1(), (WORD)pAttackUser->m_nLevel, pAttackUser->m_nSkillPoint, pAttackUser->m_nSkillLevel );
    
                if( pDefendUser->AddExperience( ((pXPfactor/4) *  (maxExpDEF / pDefendUser->m_nLevel )) / 100  , TRUE, TRUE, TRUE ) ){ //exp formel beim sterben
                        pDefendUser->LevelUpSetting();
                    }else{
                        pDefendUser->ExpUpSetting();}
                pDefendUser->AddSetExperience( pDefendUser->GetExp1(), (WORD)pDefendUser->m_nLevel, pDefendUser->m_nSkillPoint, pDefendUser->m_nSkillLevel );
    
    
            }
        }
    #endif __PVPEXP

    -----------------------------------------------

    FuncTextCmd.cpp: over
    Code:
    ON_TEXTCMDFUNC( TextCmd_say,                   "say",               "say",            "¸»",             "¸»",      TCM_SERVER, AUTH_GENERAL      , "¼Ó»èÀÓ [/¸í·É ¾ÆÀ̵𠳻¿ë]" )


    insert
    Code:
    #ifdef __PVPEXP
    ON_TEXTCMDFUNC( TextCmd_PvPEXP,                "PvPEXP",             "PvPEXP",         "PvPEXP",             "PvPEXP",        TCM_SERVER, AUTH_ADMINISTRATOR, "" )
    #endif __PVPEXP
    over :
    Code:
    BOOL TextCmd_LocalEvent( CScanner & s )
    insert
    Code:
    #ifdef __PVPEXP
    BOOL TextCmd_PvPEXP( CScanner & s)
    {
    #ifdef __WORLDSERVER
        CUser* pUser = (CUser*)s.dwValue;
    
        if (g_WorldMng.PvPEventExp == FALSE){
            g_WorldMng.PvPEventExp = TRUE;
            g_DPCoreClient.SendSystem( "Pvp Arena EXP Event Started!" );
        }else{
            g_WorldMng.PvPEventExp = FALSE;
            g_DPCoreClient.SendSystem( "Pvp Arena EXP Event Stopped!" );
        }
    #endif // __WORLDSERVER
        return TRUE;
    }
    
    #endif __PVPEXP
    Then you have to go in the VersionCommon.h (neuz and World)
    still add this:
    Code:
    #define __PVPEXP
    Ingame you begin / stops as an administrator the event while to her \"/PvPEXP \" in the chat give.


  2. #2
    Account Upgraded | Title Enabled! Ratpack is offline
    MemberRank
    May 2011 Join Date
    311Posts

    Re: Some Source Edits

    good job...hope to see more...

  3. #3
    Account Upgraded | Title Enabled! Tweek is online now
    MemberRank
    Dec 2009 Join Date
    AustriaLocation
    207Posts

    Re: Some Source Edits

    Thanks



Advertisement