Jump to content
  • 0

Correct 2 Lines Of Code Cant Find The Mistake -.-


SQL Developer

Question

Hello can someone correct for me those 2 lines? 

I am try to create a item dialog but i do somthing wrong check out ..

(this is just the neccesery fix part of code)

import com.l2jfrozen.gameserver.network.serverpackets.ExShowVariationMakeWindow;
import com.l2jfrozen.gameserver.network.SystemMessageId;

 public void useItem(final L2PlayableInstance playable, final L2ItemInstance item)
 {

if (itemId == 8762)
{
activechar.sendPacket(new SystemMessage(SystemMessageId.SELECT_THE_ITEM_TO_BE_AUGMENTED));
activechar.sendPacket(new ExShowVariationMakeWindow());
}
Edited by L2LostWard
Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

 

Hello can someone correct for me those 2 lines? 

I am try to create a item dialog but i do somthing wrong check out ..

(this is just the neccesery fix part of code)

import com.l2jfrozen.gameserver.network.serverpackets.ExShowVariationMakeWindow;
import com.l2jfrozen.gameserver.network.SystemMessageId;

 public void useItem(final L2PlayableInstance playable, final L2ItemInstance item)
 {

if (itemId == 8762)
{
activechar.sendPacket(new SystemMessage(SystemMessageId.SELECT_THE_ITEM_TO_BE_AUGMENTED));
activechar.sendPacket(new ExShowVariationMakeWindow());
}

 

Just cause im in good mood, i'l hlep you

 

If UseItem is ordinary method that isnt made by you and if it's getting neccesary data(playble, item)

then

 public void useItem(final L2PlayableInstance playable, final L2ItemInstance item)
 {

 if (Item.itemId == 8762)
 {
activechar.sendPacket(new SystemMessage(SystemMessageId.SELECT_THE_ITEM_TO_BE_AUGMENTED));
activechar.sendPacket(new ExShowVariationMakeWindow());
 }
}

But something tells me that you cant have access to activechar through there, it might need to use L2PlayableInstance instead of activeChar,  but either way there is lack of info you giving so good luck, mb thats solve it.

Edited by LightFusion
Link to comment
Share on other sites

  • 0

in the same void (useitem) here is onother code from the java file 

		if (itemId == 7064)
		{
			activeChar.sendPacket(new ShowMiniMap(1665));
			activeChar.sendPacket(new RadarControl(0, 1, 51995, -51265, -3104));
		}

and this works ok 

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
Answer this question...

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