Jump to content

Question

Posted
Good afternoon, mxc, I'm trying to adapt the acys quest to jfrozen, however, I'm trying to put the file straight into the kernel instead of properties, I'm having the following error:
2upsqdi.png
 
Code:

/*
 * This program is free software: you can redistribute it and/or modify it under
 * the terms of the GNU General Public License as published by the Free Software
 * Foundation, either version 3 of the License, or (at your option) any later
 * version.
 * 
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
 * details.
 * 
 * You should have received a copy of the GNU General Public License along with
 * this program. If not, see <http://www.gnu.org/licenses/>.
 */
package net.l2jpx.gameserver.ai.special;
 
import java.util.HashMap;
import java.util.List;
 
import net.l2jpx.gameserver.model.actor.instance.L2PcInstance;
import net.l2jpx.gameserver.model.quest.Quest;
import net.l2jpx.gameserver.network.serverpackets.PlaySound;
import net.l2jpx.gameserver.model.actor.instance.L2NpcInstance;
 
public class PartyDrop extends Quest
{
private static final String qn = "PartyDrop";
 
private static final int[] PARTYMOBS =
{
10505
};
 
boolean _canReward = false;
static HashMap<String, Integer> playerIps = new HashMap<>();
 
public PartyDrop()
{
super(-1, qn, "custom");
 
addKillId(PARTYMOBS);
}
 
@Override
public String onKill(L2NpcInstance npc, L2PcInstance player, boolean isPet)
{
if (player.isInParty())
{
List<L2PcInstance> party = player.getParty().getPartyMembers();
 
for (L2PcInstance member : party)
            {
String pIp = member.getClient().getConnection().getInetAddress().getHostAddress();
                    
if (!playerIps.containsKey(pIp))
                {
playerIps.put(pIp, 1);
_canReward = true;
                }
else
{
int count = playerIps.get(pIp);
                
if (count < 1)
                    {
playerIps.remove(pIp);
playerIps.put(pIp, count + 1);
_canReward = true;
                    }
else
                    {
member.sendMessage("Already 1 member of your ip have been rewarded, so this character won't be rewarded.");
_canReward = false;
                    }
}
if (_canReward)
{
if (member.isInsideRadius(npc, 1000, false, false))
   {
   member.addItem("Luck Box", 9509, 1, member, true);
member.addItem("Ace Coin", 9500, 5000, member, true);
member.addItem("Mochi Token", 9515, 100, member, true);
   member.broadcastPacket(new PlaySound("ItemSound.quest_finish"));
   }
   else
   {
   member.sendMessage("You are too far to be rewarded.");
   }
}
            }
playerIps.clear();   
}
else
{
player.addItem("Luck Box", 9509, 1, player, true);
player.addItem("Ace Coin", 9500, 5000, player, true);
player.addItem("Mochi Token", 9515, 100, player, true);
player.broadcastPacket(new PlaySound("ItemSound.quest_finish"));
}
 
return null;
}
 
public static void main(String[] args)
{
new PartyDrop();
}
}

 
Actually I do not know if I will succeed, the code is above, I am open to corrections ..

 

2 answers to this question

Recommended Posts

Guest
This topic is now closed to further replies.


  • Posts

    • Hey MaxCheaters! 👋 Introducing L2Soon.com — a free international platform for Lineage 2 server announcements.   Why L2Soon? No more searching through dozens of forums and Discord servers. All new L2 server openings are in one place — updated daily, with real player online counts so you always know where people actually play.   Features: 🔔 Telegram Bot (@l2Soon_bot) — alerts 24h & 1h before server launch 📅 Accurate launch times — in your local timezone ⚔️ All chronicles — Interlude, High Five, GoD, Classic, Essence, Grand Crusade and more 🎯 Filters — by chronicle, rates (x1–x1000+) and server type (PvP, RvR, GvE, Craft, Low Rate...) ⭐ VIP servers — verified projects pinned at the top 🌍 Multi-language — EN, UK, RU, PT   Listing is completely FREE. 🔗 https://l2soon.com/en Feedback welcome — drop a comment or contact us via Telegram @l2Soon_bot
    • Download Lobby u need island for lobby Download Crow Island  
    • Website: https://l2elixir.org/ Discord: https://discord.gg/5ydPHvhbxs    
    • L2-LORENA x100 MID RATE   Interlude Nostalgia Meets Modern Gameplay   OFFICIAL OPENING:  April 4 (Saturday)  19:00 UTC+1 ⸻  MAIN INFORMATION  Adena: x5  Drop: x10  Spoil: x10  Raid Boss: x10  Seal Stones: x2  Quests: x10 ⸻  FEATURES  GM Shop up to B-Grade  Full Buffer  Premium System (x2 bonuses)  AutoFarm – FREE for everyone ⸻  SERVER CONCEPT  Classic Interlude nostalgia  Enhanced with modern interface & mechanics  Balanced PvP & PvE gameplay  Active development & custom features ⸻  WHY JOIN L2-LORENA?  No Pay-to-Win  Smooth gameplay & stable server  Competitive PvP environment  Friendly & active community ⸻  JOIN US NOW L2-LORENA 100X <<< LINK Discord: https://discord.gg/TYZ88Tgx4b  Facebook: https://www.facebook.com/share/18kwbkaYZY/?mibextid=wwXIfr   L2-LORENA Link << Discord: https://discord.gg/TYZ88Tgx4b  Facebook: https://www.facebook.com/share/18kwbkaYZY/?mibextid=wwXIfr
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..