Jump to content
  • 0

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


Question

Posted (edited)

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

5 answers to this question

Recommended Posts

  • 0
Posted (edited)

 

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
  • 0
Posted

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 

  • 0
Posted

You don't have an activechar variable.

Test the L2PlayableInstance if it's instance of L2PcInstance and if it is, assign it to this activechar variable.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Posts

    • Don’t miss the new Telegram gifts with our Telegram Stars purchasing bot! A great opportunity to invest in a stable digital asset at an early stage while the market is still forming. Buy other existing gifts in the official store using Telegram Stars, pay for subscriptions, donate to games and projects, pay for Premium subscriptions, and react to messages in channels! Low prices, multiple payment options, and other cool unique features! ⚡ Try it today — SOCNET STARS BOT ⚡ Active links to SOCNET stores: Digital Goods Store (Website): Go Store Telegram Bot: Go – convenient access to the store via Telegram messenger. ⭐ Telegram Stars Purchase Bot: Go – fast and profitable way to buy stars in Telegram. SMM Panel: Go – promote your social media accounts. We present to you the current list of promotions and special offers for purchasing our products and services: 1️⃣ Promo code OCTOBER2025 (8% discount) for purchases in our store (Website, bot) in October! You can also use the promo code SOCNET (15% discount) for your first purchase. 2️⃣ Get $1 on your store balance or a 10–20% discount — just write your username after registration on our website using the template: "SEND ME BONUS, MY USERNAME IS..." — post it in our forum thread! 3️⃣ Get $1 for your first SMM Panel trial — simply open a ticket titled “Get Trial Bonus” on our website (Support). 4️⃣ Weekly ⭐ Telegram Stars giveaways in our Telegram channel and in our Telegram Stars bot! News: ➡ Telegram Channel: https://t.me/accsforyou_shop ➡ WhatsApp Channel: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord Server: https://discord.gg/y9AStFFsrh Contacts and Support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
    • Don’t miss the new Telegram gifts with our Telegram Stars purchasing bot! A great opportunity to invest in a stable digital asset at an early stage while the market is still forming. Buy other existing gifts in the official store using Telegram Stars, pay for subscriptions, donate to games and projects, pay for Premium subscriptions, and react to messages in channels! Low prices, multiple payment options, and other cool unique features! ⚡ Try it today — SOCNET STARS BOT ⚡ Active links to SOCNET stores: Digital Goods Store (Website): Go Store Telegram Bot: Go – convenient access to the store via Telegram messenger. ⭐ Telegram Stars Purchase Bot: Go – fast and profitable way to buy stars in Telegram. SMM Panel: Go – promote your social media accounts. We present to you the current list of promotions and special offers for purchasing our products and services: 1️⃣ Promo code OCTOBER2025 (8% discount) for purchases in our store (Website, bot) in October! You can also use the promo code SOCNET (15% discount) for your first purchase. 2️⃣ Get $1 on your store balance or a 10–20% discount — just write your username after registration on our website using the template: "SEND ME BONUS, MY USERNAME IS..." — post it in our forum thread! 3️⃣ Get $1 for your first SMM Panel trial — simply open a ticket titled “Get Trial Bonus” on our website (Support). 4️⃣ Weekly ⭐ Telegram Stars giveaways in our Telegram channel and in our Telegram Stars bot! News: ➡ Telegram Channel: https://t.me/accsforyou_shop ➡ WhatsApp Channel: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord Server: https://discord.gg/y9AStFFsrh Contacts and Support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
    • Don’t miss the new Telegram gifts with our Telegram Stars purchasing bot! A great opportunity to invest in a stable digital asset at an early stage while the market is still forming. Buy other existing gifts in the official store using Telegram Stars, pay for subscriptions, donate to games and projects, pay for Premium subscriptions, and react to messages in channels! Low prices, multiple payment options, and other cool unique features! ⚡ Try it today — SOCNET STARS BOT ⚡ Active links to SOCNET stores: Digital Goods Store (Website): Go Store Telegram Bot: Go – convenient access to the store via Telegram messenger. ⭐ Telegram Stars Purchase Bot: Go – fast and profitable way to buy stars in Telegram. SMM Panel: Go – promote your social media accounts. We present to you the current list of promotions and special offers for purchasing our products and services: 1️⃣ Promo code OCTOBER2025 (8% discount) for purchases in our store (Website, bot) in October! You can also use the promo code SOCNET (15% discount) for your first purchase. 2️⃣ Get $1 on your store balance or a 10–20% discount — just write your username after registration on our website using the template: "SEND ME BONUS, MY USERNAME IS..." — post it in our forum thread! 3️⃣ Get $1 for your first SMM Panel trial — simply open a ticket titled “Get Trial Bonus” on our website (Support). 4️⃣ Weekly ⭐ Telegram Stars giveaways in our Telegram channel and in our Telegram Stars bot! News: ➡ Telegram Channel: https://t.me/accsforyou_shop ➡ WhatsApp Channel: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord Server: https://discord.gg/y9AStFFsrh Contacts and Support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
    • Yes, just keep this post=)
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock