Hellion
Gremlin
Posts: 9
Joined: Feb 2011
Reputation: 0
Version:
1.4.1.95
|
PvP External Editor Help
Im not really understanding what "class aggro" means or what to set this number to. I understand what "Range max" means, but I don't understand the "Range Max Threat" nor the "range modifier".
What number do I set the "target my party" to attack that class?
How do I not target certain classes? For instance I don't want to target Tanks/dwarfs/sws/bd.
(This post was last modified: 06-16-2011 23:18 PM by Hellion.)
|
|
06-16-2011 23:17 PM |
|
ClockMan
All Mighty
Posts: 2,886
Joined: Jan 2011
Reputation: 499
Version:
1.4.3.143
|
RE: PvP External Editor Help
every number adds "agro" to char. You target char with bigest agro.
class agro is base class agro.
range max is max target range.
range max threat is maximum target range for specyfic class.
range modifier - i dont know what is this, for sure next numer what doing some calculations.
C++ Programming
bool
AutoTarget::TickPvp()
{
BEGIN_GUARD
if (!CONFIG->data.pvp.enabled) return false;
if ( DB->GetMyself ( m_myself ) == false )
{
return false;
}
EngineLayer::DataIndexList & players = DataCollection::GetSingleton()->GetPlayerList();
int top_aggro = 0;
DataMonster * victim = NULL;
std::set<DataMonster *>::const_iterator iter;
for ( iter = players.GetList().begin(); iter != players.GetList().end(); ++iter )
{
DataMonster * player = *iter;
if (NULL == player) continue;
LOG(TEXT("Testing pvp: %p %s pawn=%p\n"), player, player == NULL ? TEXT("none") : player->GetName(), player->GetPawn() );
if (!player->IsValid() || !player->IsEnemy() ||!player->CanSeeMe()) continue;
LOG(TEXT("Player is enemy pvp: %s\n"), player->GetName() );
int base_aggro = 10000;
base_aggro = base_aggro * ModifyStaticPvpAggro ( player ) / 100;
LOG(TEXT("Player aggro: %d\n"), base_aggro );
base_aggro = base_aggro * ModifyDynamicPvpAggro( player ) / 100;
LOG(TEXT("Player aggro: %d\n"), base_aggro );
if ( base_aggro > 0 && base_aggro > top_aggro )
{
top_aggro = base_aggro;
victim = player;
}
}
LOG(TEXT("Found victim = %p ( aggro = %d )\n"), victim, top_aggro );
if ( victim != NULL )
{
TARGET->Target(victim->GetId(), EngineLayer::TARGET_BY_PVP_AUTOTARGET);
}
else
{
TARGET->CancelTarget(EngineLayer::TARGET_BY_PVP_AUTOTARGET);
}
LOG(TEXT("Im done)\n") );
return true;
END_GUARD
}
// Funkcja ta przetwarza statyczne dane o graczu ktore sa niezalezne od jego klasy.
int
AutoTarget::ModifyStaticPvpAggro( DataMonster * player )
{
BEGIN_GUARD
L2TowerShared::PvpClassAggro & data = CONFIG->GetSharedConfiguration().GetData().pvp_class;
int retval = 100;
if ( data.skip_dead && player->IsAlikeDeath() == true )
{
return 0;
}
if ( player->IsPvPFlag() == true )
{
retval += data.flagged;
}
if ( player->IsPvPFlagBlink() == true )
{
retval += data.flagged_blink;
}
if ( TARGET->GetTarget(EngineLayer::TARGET_BY_MYSELF) == player->GetId() )
{
retval += data.target_onselftarget;
}
else if ( TARGET->GetTarget(EngineLayer::TARGET_BY_PVP_AUTOTARGET) == player->GetId() )
{
retval += data.target_onautotarget;
}
return retval;
END_GUARD
}
// przetwarzamy dynamiczne dane przypisane do klasy gracza. [ moga byc edytowane real-time z zewnatrz ]
int
AutoTarget::ModifyDynamicPvpAggro( DataMonster * player )
{
BEGIN_GUARD
const L2TowerShared::PvpClassData & data = CONFIG->GetSharedConfiguration().GetData().pvp_class.CLASS_Data[player->GetClass()];
int retval = data.class_aggro;
int targetId = player->target_id;
if ( targetId != 0 )
{
DataMonster * target = DB->GetMById ( targetId );
if ( target != NULL )
{
if ( target->IsMyPartyMember() )
{
retval += data.target_my_party;
}
else if ( target->IsMyClanMember() )
{
retval += data.target_my_clan;
}
}
}
if ( data.range_modifier != 100 && data.range_max_threat > m_myself->GetRangeTo ( player ))
{
retval += data.range_modifier;
}
if ( data.range_max > m_myself->GetRangeTo( player ) )
{
retval = 0; // do not target someone outside max range!
}
return 100;
END_GUARD
}
|
|
06-16-2011 23:36 PM |
|
Hellion
Gremlin
Posts: 9
Joined: Feb 2011
Reputation: 0
Version:
1.4.1.95
|
RE: PvP External Editor Help
I set the class aggro for tanks to "0" but I still target tanks. =/
I really don't want to target tanks/dwarf/sws/bd at all on my archer.
|
|
06-17-2011 07:04 AM |
|
Hellion
Gremlin
Posts: 9
Joined: Feb 2011
Reputation: 0
Version:
1.4.1.95
|
RE: PvP External Editor Help
(06-17-2011 09:40 AM)Geddys Wrote: (06-17-2011 07:04 AM)Hellion Wrote: I set the class aggro for tanks to "0" but I still target tanks. =/
I really don't want to target tanks/dwarf/sws/bd at all on my archer.
Maybe try MaxRange to 0 for those classes.
I tried that but I am still targeting tanks =/ I guess I am doing something wrong. When I type /xcfg ingame I see all the settings I made so I know everything it is saving. Both range and max range are set to "0", aggro is as well set to "0".
I even tried setting all classes to "0" everything but I still target everyone at 1200 range.
Maybe it has something to do with the server I play on?
(This post was last modified: 06-18-2011 08:34 AM by Hellion.)
|
|
06-18-2011 08:31 AM |
|