sabodden
Member
- Joined
- Sep 27, 2019
- Messages
- 138
- Reaction score
- 18
I want to finish this script:
That make players and monsters with storage 668 recive more damage
Searching on forum examples i manage to do on game.cpp
But it only get player storage...
How also get monsters storage to do the same thing?
TFS 0.X - How to make a spell in area that set a storage to eveyone around for 10 seconds
For players and monsters, i wanna make something like new sorcerer spell (curse) Is it possible with LUA? https://github.com/Fir3element/3777/blob/master/src/luascript.cpp
otland.net
That make players and monsters with storage 668 recive more damage
Searching on forum examples i manage to do on game.cpp
Code:
int32_t damage = -healthChange;
//-----------------------------------------------------------------------------------------------------------------------------------------------------------------
// def debuff
//-----------------------------------------------------------------------------------------------------------------------------------------------------------------
if(target && target->getPlayer())
{
std::string value;
target->getPlayer()->getStorage(668, value);
int32_t buffPercent = (int32_t)(atoi(value.c_str()));
if(buffPercent > 0) {
damage = (int64_t)std::floor (damage + damage * buffPercent /100);
}
}
//-----------------------------------------------------------------------------------------------------------------------------------------------------------------
if(damage != 0)
{
But it only get player storage...
How also get monsters storage to do the same thing?