[Release] zTeam Season 8 Episode 2 (Source)

Page 100 of 216 FirstFirst ... 50909293949596979899100101102103104105106107108110150200 ... LastLast
Results 1,486 to 1,500 of 3226
  1. #1486
    Account Upgraded | Title Enabled! jackbot is offline
    MemberRank
    Jan 2014 Join Date
    210Posts

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

    PKReset NPC Source

    PKReset.h

    Code:
    #pragma once// -------------------------------------------------------------------------------
    
    
    #include "user.h"
    // -------------------------------------------------------------------------------
    
    
    #define MAX_PKCLEAR_ITEM    10
    // -------------------------------------------------------------------------------
    
    
    struct PKCLEAR_ITEM_DATA
    {
        WORD    ID;
        BYTE    MinLevel;
        BYTE    MaxLevel;
        BYTE    MinDur;
        BYTE    MaxDur;
    };
    // -------------------------------------------------------------------------------
    
    
    class PKClear
    {
    public:
                PKClear();
                ~PKClear();
        // ----
        void    Init();
        void    Load();
        void    ReadData(char * File);
        // ----
        bool    SearchItem(LPOBJ lpUser, BYTE QuestItemID);
        bool    DeleteItem(LPOBJ lpUser, BYTE QuestItemID);
        bool    CheckReq(LPOBJ lpUser);
        // ----
        bool    Dialog(LPOBJ lpUser, LPOBJ lpNpc);
        // ----
    private:
        WORD    m_NpcID;
        BYTE    m_NpcMap;
        BYTE    m_NpcX;
        BYTE    m_NpcY;
        BYTE    m_ReqPK;
        WORD    m_ReqLevel;
        WORD    m_ReqReset;
        DWORD    m_Cost[4];
        PKCLEAR_ITEM_DATA m_ItemData[MAX_PKCLEAR_ITEM];
        BYTE    m_ItemLoaded;
        // ----
    }; extern PKClear g_PKClear;
    // -------------------------------------------------------------------------------
    PKReset.cpp

    Code:
    #include "StdAfx.h"#include "PKReset.h"
    #include "GameMain.h"
    #include "..\include\ReadScript.h"
    #include "..\common\winutil.h"
    #include "logproc.h"
    // -------------------------------------------------------------------------------
    
    
    PKClear g_PKClear;
    // -------------------------------------------------------------------------------
    
    
    PKClear::PKClear()
    {
        this->Init();
    }
    // -------------------------------------------------------------------------------
    
    
    PKClear::~PKClear()
    {
    
    
    }
    // -------------------------------------------------------------------------------
    
    
    void PKClear::Init()
    {
        this->m_NpcID            = -1;
        this->m_NpcMap            = -1;
        this->m_NpcX            = 0;
        this->m_NpcY            = 0;
        this->m_ReqPK            = 4;
        this->m_ReqLevel        = 1;
        this->m_ReqReset        = 0;
        this->m_ItemLoaded        = 0;
        ZeroMemory(this->m_ItemData, sizeof(this->m_ItemData));
        ZeroMemory(this->m_Cost, sizeof(this->m_Cost));
    }
    // -------------------------------------------------------------------------------
    
    
    void PKClear::Load()
    {
        this->Init();
        this->ReadData(gDirPath.GetNewPath("Custom\\PKClear.txt"));
    }
    // -------------------------------------------------------------------------------
    
    
    void PKClear::ReadData(char * File)
    {
        SMDToken Token;
        SMDFile = fopen(File, "r");
        // ----
        if( !SMDFile )
        {
            MsgBox("[PKClear] %s file not found", File);
            return;
        }
        // ----
        int Category = -1;
        // ----
        while(true)
        {
            Token = GetToken();
            // ----
            if( Token == END )
            {
                break;
            }
            // ----
            Category = TokenNumber;
            // ----
            while(true)
            {
                if( Category == 0 )    //-> NPC
                {
                    Token = GetToken();
                    // ----
                    if( !strcmp("end", TokenString) )
                    {
                        break;
                    }
                    // ----
                    this->m_NpcID        = TokenNumber;
                    // ----
                    Token = GetToken();
                    this->m_NpcMap        = TokenNumber;
                    // ----
                    Token = GetToken();
                    this->m_NpcX        = TokenNumber;
                    // ----
                    Token = GetToken();
                    this->m_NpcY        = TokenNumber;
                }
                else if( Category == 1 ) //-> Requirements
                {
                    Token = GetToken();
                    // ----
                    if( !strcmp("end", TokenString) )
                    {
                        break;
                    }
                    // ----
                    this->m_ReqPK        = TokenNumber;
                    // ----
                    Token = GetToken();
                    this->m_ReqLevel    = TokenNumber;
                    // ----
                    Token = GetToken();
                    this->m_ReqReset    = TokenNumber;
                }
                else if( Category == 2 ) //-> Cost
                {
                    Token = GetToken();
                    // ----
                    if( !strcmp("end", TokenString) )
                    {
                        break;
                    }
                    // ----
                    this->m_Cost[0]        = TokenNumber;
                    // ----
                    Token = GetToken();
                    this->m_Cost[1]        = TokenNumber;
                    // ----
                    Token = GetToken();
                    this->m_Cost[2]        = TokenNumber;
                    // ----
                    Token = GetToken();
                    this->m_Cost[3]        = TokenNumber;
                }
                else if( Category == 3 ) //-> Item list
                {
                    Token = GetToken();
                    // ----
                    if( !strcmp("end", TokenString) )
                    {
                        break;
                    }
                    // ----
                    WORD ItemType = TokenNumber;
                    Token = GetToken();
                    WORD ItemIndex = TokenNumber;
                    this->m_ItemData[this->m_ItemLoaded].ID     = ITEMGET(ItemType, ItemIndex);
                    // ----
                    Token = GetToken();
                    this->m_ItemData[this->m_ItemLoaded].MinLevel    = TokenNumber;
                    // ----
                    Token = GetToken();
                    this->m_ItemData[this->m_ItemLoaded].MaxLevel    = TokenNumber;
                    // ----
                    Token = GetToken();
                    this->m_ItemData[this->m_ItemLoaded].MinDur    = TokenNumber;
                    // ----
                    Token = GetToken();
                    this->m_ItemData[this->m_ItemLoaded].MaxDur    = TokenNumber;
                    // ----
                    this->m_ItemLoaded++;
                }
            }
        }
        // ----
        fclose(SMDFile);
        LogAddTD("[PKClear] %s file is loaded (Items: %d)", File, this->m_ItemLoaded);
    }
    // -------------------------------------------------------------------------------
    
    
    bool PKClear::SearchItem(LPOBJ lpUser, BYTE QuestItemID)
    {
        WORD ItemID = this->m_ItemData[QuestItemID].ID;
        // ----
        for( int i = INVETORY_WEAR_SIZE; i < MAIN_INVENTORY_SIZE; i++ )
        {
            if( !lpUser->pInventory[i].IsItem() || lpUser->pInventory[i].m_Type != ItemID )
            {
                continue;
            }
            // ----
            if( lpUser->pInventory[i].m_Level < this->m_ItemData[QuestItemID].MinLevel
                || lpUser->pInventory[i].m_Level > this->m_ItemData[QuestItemID].MaxLevel )
            {
                continue;
            }
            // ----
            if( lpUser->pInventory[i].m_Durability < (float)this->m_ItemData[QuestItemID].MinDur
                || lpUser->pInventory[i].m_Durability > (float)this->m_ItemData[QuestItemID].MaxDur )
            {
                continue;
            }
            // ----
            return true;
        }
        // ----
        return false;
    }
    // -------------------------------------------------------------------------------
    
    
    bool PKClear::DeleteItem(LPOBJ lpUser, BYTE QuestItemID)
    {
        WORD ItemID = this->m_ItemData[QuestItemID].ID;
        // ----
        for( int i = INVETORY_WEAR_SIZE; i < MAIN_INVENTORY_SIZE; i++ )
        {
            if( !lpUser->pInventory[i].IsItem() || lpUser->pInventory[i].m_Type != ItemID )
            {
                continue;
            }
            // ----
            if( lpUser->pInventory[i].m_Level < this->m_ItemData[QuestItemID].MinLevel
                || lpUser->pInventory[i].m_Level > this->m_ItemData[QuestItemID].MaxLevel )
            {
                continue;
            }
            // ----
            if( lpUser->pInventory[i].m_Durability < (float)this->m_ItemData[QuestItemID].MinDur
                || lpUser->pInventory[i].m_Durability > (float)this->m_ItemData[QuestItemID].MaxDur )
            {
                continue;
            }
            // ----
            gObjInventoryDeleteItem(lpUser->m_Index, i);
            GCInventoryItemDeleteSend(lpUser->m_Index, i, 1);
            // ----
            return true;
        }
        // ----
        return false;
    }
    // -------------------------------------------------------------------------------
    
    
    bool PKClear::CheckReq(LPOBJ lpUser)
    {
        if( lpUser->m_PK_Level <= this->m_ReqPK )
        {
            GCServerMsgStringSend("Your PK Level is small to PK Clear", lpUser->m_Index, 1);
            return false;
        }
        // ----
        if( lpUser->Level < this->m_ReqLevel )
        {
            GCServerMsgStringSend("Your Level is small to PK Clear", lpUser->m_Index, 1);
            return false;
        }
        // ----
        if( lpUser->Reset < this->m_ReqReset )
        {
            GCServerMsgStringSend("Your Reset is small to PK Clear", lpUser->m_Index, 1);
            return false;
        }
        // ----
        if( lpUser->Money < this->m_Cost[0] )
        {
            GCServerMsgStringSend("You need more Zen to PK Clear", lpUser->m_Index, 1);
            return false;
        }
        // ----
        if( lpUser->GameShop.WCoinC < this->m_Cost[1] )
        {
            GCServerMsgStringSend("You need more WCoinC to PK Clear", lpUser->m_Index, 1);
            return false;
        }
        // ----
        if( lpUser->GameShop.WCoinP < this->m_Cost[2] )
        {
            GCServerMsgStringSend("You need more WCoinP to PK Clear", lpUser->m_Index, 1);
            return false;
        }
        // ----
        if( lpUser->GameShop.GoblinPoint < this->m_Cost[3] )
        {
            GCServerMsgStringSend("You need more GoblinPoint to PK Clear", lpUser->m_Index, 1);
            return false;
        }
        // ----
        for( int i = 0; i < this->m_ItemLoaded; i++ )
        {
            if( !this->SearchItem(lpUser, i) )
            {
                GCServerMsgStringSend("You have not required items to PK Clear", lpUser->m_Index, 1);
                return false;
            }
        }
        // ----
        return true;
    }
    // -------------------------------------------------------------------------------
    
    
    bool PKClear::Dialog(LPOBJ lpUser, LPOBJ lpNpc)
    {
        if(        lpNpc->Class        != this->m_NpcID 
            ||    lpNpc->MapNumber    != this->m_NpcMap
            ||    lpNpc->X            != this->m_NpcX
            ||    lpNpc->Y            != this->m_NpcY )
        {
            return false;
        }
        // ----
        if( !this->CheckReq(lpUser) )
        {
            return false;
        }
        // ----
        for( int i = 0; i < this->m_ItemLoaded; i++ )
        {
            this->DeleteItem(lpUser, i);
        }
        // ----
        lpUser->Money                    -= this->m_Cost[0];
        lpUser->GameShop.WCoinC            -= this->m_Cost[1];
        lpUser->GameShop.WCoinP            -= this->m_Cost[2];
        lpUser->GameShop.GoblinPoint    -= this->m_Cost[3];
        // ----
        gGameShop.GDSavePoint(lpUser->m_Index);
        GCMoneySend(lpUser->m_Index, lpUser->Money);
        // ----
        lpUser->m_PK_Count    = 0;
        lpUser->m_PK_Level    = 3;
        lpUser->m_PK_Time    = 0;
        // ----
        if( lpUser->PartyNumber >= 0 )
        {
            gParty.UpdatePKUserInfo(lpUser->PartyNumber, lpUser->m_Index, lpUser->DBNumber, lpUser->m_PK_Level);
            gParty.UpdatePKPartyPanalty(lpUser->PartyNumber);
        }
        // ----
        GCPkLevelSend(lpUser->m_Index, lpUser->m_PK_Level);
        GCServerMsgStringSend("Your PK status has been reseted", lpUser->m_Index, 1);
        return true;
    }
    // -------------------------------------------------------------------------------
    To initiate:

    find g_BuffSkillEffect.Load();
    add this below : g_PKClear.Load();

    goodluck :)
    Attached Files Attached Files

  2. #1487
    Yes please. Wortex is offline
    MemberRank
    Nov 2008 Join Date
    268Posts

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

    @jackbot Use message box style for those messages
    Code:
            if( !this->SearchItem(lpUser, i) )
            {
                GCServerMsgStringSend("You have not required items to PK Clear", lpUser->m_Index, 1);
                return false;
            }
    Equals this in Ex7+ style
    Code:
            if( !this->SearchItem(lpUser, i) )
            {
                this->GC_MessageBox(lpUser, "You have not required items to PK Clear");
                return false;
            }

  3. #1488
    Member fabiann1 is offline
    MemberRank
    Dec 2007 Join Date
    ArgentinaLocation
    94Posts

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

    Quote Originally Posted by clerigz View Post
    bro change that 1 to 0 and restart your GS
    thanks for the answer but mine is already en 0, and the items are not exe or +15 are just pickup from the mob i kill
    thanks

  4. #1489
    Enthusiast gorath is offline
    MemberRank
    Dec 2014 Join Date
    BulgariaLocation
    44Posts

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

    Quote Originally Posted by ahmetoz27 View Post
    I cant use bless to incrase item + i use ur files michi28 brother
    no jewels works...

  5. #1490
    Valued Member Callejero is offline
    MemberRank
    Sep 2013 Join Date
    ArgentinaLocation
    127Posts

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

    Quote Originally Posted by gorath View Post
    no jewels works...





    Jewels Of Bless Full Work :)

  6. #1491
    Enthusiast gorath is offline
    MemberRank
    Dec 2014 Join Date
    BulgariaLocation
    44Posts

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

    Quote Originally Posted by Callejero View Post




    Jewels Of Bless Full Work :)
    the last source of michi28 of this post:
    https://forum.ragezone.com/f197/ztea...9/#post8470879
    with none of jevels can not lift ITEM ...

  7. #1492
    Enthusiast Bloder is offline
    MemberRank
    Jul 2005 Join Date
    Everywhere...Location
    34Posts

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

    where I remove the limit pk thanx

  8. #1493
    Enthusiast sokabenga is offline
    MemberRank
    Sep 2009 Join Date
    41Posts

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

    Quote Originally Posted by gorath View Post
    the last source of michi28 of this post:
    https://forum.ragezone.com/f197/ztea...9/#post8470879
    with none of jevels can not lift ITEM ...
    Hello friend, just a doubt need to compile the files?


    I do not understand C ++, you would not have to share your files? I thank you.

    - - - Updated - - -

    [QUOTE=michi28;8470879]here I share zgs sources and gs compiled but the folder Exdata

    Link: zGameServer

    - - - Updated - - -



    Hello friend, I follow the post repack season 8+ sources, would have as you pass me your folder MuServer? Now the possible fix???

    Sorry for the English, I thank you, hug

  9. #1494
    Enthusiast gorath is offline
    MemberRank
    Dec 2014 Join Date
    BulgariaLocation
    44Posts

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

    [QUOTE=sokabenga;8472107]Hello friend, just a doubt need to compile the files?




    I do not understand C ++, you would not have to share your files? I thank you.

    - - - Updated - - -

    Quote Originally Posted by michi28 View Post
    here I share zgs sources and gs compiled but the folder Exdata

    Link: zGameServer

    - - - Updated - - -



    Hello friend, I follow the post repack season 8+ sources, would have as you pass me your folder MuServer? Now the possible fix???

    Sorry for the English, I thank you, hug
    I compiled to just those files and jevels not work ... I did not know much about c ++ .... there somewhere error which I can not find ...

    I think it got a little old source where jevels work and somewhere to fix elementalsystem only it did not work options of Ertel from rank 2 to rank 5, they can not rise to lvl 10 ..
    Last edited by gorath; 03-08-15 at 07:37 PM.

  10. #1495
    Account Upgraded | Title Enabled! michi28 is online now
    MemberRank
    Sep 2014 Join Date
    Maldonado, Uy.Location
    473Posts

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

    [QUOTE=gorath;8472196]
    Quote Originally Posted by sokabenga View Post
    Hello friend, just a doubt need to compile the files?




    I do not understand C ++, you would not have to share your files? I thank you.

    - - - Updated - - -



    I compiled to just those files and jevels not work ... I did not know much about c ++ .... there somewhere error which I can not find ...

    I think it got a little old source where jevels work and somewhere to fix elementalsystem only it did not work options of Ertel from rank 2 to rank 5, they can not rise to lvl 10 ..

    if i was seeing. Now I'll see if I can fix that jewels. as I am busy I do not have much time

  11. #1496
    Enthusiast gorath is offline
    MemberRank
    Dec 2014 Join Date
    BulgariaLocation
    44Posts

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

    [QUOTE=michi28;8472233]
    Quote Originally Posted by gorath View Post


    if i was seeing. Now I'll see if I can fix that jewels. as I am busy I do not have much time


    Thanks in advance. Please i want if you can post the decision with the source code so I can fix it and to compile it ...

  12. #1497
    Apprentice OvidijusD is offline
    MemberRank
    Jul 2015 Join Date
    7Posts

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

    [QUOTE=michi28;8472233]
    Quote Originally Posted by gorath View Post


    if i was seeing. Now I'll see if I can fix that jewels. as I am busy I do not have much time
    Hello, michi you can help me with compiling this files? And how i need update server with your source files? I changed some things, but i dont know how compile files and update server, will be nice if you help me with that :)

  13. #1498
    Enthusiast Chalidow is offline
    MemberRank
    Jun 2015 Join Date
    London, UnitedLocation
    49Posts

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

    Michi mail any communicator ? somethink ?

    - - - Updated - - -

    Michi28 Mail, or somethink to can speak phone or whatup app

  14. #1499
    Enthusiast gorath is offline
    MemberRank
    Dec 2014 Join Date
    BulgariaLocation
    44Posts

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

    Quote Originally Posted by Chalidow View Post
    Michi mail any communicator ? somethink ?

    - - - Updated - - -

    Michi28 Mail, or somethink to can speak phone or whatup app
    Chalidow I do not think this is a topic for sale ... it's release, if you want to buy something there are sites where it is sold may be find it very easy ...

  15. #1500
    Account Upgraded | Title Enabled! ftewegw1 is offline
    MemberRank
    Sep 2012 Join Date
    292Posts

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

    Quote Originally Posted by Wortex View Post
    @ftewegw1 Those are S8.2 mains.

    S8.3 won't work. Webzentards changed opcodes again. It's not worth it to decrypt and re-do most of the stuff as the update features 0 new features apart from icon changes and mu bot interface updates.
    I see, but what's up with muuns? Are they supported by s8.2 main? I dont really like muun system myself, but people get excited with it :P
    btw I set a repo, but now I need to do some testing to see whats working and whats not and I'm also really lazy :D



Advertisement