[Release] zTeam Season 8 Episode 2 (Source)

  1. #2311
    Apprentice Tuan Truong is offline
    MemberRank
    Jul 2015 Join Date
    6Posts

    re: [Release] zTeam Season 8 Episode 2 (Source)

    I have two issues that need your help:
    1.
    I wan config max level = 400
    2. in zGameServer\ExData\EventItemBag\BloodCastle
    <?xml version="1.0" ?>
    <itembag>
    <settings>
    <name>BloodCastle1</name>
    <zen min="50000" max="50000" />
    <excoption op1="0" op2="0" op4="0" op8="0" op16="0" op32="0" />
    </settings>
    <itemlist rate="10000">
    <item id="14" num="13" lvlmin="0" lvlmax="0" skill="0" luck="0" option="0" excmin="0" excmax="0" is_anc="0" sockmin="0" sockmax="0" /> <!--Jewel of Bless -->
    <item id="14" num="14" lvlmin="0" lvlmax="0" skill="0" luck="0" option="0" excmin="0" excmax="0" is_anc="0" sockmin="0" sockmax="0" /> <!--Jewel of Soul -->
    <item id="14" num="16" lvlmin="0" lvlmax="0" skill="0" luck="0" option="0" excmin="0" excmax="0" is_anc="0" sockmin="0" sockmax="0" /> <!--Jewel of Life -->
    </itemlist>
    </itembag>

    *** I want to increase the reward to the 2 or 3 .. jewel ***
    And
    DevilSquare

  2. #2312
    MuOnline xtreme17 is offline
    MemberRank
    Feb 2011 Join Date
    RomaniaLocation
    326Posts

    re: [Release] zTeam Season 8 Episode 2 (Source)

    - Original arca tables
    - Original party and guild matching
    - GS normal + GS arca battle ( i think need cracked i don't test )
    - MuunInfo and MuunOption
    - ArcaBattleData and AcheronEventData
    - QuestProgress.txt and QuestWords.txt

    EX802 - Arca Battle

  3. #2313
    -( . ) ( . )- clerigz is offline
    MemberRank
    Mar 2012 Join Date
    1,365Posts

    re: [Release] zTeam Season 8 Episode 2 (Source)

    @michi28 bro can you share to me the source of this?

    is this correct bro?


    Code:
    #include "StdAfx.h"
    #include "ShopPointEx.h"
    #include "user.h"
    #include "GameMain.h"
    #include "logproc.h"
    #include "..\include\readscript.h"
    #include "..\common\winutil.h"
    #include "CashShop.h"
    // -------------------------------------------------------------------------------
    
    ShopPointEx g_ShopPointEx;
    // -------------------------------------------------------------------------------
    
    ShopPointEx::ShopPointEx()
    {
    	this->Init();
    }
    // -------------------------------------------------------------------------------
    
    ShopPointEx::~ShopPointEx()
    {
    	// ----
    }
    // -------------------------------------------------------------------------------
    
    void ShopPointEx::Init()
    {
    	this->m_IsLoaded			= false;
    	this->m_TimeBonusOn			= false;
    	this->m_TimeBonusAdd		= 0;
    	this->m_TimeBonusInterval	= 0;
    	this->m_MonsterLoaded		= 0;
    	// ----
    	for( int i = 0; i < MAX_SHOPPOINTEX_EVENT; i++ )
    	{
    		this->m_EventBonus[i].AddCoinC	= 0;
    		this->m_EventBonus[i].AddCoinP	= 0;
    		this->m_EventBonus[i].AddCoinG	= 0;
    	}
    	// ----
    	for(int i = 0; i < MAX_SHOPPOINTEX_MONSTER; i++ )
    	{
    		this->m_MonsterBonus[i].MonsterID	= -1;
    		this->m_MonsterBonus[i].MapNumber	= -1;
    		this->m_MonsterBonus[i].AddCoinC	= 0;
    		this->m_MonsterBonus[i].AddCoinP	= 0;
    		this->m_MonsterBonus[i].AddCoinG	= 0;
    	}
    	m_TimeBonus.clear();
    }
    // -------------------------------------------------------------------------------
    
    void ShopPointEx::Load()
    {
    	this->Init();
    	this->ReadData(gDirPath.GetNewPath("Custom\\ShopPointEx.txt"));
    }
    // -------------------------------------------------------------------------------
    
    void ShopPointEx::ReadData(char * File)
    {
    	int Category;
    	SMDToken Token;
    	SMDFile = fopen(File, "r");
    	// ----
    	if( !SMDFile )
    	{
    		MsgBox("[ShopPointEx] %s file not found", File);
    		return;
    	}
    	// ----
    	while(true)
    	{
    		Token = GetToken();
    		// ----
    		if( Token == END )
    		{
    			break;
    		}
    		// ----
    		Category = TokenNumber;
    		// ----
    		while(true)
    		{
    			if( Category == 0 )			//-> Time Bonus
    			{
    				Token = GetToken();
    				// ----
    				if( strcmp("end", TokenString) == 0 )
    				{
    					break;
    				}
    				// ----
    #pragma warning (disable : 4800)
    				this->m_TimeBonusOn = TokenNumber;
    				// ----
    				Token = GetToken();
    				this->m_TimeBonusAdd = TokenNumber;
    				// ----
    				Token = GetToken();
    				this->m_TimeBonusInterval = TokenNumber;
    
    			}
    			else if( Category == 1 )	//-> Event Bonus
    			{
    				Token = GetToken();
    				// ----
    				if( strcmp("end", TokenString) == 0 )
    				{
    					break;
    				}
    				// ----
    				int Slot = TokenNumber;
    				// ----
    				Token = GetToken();
    				this->m_EventBonus[Slot].AddCoinC = TokenNumber;
    				// ----
    				Token = GetToken();
    				this->m_EventBonus[Slot].AddCoinP = TokenNumber;
    				// ----
    				Token = GetToken();
    				this->m_EventBonus[Slot].AddCoinG = TokenNumber;
    			}
    			else if( Category == 2 )	//-> Monster Bonus
    			{
    				Token = GetToken();
    				// ----
    				if( strcmp("end", TokenString) == 0 )
    				{
    					break;
    				}
    				// ----
    				int Slot = this->m_MonsterLoaded;
    				// ----
    				this->m_MonsterBonus[Slot].MonsterID = TokenNumber;
    				// ----
    				Token = GetToken();
    				this->m_MonsterBonus[Slot].MapNumber = TokenNumber;
    				// ----
    				Token = GetToken();
    				this->m_MonsterBonus[Slot].AddCoinC = TokenNumber;
    				// ----
    				Token = GetToken();
    				this->m_MonsterBonus[Slot].AddCoinP = TokenNumber;
    				// ----
    				Token = GetToken();
    				this->m_MonsterBonus[Slot].AddCoinG = TokenNumber;
    				// ----
    				this->m_MonsterLoaded++;
    			}
    			else if( Category == 3 )
    			{
    				Token = GetToken();
    				// ----
    				if( strcmp("end", TokenString) == 0 )
    				{
    					break;
    				}
    				// ----
    				SHOPPOINTEX_TIMEBONUS lpInfo;
    				lpInfo.Hour = TokenNumber;
    				Token = GetToken();
    				lpInfo.Bonus = TokenNumber;
    				m_TimeBonus.push_back(lpInfo);
    			}
    		}
    	}
    	// ----
    	this->m_IsLoaded = true;
    	LogAddTD("[ShopPointEx] [%s] File is loaded (Monsters: %d)", File, this->m_MonsterLoaded);
    	fclose(SMDFile);
    }
    // -------------------------------------------------------------------------------
    
    int ShopPointEx::GetMonsterSlot(int Class, int Map)
    {
    	for( int i = 0; i < this->m_MonsterLoaded; i++ )
    	{
    		if( this->m_MonsterBonus[i].MonsterID != Class )
    		{
    			continue;
    		}
    		// ----
    		if( this->m_MonsterBonus[i].MapNumber != Map && this->m_MonsterBonus[i].MapNumber != -1 )
    		{
    			continue;
    		}
    		// ----
    		return i;
    	}
    	// ----
    	return -1;
    }
    // -------------------------------------------------------------------------------
    
    void ShopPointEx::AddTimeBonus(int UserIndex)
    {
    	if( !this->m_IsLoaded || !this->m_TimeBonusOn )
    	{
    		return;
    	}
    	// ----
    	if( gObj[UserIndex].m_ShopPointExTime % this->m_TimeBonusInterval != 0 )
    	{
    		return;
    	}
    	// ----
    	int Bonus = 0;
    	for( int i = 0; i < this->m_TimeBonus.size(); i++ )
    	{
    		if( gObj[UserIndex].m_ShopPointExTimeBackup >= this->m_TimeBonus[i].Hour * 60 * 60 )
    		{
    			Bonus = this->m_TimeBonus[i].Bonus;
    			break;
    		}
    	}
    	gObj[UserIndex].m_ShopPointExTime = 0;
    //	gObj[UserIndex].GameShop.GoblinPoint += this->m_TimeBonusAdd;
    //	m_ShopPointExTimeBackup
    	this->SendNotify(UserIndex, 0, 0, this->m_TimeBonusAdd + Bonus);
    }
    // -------------------------------------------------------------------------------
    
    void ShopPointEx::AddEventBonus(int UserIndex, ShopPointExEvent::T Event)
    {
    	if( !this->m_IsLoaded )
    	{
    		return;
    	}
    	// ----
    //	gObj[UserIndex].GameShop.WCoinC			+= this->m_EventBonus[Event].AddCoinC;
    //	gObj[UserIndex].GameShop.WCoinP			+= this->m_EventBonus[Event].AddCoinP;
    //	gObj[UserIndex].GameShop.GoblinPoint	+= this->m_EventBonus[Event].AddCoinG;
    	// ----
    	this->SendNotify(UserIndex,
    		this->m_EventBonus[Event].AddCoinC,
    		this->m_EventBonus[Event].AddCoinP,
    		this->m_EventBonus[Event].AddCoinG);
    }
    // -------------------------------------------------------------------------------
    
    void ShopPointEx::AddMonsterBonus(int UserIndex, int MonsterIndex)
    {
    	if( !this->m_IsLoaded )
    	{
    		return;
    	}
    	// ----
    	int MonsterSlot = this->GetMonsterSlot(gObj[MonsterIndex].Class, gObj[MonsterIndex].MapNumber);
    	// ----
    	if( MonsterSlot == -1 )
    	{
    		return;
    	}
    	
    }
    	gObj[UserIndex].GameShop.WCoinC			+= this->m_MonsterBonus[MonsterSlot].AddCoinC;
    	gObj[UserIndex].GameShop.WCoinP			+= this->m_MonsterBonus[MonsterSlot].AddCoinP;
    	gObj[UserIndex].GameShop.GoblinPoint	+= this->m_MonsterBonus[MonsterSlot].AddCoinG;
    
    	this->SendNotify(UserIndex, 
    		this->m_MonsterBonus[MonsterSlot].AddCoinC,
    		this->m_MonsterBonus[MonsterSlot].AddCoinP,
    		this->m_MonsterBonus[MonsterSlot].AddCoinG);
    }
    // -------------------------------------------------------------------------------
    
    void ShopPointEx::SendNotify(int UserIndex, int CoinC, int CoinP, int CoinG)
    {
    	//gGameShop.GDSavePoint(UserIndex);
    	protocol::MSG_GTOS_UPDATE_POINT_EX pMsg;
    	pMsg.dwUserGuid = gObj[UserIndex].DBNumber;
    	pMsg.dwAddPoint[0] = CoinC;
    	pMsg.dwAddPoint[1] = CoinP;
    	pMsg.dwAddPoint[2] = CoinG;
    	g_ShopServerClient.DataSend((PCHAR)&pMsg,sizeof(pMsg));
    	// ----
    	char Text[256];
    	// ----
    	if( CoinC > 0 )
    	{
    		ZeroMemory(Text, 255);
    		wsprintf(Text, "Obtained %d WCoinC", CoinC);
    		GCServerMsgStringSend(Text, UserIndex, 1);
    	}
    	// ----
    	if( CoinP > 0 )
    	{
    		ZeroMemory(Text, 255);
    		wsprintf(Text, "Obtained %d WCoinP", CoinP);
    		GCServerMsgStringSend(Text, UserIndex, 1);
    	}
    	// ----
    	if( CoinG > 0 )
    	{
    		ZeroMemory(Text, 255);
    		wsprintf(Text, "Obtained %d GoblinPoint", CoinG);
    		GCServerMsgStringSend(Text, UserIndex, 1);
    	}
    }
    // -------------------------------------------------------------------------------
    Last edited by clerigz; 06-09-15 at 10:29 AM.

  4. #2314
    Apprentice Tuan Truong is offline
    MemberRank
    Jul 2015 Join Date
    6Posts

    re: [Release] zTeam Season 8 Episode 2 (Source)

    Code:
    #include "StdAfx.h"
    #include "ShopPointEx.h"
    #include "user.h"
    #include "GameMain.h"
    #include "logproc.h"
    #include "..\include\readscript.h"
    #include "..\common\winutil.h"
    #include "CashShop.h"
    // -------------------------------------------------------------------------------
    
    ShopPointEx g_ShopPointEx;
    // -------------------------------------------------------------------------------
    
    ShopPointEx::ShopPointEx()
    {
        this->Init();
    }
    // -------------------------------------------------------------------------------
    
    ShopPointEx::~ShopPointEx()
    {
        // ----
    }
    // -------------------------------------------------------------------------------
    
    void ShopPointEx::Init()
    {
        this->m_IsLoaded            = false;
        this->m_TimeBonusOn            = false;
        this->m_TimeBonusAdd        = 0;
        this->m_TimeBonusInterval    = 0;
        this->m_MonsterLoaded        = 0;
        // ----
        for( int i = 0; i < MAX_SHOPPOINTEX_EVENT; i++ )
        {
            this->m_EventBonus[i].AddCoinC    = 0;
            this->m_EventBonus[i].AddCoinP    = 0;
            this->m_EventBonus[i].AddCoinG    = 0;
        }
        // ----
        for(int i = 0; i < MAX_SHOPPOINTEX_MONSTER; i++ )
        {
            this->m_MonsterBonus[i].MonsterID    = -1;
            this->m_MonsterBonus[i].MapNumber    = -1;
            this->m_MonsterBonus[i].AddCoinC    = 0;
            this->m_MonsterBonus[i].AddCoinP    = 0;
            this->m_MonsterBonus[i].AddCoinG    = 0;
        }
        m_TimeBonus.clear();
    }
    // -------------------------------------------------------------------------------
    
    void ShopPointEx::Load()
    {
        this->Init();
        this->ReadData(gDirPath.GetNewPath("Custom\\ShopPointEx.txt"));
    }
    // -------------------------------------------------------------------------------
    
    void ShopPointEx::ReadData(char * File)
    {
        int Category;
        SMDToken Token;
        SMDFile = fopen(File, "r");
        // ----
        if( !SMDFile )
        {
            MsgBox("[ShopPointEx] %s file not found", File);
            return;
        }
        // ----
        while(true)
        {
            Token = GetToken();
            // ----
            if( Token == END )
            {
                break;
            }
            // ----
            Category = TokenNumber;
            // ----
            while(true)
            {
                if( Category == 0 )            //-> Time Bonus
                {
                    Token = GetToken();
                    // ----
                    if( strcmp("end", TokenString) == 0 )
                    {
                        break;
                    }
                    // ----
    #pragma warning (disable : 4800)
                    this->m_TimeBonusOn = TokenNumber;
                    // ----
                    Token = GetToken();
                    this->m_TimeBonusAdd = TokenNumber;
                    // ----
                    Token = GetToken();
                    this->m_TimeBonusInterval = TokenNumber;
    
                }
                else if( Category == 1 )    //-> Event Bonus
                {
                    Token = GetToken();
                    // ----
                    if( strcmp("end", TokenString) == 0 )
                    {
                        break;
                    }
                    // ----
                    int Slot = TokenNumber;
                    // ----
                    Token = GetToken();
                    this->m_EventBonus[Slot].AddCoinC = TokenNumber;
                    // ----
                    Token = GetToken();
                    this->m_EventBonus[Slot].AddCoinP = TokenNumber;
                    // ----
                    Token = GetToken();
                    this->m_EventBonus[Slot].AddCoinG = TokenNumber;
                }
                else if( Category == 2 )    //-> Monster Bonus
                {
                    Token = GetToken();
                    // ----
                    if( strcmp("end", TokenString) == 0 )
                    {
                        break;
                    }
                    // ----
                    int Slot = this->m_MonsterLoaded;
                    // ----
                    this->m_MonsterBonus[Slot].MonsterID = TokenNumber;
                    // ----
                    Token = GetToken();
                    this->m_MonsterBonus[Slot].MapNumber = TokenNumber;
                    // ----
                    Token = GetToken();
                    this->m_MonsterBonus[Slot].AddCoinC = TokenNumber;
                    // ----
                    Token = GetToken();
                    this->m_MonsterBonus[Slot].AddCoinP = TokenNumber;
                    // ----
                    Token = GetToken();
                    this->m_MonsterBonus[Slot].AddCoinG = TokenNumber;
                    // ----
                    this->m_MonsterLoaded++;
                }
                else if( Category == 3 )
                {
                    Token = GetToken();
                    // ----
                    if( strcmp("end", TokenString) == 0 )
                    {
                        break;
                    }
                    // ----
                    SHOPPOINTEX_TIMEBONUS lpInfo;
                    lpInfo.Hour = TokenNumber;
                    Token = GetToken();
                    lpInfo.Bonus = TokenNumber;
                    m_TimeBonus.push_back(lpInfo);
                }
            }
        }
        // ----
        this->m_IsLoaded = true;
        LogAddTD("[ShopPointEx] [%s] File is loaded (Monsters: %d)", File, this->m_MonsterLoaded);
        fclose(SMDFile);
    }
    // -------------------------------------------------------------------------------
    
    int ShopPointEx::GetMonsterSlot(int Class, int Map)
    {
        for( int i = 0; i < this->m_MonsterLoaded; i++ )
        {
            if( this->m_MonsterBonus[i].MonsterID != Class )
            {
                continue;
            }
            // ----
            if( this->m_MonsterBonus[i].MapNumber != Map && this->m_MonsterBonus[i].MapNumber != -1 )
            {
                continue;
            }
            // ----
            return i;
        }
        // ----
        return -1;
    }
    // -------------------------------------------------------------------------------
    
    void ShopPointEx::AddTimeBonus(int UserIndex)
    {
        if( !this->m_IsLoaded || !this->m_TimeBonusOn )
        {
            return;
        }
        // ----
        if( gObj[UserIndex].m_ShopPointExTime % this->m_TimeBonusInterval != 0 )
        {
            return;
        }
        // ----
        int Bonus = 0;
        for( int i = 0; i < this->m_TimeBonus.size(); i++ )
        {
            if( gObj[UserIndex].m_ShopPointExTimeBackup >= this->m_TimeBonus[i].Hour * 60 * 60 )
            {
                Bonus = this->m_TimeBonus[i].Bonus;
                break;
            }
        }
        gObj[UserIndex].m_ShopPointExTime = 0;
    //    gObj[UserIndex].GameShop.GoblinPoint += this->m_TimeBonusAdd;
    //    m_ShopPointExTimeBackup
        this->SendNotify(UserIndex, 0, 0, this->m_TimeBonusAdd + Bonus);
    }
    // -------------------------------------------------------------------------------
    
    void ShopPointEx::AddEventBonus(int UserIndex, ShopPointExEvent::T Event)
    {
        if( !this->m_IsLoaded )
        {
            return;
        }
        // ----
    //    gObj[UserIndex].GameShop.WCoinC            += this->m_EventBonus[Event].AddCoinC;
    //    gObj[UserIndex].GameShop.WCoinP            += this->m_EventBonus[Event].AddCoinP;
    //    gObj[UserIndex].GameShop.GoblinPoint    += this->m_EventBonus[Event].AddCoinG;
        // ----
        this->SendNotify(UserIndex,
            this->m_EventBonus[Event].AddCoinC,
            this->m_EventBonus[Event].AddCoinP,
            this->m_EventBonus[Event].AddCoinG);
    }
    // -------------------------------------------------------------------------------
    
    void ShopPointEx::AddMonsterBonus(int UserIndex, int MonsterIndex)
    {
        if( !this->m_IsLoaded )
        {
            return;
        }
        // ----
        int MonsterSlot = this->GetMonsterSlot(gObj[MonsterIndex].Class, gObj[MonsterIndex].MapNumber);
        // ----
        if( MonsterSlot == -1 )
        {
            return;
        }
        
    }
        gObj[UserIndex].GameShop.WCoinC            += this->m_MonsterBonus[MonsterSlot].AddCoinC;
        gObj[UserIndex].GameShop.WCoinP            += this->m_MonsterBonus[MonsterSlot].AddCoinP;
        gObj[UserIndex].GameShop.GoblinPoint    += this->m_MonsterBonus[MonsterSlot].AddCoinG;
    
        this->SendNotify(UserIndex, 
            this->m_MonsterBonus[MonsterSlot].AddCoinC,
            this->m_MonsterBonus[MonsterSlot].AddCoinP,
            this->m_MonsterBonus[MonsterSlot].AddCoinG);
    }
    // -------------------------------------------------------------------------------
    
    void ShopPointEx::SendNotify(int UserIndex, int CoinC, int CoinP, int CoinG)
    {
        //gGameShop.GDSavePoint(UserIndex);
        protocol::MSG_GTOS_UPDATE_POINT_EX pMsg;
        pMsg.dwUserGuid = gObj[UserIndex].DBNumber;
        pMsg.dwAddPoint[0] = CoinC;
        pMsg.dwAddPoint[1] = CoinP;
        pMsg.dwAddPoint[2] = CoinG;
        g_ShopServerClient.DataSend((PCHAR)&pMsg,sizeof(pMsg));
        // ----
        char Text[256];
        // ----
        if( CoinC > 0 )
        {
            ZeroMemory(Text, 255);
            wsprintf(Text, "Obtained %d WCoinC", CoinC);
            GCServerMsgStringSend(Text, UserIndex, 1);
        }
        // ----
        if( CoinP > 0 )
        {
            ZeroMemory(Text, 255);
            wsprintf(Text, "Obtained %d WCoinP", CoinP);
            GCServerMsgStringSend(Text, UserIndex, 1);
        }
        // ----
        if( CoinG > 0 )
        {
            ZeroMemory(Text, 255);
            wsprintf(Text, "Obtained %d GoblinPoint", CoinG);
            GCServerMsgStringSend(Text, UserIndex, 1);
        }
    }
    // -------------------------------------------------------------------------------
    [/QUOTE]


    Can you guide me to this position

    1.
    I wan config max level = 400
    2. in zGameServer\ExData\EventItemBag\BloodCastle
    <?xml version="1.0" ?>
    <itembag>
    <settings>
    <name>BloodCastle1</name>
    <zen min="50000" max="50000" />
    <excoption op1="0" op2="0" op4="0" op8="0" op16="0" op32="0" />
    </settings>
    <itemlist rate="10000">
    <item id="14" num="13" lvlmin="0" lvlmax="0" skill="0" luck="0" option="0" excmin="0" excmax="0" is_anc="0" sockmin="0" sockmax="0" /> <!--Jewel of Bless -->
    <item id="14" num="14" lvlmin="0" lvlmax="0" skill="0" luck="0" option="0" excmin="0" excmax="0" is_anc="0" sockmin="0" sockmax="0" /> <!--Jewel of Soul -->
    <item id="14" num="16" lvlmin="0" lvlmax="0" skill="0" luck="0" option="0" excmin="0" excmax="0" is_anc="0" sockmin="0" sockmax="0" /> <!--Jewel of Life -->
    </itemlist>
    </itembag>

    *** I want to increase the reward to the 2 or 3 .. jewel ***
    And
    DevilSquare

    THANK....

  5. #2315
    -( . ) ( . )- clerigz is offline
    MemberRank
    Mar 2012 Join Date
    1,365Posts

    re: [Release] zTeam Season 8 Episode 2 (Source)

    Quote Originally Posted by Tuan Truong View Post
    Code:
    #include "StdAfx.h"
    #include "ShopPointEx.h"
    #include "user.h"
    #include "GameMain.h"
    #include "logproc.h"
    #include "..\include\readscript.h"
    #include "..\common\winutil.h"
    #include "CashShop.h"
    // -------------------------------------------------------------------------------
    
    ShopPointEx g_ShopPointEx;
    // -------------------------------------------------------------------------------
    
    ShopPointEx::ShopPointEx()
    {
        this->Init();
    }
    // -------------------------------------------------------------------------------
    
    ShopPointEx::~ShopPointEx()
    {
        // ----
    }
    // -------------------------------------------------------------------------------
    
    void ShopPointEx::Init()
    {
        this->m_IsLoaded            = false;
        this->m_TimeBonusOn            = false;
        this->m_TimeBonusAdd        = 0;
        this->m_TimeBonusInterval    = 0;
        this->m_MonsterLoaded        = 0;
        // ----
        for( int i = 0; i < MAX_SHOPPOINTEX_EVENT; i++ )
        {
            this->m_EventBonus[i].AddCoinC    = 0;
            this->m_EventBonus[i].AddCoinP    = 0;
            this->m_EventBonus[i].AddCoinG    = 0;
        }
        // ----
        for(int i = 0; i < MAX_SHOPPOINTEX_MONSTER; i++ )
        {
            this->m_MonsterBonus[i].MonsterID    = -1;
            this->m_MonsterBonus[i].MapNumber    = -1;
            this->m_MonsterBonus[i].AddCoinC    = 0;
            this->m_MonsterBonus[i].AddCoinP    = 0;
            this->m_MonsterBonus[i].AddCoinG    = 0;
        }
        m_TimeBonus.clear();
    }
    // -------------------------------------------------------------------------------
    
    void ShopPointEx::Load()
    {
        this->Init();
        this->ReadData(gDirPath.GetNewPath("Custom\\ShopPointEx.txt"));
    }
    // -------------------------------------------------------------------------------
    
    void ShopPointEx::ReadData(char * File)
    {
        int Category;
        SMDToken Token;
        SMDFile = fopen(File, "r");
        // ----
        if( !SMDFile )
        {
            MsgBox("[ShopPointEx] %s file not found", File);
            return;
        }
        // ----
        while(true)
        {
            Token = GetToken();
            // ----
            if( Token == END )
            {
                break;
            }
            // ----
            Category = TokenNumber;
            // ----
            while(true)
            {
                if( Category == 0 )            //-> Time Bonus
                {
                    Token = GetToken();
                    // ----
                    if( strcmp("end", TokenString) == 0 )
                    {
                        break;
                    }
                    // ----
    #pragma warning (disable : 4800)
                    this->m_TimeBonusOn = TokenNumber;
                    // ----
                    Token = GetToken();
                    this->m_TimeBonusAdd = TokenNumber;
                    // ----
                    Token = GetToken();
                    this->m_TimeBonusInterval = TokenNumber;
    
                }
                else if( Category == 1 )    //-> Event Bonus
                {
                    Token = GetToken();
                    // ----
                    if( strcmp("end", TokenString) == 0 )
                    {
                        break;
                    }
                    // ----
                    int Slot = TokenNumber;
                    // ----
                    Token = GetToken();
                    this->m_EventBonus[Slot].AddCoinC = TokenNumber;
                    // ----
                    Token = GetToken();
                    this->m_EventBonus[Slot].AddCoinP = TokenNumber;
                    // ----
                    Token = GetToken();
                    this->m_EventBonus[Slot].AddCoinG = TokenNumber;
                }
                else if( Category == 2 )    //-> Monster Bonus
                {
                    Token = GetToken();
                    // ----
                    if( strcmp("end", TokenString) == 0 )
                    {
                        break;
                    }
                    // ----
                    int Slot = this->m_MonsterLoaded;
                    // ----
                    this->m_MonsterBonus[Slot].MonsterID = TokenNumber;
                    // ----
                    Token = GetToken();
                    this->m_MonsterBonus[Slot].MapNumber = TokenNumber;
                    // ----
                    Token = GetToken();
                    this->m_MonsterBonus[Slot].AddCoinC = TokenNumber;
                    // ----
                    Token = GetToken();
                    this->m_MonsterBonus[Slot].AddCoinP = TokenNumber;
                    // ----
                    Token = GetToken();
                    this->m_MonsterBonus[Slot].AddCoinG = TokenNumber;
                    // ----
                    this->m_MonsterLoaded++;
                }
                else if( Category == 3 )
                {
                    Token = GetToken();
                    // ----
                    if( strcmp("end", TokenString) == 0 )
                    {
                        break;
                    }
                    // ----
                    SHOPPOINTEX_TIMEBONUS lpInfo;
                    lpInfo.Hour = TokenNumber;
                    Token = GetToken();
                    lpInfo.Bonus = TokenNumber;
                    m_TimeBonus.push_back(lpInfo);
                }
            }
        }
        // ----
        this->m_IsLoaded = true;
        LogAddTD("[ShopPointEx] [%s] File is loaded (Monsters: %d)", File, this->m_MonsterLoaded);
        fclose(SMDFile);
    }
    // -------------------------------------------------------------------------------
    
    int ShopPointEx::GetMonsterSlot(int Class, int Map)
    {
        for( int i = 0; i < this->m_MonsterLoaded; i++ )
        {
            if( this->m_MonsterBonus[i].MonsterID != Class )
            {
                continue;
            }
            // ----
            if( this->m_MonsterBonus[i].MapNumber != Map && this->m_MonsterBonus[i].MapNumber != -1 )
            {
                continue;
            }
            // ----
            return i;
        }
        // ----
        return -1;
    }
    // -------------------------------------------------------------------------------
    
    void ShopPointEx::AddTimeBonus(int UserIndex)
    {
        if( !this->m_IsLoaded || !this->m_TimeBonusOn )
        {
            return;
        }
        // ----
        if( gObj[UserIndex].m_ShopPointExTime % this->m_TimeBonusInterval != 0 )
        {
            return;
        }
        // ----
        int Bonus = 0;
        for( int i = 0; i < this->m_TimeBonus.size(); i++ )
        {
            if( gObj[UserIndex].m_ShopPointExTimeBackup >= this->m_TimeBonus[i].Hour * 60 * 60 )
            {
                Bonus = this->m_TimeBonus[i].Bonus;
                break;
            }
        }
        gObj[UserIndex].m_ShopPointExTime = 0;
    //    gObj[UserIndex].GameShop.GoblinPoint += this->m_TimeBonusAdd;
    //    m_ShopPointExTimeBackup
        this->SendNotify(UserIndex, 0, 0, this->m_TimeBonusAdd + Bonus);
    }
    // -------------------------------------------------------------------------------
    
    void ShopPointEx::AddEventBonus(int UserIndex, ShopPointExEvent::T Event)
    {
        if( !this->m_IsLoaded )
        {
            return;
        }
        // ----
    //    gObj[UserIndex].GameShop.WCoinC            += this->m_EventBonus[Event].AddCoinC;
    //    gObj[UserIndex].GameShop.WCoinP            += this->m_EventBonus[Event].AddCoinP;
    //    gObj[UserIndex].GameShop.GoblinPoint    += this->m_EventBonus[Event].AddCoinG;
        // ----
        this->SendNotify(UserIndex,
            this->m_EventBonus[Event].AddCoinC,
            this->m_EventBonus[Event].AddCoinP,
            this->m_EventBonus[Event].AddCoinG);
    }
    // -------------------------------------------------------------------------------
    
    void ShopPointEx::AddMonsterBonus(int UserIndex, int MonsterIndex)
    {
        if( !this->m_IsLoaded )
        {
            return;
        }
        // ----
        int MonsterSlot = this->GetMonsterSlot(gObj[MonsterIndex].Class, gObj[MonsterIndex].MapNumber);
        // ----
        if( MonsterSlot == -1 )
        {
            return;
        }
        
    }
        gObj[UserIndex].GameShop.WCoinC            += this->m_MonsterBonus[MonsterSlot].AddCoinC;
        gObj[UserIndex].GameShop.WCoinP            += this->m_MonsterBonus[MonsterSlot].AddCoinP;
        gObj[UserIndex].GameShop.GoblinPoint    += this->m_MonsterBonus[MonsterSlot].AddCoinG;
    
        this->SendNotify(UserIndex, 
            this->m_MonsterBonus[MonsterSlot].AddCoinC,
            this->m_MonsterBonus[MonsterSlot].AddCoinP,
            this->m_MonsterBonus[MonsterSlot].AddCoinG);
    }
    // -------------------------------------------------------------------------------
    
    void ShopPointEx::SendNotify(int UserIndex, int CoinC, int CoinP, int CoinG)
    {
        //gGameShop.GDSavePoint(UserIndex);
        protocol::MSG_GTOS_UPDATE_POINT_EX pMsg;
        pMsg.dwUserGuid = gObj[UserIndex].DBNumber;
        pMsg.dwAddPoint[0] = CoinC;
        pMsg.dwAddPoint[1] = CoinP;
        pMsg.dwAddPoint[2] = CoinG;
        g_ShopServerClient.DataSend((PCHAR)&pMsg,sizeof(pMsg));
        // ----
        char Text[256];
        // ----
        if( CoinC > 0 )
        {
            ZeroMemory(Text, 255);
            wsprintf(Text, "Obtained %d WCoinC", CoinC);
            GCServerMsgStringSend(Text, UserIndex, 1);
        }
        // ----
        if( CoinP > 0 )
        {
            ZeroMemory(Text, 255);
            wsprintf(Text, "Obtained %d WCoinP", CoinP);
            GCServerMsgStringSend(Text, UserIndex, 1);
        }
        // ----
        if( CoinG > 0 )
        {
            ZeroMemory(Text, 255);
            wsprintf(Text, "Obtained %d GoblinPoint", CoinG);
            GCServerMsgStringSend(Text, UserIndex, 1);
        }
    }
    // -------------------------------------------------------------------------------

    Can you guide me to this position

    1.
    I wan config max level = 400
    2. in zGameServer\ExData\EventItemBag\BloodCastle
    <?xml version="1.0" ?>
    <itembag>
    <settings>
    <name>BloodCastle1</name>
    <zen min="50000" max="50000" />
    <excoption op1="0" op2="0" op4="0" op8="0" op16="0" op32="0" />
    </settings>
    <itemlist rate="10000">
    <item id="14" num="13" lvlmin="0" lvlmax="0" skill="0" luck="0" option="0" excmin="0" excmax="0" is_anc="0" sockmin="0" sockmax="0" /> <!--Jewel of Bless -->
    <item id="14" num="14" lvlmin="0" lvlmax="0" skill="0" luck="0" option="0" excmin="0" excmax="0" is_anc="0" sockmin="0" sockmax="0" /> <!--Jewel of Soul -->
    <item id="14" num="16" lvlmin="0" lvlmax="0" skill="0" luck="0" option="0" excmin="0" excmax="0" is_anc="0" sockmin="0" sockmax="0" /> <!--Jewel of Life -->
    </itemlist>
    </itembag>

    *** I want to increase the reward to the 2 or 3 .. jewel ***
    And
    DevilSquare

    THANK....
    [/QUOTE]

    or you can do this bro


    <itembag>
    <settings>
    <name>BloodCastle1</name>
    <zen min="50000" max="50000" />
    <excoption op1="0" op2="0" op4="0" op8="0" op16="0" op32="0" />
    </settings>
    <itemlist rate="10000">
    <item id="14" num="13" lvlmin="0" lvlmax="0" skill="0" luck="0" option="0" excmin="0" excmax="0" is_anc="0" sockmin="0" sockmax="0" /> <!--Jewel of Bless -->
    <item id="14" num="14" lvlmin="0" lvlmax="0" skill="0" luck="0" option="0" excmin="0" excmax="0" is_anc="0" sockmin="0" sockmax="0" /> <!--Jewel of Soul -->
    <item id="14" num="16" lvlmin="0" lvlmax="0" skill="0" luck="0" option="0" excmin="0" excmax="0" is_anc="0" sockmin="0" sockmax="0" /> <!--Jewel of Life -->
    <item id="14" num="13" lvlmin="0" lvlmax="0" skill="0" luck="0" option="0" excmin="0" excmax="0" is_anc="0" sockmin="0" sockmax="0" /> <!--Jewel of Bless -->
    <item id="14" num="14" lvlmin="0" lvlmax="0" skill="0" luck="0" option="0" excmin="0" excmax="0" is_anc="0" sockmin="0" sockmax="0" /> <!--Jewel of Soul -->
    <item id="14" num="16" lvlmin="0" lvlmax="0" skill="0" luck="0" option="0" excmin="0" excmax="0" is_anc="0" sockmin="0" sockmax="0" /> <!--Jewel of Life -->
    <item id="14" num="13" lvlmin="0" lvlmax="0" skill="0" luck="0" option="0" excmin="0" excmax="0" is_anc="0" sockmin="0" sockmax="0" /> <!--Jewel of Bless -->
    <item id="14" num="14" lvlmin="0" lvlmax="0" skill="0" luck="0" option="0" excmin="0" excmax="0" is_anc="0" sockmin="0" sockmax="0" /> <!--Jewel of Soul -->
    <item id="14" num="16" lvlmin="0" lvlmax="0" skill="0" luck="0" option="0" excmin="0" excmax="0" is_anc="0" sockmin="0" sockmax="0" /> <!--Jewel of Life -->
    </itemlist>
    </itembag>

  6. #2316
    Apprentice Tuan Truong is offline
    MemberRank
    Jul 2015 Join Date
    6Posts

    re: [Release] zTeam Season 8 Episode 2 (Source)

    Quote Originally Posted by clerigz View Post
    Can you guide me to this position

    1.
    I wan config max level = 400
    2. in zGameServer\ExData\EventItemBag\BloodCastle
    <?xml version="1.0" ?>
    <itembag>
    <settings>
    <name>BloodCastle1</name>
    <zen min="50000" max="50000" />
    <excoption op1="0" op2="0" op4="0" op8="0" op16="0" op32="0" />
    </settings>
    <itemlist rate="10000">
    <item id="14" num="13" lvlmin="0" lvlmax="0" skill="0" luck="0" option="0" excmin="0" excmax="0" is_anc="0" sockmin="0" sockmax="0" /> <!--Jewel of Bless -->
    <item id="14" num="14" lvlmin="0" lvlmax="0" skill="0" luck="0" option="0" excmin="0" excmax="0" is_anc="0" sockmin="0" sockmax="0" /> <!--Jewel of Soul -->
    <item id="14" num="16" lvlmin="0" lvlmax="0" skill="0" luck="0" option="0" excmin="0" excmax="0" is_anc="0" sockmin="0" sockmax="0" /> <!--Jewel of Life -->
    </itemlist>
    </itembag>

    *** I want to increase the reward to the 2 or 3 .. jewel ***
    And
    DevilSquare

    THANK....
    or you can do this bro[/QUOTE]


    I have tested your way but still no results
    Do you have any other way

    Thank..

  7. #2317
    Account Upgraded | Title Enabled! samsunggon is offline
    MemberRank
    Mar 2010 Join Date
    Lorencia BarLocation
    518Posts

    re: [Release] zTeam Season 8 Episode 2 (Source)

    Quote Originally Posted by Gm2gustavo View Post
    USE IPV4 In Connect Server and others.
    thanks. already solved
    i just change 127.0.0.1 to my localip

    [GameServerInfo]
    ServerName = highxp
    ServerCode = 1
    ClientExeVersion = 1.99.99
    ClientExeSerial = zTeamSeason8Path
    LootingTime = 25
    ItemDisappearTime = 30
    NonPk = 0
    ConnectMemberLoad = 0 //-> Connect only members from list (0: Disable, 1: Enable)
    ConnectMemberReload = 0 //-> Auto reloading connect member list (0: Disable, 1: Enable)
    ConnectMemberReloadTime = 0 //-> Minutes (1~N)
    PKLimitFree = 1

    [ConnectServerInfo]
    IP = 127.0.0.1 - change to my localip
    PORT = 55557

  8. #2318
    Member gustavobm is offline
    MemberRank
    Oct 2010 Join Date
    58Posts

    re: [Release] zTeam Season 8 Episode 2 (Source)

    @xtreme17 thanks for sharing it's hard to see someone posting something useful instead of screenshots

  9. #2319
    #ChangeBrazil SmileYzn is offline
    MemberRank
    Nov 2012 Join Date
    0x00401000Location
    927Posts

    re: [Release] zTeam Season 8 Episode 2 (Source)

    Quote Originally Posted by gustavobm View Post
    @xtreme17 thanks for sharing it's hard to see someone posting something useful instead of screenshots
    Since those events are not fully coded at GameServer, we can do some thing with that :D

  10. #2320
    Account Upgraded | Title Enabled! jeffzkie69 is offline
    MemberRank
    Jul 2009 Join Date
    516Posts

    re: [Release] zTeam Season 8 Episode 2 (Source)

    does someone has fixed random DC while on Castle Siege?.,thnx!

  11. #2321
    Valued Member Omaruu is offline
    MemberRank
    Jan 2008 Join Date
    141Posts

    config re: [Release] zTeam Season 8 Episode 2 (Source)

    Quote Originally Posted by rusolp View Post
    I find your post but cannot found.. whats the "fix" Omaruu?
    Do you have some info more specific about this bug??
    Find in user.cpp function:
    Code:
    bool gObjLevelUp(LPOBJ lpObj, __int64* addexp, int iMonsterType, int iEventType)
    after:
    Code:
    #if (CUSTOM_PETS == 1)
        gCustomPets.gObjLevelUp(lpObj->m_Index,*addexp);
    #endif
    add:
    Code:
        int NewExp = 0;
    
        if ( lpObj->Experience > lpObj->NextExp )
        {
        NewExp = lpObj->Experience - lpObj->NextExp;
        }
    Note: But when your exp get higher than your character level you need to kill some monsters then switch character(you will get less experience) and need to make your experience from 0 to your level experience so in fun servers this "solve" problem but for hard servers will not be so good becouse for example if you get bugged at 389 level you will need to gain all this experience again.

  12. #2322
    Account Upgraded | Title Enabled! rusolp is offline
    MemberRank
    Mar 2008 Join Date
    $db->play_lifeLocation
    319Posts

    re: [Release] zTeam Season 8 Episode 2 (Source)

    Quote Originally Posted by Omaruu View Post
    Find in user.cpp function:
    Code:
    bool gObjLevelUp(LPOBJ lpObj, __int64* addexp, int iMonsterType, int iEventType)
    after:
    Code:
    #if (CUSTOM_PETS == 1)
        gCustomPets.gObjLevelUp(lpObj->m_Index,*addexp);
    #endif
    add:
    Code:
        int NewExp = 0;
    
        if ( lpObj->Experience > lpObj->NextExp )
        {
        NewExp = lpObj->Experience - lpObj->NextExp;
        }
    Note: But when your exp get higher than your character level you need to kill some monsters then switch character(you will get less experience) and need to make your experience from 0 to your level experience so in fun servers this "solve" problem but for hard servers will not be so good becouse for example if you get bugged at 389 level you will need to gain all this experience again.

    where is NewExp in use?

  13. #2323
    Apprentice Tuan Truong is offline
    MemberRank
    Jul 2015 Join Date
    6Posts

    re: [Release] zTeam Season 8 Episode 2 (Source)

    you can help me this problem
    1. I wan config max level = 400
    2. in zGameServer\ExData\EventItemBag\BloodCastle

    <?xml version="1.0" ?>
    <itembag>
    <settings>
    <name>BloodCastle1</name>
    <zen min="50000" max="50000" />
    <excoption op1="0" op2="0" op4="0" op8="0" op16="0" op32="0" />
    </settings>
    <itemlist rate="10000">
    <item id="14" num="13" lvlmin="0" lvlmax="0" skill="0" luck="0" option="0" excmin="0" excmax="0" is_anc="0" sockmin="0" sockmax="0" /> <!--Jewel of Bless -->
    <item id="14" num="14" lvlmin="0" lvlmax="0" skill="0" luck="0" option="0" excmin="0" excmax="0" is_anc="0" sockmin="0" sockmax="0" /> <!--Jewel of Soul -->
    <item id="14" num="16" lvlmin="0" lvlmax="0" skill="0" luck="0" option="0" excmin="0" excmax="0" is_anc="0" sockmin="0" sockmax="0" /> <!--Jewel of Life -->
    </itemlist>
    </itembag>

    *** I want to increase the reward to the 2 or 3 .. jewel ***
    And
    DevilSquare

    THANK....

  14. #2324
    -( . ) ( . )- clerigz is offline
    MemberRank
    Mar 2012 Join Date
    1,365Posts

    re: [Release] zTeam Season 8 Episode 2 (Source)

    any one know how to fix this? when im compiling the source i will try to remove the // but it give me errors

    void ShopPointEx::AddMonsterBonus(int UserIndex, int MonsterIndex)
    {
    if( !this->m_IsLoaded )
    {
    return;
    }

    int MonsterSlot = this->GetMonsterSlot(gObj[MonsterIndex].Class, gObj[MonsterIndex].MapNumber);

    if( MonsterSlot == -1 )
    {
    return;
    }
    gObj[UserIndex].GameShop.WCoinC += this->m_MonsterBonus[MonsterSlot].AddCoinC;
    gObj[UserIndex].GameShop.WCoinP += this->m_MonsterBonus[MonsterSlot].AddCoinP;
    gObj[UserIndex].GameShop.GoblinPoint += this->m_MonsterBonus[MonsterSlot].AddCoinG;


    this->SendNotify(UserIndex,
    this->m_MonsterBonus[MonsterSlot].AddCoinC,
    this->m_MonsterBonus[MonsterSlot].AddCoinP,
    this->m_MonsterBonus[MonsterSlot].AddCoinG);
    }



    void ShopPointEx::SendNotify(int UserIndex, int CoinC, int CoinP, int CoinG)
    {
    gGameShop.GDSavePoint(UserIndex);
    protocol::MSG_GTOS_UPDATE_POINT_EX pMsg;
    pMsg.dwUserGuid = gObj[UserIndex].DBNumber;
    pMsg.dwAddPoint[0] = CoinC;
    pMsg.dwAddPoint[1] = CoinP;
    pMsg.dwAddPoint[2] = CoinG;
    g_ShopServerClient.DataSend((PCHAR)&pMsg,sizeof(pMsg));

    char Text[256];

    if( CoinC > 0 )
    {
    ZeroMemory(Text, 255);
    wsprintf(Text, "Obtained %d WCoinC", CoinC);
    GCServerMsgStringSend(Text, UserIndex, 1);
    }

    if( CoinP > 0 )
    {
    ZeroMemory(Text, 255);
    wsprintf(Text, "Obtained %d WCoinP", CoinP);
    GCServerMsgStringSend(Text, UserIndex, 1);
    }

    if( CoinG > 0 )
    {
    ZeroMemory(Text, 255);
    wsprintf(Text, "Obtained %d GoblinPoint", CoinG);
    GCServerMsgStringSend(Text, UserIndex, 1);
    }
    }


  15. #2325
    #ChangeBrazil SmileYzn is offline
    MemberRank
    Nov 2012 Join Date
    0x00401000Location
    927Posts

    re: [Release] zTeam Season 8 Episode 2 (Source)

    We fixed new wings system from zTeam, added support for 28 Wings;



    by Scott_ADM



Advertisement