- 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:
#1. Open Players.cpp
Add
With all of the includes
#2. Add the following command with the others.
#3.
Open Player.h
Change
to
Change
to
Change
to
Change
to
Done.
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
Add
Code:
#include "LevelsPacket.h"
#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);
}
}
}
Open Player.h
Change
Code:
void setStr(short str){
Code:
void setStr(int str){
Code:
void setDex(short dex){
Code:
void setDex(int dex){
Code:
void setInt(short int){
Code:
void setInt(int int){
Code:
void setLuk(short luk){
Code:
void setLuk(int luk){