Page 1 of 1

PvP Points From mobs

Posted: Sat Nov 27, 2010 7:18 pm
by dymek84
Hello i have pvp points on my server. From each killed pleyera gets his 10% pvpPoints and that points has stored in db new column in characters
Wanna know how to add these points to the mobs and get them together with exp and sp.
but if exp is set to 7000 is a mob would give me 7 pvppoints.
hope u understand me cuz my english is more funny than the understandable.

Re: PvP Points From mobs

Posted: Mon Dec 06, 2010 8:33 pm
by dymek84
CAn some one help me with this for now i have:

Code: Select all

package com.l2jserver.gameserver.model.actor.instance; import com.l2jserver.gameserver.model.actor.L2Character;import com.l2jserver.gameserver.model.actor.L2Summon;import com.l2jserver.gameserver.templates.chars.L2NpcTemplate; /** * This class manages special pvpkill rewards mobs. */public class L2PvpMobInstance extends L2MonsterInstance{    public L2PvpMobInstance(int objectId, L2NpcTemplate template)    {        super(objectId, template);        setInstanceType(InstanceType.L2PvpMobInstance);    }     /**    * Manages the doDie event<BR><BR>    *    * @param killer The L2Character that killed this instance.<BR><BR>    */    @Override    public boolean doDie(L2Character killer)    {        if (!super.doDie(killer))            return false;        L2PcInstance player = null;                if (killer instanceof L2PcInstance)            player = (L2PcInstance) killer;        else if (killer instanceof L2Summon)            player = ((L2Summon) killer).getOwner();                if (killer != null)        {                           numberToAdd = (getLevel()-79)*2;                setPvpPoints(playerr.getPvpPoints() + numberToAdd);          }                               return true;    }}
that is new java L2pvpMobInstance for mobs 80+ lvl this code have some errors and think i miss something.
pls help me i working on this 3rd weaks. I want to finish it in the end and take you for the rest of