L2JMobius

C6 fake death

dramaa · 6 · 627

Online dramaa

  • Elder
  • ****
    • Posts: 128
don't ask me how, just please tell me where to put this code  :-[ :-[ :-[
Code: [Select]
// Assuming there is a boolean variable to track the state of the Fake Death effect
private boolean fakeDeathActive = false;

// Inside your method or class
if (skill.getId() == 60 /* Fake Death */) {
    if (fakeDeathActive) {
        // If Fake Death is already active, exit the effect (stand up)
        effect.exit(false);
        fakeDeathActive = false; // Update the state to indicate it's no longer active
    } else {
        // If Fake Death is not active, perform the usual logic to handle the effect
        // (You may want to keep the existing logic here)
        // ...
        // Set the state to indicate that Fake Death is now active
        fakeDeathActive = true;
    }
}


Online G-hamsteR

  • Viscount
  • *****
    • Posts: 335
Explain what you want to achieve. You can put it anywhere, but it's not going to work unless you explain the problem.


Online dramaa

  • Elder
  • ****
    • Posts: 128
you know, when you press fake death, you need to either write /stand or use stand icon to stand up again, i want to press fake death again and stand.
i sue fake death, when i press again, stand


Online G-hamsteR

  • Viscount
  • *****
    • Posts: 335
Open gameserver/model/actor/Player.java and find the doCast function.

Add the following code on top:


Code: [Select]
@Override
public void doCast(Skill skill)
{
if(skill.getId() == 60 && isFakeDeath()) {
standUp();
return;
}
//Rest of the code


Online dramaa

  • Elder
  • ****
    • Posts: 128
did not work, maybe i put it in a wrong place


Online G-hamsteR

  • Viscount
  • *****
    • Posts: 335
Everytime you build the project, you have to replace game/libs/GameServer.jar or whatever it's called.