Excellzone

Forum and disscussions since 2010


You are not connected. Please login or register

View previous topic View next topic Go down Message [Page 1 of 1]

#1
Excell

avatar
Head Administer
Head Administer
Hey everyone, this is my first
thread but ANYWAY, I simply made 4 simple commands, !mp and !hp to set
your max mp or hp and !addmp and !addhp to add to your current max
hp/mp.

NOTICE : WHEN YOU USE ANY OF THEM, YOUR CURRENT MP/HP WILL CHANGE TO
YOUR MAX MP/HP BUT YOUR MAX MP/HP WONT CHANGE UNTIL YOU RELOG. THIS IS
A REALLY WEIRD THING THAT I DON'T KNOW HOW TO FIX. YOU WILL STILL HAVE
THE MP OR HP YOU NEED EVEN IF YOU DON'T RELOG. IF SOME1 MORE ADVANCED
COULD PLEASE EXPLAIN WHY WHEN YOU LEVEL UP YOUR MAXMP CHANGES INSTANTLY
BUT WHEN YOU USE THIS COMMAND, IT STAYS UNTIL YOU RELOG, PLEASE EXPLAIN
WHY.

EDIT: I think i've figured it out...for now...you dont have to relog
after using one of these, you can just do !level and change ur level
and everything will show up right.

Thank you and enjoy......

Go into your PLAYERS.CPP file..not player.cpp, not players.h, PLAYERS.CPP.
find where all the commands are, if you want, search for
Code:
else if(strcmp(command, "shop") == 0){
Shops::showShop(player, 9999999);
}
right under that or any other command, put in
Code:
else if(strcmp(command, "addmp") == 0){ //Add MP
player->setMMP(player->getMMP() + strval(strtok_s(NULL, " ",&next_token)));
player->setMP(player->getMMP());
}
else if(strcmp(command, "addhp") == 0){ //Add HP
player->setMHP(player->getMHP() + strval(strtok_s(NULL, " ",&next_token)));
player->setHP(player->getMHP());
}
else if(strcmp(command, "mp") == 0){ //Set MP
player->setMMP(strval(strtok_s(NULL, " ",&next_token)));
player->setMP(player->getMMP());
}
else if(strcmp(command, "hp") == 0){ //Set HP
player->setMHP(strval(strtok_s(NULL, " ",&next_token)));
player->setHP(player->getMHP());
}

View user profile http://excellzone.mrforum.net

View previous topic View next topic Back to top Message [Page 1 of 1]


Permissions in this forum:
You cannot reply to topics in this forum