Jump to content

[Share].reward VoiceCommand


Fanky

Recommended Posts

I agree with Coyote or the one who said that it should be like that : typing .reward and receiving an item which when you click on it you get the skill!

 

But it's a good idea mate... keep creating with java!

Link to comment
Share on other sites

I agree with Coyote or the one who said that it should be like that : typing .reward and receiving an item which when you click on it you get the skill!

 

But it's a good idea mate... keep creating with java!

Thats i think first this i code so :D

thanks :]

Link to comment
Share on other sites

  • 1 month later...

how can I change this line:

 

 L2Skill skill = SkillTable.getInstance().getInfo(56,2);              
+              activeChar.addSkill(skill);

 

To give an item like a bracelet or a agathion?

 

So instead of getting a skill the player will get an item when he type .reward

 

Thank you.

 

 

 

Link to comment
Share on other sites

how can I change this line:

 

 L2Skill skill = SkillTable.getInstance().getInfo(56,2);              
+              activeChar.addSkill(skill);

 

To give an item like a bracelet or a agathion?

 

So instead of getting a skill the player will get an item when he type .reward

 

Thank you.

 

 

 

If u need item instead of reward you should change the whole code not only this line
Link to comment
Share on other sites

the code is done wrong >.> also the destroy method is a boolean in case the item cant be destroyed >.> should of taken advantage of that, with the current code it can be hacked.

 

also disorder25, you can just simply delete those two lines and add the item creation ones >.>

activeChar.addItem("Crapcode", 57, 2000000, activeChar, true);

Link to comment
Share on other sites

the code is done wrong >.> also the destroy method is a boolean in case the item cant be destroyed >.> should of taken advantage of that, with the current code it can be hacked.

 

also disorder25, you can just simply delete those two lines and add the item creation ones >.>

activeChar.addItem("Crapcode", 57, 2000000, activeChar, true);

Noone mention it,till now :D

Anyway thanks for it >.>

Link to comment
Share on other sites

can u tell me what this line is?

public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target)

i dont understand this well...it is to read the activeChar?

no, its to remove ur title cus ur an idiot.

Thats an interface method, that method is called when the user is doing a voiced command, the parameters activeChar and target are defined when the method is called by the player in Say2 client packet.

Link to comment
Share on other sites

no, its to remove ur title cus ur an idiot.

Thats an interface method, that method is called when the user is doing a voiced command, the parameters activeChar and target are defined when the method is called by the player in Say2 client packet.

pfff kill your self men i am just asking...i dont tell you an idiot...so stfu because you are not God men . have a life noob!
Link to comment
Share on other sites

the code is done wrong >.> also the destroy method is a boolean in case the item cant be destroyed >.> should of taken advantage of that, with the current code it can be hacked.

 

also disorder25, you can just simply delete those two lines and add the item creation ones >.>

activeChar.addItem("Crapcode", 57, 2000000, activeChar, true);

 

Thanks Setekh And how can I fix that problem that you are talking about.

What can I use instead of use destroyItemByItemId

I Appreciate.

 

 

 

 

 

If u need item instead of reward you should change the whole code not only this line

 

It is working fine, and the item is a reward, I just don't want a skill.

Link to comment
Share on other sites

Thanks Setekh And how can I fix that problem that you are talking about.

What can I use instead of use destroyItemByItemId

I Appreciate.

 

 

 

 

 

It is working fine, and the item is a reward, I just don't want a skill.

well i sayd that the method is a boolean just use its return.

if(activeChar.getInventory().destroyItemByItemId("Item", 3470, 1, activeChar, activeChar.getTarget()))
{
              activeChar.sendMessage("You have been rewarded");          
            // stuff u need
}

 

 

pfff kill your self men i am just asking...i dont tell you an idiot...so stfu because you are not God men . have a life noob!

HAHA whos talkin xD also i explained smart ass l2jdev >.>

Link to comment
Share on other sites

I have it like this, it's working but I don't want any exploit.

 

           if (activeChar.getInventory().getItemByItemId(14720) == null)
          {
           activeChar.sendMessage("You don't have the items required to take this reward");
           return false;
          }
             activeChar.getInventory().destroyItemByItemId("Item", 14720, 1, activeChar, activeChar.getTarget());                   
             activeChar.sendMessage("You have been rewarded");
		  activeChar.addItem("Loot", 3470, 1, reward, true);
             activeChar.sendMessage("One Event - Apiga has dissapeared");

Link to comment
Share on other sites

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...