Hi guys , i'm trying to change this java code from java 7 to java 8
who can help me please change it .
i want change it , for L2RO-TEAM source
/*
* 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 com.l2jserver.gameserver.network.serverpackets;
import java.util.ArrayList;
import java.util.List;
import com.l2jserver.ArabicUtilities;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.network.NpcStringId;
import com.l2jserver.gameserver.network.SystemMessageId;
/**
* This class ...
*
* @version $Revision: 1.4.2.1.2.3 $ $Date: 2005/03/27 15:29:57 $
*/
public final class CreatureSay extends L2GameServerPacket
{
// ddSS
private static final String _S__4A_CREATURESAY = "[S] 4A CreatureSay";
private int _objectId;
private int _textType;
private String _charName = null;
private int _charId = 0;
private String _text = null;
private int _npcString = -1;
private List<String> _parameters;
/**
* @param objectId
* @param messageType
* @param charName
* @param text
*/
public CreatureSay(int objectId, int messageType, String charName, String text)
{
_objectId = objectId;
_textType = messageType;
_charName = charName;
_text = text;
}
public CreatureSay(int objectId, int messageType, int charId, NpcStringId npcString)
{
_objectId = objectId;
_textType = messageType;
_charId = charId;
_npcString = npcString.getId();
}
public CreatureSay(int objectId, int messageType, String charName, NpcStringId npcString)
{
_objectId = objectId;
_textType = messageType;
_charName = charName;
_npcString = npcString.getId();
}
public CreatureSay(int objectId, int messageType, int charId, SystemMessageId sysString)
{
_objectId = objectId;
_textType = messageType;
_charId = charId;
_npcString = sysString.getId();
}
/**
* String parameter for argument S1,S2,.. in npcstring-e.dat
* @param text
*/
public void addStringParameter(String text)
{
if (_parameters == null)
_parameters = new ArrayList<>();
_parameters.add(text);
}
@Override
protected final void writeImpl()
{
writeC(0x4a);
writeD(_objectId);
writeD(_textType);
if (_charName != null)
writeS(_charName);
else
writeD(_charId);
writeD(_npcString); // High Five NPCString ID
if (_text != null)
{//only edit this
if (ArabicUtilities.hasArabicLetters(_text))
{
String ttext = ArabicUtilities.reshapeSentence(_text);
writeS(ttext);
}
else
{
writeS(_text);
}
}//only edit this
else
{
if (_parameters != null)
{
for (String s : _parameters)
writeS(s);
}
}
}
@Override
public final void runImpl()
{
L2PcInstance _pci = getClient().getActiveChar();
if (_pci != null)
{
_pci.broadcastSnoop(_textType,_charName,_text);
}
}
@Override
public String getType()
{
return _S__4A_CREATURESAY;
}
}
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Some suggestion:
Add the option to set minimum time streamed to receive award.
e.x
Stream 2 hours to claim the reward.
Seems stupid to me, somebody start streaming, run stream for 5 min - take reward and shut down stream.
WTS Adenas per million or quantity.
Price: 7u$d x 1kk (best price in quantity).
💸 STOCK : 14kk
Acc:
🔸 Tyrant Lv. 51 w/o equipment, PA to 03/11/2025. Dye +4STR-4CON.
(i transfer to your acc). Price: 100 u$d
🔹Prophet Lv. 46 full buff, Karmian Set + joyas D.
(mail clean).Price: 150 u$d
Discord: dcr32 - Zeep#0215
Telegram: @xDCr32
📢 It’s Time!
I was thinking… when will be the perfect time? The answer is now — no more waiting.
⏳ 3 years without L2Mid…
Now we are coming strong 💪 and motivated to play again — an Interlude server ⚔️ like old school before. Here, there were good times… and now, they return.
🏆 Announcing:
L2Mid New Server – x25
One of the best Lineage II experiences since 2011 is making its return.
✨ Grand Opening: 10 October 2025
🛠 Open Beta Test: 22 September – 9 October 2025
🔥 Get ready for an epic journey, fierce battles, and the community you’ve been waiting for.
💥 Let’s make history again!
Question
DLDL
Hi guys , i'm trying to change this java code from java 7 to java 8
who can help me please change it .
i want change it , for L2RO-TEAM source
7 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.