Jump to content
  • 0

[Request] Java help


Question

Posted

i want help to apply some java codes. i tried in many ways but i get errors >.> i'm still noob on java so what i want is to unite this two java codes:

 

Quake PvP system:http://www.maxcheaters.com/forum/index.php?topic=78071.0

 switch(quakeSystem) {
            case 4:
                 Announcements.getInstance().announceToAll("" + this.getName()+ " is Dominating!");
                 break;
            case 6:
                Announcements.getInstance().announceToAll("" + this.getName()+ " is on a Rampage!");
                break;
            case 8:
                Announcements.getInstance().announceToAll("" + this.getName()+ " is on a Killing Spree!");
                break;
            case 10:
                Announcements.getInstance().announceToAll("" + this.getName()+ " is on a Monster Kill!");
                break;
            case 12:
                Announcements.getInstance().announceToAll("" + this.getName()+ " is Unstoppable!");
                break;
            case 14:
                Announcements.getInstance().announceToAll("" + this.getName()+ " is on an Ultra Kill!");
                break;
            case 16:
                Announcements.getInstance().announceToAll("" + this.getName()+ " is Godlike");
                break;
            case 18:
                Announcements.getInstance().announceToAll("" + this.getName()+ " is Wicked Sick!");
                break;
            case 20:
                Announcements.getInstance().announceToAll("" + this.getName()+ " is on a Ludricrous Kill!");
                break;
            case 24:
                Announcements.getInstance().announceToAll("" + this.getName()+ " is on a Holy Shit!");
                 default:
                     ;
        }

 

with Sound durin PvP: http://www.maxcheaters.com/forum/index.php?topic=78081.0

+   private int spreeKills = 0;
     public void increasePvpKills()
     {
+       spreeKills++;
+       
+      switch(spreeKills){
+       
+       case 1:
+          PlaySound _snd1 = new PlaySound(1, "firstblood", 0, 0, 0, 0, 0);
+          sendPacket(_snd1);
+       break;
+       
+       case 2:
+          PlaySound _snd2 = new PlaySound(1, "doublekill", 0, 0, 0, 0, 0);
+          sendPacket(_snd2);
+       break;
+       
+       case 3:
+          PlaySound _snd3 = new PlaySound(1, "triplekill", 0, 0, 0, 0, 0);
+          sendPacket(_snd3);
+       break;
+       
+       case 4:
+          PlaySound _snd4 = new PlaySound(1, "megakill", 0, 0, 0, 0, 0);
+          sendPacket(_snd4);
+       break;
+       
+       case 5:
+          PlaySound _snd5 = new PlaySound(1, "ultrakill", 0, 0, 0, 0, 0);
+          sendPacket(_snd5);
+       break;
+       
+       case 10:
+          PlaySound _snd10 = new PlaySound(1, "monsterkill", 0, 0, 0, 0, 0);
+          sendPacket(_snd10);
+       break;
+       
+       case 15:
+          PlaySound _snd15 = new PlaySound(1, "killingspree", 0, 0, 0, 0, 0);
+          sendPacket(_snd15);
+       break;
+         default:
+          ;
+       }
+

 

i made it like this:

 Increase the pvp kills count and send the info to the player
     */
    private int spreeKills = 0;
    public void increasePvpKills()
    {
               spreeKills++;
               
              switch(spreeKills){
               
               case 1:
                  PlaySound _snd1 = new PlaySound(1, "monsterkill", 0, 0, 0, 0, 0);
                  sendPacket(_snd1);
               break;
               
               case 2:
                  PlaySound _snd2 = new PlaySound(1, "doublekill", 0, 0, 0, 0, 0);
                  sendPacket(_snd2);
               break;
               
               case 3:
                  PlaySound _snd3 = new PlaySound(1, "triplekill", 0, 0, 0, 0, 0);
                  sendPacket(_snd3);
               break;
               
               case 4:
                  PlaySound _snd4 = new PlaySound(1, "megakill", 0, 0, 0, 0, 0);
                  sendPacket(_snd4);
               break;
               
               case 5:
                  PlaySound _snd5 = new PlaySound(1, "ultrakill", 0, 0, 0, 0, 0);
                  sendPacket(_snd5);
               break;
               
               case 10:
                  PlaySound _snd10 = new PlaySound(1, "monsterkill", 0, 0, 0, 0, 0);
                  sendPacket(_snd10);
               break;
               
               case 15:
                  PlaySound _snd15 = new PlaySound(1, "killingspree", 0, 0, 0, 0, 0);
                  sendPacket(_snd15);
               break;
                 default:
                  ;
               }
        
              {
        if (TvT._started && _inEventTvT || DM._started && _inEventDM || CTF._started && _inEventCTF || FortressSiege._started && _inEventFOS)
            return;
        if (Config.ALLOW_PVP_REWARD)
        {
            // Item Reward system
            addItem("Loot", Config.PVP_REWARD_ITEM, Config.PVP_REWARD_COUNT, this, true);
            sendMessage("You will be rewarded for pvp kill!");
        }
        // Add to attacker and increase its PK counter
        setPvpKills(getPvpKills() + 1);
        quakeSystem++;
        
        switch(quakeSystem) {
        case 1:
             Announcements.getInstance().announceToAll("" + this.getName()+ " Monster kill!");
             break;
        case 6:
            Announcements.getInstance().announceToAll("" + this.getName()+ " is on a Rampage!");
            break;
        case 8:
            Announcements.getInstance().announceToAll("" + this.getName()+ " is on a Killing Spree!");
            break;
        case 10:
            Announcements.getInstance().announceToAll("" + this.getName()+ " is on a Monster Kill!");
            break;
        case 12:
            Announcements.getInstance().announceToAll("" + this.getName()+ " is Unstoppable!");
            break;
        case 14:
            Announcements.getInstance().announceToAll("" + this.getName()+ " is on an Ultra Kill!");
            break;
        case 16:
            Announcements.getInstance().announceToAll("" + this.getName()+ " is Godlike");
            break;
        case 18:
            Announcements.getInstance().announceToAll("" + this.getName()+ " is Wicked Sick!");
            break;
        case 20:
            Announcements.getInstance().announceToAll("" + this.getName()+ " is on a Ludricrous Kill!");
            break;
        case 24:
            Announcements.getInstance().announceToAll("" + this.getName()+ " is on a Holy Shit!");
             default:
                 ;
    }

 

and i get errors :/ please can you modified and paste here the right code? thanks

 

Recommended Posts

  • 0
Posted

errors:

Errors i get:
[code]  [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:4632: illegal start of expression
   [javac]     public void doPkInfo(L2PcInstance PlayerWhoKilled)
   [javac]     ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:4632: illegal start of expression
   [javac]     public void doPkInfo(L2PcInstance PlayerWhoKilled)
   [javac]            ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:4632: ';' expected
   [javac]     public void doPkInfo(L2PcInstance PlayerWhoKilled)
   [javac]                         ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:4632: ';' expected
   [javac]     public void doPkInfo(L2PcInstance PlayerWhoKilled)
   [javac]                                                      ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:4736: illegal start of expression
   [javac]     public void increasePkKillsAndKarma(int targLVL)
   [javac]     ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:4736: illegal start of expression
   [javac]     public void increasePkKillsAndKarma(int targLVL)
   [javac]            ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:4736: ';' expected
   [javac]     public void increasePkKillsAndKarma(int targLVL)
   [javac]                                        ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:4736: ';' expected
   [javac]     public void increasePkKillsAndKarma(int targLVL)
   [javac]                                                    ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:4786: illegal start of expression
   [javac]     public int calculateKarmaLost(long exp)
   [javac]     ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:4786: ';' expected
   [javac]     public int calculateKarmaLost(long exp)
   [javac]                                  ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:4786: ';' expected
   [javac]     public int calculateKarmaLost(long exp)
   [javac]                                           ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:4808: illegal start of expression
   [javac]     public void updatePvPStatus()
   [javac]     ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:4808: illegal start of expression
   [javac]     public void updatePvPStatus()
   [javac]            ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:4808: ';' expected
   [javac]     public void updatePvPStatus()
   [javac]                                ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:4819: illegal start of expression
   [javac]     public void updatePvPStatus(L2Character target)
   [javac]     ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:4819: illegal start of expression
   [javac]     public void updatePvPStatus(L2Character target)
   [javac]            ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:4819: ';' expected
   [javac]     public void updatePvPStatus(L2Character target)
   [javac]                                ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:4819: ';' expected
   [javac]     public void updatePvPStatus(L2Character target)
   [javac]                                                   ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:4851: illegal start of expression
   [javac]     public void restoreExp(double restorePercent)
   [javac]     ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:4851: illegal start of expression
   [javac]     public void restoreExp(double restorePercent)
   [javac]            ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:4851: ';' expected
   [javac]     public void restoreExp(double restorePercent)
   [javac]                           ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:4851: ';' expected
   [javac]     public void restoreExp(double restorePercent)
   [javac]                                                 ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:4869: illegal start of expression
   [javac]     public void deathPenalty(boolean atwar)
   [javac]     ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:4869: illegal start of expression
   [javac]     public void deathPenalty(boolean atwar)
   [javac]            ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:4869: ';' expected
   [javac]     public void deathPenalty(boolean atwar)
   [javac]                             ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:4869: ';' expected
   [javac]     public void deathPenalty(boolean atwar)
   [javac]                                           ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:4874: illegal start of expression
   [javac]     public void deathPenalty(boolean inWar, boolean inPvP, boolean byPK)
   [javac]     ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:4874: illegal start of expression
   [javac]     public void deathPenalty(boolean inWar, boolean inPvP, boolean byPK)
   [javac]            ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:4874: ';' expected
   [javac]     public void deathPenalty(boolean inWar, boolean inPvP, boolean byPK)
   [javac]                             ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:4874: <identifier> expected
   [javac]     public void deathPenalty(boolean inWar, boolean inPvP, boolean byPK)
   [javac]                                            ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:4874: not a statement
   [javac]     public void deathPenalty(boolean inWar, boolean inPvP, boolean byPK)
   [javac]                                                     ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:4874: ';' expected
   [javac]     public void deathPenalty(boolean inWar, boolean inPvP, boolean byPK)
   [javac]                                                          ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:4874: ';' expected
   [javac]     public void deathPenalty(boolean inWar, boolean inPvP, boolean byPK)
   [javac]                                                                        ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:4944: illegal start of expression
   [javac]     public void setPartyMatchingAutomaticRegistration(boolean b)
   [javac]     ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:4944: illegal start of expression
   [javac]     public void setPartyMatchingAutomaticRegistration(boolean b)
   [javac]            ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:4944: ';' expected
   [javac]     public void setPartyMatchingAutomaticRegistration(boolean b)
   [javac]                                                      ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:4944: ';' expected
   [javac]     public void setPartyMatchingAutomaticRegistration(boolean b)
   [javac]                                                                ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:4952: illegal start of expression
   [javac]     public void setPartyMatchingShowLevel(boolean b)
   [javac]     ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:4952: illegal start of expression
   [javac]     public void setPartyMatchingShowLevel(boolean b)
   [javac]            ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:4952: ';' expected
   [javac]     public void setPartyMatchingShowLevel(boolean b)
   [javac]                                          ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:4952: ';' expected
   [javac]     public void setPartyMatchingShowLevel(boolean b)
   [javac]                                                    ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:4960: illegal start of expression
   [javac]     public void setPartyMatchingShowClass(boolean b)
   [javac]     ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:4960: illegal start of expression
   [javac]     public void setPartyMatchingShowClass(boolean b)
   [javac]            ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:4960: ';' expected
   [javac]     public void setPartyMatchingShowClass(boolean b)
   [javac]                                          ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:4960: ';' expected
   [javac]     public void setPartyMatchingShowClass(boolean b)
   [javac]                                                    ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:4968: illegal start of expression
   [javac]     public void setPartyMatchingMemo(String memo)
   [javac]     ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:4968: illegal start of expression
   [javac]     public void setPartyMatchingMemo(String memo)
   [javac]            ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:4968: ';' expected
   [javac]     public void setPartyMatchingMemo(String memo)
   [javac]                                     ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:4968: ';' expected
   [javac]     public void setPartyMatchingMemo(String memo)
   [javac]                                                 ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:4973: illegal start of expression
   [javac]     public boolean isPartyMatchingAutomaticRegistration()
   [javac]     ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:4973: ';' expected
   [javac]     public boolean isPartyMatchingAutomaticRegistration()
   [javac]                                                        ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:4978: illegal start of expression
   [javac]     public String getPartyMatchingMemo()
   [javac]     ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:4978: ';' expected
   [javac]     public String getPartyMatchingMemo()
   [javac]                                       ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:4983: illegal start of expression
   [javac]     public boolean isPartyMatchingShowClass()
   [javac]     ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:4983: ';' expected
   [javac]     public boolean isPartyMatchingShowClass()
   [javac]                                            ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:4988: illegal start of expression
   [javac]     public boolean isPartyMatchingShowLevel()
   [javac]     ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:4988: ';' expected
   [javac]     public boolean isPartyMatchingShowLevel()
   [javac]                                            ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:5002: illegal start of expression
   [javac]     public void increaseLevel()
   [javac]     ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:5002: illegal start of expression
   [javac]     public void increaseLevel()
   [javac]            ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:5002: ';' expected
   [javac]     public void increaseLevel()
   [javac]                              ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:5017: illegal start of expression
   [javac]     public void stopAllTimers()
   [javac]     ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:5017: illegal start of expression
   [javac]     public void stopAllTimers()
   [javac]            ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:5017: ';' expected
   [javac]     public void stopAllTimers()
   [javac]                              ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:5032: ';' expected
   [javac]     public L2Summon getPet()
   [javac]                           ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:5041: illegal start of expression
   [javac]     public void setPet(L2Summon summon)
   [javac]     ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:5041: illegal start of expression
   [javac]     public void setPet(L2Summon summon)
   [javac]            ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:5041: ';' expected
   [javac]     public void setPet(L2Summon summon)
   [javac]                       ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:5041: ';' expected
   [javac]     public void setPet(L2Summon summon)
   [javac]                                       ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:5050: illegal start of expression
   [javac]     public L2TamedBeastInstance getTrainedBeast()
   [javac]     ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:5050: ';' expected
   [javac]     public L2TamedBeastInstance getTrainedBeast()
   [javac]                                                ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:5059: illegal start of expression
   [javac]     public void setTrainedBeast(L2TamedBeastInstance tamedBeast)
   [javac]     ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:5059: illegal start of expression
   [javac]     public void setTrainedBeast(L2TamedBeastInstance tamedBeast)
   [javac]            ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:5059: ';' expected
   [javac]     public void setTrainedBeast(L2TamedBeastInstance tamedBeast)
   [javac]                                ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:5059: ';' expected
   [javac]     public void setTrainedBeast(L2TamedBeastInstance tamedBeast)
   [javac]                                                                ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:5068: illegal start of expression
   [javac]     public L2Request getRequest()
   [javac]     ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:5068: ';' expected
   [javac]     public L2Request getRequest()
   [javac]                                ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:5077: illegal start of expression
   [javac]     public synchronized void setActiveRequester(L2PcInstance requester)
   [javac]     ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:5077: '(' expected
   [javac]     public synchronized void setActiveRequester(L2PcInstance requester)
   [javac]                        ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:5077: illegal start of expression
   [javac]     public synchronized void setActiveRequester(L2PcInstance requester)
   [javac]                         ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:5077: ')' expected
   [javac]     public synchronized void setActiveRequester(L2PcInstance requester)
   [javac]                             ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:5077: '{' expected
   [javac]     public synchronized void setActiveRequester(L2PcInstance requester)
   [javac]                                                ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:5077: ';' expected
   [javac]     public synchronized void setActiveRequester(L2PcInstance requester)
   [javac]                                                                       ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:5086: illegal start of expression
   [javac]     public L2PcInstance getActiveRequester()
   [javac]     ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:5086: ';' expected
   [javac]     public L2PcInstance getActiveRequester()
   [javac]                                           ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:5095: illegal start of expression
   [javac]     public boolean isProcessingRequest()
   [javac]     ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:5095: ';' expected
   [javac]     public boolean isProcessingRequest()
   [javac]                                       ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:5104: illegal start of expression
   [javac]     public boolean isProcessingTransaction()
   [javac]     ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:5104: ';' expected
   [javac]     public boolean isProcessingTransaction()
   [javac]                                           ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:5114: illegal start of expression
   [javac]     public boolean isRequestExpired()
   [javac]     ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:5114: ';' expected
   [javac]     public boolean isRequestExpired()
   [javac]                                    ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:5123: illegal start of expression
   [javac]     public void onTransactionRequest(L2PcInstance partner)
   [javac]     ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:5123: illegal start of expression
   [javac]     public void onTransactionRequest(L2PcInstance partner)
   [javac]            ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:5123: ';' expected
   [javac]     public void onTransactionRequest(L2PcInstance partner)
   [javac]                                     ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:5123: ';' expected
   [javac]     public void onTransactionRequest(L2PcInstance partner)
   [javac]                                                          ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:5133: illegal start of expression
   [javac]     public void onTransactionResponse()
   [javac]     ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:5133: illegal start of expression
   [javac]     public void onTransactionResponse()
   [javac]            ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:5133: ';' expected
   [javac]     public void onTransactionResponse()
   [javac]                                      ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:5142: illegal start of expression
   [javac]     public void setActiveWarehouse(ItemContainer warehouse)
   [javac]     ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:5142: illegal start of expression
   [javac]     public void setActiveWarehouse(ItemContainer warehouse)
   [javac]            ^
   [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:5142: ';' expected
   [javac]     public void setActiveWarehouse(ItemContainer warehouse)
   [javac]                                   ^
   [javac] 100 errors

as i told ya i'm newbie

i want to unite this 2 codes so when a player reach x kill (announce bla bla bla and play sound to all)[/code]

  • 0
Posted

Why did you 2 switches ? :\

At least you should to cleanup your code to see your parenthesis { }{} {}{}{ { }{ }{ }{{ }

so what should i do? :$
  • 0
Posted

look i insert quake system and i got no errors but i dont know how can i add sound on sprees...

i tried this:

[tt]

quakeSystem++;
        
         switch(quakeSystem) {
         case 4:
              Announcements.getInstance().announceToAll("" + this.getName()+ " is Dominating!");
             PlaySound _snd1 = new PlaySound(1, "firstblood", 0, 0, 0, 0, 0);
                       sendPacket(_snd1);
              break;
         case 6:
             Announcements.getInstance().announceToAll("" + this.getName()+ " is on a Rampage!");
             break;
         case 8:
             Announcements.getInstance().announceToAll("" + this.getName()+ " is on a Killing Spree!");
             break;
         case 10:
             Announcements.getInstance().announceToAll("" + this.getName()+ " is on a Monster Kill!");
             break;
         case 12:
             Announcements.getInstance().announceToAll("" + this.getName()+ " is Unstoppable!");
             break;
         case 14:
             Announcements.getInstance().announceToAll("" + this.getName()+ " is on an Ultra Kill!");
             break;
         case 16:
             Announcements.getInstance().announceToAll("" + this.getName()+ " is Godlike");
             break;
         case 18:
             Announcements.getInstance().announceToAll("" + this.getName()+ " is Wicked Sick!");
             break;
         case 20:
             Announcements.getInstance().announceToAll("" + this.getName()+ " is on a Ludricrous Kill!");
             break;
         case 24:
             Announcements.getInstance().announceToAll("" + this.getName()+ " is on a Holy Shit!");
              default:
                  ;
     }

[/tt]

 

error:

 

[javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:4551: cannot find symbol
    [javac] symbol  : class PlaySound
    [javac] location: class net.sf.l2j.gameserver.model.actor.instance.L2PcInstance
    [javac]              PlaySound _snd1 = new PlaySound(1, "firstblood", 0, 0, 0, 0, 0);
    [javac]              ^
    [javac] C:\teonpack\CORE\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:4551: cannot find symbol
    [javac] symbol  : class PlaySound
    [javac] location: class net.sf.l2j.gameserver.model.actor.instance.L2PcInstance
    [javac]              PlaySound _snd1 = new PlaySound(1, "firstblood", 0, 0, 0, 0, 0);
    [javac]                                    ^
    [javac] Note: C:\teonpack\CORE\java\net\sf\l2j\gameserver\GeoEngine.java uses or overrides a deprecated API.
    [javac] Note: Recompile with -Xlint:deprecation for details.
    [javac] 2 errors

 

  • 0
Posted

Missing import

 

and

 

Announcements.getInstance().announceToAll("" + this.getName()+ " is on a Holy Shit!");

              default:

                  ;

    }

 

Are you blind ?

  • 0
Posted

Missing import

 

and

 

Announcements.getInstance().announceToAll("" + this.getName()+ " is on a Holy Shit!");

              default:

                  ;

    }

 

Are you blind ?

nop im not blind i'm noob on java so can you explain me what should i do please?

  • 0
Posted

THANKS guys i made it work :')

 

one last question how can i make it so whole word will hear that sound not only the player who gets killing spree?

  • 0
Posted

so i should code this? getAllPlayers()PlaySound _snd1 = new PlaySound(1, "firstblood", 0, 0, 0, 0, 0);

                      sendPacket(_snd1);

  • 0
Posted

Not quite. You get a list of players currently in the world, so you have to iterate through all of them and send the play sound to each one. Hint:

for (L2PcInstance tmpPlayer : L2World.getInstance().getAllPlayers().values() )
{
// do something here
}

Guest
This topic is now closed to further replies.


×
×
  • Create New...