- Joined
- Apr 12, 2008
- Messages
- 40
- Reaction score
- 0
Another very easy update that koolk didn't have the time to add or didn't feel it was necessary.
Add:
After:
This will allow anyone to use @ and then commands. To add new ones, you just add it after the 2nd closing bracket and use it like the gm commands.
Add:
Code:
else if(msg.substr(0, 1) == "@"){
string command = msg.substr(1, msg.find(" ")-1);
if(command == "str"){
int add = strval(msg.substr(msg.find(" ")));
if(add <= player->getAP())
{
player->addSTR(add);
player->addAP(-add);
}
}
else if(command == "dex"){
int add = strval(msg.substr(msg.find(" ")));
if(add <= player->getAP())
{
player->addDEX(add);
player->addAP(-add);
}
}
else if(command == "int"){
int add = strval(msg.substr(msg.find(" ")));
if(add <= player->getAP())
{
player->addINT(add);
player->addAP(-add);
}
}
else if(command == "luk"){
int add = strval(msg.substr(msg.find(" ")));
if(add <= player->getAP())
{
player->addLUK(add);
player->addAP(-add);
}
}
}
After:
Code:
else if(command == "horntail"){
player->getMap()->getMobs()->spawnMob(8810000, player->getPosition().x, player->getPosition().y, -1, false);
player->getMap()->getMobs()->spawnMob(8810001, player->getPosition().x, player->getPosition().y, -1, false);
player->getMap()->getMobs()->spawnMob(8810002, player->getPosition().x, player->getPosition().y, -1, false);
player->getMap()->getMobs()->spawnMob(8810003, player->getPosition().x, player->getPosition().y, -1, false);
player->getMap()->getMobs()->spawnMob(8810004, player->getPosition().x, player->getPosition().y, -1, false);
player->getMap()->getMobs()->spawnMob(8810005, player->getPosition().x, player->getPosition().y, -1, false);
player->getMap()->getMobs()->spawnMob(8810006, player->getPosition().x, player->getPosition().y, -1, false);
player->getMap()->getMobs()->spawnMob(8810007, player->getPosition().x, player->getPosition().y, -1, false);
player->getMap()->getMobs()->spawnMob(8810008, player->getPosition().x, player->getPosition().y, -1, false);
}
}
This will allow anyone to use @ and then commands. To add new ones, you just add it after the 2nd closing bracket and use it like the gm commands.