thanks, do you know anything about 0.3.7?![]()
CreatureEvent - [TFS 1.3] Vocations Balancing [Easiest Way]
Had to write this code for my server because when player PVP they die faster than they should, so i gave players protection through this code depending on their vocation, so this code won't work verses monsters only players, you can easily change it by removing the if function i will show you it...otland.net
tell me how u want it work?thanks, do you know anything about 0.3.7?
Players dmg vs monsters = 100% and players dmg vs players = 50% ( normal thing )tell me how u want it work?
in game.cpp that will decrease all coming damage to target playerPlayers dmg vs monsters = 100% and players dmg vs players = 50% ( normal thing )
I wanna to change players vs players to be 25% instead of 50%
i tried to make onStatsChange script but i got overstack flow problem.
So where i get this?
if (target && target->getPlayer())
{
damage = static_cast<int32_t>(damage /2); // you can use /2 or *0.50
}
if(target && target->getPlayer())
{
std::string value;
target->getPlayer()->getStorage(xxxx, value);
int32_t tmp = (int32_t)(atoi(value.c_str()));
if(tmp > 0 )
damage = static_cast<int32_t>(damage/2);
}
if(target && target->getPlayer())
{
if( params.combatType == COMBAT_PHYSICALDAMAGE)
damage = static_cast<int32_t>(damage /2);
}
Thanks, i will test it and give you feedback.in game.cpp that will decrease all coming damage to target player
LUA:if (target && target->getPlayer()) { damage = static_cast<int32_t>(damage /2); // you can use /2 or *0.50 }
if you want it work if target player have x storage
Code:if(target && target->getPlayer()) { std::string value; target->getPlayer()->getStorage(xxxx, value); int32_t tmp = (int32_t)(atoi(value.c_str())); if(tmp > 0 ) damage = static_cast<int32_t>(damage/2); }
if you want it work for combat
Code:if(target && target->getPlayer()) { if( params.combatType == COMBAT_PHYSICALDAMAGE) damage = static_cast<int32_t>(damage /2); }
nothing of this inside game.cppin game.cpp that will decrease all coming damage to target player
LUA:if (target && target->getPlayer()) { damage = static_cast<int32_t>(damage /2); // you can use /2 or *0.50 }
if you want it work if target player have x storage
Code:if(target && target->getPlayer()) { std::string value; target->getPlayer()->getStorage(xxxx, value); int32_t tmp = (int32_t)(atoi(value.c_str())); if(tmp > 0 ) damage = static_cast<int32_t>(damage/2); }
if you want it work for combat
Code:if(target && target->getPlayer()) { if( params.combatType == COMBAT_PHYSICALDAMAGE) damage = static_cast<int32_t>(damage /2); }
u add itnothing of this inside game.cpp
ok thanks, i will test it.u add itunder int32_t damage = -healthChange;