TitanMS setStr, setDex, setInt, setLuk commands

Newbie Spellweaver
Joined
Apr 12, 2008
Messages
40
Reaction score
0
A very small release, I haven't tested this with 0.2.0, but with the past versions, you would have to add one point to the skill for the new effects.

So in ChatHandler.cpp
Add:
Code:
else if(command == "setstr"){
            int newstat = strval(msg.substr(msg.find(" ")));
            player->setStr(newstat);
}
else if(command == "setdex"){
            int newstat = strval(msg.substr(msg.find(" ")));
            player->setDex(newstat);
}
else if(command == "setint"){
            int newstat = strval(msg.substr(msg.find(" ")));
            player->setInt(newstat);
}
else if(command == "setluk"){
            int newstat = strval(msg.substr(msg.find(" ")));
            player->setLuk(newstat);
}

After:
Code:
else if(command == "ap"){
            int ap = strval(msg.substr(msg.find(" ")));
            player->addAP(ap);
        }

Doesn't really matter after which command you add it after though.
 
Re: [Release]TitanMS setStr, setDex, setInt, setLuk commands

Yeah, those ones set too.
The !str commands add to the current str, mine changes it to a new one.

If you take a look at the !str command, you will see
Code:
player->addStr(s)
when mine's
Code:
player->setStr(newstat)
 
Re: [Release]TitanMS setStr, setDex, setInt, setLuk commands

setStr doesnt work on Angel Script, you gotta change it anyway (quite easy).
 
Re: [Release]TitanMS setStr, setDex, setInt, setLuk commands

setStr doesnt work on Angel Script, you gotta change it anyway (quite easy).
This isn't for the scripting, it's for the GM commands. I tested it and it worked :)

But yeah, for NPCs and stuff it might not work.
 
Back