Jump to content

[Share] .res voice command - Takes one goldbar and resses you


Vago

Recommended Posts

u wrote that i should   write this

_voicedCommandHandler.registerVoicedCommandHandler(new Res());  

after this

_log.config("VoicedCommandHandler: Loaded .res VoiceCommand handler.");  

but i can't find _log.config and dont know where to put that, maybe u can write line o smt like that? using 2ljfree

 

posible.. ∞ At me work this command..but I removed it because unbalance pvp

Link to comment
Share on other sites

  • 4 months later...

I have a problem! I have added your ressurection system and I wanted to change GB count to 100...

I have changed this line:

activeChar.getInventory().destroyItemByItemId("RessSystem", 3470, 1, activeChar, activeChar.getTarget());

To this:

activeChar.getInventory().destroyItemByItemId("RessSystem", 3470, 100, activeChar, activeChar.getTarget());

And it takes 100 GB, but if you have 99 GB it ressurects you anyway and don't take GB!

 

As I think, I need to edit this line and add here count:

if(activeChar.getInventory().getItemByItemId(3470) == null)

But how can I add it? I have tried

getItemByItemId(3470, 100)

, but this don't work and give an error...

 

Help me please asap... Thank you in advice.

Link to comment
Share on other sites

if (activeChar.getInventory().getInventoryItemCount(3470, 1000)

 

or

 

if (activeChar.getInventory().getInventoryItemCount(57, 0) >= Config.yourconfig)

Link to comment
Share on other sites

try adding this

 

if (targetChar instanceof L2PcInstance)

((L2PcInstance) targetChar).restoreExp(100.0);

 

I used:

if (activeChar instanceof L2PcInstance)
((L2PcInstance) activeChar).restoreExp(100.0);

And it worked! Thank you a lot :)

 

Added: But it don't show an effect if you have for ex: 85 lvl and 23%... And setlvl is not a solution <__<

Any other way to do this?

Link to comment
Share on other sites

        broadcastPacket(new SocialAction(getObjectId(), 15));      -      this will show the level up animation

        broadcastPacket(new SocialAction(getObjectId(), 16));      -      this will show the hero animation

 

Link to comment
Share on other sites

import net.sf.l2j.gameserver.network.serverpackets.SocialAction;

 

        broadcastPacket(new SocialAction(activeChar.getObjectId(), 15));

 

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now



  • Posts

    • L2 Insignia High Five 20x MID SERVER FOCUSED ON OLYMPIAD | PVP | AUTOFARM       OPEN BETA TEST SERVER 3 MAY 2024   GRAND OPENING 10 MAY 2024    Rates: 📜 XP/SP 20x | Spoil 15x | Drop 10x | Adena 10x 📜     Server Features: 🔥 No Olf-T Shirt, No big over-enchant, No over-power Donate 🔥 🔥 VIP Gold Color Chat, Unique Olympiad Extra Points Engine, GvG Event 🔥 🔥 Auto-Farm, LoA and DV scheduled PvP Zone, Calendar Daily Reward 🔥 🔥 Castle Instance, Solo Instance, PvP Solo Rift, Dress me system, Adena Boxes 🔥        Website: https://www.l2insignia.com  Discord: https://discord.com/invite/yEgsrHn2hQ      
    • I am selling the essence project which includes versions 388 and 439 that have been running for over 2 years or (447 as custom PVP like Pride). I have a test server for you to test them out. If you are really interested in it then contact my seller at discord: kiwi7106. Price: 4000 Euro P/s: This is a project that I have spent a lot of money and time developing, so if you are not interested in it, please get out of this topic, thank you. P/s 2: If you find the price too expensive, it's best to skip this article and find another project and don't comment negatively on my topic, thank you.
    • Someone ask me for this, it should work on any client that has Kamael race, preview:     Installation - there are two ways to install depending on how you want to use it:   Method 1: If you want to completely replace the original, do:   Copy all lines from your armorgrp to Notepad++, press Ctrl+H, check the "match whole word" option and replace:   kamael.Mkamael_m000_w_ad00   by:   AvengersKamaelWings.Avengers_MKamael_m001_w_ad00   Then replace:   MKamael.Mkamael_m000_t00_w   by:   AvengersKamaelWings.MKamael_m001_t00_w   Now repeat the same process with the female, replace:   kamael.Fkamael_m000_w_ad00   by:   AvengersKamaelWings.Avengers_FKamael_m001_w_ad00   Then replace:   FKamael.Fkamael_m000_t00_w   by:   AvengersKamaelWings.FKamael_m001_t00_w   You're done, paste everything back into File Edit and save!   Method 2: If you only want to replace in specific sets, execute the above process only on the armorgrp of those sets.   Repack by: AvengersTeamBr Password: LadrãoDeFrango      
  • Topics

×
×
  • Create New...