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

    • Lineage 2 Interlude Developer – Cliente + Datapack Hola, soy developer especializado en Lineage 2 Interlude con experiencia tanto en cliente como datapack/core. ✔ Desarrollo datapack (Java, scripts, quests, balance PvP/PvE) ✔ Fixes core / geodata / exploits ✔ Sistemas custom (events, Olympiad, instancias, mods PvP) ✔ Cliente: interface mods, system patches, .dat edits, UI personalizada ✔ Optimización y estabilidad de servidor ✔ Trabajo freelance o colaboración fija Si necesitáis soporte dev o mejoras para vuestro servidor Interlude, podéis contactarme por DM. Portfolio y ejemplos disponibles bajo petición.
    • THEY DON’T COME BACK FOR NO REASON. HERE’S WHY Our clients come from different countries and with very different tasks. But the strongest indicator of quality is simple — when a client comes back **for a second time**. This case is exactly that. The client returned with a request for a **German ID**. The requirement was clear: a document **in a male hand**, with a natural live scene and correct geographic context. What we did: ▪ accepted source files and data without unnecessary bureaucracy ▪ selected a **real street**, not a generic background ▪ built a print-ready mockup with correct scene logic ▪ sent it for approval ▪ after confirmation, delivered the **final file for printing** No templates. No “good enough”. Only solutions tailored to a specific task. Result: ▪ mockup approved on the first try ▪ client fully satisfied ▪ stays in touch We work **worldwide** — and that’s exactly why clients return. Contact us › TG: @mustang_service ( https:// t.me/ mustang_service ) › Channel: Mustang Service ( https:// t.me/ +6RAKokIn5ItmYjEx ) *All data is published with the client’s consent.* #redraw #verification #documents #case #ID
    • Lineage 2 Interlude Developer – Cliente + Datapack Hola, soy developer especializado en Lineage 2 Interlude con experiencia tanto en cliente como datapack/core. ✔ Desarrollo datapack (Java, scripts, quests, balance PvP/PvE) ✔ Fixes core / geodata / exploits ✔ Sistemas custom (events, Olympiad, instancias, mods PvP) ✔ Cliente: interface mods, system patches, .dat edits, UI personalizada ✔ Optimización y estabilidad de servidor ✔ Trabajo freelance o colaboración fija Si necesitáis soporte dev o mejoras para vuestro servidor Interlude, podéis contactarme por DM. Portfolio y ejemplos disponibles bajo petición.
  • 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..