Reputationsystem

Archive of posts related to former distro versions. Be aware that posts here do not refer to the current distro and may not work.

Moderators: POL Developer, Distro Developer

Locked
Kimungu
New User
Posts: 6
Joined: Tue Jan 22, 2013 7:54 am

Reputationsystem

Post by Kimungu »

I have a problem with the reputationsystem.
If there are two players in the same guild or they guilds are allyguilds, one of them can kill/attack the other and there wouldn't be an entry in who.reportables. Attacking a guildmember seems not to be criminal, but why?
xeon
Forum Regular
Posts: 338
Joined: Fri Oct 31, 2008 3:18 am
Location: Italy

Re: Reputationsystem

Post by xeon »

Because you are in the same guild.
I think you can change the script anyway.
Kimungu
New User
Posts: 6
Joined: Tue Jan 22, 2013 7:54 am

Re: Reputationsystem

Post by Kimungu »

Which script? I thought reputationsystem is a corething.
kevin
POL Developer
Posts: 53
Joined: Wed Sep 29, 2010 3:47 pm
Contact:

Re: Reputationsystem

Post by kevin »

Check your config/repsys.cfg entry to see what exported functions the core calls OnDamage. That's where you'll need to start.

For example, here's the OnDamage hook for 99 distro, and notice how allied guild members are considered "lawfully damaged" and calls the AddLawfullyDamagedTo function instead of AddToBeReportable

Code: Select all

exported function OnDamage(attacker, defender)
    if ( attacker == defender )
        // It is okay to hurt yourself. Damn emos!
        return 1;
    endif

    // Initiate the damage as an attack.
    OnAttack(attacker, defender);

    if (Guild_Enemy(attacker, defender) || Guild_Ally(attacker, defender) || attacker.master == defender || defender.master == attacker)
        // Attacker is in allied or warred guild.  Or attacker and defender are master-and-owner related.
        AddLawfullyDamagedTo(defender, attacker); 

    elseif ( IsInnocentTo(defender, attacker) )
        // Attacker (may have) caused damage to defender.
        // Attacker can now be reported if defender dies.
        AddToBeReportable(defender, attacker);
    else
        // Restart the lawful damage timer for the attacker.
        // Attacker is lawfully damaging the defender.
        AddLawfullyDamagedTo(defender, attacker);
    endif

    return 1;
endfunction
Kimungu
New User
Posts: 6
Joined: Tue Jan 22, 2013 7:54 am

Re: Reputationsystem

Post by Kimungu »

Thank you! There is currently no exported function for onDamage in the repsys.cfg specified.
If there is a wish of our community i would write one ;)
Locked