[Release] Stat Reset NPC (Sera)

Results 1 to 14 of 14
  1. #1
    Enthusiast FearedBliss is offline
    MemberRank
    Apr 2008 Join Date
    26Posts

    [Release] Stat Reset NPC (Sera)

    This stat reset is for the first NPC you see when you drop into the Maple world. Sera. If you played Odin MS you already know this.

    Some credits go to Reiyhn since I used parts of his Stat Reseter.

    MapleIsland.cpp
    Code:
    #include "NPCs.h"
    #include "NPCsScripts.h"
    #include "Player.h"
    
    void NPCsScripts::npc_2100(NPC* npc) {
        int state = npc->getState();
            
        if(state == 0) {
            npc->addText("Welcome to MapleStory. Do you want a free stat reset ?");
            npc->sendYesNo();
        }
        else if(state == 1) {
            Player * player = npc->getPlayer();
            if(npc->getSelected() == YES) {
                npc->addText("Alright, please relog and you will have your stat reset !");
                npc->setSTR(4);
                npc->setDEX(4);
                npc->setLUK(4);
                npc->setINT(4);
                npc->setAP(9); // Default AP
                npc->sendOK();
            }
            else if(npc->getSelected() == NO) {
                    npc->addText("Your stats will not be reset.");
                    npc->sendOK();
                }
        }
        else if(state == 2) {
            npc->teleport(40000);
        }
    }
    NPCs.h
    Code:
    void setLUK(short luk);
    void setINT(short Int);
    void setDEX(short dex);
    void setSTR(short str);
    void setAP(short ap);
    void setSP(short sp);
    NPCs.cpp
    Code:
    void NPC::setDEX(short dex){
        player->setDex(dex);
    }
    void NPC::setLUK(short luk){
        player->setLuk(luk);
    }
    void NPC::setSTR(short str){
        player->setStr(str);
    }
    void NPC::setINT(short Int){
        player->setInt(Int);
    }
    void NPC::setAP(short ap){
        player->setAp(ap);
    }
    void NPC::setSP(short sp){
        player->setSp(sp);
    }
    Comment the stuff on this code :

    NPCsScripts.h
    Code:
    #ifndef NPCSSCRIPT_H
    #define NPCSSCRIPT_H
    
    class NPC;
    
    int strval(char* buf);
    
    class QuestsScripts {
    public:
        static void handle(int npcid, NPC* npc, bool start){
            /*if(start){
                switch(npcid){
                    case 2000: npc_2000s(npc); break;
                    default: npc->end(); break;
                }
            }
            else{
                switch(npcid){
                    case 2000: npc_2000e(npc); break;
                    default: npc->end(); break;
                }
            }*/
        }
    private:
        //static void npc_2000s(NPC* npc);
        //static void npc_2000e(NPC* npc);
    };
    
    class NPCsScripts {
    public:
        static void handle(int npcid, NPC* npc){
            if(npc->isQuest()){
                QuestsScripts::handle(npcid, npc, npc->isStart());
                return;
            }
            switch(npcid){
                case 2100: npc_2100(npc); break;
                //case 2101: npc_2101(npc); break;
                //case 2020005: npc_2020005(npc); break;
                //case 9101001: npc_9101001(npc); break;
                case 9900000: npc_9900000(npc); break;
                default: npc->end(); break;
            }
        }
    private:
        static void npc_2100(NPC* npc);
        //static void npc_2101(NPC* npc);
        //static void npc_2020005(NPC* npc);
        //static void npc_9101001(NPC* npc);
        static void npc_9900000(NPC* npc);
    };
    
    #endif


  2. #2
    Account Upgraded | Title Enabled! ctZ'... is offline
    MemberRank
    Dec 2006 Join Date
    533Posts

    Re: [Release] Stat Reset NPC (Sera)

    Im making a more complicated Sera, Im making her so the user chooses what job he/she's going to be then it adds 13 for the main stat of that job and sets 4 in the other stats. its almost done, but im having some weird pain, so I'm not in the mood :\

  3. #3
    Enthusiast FearedBliss is offline
    MemberRank
    Apr 2008 Join Date
    26Posts

    Re: [Release] Stat Reset NPC (Sera)

    That's pretty easy to code but it will make peoples lives easier. The ultimate Sera would probably set the players HP/MP/AP/Skills and appropriate level for that job and after that it would teleport them to the trainer.

  4. #4
    Account Upgraded | Title Enabled! ctZ'... is offline
    MemberRank
    Dec 2006 Join Date
    533Posts

    Re: [Release] Stat Reset NPC (Sera)

    Lol, na, its the only bonus im putting on my server =)

  5. #5
    Enthusiast FearedBliss is offline
    MemberRank
    Apr 2008 Join Date
    26Posts

    Re: [Release] Stat Reset NPC (Sera)

    Lol alright.

  6. #6
    Apprentice shesSEXY is offline
    MemberRank
    May 2008 Join Date
    19Posts

    Re: [Release] Stat Reset NPC (Sera)

    fatal error C1004: unexpected end-of-file found
    help?

  7. #7
    Account Upgraded | Title Enabled! sean360 is offline
    MemberRank
    Apr 2008 Join Date
    PhilippinesLocation
    426Posts

    Re: [Release] Stat Reset NPC (Sera)

    Quote Originally Posted by shesSEXY View Post
    help?
    Lol don't tell me you replaced all your npcscripts.h with his script xD

  8. #8
    Enthusiast imcedric is offline
    MemberRank
    Jun 2008 Join Date
    42Posts

    Re: [Release] Stat Reset NPC (Sera)

    erm sry can u say where to put the stuff pls?

    im not gd at this

    thx

  9. #9
    Apprentice asdlkjqwepoi is offline
    MemberRank
    Nov 2006 Join Date
    20Posts

    Re: [Release] Stat Reset NPC (Sera)

    1>------ Build started: Project: MapleStoryServer, Configuration: Debug Win32 ------
    1>Compiling...
    1>NPCs.cpp
    1>c:\documents and settings\whye\desktop\my mapleserver\software needed\dys repack\dys repack\dys repack\maplestoryserver\npcs.cpp(581) : error C2039: 'setDEX' : is not a member of 'NPC'
    1> c:\documents and settings\whye\desktop\my mapleserver\software needed\dys repack\dys repack\dys repack\maplestoryserver\npcs.h(56) : see declaration of 'NPC'
    1>c:\documents and settings\whye\desktop\my mapleserver\software needed\dys repack\dys repack\dys repack\maplestoryserver\npcs.cpp(582) : error C2065: 'player' : undeclared identifier
    1>c:\documents and settings\whye\desktop\my mapleserver\software needed\dys repack\dys repack\dys repack\maplestoryserver\npcs.cpp(582) : error C2227: left of '->setDex' must point to class/struct/union/generic type
    1> type is ''unknown-type''
    1>c:\documents and settings\whye\desktop\my mapleserver\software needed\dys repack\dys repack\dys repack\maplestoryserver\npcs.cpp(584) : error C2039: 'setLUK' : is not a member of 'NPC'
    1> c:\documents and settings\whye\desktop\my mapleserver\software needed\dys repack\dys repack\dys repack\maplestoryserver\npcs.h(56) : see declaration of 'NPC'
    1>c:\documents and settings\whye\desktop\my mapleserver\software needed\dys repack\dys repack\dys repack\maplestoryserver\npcs.cpp(585) : error C2065: 'player' : undeclared identifier
    1>c:\documents and settings\whye\desktop\my mapleserver\software needed\dys repack\dys repack\dys repack\maplestoryserver\npcs.cpp(585) : error C2227: left of '->setLuk' must point to class/struct/union/generic type
    1> type is ''unknown-type''
    1>c:\documents and settings\whye\desktop\my mapleserver\software needed\dys repack\dys repack\dys repack\maplestoryserver\npcs.cpp(587) : error C2039: 'setSTR' : is not a member of 'NPC'
    1> c:\documents and settings\whye\desktop\my mapleserver\software needed\dys repack\dys repack\dys repack\maplestoryserver\npcs.h(56) : see declaration of 'NPC'
    1>c:\documents and settings\whye\desktop\my mapleserver\software needed\dys repack\dys repack\dys repack\maplestoryserver\npcs.cpp(588) : error C2065: 'player' : undeclared identifier
    1>c:\documents and settings\whye\desktop\my mapleserver\software needed\dys repack\dys repack\dys repack\maplestoryserver\npcs.cpp(588) : error C2227: left of '->setStr' must point to class/struct/union/generic type
    1> type is ''unknown-type''
    1>c:\documents and settings\whye\desktop\my mapleserver\software needed\dys repack\dys repack\dys repack\maplestoryserver\npcs.cpp(590) : error C2039: 'setINT' : is not a member of 'NPC'
    1> c:\documents and settings\whye\desktop\my mapleserver\software needed\dys repack\dys repack\dys repack\maplestoryserver\npcs.h(56) : see declaration of 'NPC'
    1>c:\documents and settings\whye\desktop\my mapleserver\software needed\dys repack\dys repack\dys repack\maplestoryserver\npcs.cpp(591) : error C2065: 'player' : undeclared identifier
    1>c:\documents and settings\whye\desktop\my mapleserver\software needed\dys repack\dys repack\dys repack\maplestoryserver\npcs.cpp(591) : error C2227: left of '->setInt' must point to class/struct/union/generic type
    1> type is ''unknown-type''
    1>1stJob.cpp
    1>3rdJob.cpp
    1>4thJob.cpp
    1>MapleIsland.cpp
    1>c:\documents and settings\whye\desktop\my mapleserver\software needed\dys repack\dys repack\dys repack\maplestoryserver\mapleisland.cpp(365) : error C2039: 'setSTR' : is not a member of 'NPC'
    1> c:\documents and settings\whye\desktop\my mapleserver\software needed\dys repack\dys repack\dys repack\maplestoryserver\npcs.h(56) : see declaration of 'NPC'
    1>c:\documents and settings\whye\desktop\my mapleserver\software needed\dys repack\dys repack\dys repack\maplestoryserver\mapleisland.cpp(366) : error C2039: 'setDEX' : is not a member of 'NPC'
    1> c:\documents and settings\whye\desktop\my mapleserver\software needed\dys repack\dys repack\dys repack\maplestoryserver\npcs.h(56) : see declaration of 'NPC'
    1>c:\documents and settings\whye\desktop\my mapleserver\software needed\dys repack\dys repack\dys repack\maplestoryserver\mapleisland.cpp(367) : error C2039: 'setLUK' : is not a member of 'NPC'
    1> c:\documents and settings\whye\desktop\my mapleserver\software needed\dys repack\dys repack\dys repack\maplestoryserver\npcs.h(56) : see declaration of 'NPC'
    1>c:\documents and settings\whye\desktop\my mapleserver\software needed\dys repack\dys repack\dys repack\maplestoryserver\mapleisland.cpp(368) : error C2039: 'setINT' : is not a member of 'NPC'
    1> c:\documents and settings\whye\desktop\my mapleserver\software needed\dys repack\dys repack\dys repack\maplestoryserver\npcs.h(56) : see declaration of 'NPC'
    1>Generating Code...
    1>Compiling...
    1>Quests.cpp
    1>Generating Code...
    1>Build log was saved at "file://c:\Documents and Settings\whye\Desktop\My mapleserver\software needed\DYS REPACK\DYS REPACK\DYS Repack\MapleStoryServer\Debug\BuildLog.htm"
    1>MapleStoryServer - 16 error(s), 0 warning(s)
    ========== Build: 0 succeeded, 1 failed, 2 up-to-date, 0 skipped ==========
    i get this error.
    anyone help please.

  10. #10
    Apprentice mapleman111 is offline
    MemberRank
    Jul 2008 Join Date
    12Posts

    Re: [Release] Stat Reset NPC (Sera)

    mismatched #if/#endif pair in file

    What should i do?

  11. #11
    Apprentice thiefsrule is offline
    MemberRank
    Aug 2008 Join Date
    7Posts

    Re: [Release] Stat Reset NPC (Sera)

    mapleisland.cpp(277) : error C2039: 'npc_2020005' : is not a member of 'NPCsScripts'

    i got this error, any1 know how to fix it?

  12. #12
    Alpha Member Vakarian is offline
    MemberRank
    Apr 2008 Join Date
    Ohio, USALocation
    2,134Posts

    Re: [Release] Stat Reset NPC (Sera)

    Quote Originally Posted by thiefsrule View Post
    mapleisland.cpp(277) : error C2039: 'npc_2020005' : is not a member of 'NPCsScripts'

    i got this error, any1 know how to fix it?
    Augh.
    Stop rezzing topics!
    Just PM them!
    There's ~90% chance they're inactive on the forum, though.
    So; if that doesn't work.
    Support Forum.

  13. #13
    Enthusiast fallengod is offline
    MemberRank
    Oct 2008 Join Date
    CTLocation
    34Posts

    Re: [Release] Stat Reset NPC (Sera)

    can u make max stats shop with this cuz i have a max stats shop and i need it 2 reset ur stats when u buy something from them

  14. #14
    Account Upgraded | Title Enabled! xcelinex33 is offline
    MemberRank
    Apr 2008 Join Date
    spooksLocation
    859Posts

    Re: [Release] Stat Reset NPC (Sera)

    Neeb stop bumping old threads .-.



Advertisement