Jump to content
  • 0

[Help] With ClassMasterInstance [Java]


livogro

Question

Hello everyone. Maybe some one can help me with this:

 

If i puting code like that it's not working ( i marked red color where is the problem) ;/

changeClass(player, val);

player.rewardSkills();

if (newJobLevel == 1)

{

CreatureSay np = new CreatureSay(0, Say2.TELL,"Class Master","Good Job"); 

    player.sendPacket(np); 

}

 

But if like that, it's working but every time when change the class.

changeClass(player, val);

player.rewardSkills();

if (newJobLevel < 1)

{

CreatureSay np = new CreatureSay(0, Say2.TELL,"Class Master","Good Job");

    player.sendPacket(np); 

}

 

maybe some one can help me with this i need every level difrent example like :

 

changeClass(player, val);

player.rewardSkills();

 

if (newJobLevel == 1)

{

CreatureSay np = new CreatureSay(0, Say2.TELL,"Class Master","Good Job"); 

    player.sendPacket(np); 

}

if (newJobLevel == 2)

{

CreatureSay np = new CreatureSay(0, Say2.TELL,"Class Master","Good Job"); 

    player.sendPacket(np); 

}

 

Link to comment
Share on other sites

10 answers to this question

Recommended Posts

  • 0

            switch(newJobLevel)

            {

            case 1:

                    CreatureSay np = new CreatureSay(0, Say2.TELL,"Class Master","Good Job"); 

                    player.sendPacket(np);

                    break;

            case 2:

            CreatureSay np1 = new CreatureSay(0, Say2.TELL,"Class Master","Good Job"); 

                    player.sendPacket(np1);

                    break;

            case 3:

            CreatureSay np2 = new CreatureSay(0, Say2.TELL,"Class Master","Good Job"); 

                    player.sendPacket(np2);

                    break;

            }

Link to comment
Share on other sites

  • 0

Thx Setekh, Thx for answer xAddytzu but it's still without any effect, happens nothing.

 

and plus where is switch in my classmasterinstance it's like this:

switch (lvlnow)

{

case First:

jobLevel = 1;

break;

case Second:

jobLevel = 2;

break;

case Third:

jobLevel = 3;

break;

default:

jobLevel = 4;

}

if (jobLevel == 4)

return; // no more job changes

 

ClassLevel lvlnext = PlayerClass.values()[val].getLevel();

switch (lvlnext)

{

case First:

newJobLevel = 1;

break;

case Second:

newJobLevel = 2;

break;

case Third:

newJobLevel = 3;

break;

default:

newJobLevel = 4;

}

But if putting First i geting erorr (First cannot be resloved).

Link to comment
Share on other sites

  • 0

Thx Setekh, Thx for answer xAddytzu but it's still without any effect, happens nothing.

 

and plus where is switch in my classmasterinstance it's like this:But if putting First i geting erorr (First cannot be resloved).

can u give me ur class master class..?

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.


×
×
  • Create New...