Jump to content
  • 0

Add Point pvp in arena zone


Amanda55
 Share

Question

10 answers to this question

Recommended Posts

  • 0
* This program is free software: you can redistribute it and/or modify it under

* the terms of the GNU General Public License as published by the Free Software

* Foundation, either version 3 of the License, or (at your option) any later

* version.

*

* This program is distributed in the hope that it will be useful, but WITHOUT

* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS

* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more

* details.

*

* You should have received a copy of the GNU General Public License along with

* this program. If not, see <http://www.gnu.org/licenses/>.

*/

package com.end.gameserver.model.zone.type;

 

import com.end.gameserver.model.actor.L2Character;

import com.end.gameserver.model.actor.instance.L2PcInstance;

import com.end.gameserver.model.zone.L2ZoneType;

import com.end.gameserver.network.SystemMessageId;

 

/**

* A PVP Zone

* @author durgus

*/

public class L2ArenaZone extends L2ZoneType

{

public L2ArenaZone(int id)

{

super(id);

}

 

@Override

protected void onEnter(L2Character character)

{

if (character instanceof L2PcInstance)

{

if (!character.isInsideZone(L2Character.ZONE_PVP))

{

character.sendPacket(SystemMessageId.ENTERED_COMBAT_ZONE);

}

}

 

character.setInsideZone(L2Character.ZONE_PVP, true);

}

 

@Override

protected void onExit(L2Character character)

{

if (character instanceof L2PcInstance)

{

if (!character.isInsideZone(L2Character.ZONE_PVP))

{

character.sendPacket(SystemMessageId.LEFT_COMBAT_ZONE);

}

}

 

character.setInsideZone(L2Character.ZONE_PVP, false);

}

 

@Override

public void onDieInside(L2Character character)

{

}

 

@Override

public void onReviveInside(L2Character character)

{

}

}

 

 

Don't work

 

* This program is free software: you can redistribute it and/or modify it under

* the terms of the GNU General Public License as published by the Free Software

* Foundation, either version 3 of the License, or (at your option) any later

* version.

*

* This program is distributed in the hope that it will be useful, but WITHOUT

* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS

* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more

* details.

*

* You should have received a copy of the GNU General Public License along with

* this program. If not, see <http://www.gnu.org/licenses/>.

*/

package com.end.gameserver.model.zone.type;

 

import com.end.gameserver.model.actor.L2Character;

import com.end.gameserver.model.actor.instance.L2PcInstance;

import com.end.gameserver.model.zone.L2ZoneType;

import com.end.gameserver.network.SystemMessageId;

 

/**

* A PVP Zone

* @author durgus

*/

public class L2ArenaZone extends L2ZoneType

{

public L2ArenaZone(int id)

{

super(id);

}

 

@Override

protected void onEnter(L2Character character)

{

if (character instanceof L2PcInstance)

{

if (!character.isInsideZone(L2Character.ZONE_PVP))

{

character.sendPacket(SystemMessageId.ENTERED_COMBAT_ZONE);

}

}

 

character.setInsideZone(L2Character.ZONE_PVP, true);

}

 

@Override

protected void onExit(L2Character character)

{

if (character instanceof L2PcInstance)

{

if (!character.isInsideZone(L2Character.ZONE_PVP))

{

character.sendPacket(SystemMessageId.LEFT_COMBAT_ZONE);

}

}

 

character.setInsideZone(L2Character.ZONE_PVP, true);

}

 

@Override

public void onDieInside(L2Character character)

{

}

 

@Override

public void onReviveInside(L2Character character)

{

}

}

 

don't work too

Link to comment
Share on other sites

  • 0

if you want to make it right you need a manager.

 

You can do it from l2pcinstance 

 

// Check if the L2PcInstance is in an arena or a siege area

if (isInsideZone(ZONE_PVP) && ((L2PcInstance) attacker).isInsideZone(ZONE_PVP))

return true;

{

addPoints(getCharId(), (getLevel() / 2) + Rnd.get(-5, 5));

}

 

 

 

 

 

// If in Arena, do nothing

if (isInsideZone(ZONE_PVP) || targetPlayer.isInsideZone(ZONE_PVP))

return;

{

addPoints(getCharId(), (getLevel() / 2) + Rnd.get(-5, 5));

}

 

 

not tested but you should see how the raidboss points are working and you will fix it easy...

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share



  • Posts

    • Hello everyone,   Does anyone know how to turn off or to properly setup "proxy'? I'm trying to connect on server and i get error in Login server:   ========================================================== Error in Login Server ========================================================== "[15:01:53]  INFO IP: 84.126.108.137 Login: test Assigned to Proxy: 127.0.0.1" ==========================================================   And in proxies.xml say something about .properties file, but i cant find that file.     ========================================================== proxies.xml ========================================================== <?xml version='1.0' encoding='utf-8'?> <!DOCTYPE list SYSTEM "proxies.dtd"> <!-- In order to make this file be in use, EnableProxies in server.properties MUST be set to true --> <!-- This list should contain GameServer IPs. IP of the GameServer will be chosen for Player during Server Selection, based on Mask of his IP --> <!-- For example, if IP of the player is 153.4.138.226, all of the masks below will be checked if IP matches range of mask --> <!-- Mask 0.0.0.0/3 covers IPs from 0.0.0.0 to 31.255.255.255. Mask 32.0.0.0/3 covers IPs from 32.0.0.0 to 63.255.255.255 and so on --> <!-- So if IP of the player matches below mask, value in "ip" will be given to him, to connect with GameServer --> <!-- If player IP will not match any mask, Error in LoginServer logs will be printed --> <list>     <level min="40" max="86" ip="127.0.0.1"/>     <minChatMessages party="3" clan="5" ip="127.0.0.1"/>     <minChatMessages shout="5" ip="127.0.0.1"/>     <minChatMessages all="15" trade="5" ip="127.0.0.1"/>     <minChatMessages pm="3" clan="5" ip="127.0.0.1"/>     <mask mask="0.0.0.0/4" ip="127.0.0.1"/>     <mask mask="16.0.0.0/4" ip="127.0.0.1"/>     <mask mask="32.0.0.0/4" ip="127.0.0.1"/>     <mask mask="48.0.0.0/4" ip="127.0.0.1"/>     <mask mask="64.0.0.0/4" ip="127.0.0.1"/>     <mask mask="80.0.0.0/4" ip="127.0.0.1"/>     <mask mask="96.0.0.0/4" ip="127.0.0.1"/>     <mask mask="112.0.0.0/4" ip="127.0.0.1"/>     <mask mask="128.0.0.0/4" ip="127.0.0.1"/>     <mask mask="144.0.0.0/4" ip="127.0.0.1"/>     <mask mask="160.0.0.0/4" ip="127.0.0.1"/>     <mask mask="176.0.0.0/4" ip="127.0.0.1"/>     <mask mask="192.0.0.0/4" ip="127.0.0.1"/>     <mask mask="208.0.0.0/4" ip="127.0.0.1"/>     <mask mask="224.0.0.0/4" ip="127.0.0.1"/> </list> ========================================================== ==========================================================   If anyone could help it would be great.  
    • @Celestinewasnt this guy banned for selling shared stuff? 😄
    • I know xD ... please clean the topic. It's okay!
    • link off    anyone can share it ?   thks
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disbaled AdBlock