aonniemnoi
-
Posts
62 -
Credits
0 -
Joined
-
Last visited
-
Days Won
1 -
Feedback
0%
Content Type
Articles
Profiles
Forums
Store
Posts posted by aonniemnoi
-
-
btw i want to change this msg announce for all player to color msg. something like RED color
like type a SHOUT...
Thank you for some 1 can help me
// announce pvp/pk
if (Config.ANNOUNCE_PK_PVP && !pk.isGM())
{
String msg = "";
if (getPvpFlag() == 0)
{
msg = Config.ANNOUNCE_PK_MSG.replace("$killer", pk.getName()).replace("$target", getName());
if (Config.ANNOUNCE_PK_PVP_NORMAL_MESSAGE)
{
SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S1);
sm.addString(msg);
Announcements.getInstance().announceToAll(sm);
}
else
{
Announcements.getInstance().announceToAll(msg);
}
}
else if (getPvpFlag() != 0)
{
msg = Config.ANNOUNCE_PVP_MSG.replace("$killer", pk.getName()).replace("$target", getName());
if (Config.ANNOUNCE_PK_PVP_NORMAL_MESSAGE)
{
SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S1);
sm.addString(msg);
Announcements.getInstance().announceToAll(sm);
}
else
{
Announcements.getInstance().announceToAll(msg);
}
}
}
} -
I need anti-enchant system and will work 100% pm me Pls.
I will pay
-
On 9/19/2021 at 1:27 AM, Zake said:
Pack/client?
L2jserver 6670
-
btw i using l2jserver6670
---------------------------
pls anyone how to make a code Raidboss status show in NPC Alive and Dead
and how to make Show announce raidboss to spawn to all player online to know
i should start from where? please.
and Examp the code please?
if announce to all player how to do if this code for show in NPC?
-------------------------------
SpawnTable.getInstance().addNewSpawn(spawnDat, false);
if ((respawnTime == 0L) || (time > respawnTime))
{
L2RaidBossInstance raidboss = null;
if (bossId == 11111,22222,33333,44444,55555)
{
raidboss = (L2RaidBossInstance) spawnDat.doSpawn();
}
if (raidboss != null)
{
raidboss.setCurrentHp(currentHP);
raidboss.setCurrentMp(currentMP);
raidboss.setRaidStatus(StatusEnum.ALIVE);
_bosses.put(bossId, raidboss);
final StatsSet info = new StatsSet();
info.set("currentHP", currentHP);
info.set("currentMP", currentMP);
info.set("respawnTime", 0L);
_storedInfo.put(bossId, info);
}
}
else
{
final long spawnTime = respawnTime - Calendar.getInstance().getTimeInMillis();
_schedules.put(bossId, ThreadPoolManager.getInstance().scheduleGeneral(new SpawnSchedule(bossId), spawnTime));
}
_spawns.put(bossId, spawnDat);
if (storeInDb)
{
try (Connection con = L2DatabaseFactory.getInstance().getConnection();
PreparedStatement statement = con.prepareStatement("INSERT INTO raidboss_spawnlist (boss_id,amount,loc_x,loc_y,loc_z,heading,respawn_time,currentHp,currentMp) VALUES(?,?,?,?,?,?,?,?,?)"))
{
statement.setInt(1, spawnDat.getId());
statement.setInt(2, spawnDat.getAmount());
statement.setInt(3, spawnDat.getX());
statement.setInt(4, spawnDat.getY());
statement.setInt(5, spawnDat.getZ());
statement.setInt(6, spawnDat.getHeading());
statement.setLong(7, respawnTime);
statement.setDouble(8, currentHP);
statement.setDouble(9, currentMP);
statement.execute();
}
catch (Exception e)
{
// problem with storing spawn
_log.log(Level.WARNING, getClass().getSimpleName() + ": Could not store raidboss #" + bossId + " in the DB:" + e.getMessage(), e);
}
} -
this link.
awhile playing then will get this bug.
i dont know when this bug come from.
but only some people get this bug.
get very low damage when pvp.
some time attack in 10 + only
if re login this bug will gone...
Then get normal gamage is 1-200+
some one please help me.
i dont know where how to do
-
who can help me please pm me. i pay 50 us
i using l2jserver 6670
- 1
-
Hello. who can help me adapt to my server and running on my server with no problem i pay you 50 US
Please pm me.
i using l2jserver
SV-6670
DP-10490
-
hello
i need the code something like when doing action the return to the character lobby
can some one have any idea?
-
On 9/8/2021 at 12:00 AM, Kara said:
The code i gave you was handwritten. You can't just copy paste. I just gave you the idea.
There is a missing ) in the end but still the getIP() is not existing. You need replace the getIP() with what method retrieve your char's IP.
Like this?
if (L2World.getInstance().getPlayers().stream().filter(s -> s.IP().equalsIgnoreCase(activeChar.getIP(0.0.0.0)).count() > 2) { activeChar.close(false); return; }
-
58 minutes ago, Kara said:
The code i gave you was handwritten. You can't just copy paste. I just gave you the idea.
There is a missing ) in the end but still the getIP() is not existing. You need replace the getIP() with what method retrieve your char's IP.
Can you help me example for me please? I no have any idea
-
-
27 minutes ago, Kara said:
Editing GameClient.java is harder for you, so i guest you add a simple line check at file EnterWorld.java
such as:
if (L2World.getInstance().getPlayers().stream().filter(s -> s.IP().equalsIgnoreCase(activeChar.getIP()).count() > 2) { activeChar.close(false); return; }
here I add then show this. how to fix this please?
-
Hi i want to know how to set 1 ip can play 2 char online only . If use 3 cha will get disconnect on 3nd cha can help me please?
i try many code but cannot noting happen.
can some one how to create and where to use the code in please
-
2 hours ago, Kara said:
What exactly are you trying to do? Set max online users on the server?
If that's what you want to do using login system to block access such edit the file
RequestServerLogin.java
and in
public void run()
Before send the:
getClient().setJoinedGS(true); getClient().sendPacket(new PlayOk(sk));
You can add a check or you can do the same thing easier using
EnterWorld.java
and add a simple check to kick player if for example
if (L2World.getInstance().getPlayersSize() > 100) { activeChar.logout(false); }
I want to set 1 ip can play 2 char online only . If use 3 cha will get disconnect on 3nd cha can help me please?
I want to set 1 ip can play 2 char online only . If use 3 cha will get disconnect on 3nd cha can help me please?
-
I using this code for Max_ip online but noting heppen
I doing the code correct?
some 1 please help. sorry for my ENG
I using l2jserver 6670------
here is the code...
at server.properties
------------------------
# MAX IP
MaxIp = 2at L2pcinstance
------------------------------
public void findDualBox(L2PcInstance activeChar)
{
Map<String, List<L2PcInstance>> ipMap = new HashMap<>();
String ip = "0.0.0.0";
int multibox = Config.MAX_IP;
final Map<String, Integer> dualboxIPs = new HashMap<>();
for (L2PcInstance player : L2World.getInstance().getPlayers())
{
ip = player.getIP();
if (ipMap.get(ip) == null)
{
ipMap.put(ip, new ArrayList<L2PcInstance>());
}
ipMap.get(ip).add(player);
if (ipMap.get(ip).size() >= multibox)
{
Integer count = dualboxIPs.get(ip);
if (count == null)
{
dualboxIPs.put(ip, multibox);
}
else
{
dualboxIPs.put(ip, count++);
}
}
}
List<String> keys = new ArrayList<>(dualboxIPs.keySet());
Collections.sort(keys, (left, right) -> dualboxIPs.get(left).compareTo(dualboxIPs.get(right)));
Collections.reverse(keys);
for (String dualboxIP : keys)
{
findCharacterByIp(activeChar, dualboxIP);
}
}
/**
* @return
*/
private String getIP()
{
// TODO Auto-generated method stub
return null;
}
private void findCharacterByIp(L2PcInstance activeChar, String IpAdress) throws IllegalArgumentException
{
boolean findDisconnected = false;
if (IpAdress.equals("disconnected"))
{
findDisconnected = true;
}
else
{
if (!IpAdress.matches("^(?:(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2(?:[0-4][0-9]|5[0-5]))\\.){3}(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2(?:[0-4][0-9]|5[0-5]))$"))
{
throw new IllegalArgumentException("Malformed IPv4 number");
}
}
String ip = "0.0.0.0";
for (L2PcInstance player : L2World.getInstance().getPlayers())
{
if (findDisconnected)
{
continue;
}
ip = player.getIP();
if (!ip.equals(IpAdress))
{
continue;
}
}
stopDualbox();
logout();
antiDualbox();
}
public static void startAntiDualTask(L2PcInstance player)
{
player.antiDualbox();
}
public static ScheduledFuture<?> _antiDualbox;
private static void stopDualbox()
{
if (_antiDualbox != null)
{
_antiDualbox.cancel(false);
_antiDualbox = null;
}
}
public void antiDualbox()
{
_antiDualbox = ThreadPoolManager.getInstance().scheduleAi(new startDualbox(), 300000);
}
private class startDualbox implements Runnable
{
public startDualbox()
{
findDualBox(_plD);
}
@Override
public void run()
{
}
}
L2PcInstance _plD;
} -
On 9/30/2020 at 12:04 AM, Zake said:
Just don't use such sources, they're outdated and poorly coded. There are plenty of active h5 forks out there (or at least not outdated since 2013)
Can i get new? Or have any source new for l2mythras? Thank you
-
When get allplayer online also got problem how to fix it? Please some one help me
On 6/18/2019 at 9:42 PM, Ms.G said:problem solved.
Please how to fix it? Can you help me?
-
# Max Chars per HWID
MaxChars = 2cannot use. when i set this is to 2 when all people online many people cant login
alway show cant login more than 2 character but only just login for 1 character also cannot T_T
some time set to 3,4,5 also cannot
btw can any onyone have code for IP limit for 2 character for one pc? something like that thank you
-
On 9/8/2020 at 8:02 PM, HowardStern said:
theres anti dual box already implemented in l2jserver but u can send me a pm with your discord i can apply that for u
can i have you discord? thank
i am a new for discord sorry
-
On 11/2/2014 at 7:54 PM, Tristis said:
And this:
+ if (ProtectionDualBox.check(activeChar))
+ ProtectionDualBox.disc(activeChar);Should be changed to this:
+ if (ProtectionNetwork.check(activeChar))
+ ProtectionNetwork.disc(activeChar);Right?
i build ok but when i login alway all disconnected from server even 1st charecter also got disconnect
my code...
/*
* Copyright (C) 2004-2020 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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 Server 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/>.
*/
/**
* @author User
*
*/
package com.l2jserver.gameserver.model;import com.l2jserver.gameserver.ThreadPoolManager;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.network.clientpackets.Say2;
import com.l2jserver.gameserver.network.serverpackets.CreatureSay;/**
* @author xAddytzu
*/
public class ProtectionNetwork
{
public static void disc(final L2PcInstance player)
{
player.sendPacket(new CreatureSay(1, Say2.HERO_VOICE, "SYSTEM", "You cannot play with dualbox."));
ThreadPoolManager.getInstance().scheduleGeneral(() -> player.closeNetConnection(false), 20000);
}
public static boolean check(L2PcInstance player)
{
boolean loggedz0r = false;
for (L2PcInstance playerz0r : L2World.getInstance().getPlayers())
{
String client = first(playerz0r);
String client1 = second(player);
if (client.equalsIgnoreCase(client1))
{
loggedz0r = true;
}
}
return loggedz0r;
}
private static String first(L2PcInstance player)
{
return second(player).toString();
}
private static String second(L2PcInstance player)
{
try
{
player.getClient().getConnection().getInetAddress().getHostAddress();
}
catch (Throwable t)
{
}
return null;
}
} -
/*
* Copyright (C) 2004-2020 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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 Server 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/>.
*/
/**
* @author User
*
*/
package com.l2jserver.gameserver.model.custom;import com.l2jserver.gameserver.ThreadPoolManager;
import com.l2jserver.gameserver.model.L2World;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.network.clientpackets.Say2;
import com.l2jserver.gameserver.network.serverpackets.CreatureSay;/**
* @author xAddytzu
*/
public class ProtectionNetwork
{
public static void disc(final L2PcInstance player)
{
player.sendPacket(new CreatureSay(1, Say2.HERO_VOICE, "SYSTEM", "You cannot play with dualbox."));
ThreadPoolManager.getInstance().scheduleGeneral(() -> player.closeNetConnection(), 20000);
}
public static boolean check(L2PcInstance player)
{
boolean loggedz0r = false;
for (L2PcInstance playerz0r : L2World.getInstance().getPlayers())
{
String client = first(playerz0r);
String client1 = second(player);
if (client.equalsIgnoreCase(client1))
{
}
loggedz0r = true;
}
return loggedz0r;
}
private static String first(L2PcInstance player)
{
return second(player).toString();
}
private static String second(L2PcInstance player)
{
try
{
return player.getClient().getConnection().getSocketChannel().socket().getInetAddress().getHostAddress();
}
catch (Throwable t)
{
}
return null;
}
}---------------------------------------------------------------------------
by the way i have no idea for this line
(() -> player.closeNetConnection(), 20000); ------> closeNetConnection() this error
and this line
return player.getClient().getConnection().getSocketChannel().socket().getInetAddress().getHostAddress();
getSocketChannel ----> this error
I using l2jserver Beta
core. 6670
-
On 9/26/2019 at 6:01 AM, kaiserxd said:
Hello young people, Here is a simple protection.
in -> l2jserver/gameserver/network/clientpackets/RequestMagicSkillUse.java method -> runImpl() search for: // Check the validity of the skill if (skill != null) { Add: + if (activeChar.isInSiege()) + { + //Proibe Ress em Sieges + if (skill.getId() == 1016 || skill.getId() == 1254) + { + activeChar.sendMessage("Não é possivel utilizar " + skill.getName() + " durante a Siege!"); + activeChar.sendPacket(ActionFailed.STATIC_PACKET); + return; + } + }
bro still cant use. that code still cant block
i use l2jserver
SV-6670
DP-10490
-
Any code or scripts for anti bot attack pk to player farming exp
like a when die and need to put question or random code for Resurrection again. And Restrict screen opening. Like a 1 ip can open 2 screen.
Any scripts For that thing?
thankyou
-
How to make it my server go online
so i already do ...
-forward port all 2106 ,3306 ,7777 ,9014
-set my server ip on thddns.net
-check my port open at the . https://www.yougetsignal.com/. Already open
all thing i do but other people cant get in my server
already i do all correct? Help me please
How to set Announce msg Color for PK-PVP
in Request Server Development Help [L2J]
Posted
now i open it on systemmsg-e.dat in system.
now where to change pls?