Jump to content

Question

Posted

Hello,

 

How can i add here:

    public boolean isAllowedToEnchantSkills()
    {
        if (isLocked())
            return false;
        if (isTransformed())
            return false;
        if (AttackStanceTaskManager.getInstance().getAttackStanceTask(this))
            return false;
        if (isCastingNow() || isCastingSimultaneouslyNow() || isInCombat())
            return false;
        if (isInBoat() || isInAirShip())
            return false;
        return true;
    }

If the skill has cooldown to return false?
 

    // Check if this skill is enabled (ex : reuse time)
        if (isSkillDisabled(skill))
        {
            SystemMessage sm = null;
            
            if (_reuseTimeStamps.containsKey(Integer.valueOf(skill.getReuseHashCode())))
            {
                int remainingTime = (int)(_reuseTimeStamps.get(Integer.valueOf(skill.getReuseHashCode())).getRemaining()/1000);
                int hours = remainingTime / 3600;
                int minutes = (remainingTime % 3600) / 60;
                int seconds = (remainingTime % 60);
                if (hours > 0)
                {
                    sm = new SystemMessage(SystemMessageId.S2_HOURS_S3_MINUTES_S4_SECONDS_REMAINING_FOR_REUSE_S1);
                    sm.addSkillName(skill);
                    sm.addNumber(hours);
                    sm.addNumber(minutes);
                }
                else if (minutes > 0)
                {
                    sm = new SystemMessage(SystemMessageId.S2_MINUTES_S3_SECONDS_REMAINING_FOR_REUSE_S1);
                    sm.addSkillName(skill);
                    sm.addNumber(minutes);
                }
                else
                {
                    sm = new SystemMessage(SystemMessageId.S2_SECONDS_REMAINING_FOR_REUSE_S1);
                    sm.addSkillName(skill);
                }
                
                sm.addNumber(seconds);
            }
            else
            {
                sm = new SystemMessage(SystemMessageId.S1_PREPARED_FOR_REUSE);
                sm.addSkillName(skill);
            }
            
            sendPacket(sm);
            return false;
        }

 

Recommended Posts

  • 0
Posted (edited)

Okey maybe im wrong but since you have in your hands the skill that will removed you can check this one ...

 

something like that 

if (linked && _linkedSkill != null && player.isSkillDisabled(_linkedSkill))
	{
		message
	}

before 

final int costMultiplier = skill.getEnchantCostMultiplier();
Edited by melron
  • 0
Posted

Thanks now it works fine!

 

Btw do you know what cause this issue?  why the skills got refreshed when enchanted?

 

Can we fix it retail like?  I think it has something to do with the skill changing skill_level.

 

Do you know where the skill reuse time saved before player make restart? (after restart it saved on character_skills_save)


Thanks again :)

  • 0
Posted

 

Okey maybe im wrong but since you have in your hands the skill that will removed you can check this one ...

 

something like that 

if (linked && _linkedSkill != null && player.isSkillDisabled(_linkedSkill))
	{
		message
	}

before 

final int costMultiplier = skill.getEnchantCostMultiplier();

When the character login and try to enchant a skill he gets the message.

 

This works only after the char use the skill and wait for the cooldown :P

 

 

  • 0
Posted

Thanks now it works fine!

 

 

Btw do you know what cause this issue?  why the skills got refreshed when enchanted?

 

Can we fix it retail like?  I think it has something to do with the skill changing skill_level.

 

Do you know where the skill reuse time saved before player make restart? (after restart it saved on character_skills_save)

 

 

Thanks again :)

No problem, always happy to help. Consider marking my post as "answer" to this thread in order to help other people find this fix too :)

  • 0
Posted (edited)

No problem, always happy to help. Consider marking my post as "answer" to this thread in order to help other people find this fix too :)

I have one problem with this it happens the same with the above code

 

When i login i can't enchant the skill only if i use it and wait for the reuse :/

Edited by GameBlonD
  • 0
Posted

I have one problem with this it happens the same with the above code

 

When i login i can't enchant the skill only if i use it and wait for the reuse :/

hm...this sounds weird actually. I did not have any problems like this when i was using it my own.

 

So, to make this straight. Lets say you are a tank and you have Ultimate Defense.

 

Ultimate defense is NOT in cooldown. You log in. You try to enchant UD, but you cant. You use UD. UD is on cooldown. You cant enchant because its on cooldown. UD cooldown restored. You can enchant UD normally...

 

Is this your problem?

  • 0
Posted (edited)

hm...this sounds weird actually. I did not have any problems like this when i was using it my own.

 

So, to make this straight. Lets say you are a tank and you have Ultimate Defense.

 

Ultimate defense is NOT in cooldown. You log in. You try to enchant UD, but you cant. You use UD. UD is on cooldown. You cant enchant because its on cooldown. UD cooldown restored. You can enchant UD normally...

 

Is this your problem?

Yes

 

IT happens on all skills expect Blink/rapid shot so far

 

Maybe return checkUseMagicConditions(skill, false, false);   those 2 false?

Edited by GameBlonD
  • 0
Posted

Yes

 

IT happens on all skills expect Blink/rapid shot so far

Well, that sounds pretty weird. I got a couple of things for you:

1) Did you add any protection by your own during tests and now you forget to remove it after you applied my code?

2) Did you try to remove my code and see if everything is back to normal?

3) Try to use //removereuse command and restart. If after //removereuse still having this problem, i have no idea :(

  • 0
Posted

Well, that sounds pretty weird. I got a couple of things for you:

1) Did you add any protection by your own during tests and now you forget to remove it after you applied my code?

2) Did you try to remove my code and see if everything is back to normal?

3) Try to use //removereuse command and restart. If after //removereuse still having this problem, i have no idea :(

1. no

2. yes

 

Its strange , i will try to find the retail fix , but i don't know where the server saves the cooldown when the player is online.

  • 0
Posted

1. no

2. yes

 

Its strange , i will try to find the retail fix , but i don't know where the server saves the cooldown when the player is online.

Take a look at here, xxdem refers to the retail fix.

  • 0
Posted (edited)

Open isSkillDisabled method,

 

Inside of this method add messages in every IF / case (where return is true) to see where the problem is,

post the prob here ;)

Edited by melron

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Posts

    • TG Support: https://t.me/buyingproxysup | Channel: https://t.me/buyingproxycom Discord support: #buyingproxy | Server: Join the BuyingProxy Discord Server!  Create your free account here
    • I think you should check the video more carefully you missing something very important 😛      
    • Im responding to an anonymous account with 3 posts, almost no background, and practically zero useful information added to the discussion. On top of that, the topic title is misleading  calling it "Lucera Source Code" gives a completely different impression from what is actually being presented.   I didn’t say anything different. Therefore, I have no clue how his process produces the same desirable result.   And here you are creating drama. Your topic title clearly says "Lucera Source Code," which is not actually the case, or at least that’s how it looked when I first clicked on it, so I don’t think I was completely off. There’s also no significant information about your process like  what difficulties you faced, what tools you used, or anything else meaningful. Yet you still expect others to provide value based on what? I’m not talking about your project itself which, by the way, good job. I’m talking about the topic itself as a source of value for this forum, because right now it doesn’t really offer much in that regard. So regarding the semantics, yes, wording does matter.  
    • You are funny guy! 😄 😄 😄    I was working with Lucera long before “AI apps” became fashionable. This was not something I generated in one day with a prompt. It took me years of work, testing, debugging and fixing broken decompiled code.   Of course a decompiled source is not the original private repository with the original comments, history and developer structure. Nobody said it is the same Git repository. But saying it is only “guesses” is also wrong.   When you decompile, rebuild, fix thousands of compile/runtime issues, restore broken logic, reconnect scripts, fix bad casts, repair database calls, compile it again and run it in-game, at that point it is no longer just a guess.   It becomes a working reconstructed source base!   The important part is not whether it is byte-for-byte identical to the original private source. The important part is that I can now work directly inside the code, change core logic, rebuild scripts, fix bugs and continue development without being locked behind closed binaries.   Does it compile? Yes. Does it run in-game? Yes. Can I modify core systems directly? Yes. Can I continue development independently? Yes.   So call it reconstructed, decompiled, cleaned, restored or whatever name you prefer. The result is still the same: I have a working source environment that gives me control over the lucera2 project.   And that was exactly the goal!   🙂 
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..