Jump to content

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


Recommended Posts

Posted

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

  • 4 months later...
Posted

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.

Posted

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

 

or

 

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

Posted

try adding this

 

if (targetChar instanceof L2PcInstance)

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

Posted

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?

Posted

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

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

 

Posted

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

 

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

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.




×
×
  • Create New...