NPC增益97D


Published:   Comment: No Comments

游戏设置

#include "StdAfx.h"

cBuffer Buffer;


bool cBuffer::Load()
{
    Tokenizer          Token;
    TokenizerGroup     Group;
    TokenizerSection   Section;


    Token.ParseFile(std::string("./Data/Buffer.txt"), Group);


    if (Group.GetSection(0, Section))
    {
        this->_Active    = Section.Rows[0].GetInt(0) > 0 ? true : false;
        this->_Vip        = Section.Rows[0].GetInt(1);
        this->_Level    = Section.Rows[0].GetInt(2);
    }
    if (Group.GetSection(1, Section))
    {
        this->_Time        = Section.Rows[0].GetInt(0);
        this->_Attack    = Section.Rows[0].GetInt(1);
        this->_Defense    = Section.Rows[0].GetInt(2);
    }


    return true;
}


void cBuffer::Elf(OBJECTSTRUCT* Npc, OBJECTSTRUCT* lpObj)
{
    if (!this->_Active)
    {
        ChatTargetSend(Npc, "Fui desabilitado.", lpObj->m_Index);
        return;
    }
    else if (Custom[lpObj->m_Index].VipCount < Buffer._Vip)
    {
        ChatTargetSend(Npc, "Sistema exclusivo para VIP.", lpObj->m_Index);
        return;
    }
    else if (lpObj->Level > Buffer._Level)
    {
        ChatTargetSend(Npc, "Ya no presisas de mi ayuda.", lpObj->m_Index);
        return;
    }


    lpObj->m_SkillAttack = lpObj->Level / 3 + Buffer._Attack;
    lpObj->m_SkillAttackTime = Buffer._Time * 60000;
    lpObj->m_ViewSkillState |= 8;
    lpObj->m_ViewSkillState |= 0x2000000;
    GCMagicAttackNumberSend(Npc, 28, lpObj->m_Index, true);


    Sleep(1000);
    lpObj->m_SkillDefense = lpObj->Level / 5 + Buffer._Defense;
    lpObj->m_SkillDefenseTime = Buffer._Time * 60000;
    lpObj->m_ViewSkillState |= 4;
    lpObj->m_ViewSkillState |= 0x2000000;
    GCMagicAttackNumberSend(Npc, 27, lpObj->m_Index, true);


    ChatTargetSend(Npc, "He aumentado tu defensa y ataque.", lpObj->m_Index);
    return;
}

#pragma once

class cBuffer
{
public:
    bool Load();
    void Elf(OBJECTSTRUCT* Npc, OBJECTSTRUCT* lpObj);


private:
    bool                _Active;
    int                    _Vip;
    int                    _Level;
    char                _Buffer[60];
    int                    _Time;
    int                    _Attack;
    int                    _Defense;
};


extern cBuffer Buffer;
none
Last Modified:2025-10-14 23:19:19

我有话说