If you want to receive support we need this info to help you properly.
» Find Revision
L2J Revision Number:4487
L2JDP Revision Number:7760
I'm trying to make that players could attack each other without holding ctrl. So far I only managed to make it work only for simple attack. But for skills you still need to hold ctrl. And skills like, aura flare dont work at all (I gues server checks your target, no target = no skill). Second problem is that I need to dissable peace zones. Once again I managed to modify code so that you could use simple attack in peace zone, but not skills. Where exactly these this are being handled?
And one more thing. Is it posible to modify how offten server writes all players data to database?
Attack without ctrl and peace zone
Forum rules
READ NOW: L2j Forums Rules of Conduct
READ NOW: L2j Forums Rules of Conduct
-
- Posts: 25
- Joined: Thu Sep 24, 2009 11:05 am
- Contact:
-
- Posts: 25
- Joined: Thu Sep 24, 2009 11:05 am
- Contact:
Re: Attack without ctrl and peace zone
Attacking in peace zone allready done. Now I still cant find attacking with skill without ctrl. Sleep, fear and etc works withour ctrl. Just attack type skills dont work. And aura flash does absolutely nothing. Any sugestions? 

-
- Posts: 25
- Joined: Thu Sep 24, 2009 11:05 am
- Contact:
Re: Attack without ctrl and peace zone
Fixed the ctrl problem. Only problem left is non working aura flare skill. I gues that all TARGET_AURA type skills does nothing. It doesnt display any "incorect target" or similar errors. It just does nothing(no animation). Where all "mechanics" of this skill type are declared?
-
- L2j Veteran
- Posts: 3437
- Joined: Wed Apr 30, 2008 8:53 am
- Location: Russia
Re: Attack without ctrl and peace zone
L2Skill.checkForAreaOffensiveSkill or smth like this.
Commiter of the shit
public static final int PI = 3.1415926535897932384626433832795;
public static final int PI = 3.1415926535897932384626433832795;
-
- Posts: 25
- Joined: Thu Sep 24, 2009 11:05 am
- Contact:
Re: Attack without ctrl and peace zone
I tryed debuging and found a place in the code whe casting aura flash stops.
it is function checkUseMagicConditions in l2pcinstance.java
to be more exact I think its this code:
I'm not sure that I do understand this part of a code. If it is TARGET_AURA type skill, it assigns no target at all, so it returns false and casting is aborted. I'm not getting it right or the code is messed up?
it is function checkUseMagicConditions in l2pcinstance.java
to be more exact I think its this code:
Code: Select all
L2Object target = null; switch (sklTargetType){ // Target the player if skill type is AURA, PARTY, CLAN or SELF case TARGET_AURA: case TARGET_FRONT_AURA: case TARGET_BEHIND_AURA: case TARGET_PARTY: case TARGET_ALLY: case TARGET_CLAN: case TARGET_PARTY_CLAN: case TARGET_GROUND: case TARGET_SELF: case TARGET_AREA_SUMMON: target = this; break; case TARGET_PET: case TARGET_SUMMON: target = getPet(); break; default: target = getTarget(); break;} if (target == null){ sendPacket(ActionFailed.STATIC_PACKET); return false;}
-
- L2j Veteran
- Posts: 3437
- Joined: Wed Apr 30, 2008 8:53 am
- Location: Russia
Re: Attack without ctrl and peace zone
target = this
Commiter of the shit
public static final int PI = 3.1415926535897932384626433832795;
public static final int PI = 3.1415926535897932384626433832795;
-
- Posts: 25
- Joined: Thu Sep 24, 2009 11:05 am
- Contact:
Re: Attack without ctrl and peace zone
Problem solved. It was my own mistake in code with faction handling during attack.
if (player.factionid() == target.factionid()) return false;
But with type_aura skills target is equal player. So using skills wich doesnt require target was imposible
Litle mistake, but it took me couple days to find it.
if (player.factionid() == target.factionid()) return false;
But with type_aura skills target is equal player. So using skills wich doesnt require target was imposible

Litle mistake, but it took me couple days to find it.