Explain if possible how to make or do I have downloaded.
thanks in advance.
sorry for my english, I live in Ukraine

I recommend you that you read this guides:zelmaks wrote:Boys and girls, help me with the service, tell me how to make the service "change nickname" - "to change the color of nick"
please help me
Code: Select all
player.getAppearance().setNameColor(Integer.decode("0x" + val));
player.broadcastUserInfo();
Привет, ахуенно что русские тут есть))epu wrote:players*zelmaks wrote:igrakov
Проверочное слово - игрок
Code: Select all
/*
* Copyright (C) 2004-2015 L2J DataPack
*
* This file is part of L2J DataPack.
*
* L2J DataPack 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.
*
* L2J DataPack 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 custom.ai.EvilSantaClaus;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import ai.npc.AbstractNpcAI;
import com.l2jserver.gameserver.model.actor.L2Npc;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
/**
* Evil Santa Claus AI.
* @author Zoey76
*/
public class EvilSantaClaus extends AbstractNpcAI
{
// NPC
private static final int NPC_ID = 1004307;
// Rewarded players
private static final Set<Integer> REWARDED_PLAYERS_IDS = ConcurrentHashMap.newKeySet();
// Reward
private static final long ADENA_COUNT = 100;
public EvilSantaClaus()
{
super(EvilSantaClaus.class.getSimpleName(), "custom/ai");
addFirstTalkId(NPC_ID);
addTalkId(NPC_ID);
}
@Override
public String onFirstTalk(L2Npc npc, L2PcInstance player)
{
String html = getHtm(player.getHtmlPrefix(), "1004307.html");
html = html.replace("%gender%", player.getAppearance().getSex() ? "girl" : "boy");
return html;
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
switch (event)
{
case "reward":
{
if (npc.isInsideRadius(player, 300, false, true))
{
if (REWARDED_PLAYERS_IDS.contains(player.getObjectId()))
{
player.sendMessage("You have already been rewarded!");
}
else
{
REWARDED_PLAYERS_IDS.add(player.getObjectId());
player.sendMessage("Here is your reward!");
giveAdena(player, ADENA_COUNT, false);
}
}
else
{
player.sendMessage("You are too far to get a reward!");
}
break;
}
}
return super.onAdvEvent(event, npc, player);
}
}
So what i need te do now to make this workZoey76 wrote:My bad, I'll fix the guide.
Attila wrote:So what i need te do now to make this workZoey76 wrote:My bad, I'll fix the guide.
Zoey76 wrote:Attila wrote:So what i need te do now to make this workZoey76 wrote:My bad, I'll fix the guide.
Add the missing main method like the error says: https://github.com/L2J/L2J_Server/wiki/ ... a-basic-AI
yes tanksAvanael92 wrote:The main method is at the very end, just copy & paste the updated code. The main method is basically the starting point to execute a java application.
Code: Select all
game/data/scripts/custom/ai/EvilSantaClaus