Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Stat Maxing Command

Newbie Spellweaver
Joined
Apr 10, 2008
Messages
50
Reaction score
0
This is something I've always wanted to make ever since the private servers have come out since some rates are extreamly high and if you're left with 200 points to put in, that'll take you a while to put them all in.

What this command does is it will take you're AP and max out a stat of you're choice.

Note:
This adds all of the points in but keeps the AP until the player adds in another point which will set the AP to 0.

Commands:
Code:
!max str
!max dex
!max int
!max luk
#1. Open Players.cpp
Add
Code:
#include "LevelsPacket.h"
With all of the includes

#2. Add the following command with the others.
Code:
        else if(strcmp(command, "max") == 0){
            if(strlen(next_token) > 0) {
                char *name = strtok_s(NULL, " ",&next_token);
                if (player->getAp() > 4)
                {
                    if (strcmp(name, "str") == 0) {
                        player->setStr((player->getStr()+player->getAp())-1);
                        player->setAp(0+1);
                        LevelsPacket::changeStat(player, 0x40, player->getStr());

                        PlayersPacket::ShowNotice(player, "You're Str has been maxed", 6);
                        printf ("%s has maxed their Str via command.\n", player->getName());
                    }
                    if (strcmp(name, "dex") == 0) {
                        player->setDex((player->getDex()+player->getAp()-1));
                        player->setAp(0+1);
                        LevelsPacket::changeStat(player, 0x80, player->getDex());

                        PlayersPacket::ShowNotice(player, "You're Dex has been maxed", 6);
                        printf ("%s has maxed their Dex via command.\n", player->getName());
                    }
                    if (strcmp(name, "int") == 0) {
                        player->setInt((player->getInt()+player->getAp())-1);
                        player->setAp(0+1);
                        LevelsPacket::changeStat(player, 0x100, player->getInt());

                        PlayersPacket::ShowNotice(player, "You're Int has been maxed", 6);
                        printf ("%s has maxed their Int via command.\n", player->getName());
                    }
                    if (strcmp(name, "luk") == 0) {
                        player->setLuk((player->getLuk()+player->getAp())-1);
                        player->setAp(0+1);
                        LevelsPacket::changeStat(player, 0x200, player->getLuk());

                        PlayersPacket::ShowNotice(player, "You're Luk has been maxed", 6);
                        printf ("%s has maxed their Luk via command.\n", player->getName());
                    }
                }
                else{
                PlayersPacket::ShowNotice(player, "You need 5 or more AP to use this command", 1);
                }
            }
        }
#3.
Open Player.h

Change
Code:
void setStr(short str){
to
Code:
void setStr(int str){
Change
Code:
void setDex(short dex){
to
Code:
void setDex(int dex){
Change
Code:
void setInt(short int){
to
Code:
void setInt(int int){
Change
Code:
void setLuk(short luk){
to
Code:
void setLuk(int luk){
Done.
 
Skilled Illusionist
Joined
Apr 11, 2008
Messages
302
Reaction score
0
Re: [Release]Stat Maxing Command

I think somebody already released this. o.o
 
Master Summoner
Loyal Member
Joined
Jul 22, 2008
Messages
573
Reaction score
0
Re: [Release]Stat Maxing Command

odin or titian?
 
Newbie Spellweaver
Joined
Aug 8, 2008
Messages
50
Reaction score
0
Re: [Release]Stat Maxing Command

I might try this on my Titan Server.
 
Junior Spellweaver
Joined
Jul 5, 2008
Messages
131
Reaction score
0
Re: [Release]Stat Maxing Command

fair enuf release,
steals and runs with the code~~
But it's better to make like !stradd 3 and checks for ap left.
 
Back
Top