Jump to content
  • 0

Faction olympiad [SOLVED]


Question

Posted

Greetings humble humans.

I'm working on a faction(GvE) project on interlude (based L2JEqual) and I wanna make the olympiad run normally along with the faction engine.

I imagine problems will be caused to that by same faction characters not being able to hit each other once they end up together for a match, I'm not completely sure about this as I'm waiting for a new router since on this I can't disable the firewall and therefore can't have friends over to test and I have no idea how I can make it possible for like 2-3 clients that I would be able to open to launch an olympiad game.

And from what I've looked on the scripts I assume there's no such thing fixing the olympiad on this pack by default

 

Anyway I would like your help on the matter as on the server side I have never bothered with the olympiad so I have no clue how the the whole process works on the java side.

 

A way I imagine it could be done it storing the clients faction side, then making him neutral and restoring it after the match is over but what if he disconnects?

 

Anyway thanks in advance for your help :)

2 answers to this question

Recommended Posts

  • 0
Posted

Where you're checking if they're from same faction, then can't attack... Just add...

Example:

if((player.isGod() && target.isGod()) || (player.isEvil() && target.isEvil()) && !player.isInOlympiadMode() && !target.isInOlympiadMode()){
player.sendMessage("You can't attack members of your own faction.");
return false;}

 

  • 0
Posted

Where you're checking if they're from same faction, then can't attack... Just add...

Example:

if((player.isGod() && target.isGod()) || (player.isEvil() && target.isEvil()) && !player.isInOlympiadMode() && !target.isInOlympiadMode()){
player.sendMessage("You can't attack members of your own faction.");
return false;}

 

haha now I feel stupid for not thinking of that earler >.>

but I'm pretty busy and I have been away from the field for a while :)

 

anyway haven't tested it yet but it should do the trick, thanks a lot :)

 

 

(the topic may be locked)

Guest
This topic is now closed to further replies.


×
×
  • Create New...