Page 1 of 1


Posted: Tue Jan 22, 2013 8:14 am
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?

Re: Reputationsystem

Posted: Tue Jan 22, 2013 12:59 pm
by xeon
Because you are in the same guild.
I think you can change the script anyway.

Re: Reputationsystem

Posted: Wed Jan 23, 2013 3:02 pm
by Kimungu
Which script? I thought reputationsystem is a corething.

Re: Reputationsystem

Posted: Mon Jan 28, 2013 12:01 am
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;

    // 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);
        // Restart the lawful damage timer for the attacker.
        // Attacker is lawfully damaging the defender.
        AddLawfullyDamagedTo(defender, attacker);

    return 1;

Re: Reputationsystem

Posted: Sat Sep 14, 2013 5:05 pm
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 ;)