Jump to content
  • 0

No Damage When Player Has No Mp


Question

Posted (edited)

hi ,

 

 

The problem is when a player spam Deadly blow(for example)  and get the message Not Enough MP and together spam Attack the result is NO damage no message nothing the only message is : Not Enough MP

Edited by GameBlonD

Recommended Posts

  • 0
Posted

hi ,

 

 

The problem is when a player spam Deadly blow(for example)  and get the message Not Enough MP and together spam Attack the result is NO damage no message nothing the only message is : Not Enough MP

you mean he cast the skill but no dmg even when mp is 0 ?

  • 0
Posted

He tries to cast the Skill but get message Not Enough Mp(because he doesnt have MP) so he spam The skill deadly blow and also tries to hit with simple hits the result= simple hits doesn't even have system messages nothing  only consumption of ss.

  • 0
Posted

He tries to cast the Skill but get message Not Enough Mp(because he doesnt have MP) so he spam The skill deadly blow and also tries to hit with simple hits the result= simple hits doesn't even have system messages nothing  only consumption of ss.

What pack are you using?  

  • 0
Posted (edited)

Mom's spaggheti with sauce + loop

It supposed to check the mana if someone use skill,and not attack.

 

Post code tho

(Just a huge guess from somoene who doesnt know l2j)

 

EDIT RIP guess. FailFish

Edited by bravetobe
  • 0
Posted

Mom's spaggheti with sauce + loop

It supposed to check the mana if someone use skill,and not attack.

 

(Just a guess)

Depends if it happen with all skills then is doCast problem else is more specific 

  • 0
Posted

                        if (getCurrentMp() < mpConsume)
                        {
                            // If L2PcInstance doesn't have enough MP, stop the attack
                            ThreadPoolManager.getInstance().scheduleAi(new NotifyAITask(CtrlEvent.EVT_READY_TO_ACT), 1000);
                            sendPacket(new SystemMessage(SystemMessageId.NOT_ENOUGH_MP));
                            sendPacket(ActionFailed.STATIC_PACKET);
                            return;
                        }

        // Check if the caster has enough MP
        if (getCurrentMp() < getStat().getMpConsume(skill) + getStat().getMpInitialConsume(skill))
        {
            // Send a System Message to the caster
            sendPacket(new SystemMessage(SystemMessageId.NOT_ENOUGH_MP));
            
            // Send a Server->Client packet ActionFailed to the L2PcInstance
            sendPacket(ActionFailed.STATIC_PACKET);
            return false;
        }

This  two are the only one that displays Not Enough mp what should i change?

  • 0
Posted (edited)

How about editting the one of them in the first place ? :D (A unique system message,so u can find out).

I think its the second .It still checks the skill.

 

 getCurrentMp() < getStat().getMpConsume(skill) + getStat().getMpInitialConsume(skill)

Hm...

 

P.S i have no idea about l2j. Kappa

Edited by bravetobe
  • 0
Posted (edited)

Does this happen until the skill (Deadly blow) is able to be casted? I mean until the consumed mp from the skill <= current mp?

What about adding a "&& not autoattack" in the second one.Can u confirm that it doesnt keep checking the last skill casted even if u make autos?

Since i dont know l2j,i m not sure what this getMpInitialConsume(skill) does

 

Maybe someone can help u out but throwing ideas in the table might give u an idea :)

Edited by bravetobe
  • 0
Posted

                        if (getCurrentMp() < mpConsume)

                        {

                            // If L2PcInstance doesn't have enough MP, stop the attack

                            ThreadPoolManager.getInstance().scheduleAi(new NotifyAITask(CtrlEvent.EVT_READY_TO_ACT), 1000);

                            sendPacket(new SystemMessage(SystemMessageId.NOT_ENOUGH_MP));

                            sendPacket(ActionFailed.STATIC_PACKET);

                            return;

                        }

 

        // Check if the caster has enough MP

        if (getCurrentMp() < getStat().getMpConsume(skill) + getStat().getMpInitialConsume(skill))

        {

            // Send a System Message to the caster

            sendPacket(new SystemMessage(SystemMessageId.NOT_ENOUGH_MP));

            

            // Send a Server->Client packet ActionFailed to the L2PcInstance

            sendPacket(ActionFailed.STATIC_PACKET);

            return false;

        }

 

This  two are the only one that displays Not Enough mp what should i change?

the variable mpConsume from what method takes value? 

  • 0
Posted

                        int saMpConsume = (int) getStat().calcStat(Stats.MP_CONSUME, 0, null, null);
                        int mpConsume = saMpConsume == 0 ? weaponItem.getMpConsume() : saMpConsume;
                        mpConsume = (int) calcStat(Stats.BOW_MP_CONSUME_RATE, mpConsume, null, null);

  • 0
Posted (edited)
That comes to my mind.

11/10 eminem rating

10/10 spaggheti

 

if someone does autoattack

    if someone doesnt wear bow

        deal damage blabla

        return true

    else

        if he has enough mp for attack with bow

            deal damage

            return true

        else               // or even without it.

            return false

else

     ur shit u coded above

 

#

Edited by bravetobe
  • 0
Posted (edited)

So i checked l2j last revisions and they use the same code... i dont know if this bug happens and inside the game maybe i test it later.
So the problem is  here:
        if (getCurrentMp() < getStat().getMpConsume(skill) + getStat().getMpInitialConsume(skill) && !isAttackingNow())
I added !isAttackingNow  and now it does ->one skill - auto attack player dead but he does skill with 0 mp :P

I will try to improve it somehow if some1 has a way let me know.
 

Edited by GameBlonD
Guest
This topic is now closed to further replies.


  • Posts

    • Dragic is a trusted guy—buy with confidence. The feature list looks incredibly solid, and you've clearly put a ton of work into this pack. Good luck with the sale, mate!
    • Im Selling my Interlude server L2wish only The Data and Core of L2wish based on lucera2 files with source code reconstructed which i did a long time ago. Im not selling the servername copyrights logos launcher etc only server data and source code, including Essence Interface reworked with interface source also.      EXP/SP: x75  Adena: x20  Drop: x20  Spoil: x20  Seal Stones: x5  Fangs of Stakato: x5  Raid Boss EXP/SP: x75  Raid Boss Drop: x1  Epic Boss Drop: x1  Manor: x5  Safe Enchant: +3  Max Enchant: Unlimited   Normal Scroll S/A Grade: 50%   Blessed Scroll S/A Grade: 55%    Normal Scroll B/C/D Grade: 50%    Blessed Scroll B/C/D Grade 55%  Max clans in ally (2)  3rd Class Cost (700 Halisha's Mark from Shrine of Loyalty)  NPC Buffer with 3h buff duration  GM Shop until B-Grade  Mana Potions  (1000 Power Delay 10 Seconds)  Auto-learn skills   Buff Slots (22+4 extra with Divine Inspiration)  Autopickup  Auction House in NPC at all towns  Offline Stores  Max Clients per PC (2)  Retail Geodata and Pathnodes  Reworked movement  Shift + Click Droplist on Monsters  Alt + Click Remove Buffs  Global Shout & Trade Chat  Special akamanah and zariche transformation  Seven Sings (Open)  Olympiad Weekly Circle  Olympiad Non-class  (5 min participants to begin)  Olympiad Class based (5 min participants to begin)  Tyrannosaurus drop Top LS chance 20% 5 Minutes Respawn  Flames of Invincibility cast 5 sec / duration 30 sec  Premium Account System  Auto Farm system using 10th Skill Bar.  IMPROVED RING OF CORE +1 STR +1 INT • INCREASE M. ATK. AND P. ATK.  IMPROVED EARRING OF ORFEN +1 WIT • INCREASE CASTING SPEED.  Subclass Quest           Part I: Kill Cabrio (Aden-Seal of Shilen) Talk to the box and bring the item to Subclass Quest           NPC.           Part II: Go for Hallate TOI 3, Kernon TOI 8 and Golkonda TOI 11, (Regardless of the order)           kill them, talk to the boxes and bring the sticks to Subclass Quest NPC to redeem your           subclass item.    Vote Reward System with Vote Coins and 12 Hours Vote Rune.  Vote Rune increases your P. Def and M. Def by 6%, P. Attack and M. Attack by 4%, Movement Speed by 4%.  Duration 12 Hours   Quest Name Drop  Relics of the Old Empire x4-8  Gather The Flames x3  Alliance with the Ketra Orcs x5  Alliance with the Varka Silenos x5  War with Ketra Orcs x10  War with the Varka Silenos x10  The Finest Food x5  A Powerful Primeval Creature x5  Rise and Fall of the Elroki Tribe x8  Legacy of Insolence x6-50%  Exploration of Giants Cave Part 1 x3  Exploration of Giants Cave Part 2 x3   Seekers of the Holy Grail x10   Guardians of the Holy Grail x10  Hunt of the Golden Ram Mercenary Force x10  The Zero Hour x5  Delicious Top Choice Meat x1  Heart in Search of Power x1  Whisper of Dreams 1/2 x3  In Search Of Fragments Of The Dimension x1 Raid Boss Name LvL Respawn  Frintezza    80 Respawn 48 Hours + - 30 Min  • Frintezza’s Necklace drop chance is 100%  Valakas    80 Respawn 240 Hours + - 30 Min  Sleep time 30 Minutes • Necklace of Valakas drop chance is 100%  Antharas    80 Respawn 192 Hours + - 30 Min  Sleep time 30 Minutes • Earring of Antharas drop chance is 100%  Baium    80 Respawn 120 Hours + - 30 Min  Sleep time 30 Minutes • Ring of Baium drop chance is 100%  Zaken    80 Respawn 48 Hours + - 30 Min  Door Open 22:00 in the night • Zaken’s Earring drop chance is 100%  Orfen    80 Every 24 Hours -+ 20 Minutes  • Earring of Orfen drop chance is 30%  Core    80 Every 26 Hours -+ 20 Minutes   • Ring of Core drop chance is 30%  Ant Queen    80 Every 28 Hours -+ 20 Minutes • Ring of Queen Ant drop chance is 30%  Splendor Barakiel    80 Spawn 6 Hours + - 15 Min Random  Subclass - Cabrio    80 Spawn 6 Hours + - 15 Min Random  Subclass - Hallate    80 Spawn 6 Hours + - 15 Min Random  Subclass - Kernon    80 Spawn 6 Hours + - 15 Min Random  Subclass - Golkonda    80 Spawn 6 Hours + - 15 Min Random   Ketra's Hero Hekaton    80 Spawn 22 Hours + - 15 Min Random   Ketra's Commander Tayr    80 Spawn 22 Hours + - 15 Min Random  Varka's Hero Shadith    80 Spawn 22 Hours + - 15 Min Random   Varka's Commander    80 Spawn 22 Hours + - 15 Min Random   Command Description .getreward Get vote reward from Hopzone. .rune Your Rune Informations. .menu Personal Menu Options. .raid Shows Normal Raids & Respawn. .epic Shows Epic Raids & Respawn. .rewards Get your Achievments. .offline Offline Shops. .relog Clearing your cache fps.     Source code reconstructed from my Lucera2 project.           Contact me for more informations, trollers will be not answered and don't expect a low price or a price drop. This project was running with 500+ real players.
    • 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
  • 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..