Jump to content
  • 0

[Help]Πώς μπορώ να κάνω 1 Java Code


Ranger™

Question

13 answers to this question

Recommended Posts

  • 0

ekana 1 code otan kapoios exei 20 pvp na ginete noblesse swsto?

 

if (activeChar.getPvpKills() >= 20)

        {

      activeChar.sendMessage ("Congratz , you are now a server Noblesse ");

        activeChar.setNoblesse(true);

        }

Link to comment
Share on other sites

  • 0

ekana 1 code otan kapoios exei 20 pvp na ginete noblesse swsto?

 

nai nomizw ine swsto. ala prin to } den 8elei ena return;?dld na ine etc:

if (activeChar.getPvpKills() >= 20)
        {
       activeChar.sendMessage ("Congratz , you are now a server Noblesse ");
        activeChar.setNoblesse(true);
        return;
        }

 

vevea den ime sigouros

Link to comment
Share on other sites

  • 0

Όταν γράφεις κώδικα σε μιά γλώσσα προγραμματισμού συνήθως έχεις τρία "προβλήματα":

 

1)Πού θα εκτελεστεί ο κώδικάς μου ?

2)Πόσες φορές θα εκτελεστεί ο κώδικάς μου ?

3)Τί κάνει ο κώδικάς μου ?

 

Αυτή είναι η βασική συλογιστική πορεία. Στην προκειμένη περίπτωση:

 

1)Την στιγμή που ο character κερδίζει ένα PVP.

2)Θέλω μία φορά μόνο, δεν θα κάνω τον character Noblesse κάθε φορά που κάνει ένα pvp.

3)Κάνει τον Character Noblesse.

 

Αυτό το κομμάτι που έγραψες πρέπει να μπεί στην onKill συνάρτηση μέσα στο L2PcInstance ή καλύτερα στην increasePvPKills().  Τα λάθη που έχει:

 

activeChar.getPvpKills >= 20 // Δηλαδή κάθε φορά που κάνεις pvp και είσαι πάνω από τα 20 pvp γίνεσαι noblesse.

 

return; //Αυτό ίσως προκαλέσει προβλήματα αναλόγως που βάλεις τον κώδικά σου, διέγραψέ το.

 

Άρα πρέπει αν γράψεις:

 


//mono otan ta pvp einai 20, oxi perisotera oxi ligotera. Mono mia fora tha ginei noblesse.
if(activeChar.getPvpKills() == 20)
{
    activeChar.setNoblesse(true);
    activeChar.sendMessage("Congrats you are now a noblesse.");
}

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.


  • Posts

    • Help plz i have this error   Has anyone had this happen to you? How do I solve it?  
    • ??? error   https://ibb.co/Srn4LsX No support  :S   No support : S ? :S @Lowness  ..... error, help   hey friend were you able to solve the problem? were you able to solve the problem?
    • I also think this feature would bring more harm than good... another example is a dwarf rushing against your mobs so he takes priority, then he plays fake death and proceeds to grief the shit out of you. A minimum damage threshold is necessary, which would basically converge to what is the default feature (i.e. biggest damage dealer)
    • I bought the premium to watch the video and it's private. 😢
    • For some Majestic reason OP can't edit their topics anymore?    Let me update the potential offers, I got up to 2 spots to fill.   CONTACT TELEGRAM ONLY: https://t.me/asupport_g1     A credible team that SGuard represents is looking for java developers.    These positions is full time only i.e. your time is mostly dedicated within the team and team tasks, side gigs are fine, as long as you are able to combine your gig and main.  All necessary tools are provided.  The team is consistent with > 10 team members and the team is looking to expand to meet various goals. A decent Lineage 2 Essense OR Main (GOD) knowledge is needed.  Experience with l2r/l2p/l2s. mobius is fine too for referrence only. The team is friendly and goal oriented, very active and resourceful.   Requirements are standard, java knowledge is optional.  Multi language is a plus but not necessary (English/Russian), any is accepted.   Terms and conditions including compensation are reasonable and considered to be up for the industry standards. Details are negotiable with suitable candidates.   You will need to have a headset and a mic just for the initial processing, there're no team meetings or conferences after that. There's a small 30min interview process to demonstrate knowledge and just to meet each other.   The team has decided it is in their best interest to not publish their information at this time. Details will be available only for suitable candidates.   CONTACT TELEGRAM ONLY: https://t.me/asupport_g1
  • Topics

×
×
  • Create New...