/**
* @author Anarchy
*
* This class should hold all the information of a player
* before he entered an event. It is used to restore
* players' status after an event, or after disconnection.
*/
public class PlayerData
{
private int playerId;
private int playerColor;
private String playerTitle;
private Location playerLocation;
public PlayerData(Player player)
{
playerId = player.getObjectId();
playerColor = player.getAppearance().getNameColor();
playerTitle = player.getTitle();
playerLocation = new Location(player.getX(), player.getY(), player.getZ());
}
public void restore(Player player)
{
if (player.isDead())
player.doRevive();
player.getAppearance().setNameColor(playerColor);
player.setTitle(playerTitle);
player.setTeam(TeamType.NONE);
player.teleportTo(playerLocation, 0);
player.sendMessage("Your status has been restored after leaving an event.");
// Increase the participated in tasks
int participates = PlayerMemo.getVarInt(player, "participated_automatic_events"); PlayerMemo.setVar(player, "participated_automatic_events", participates+1, -1);
}
public int getPlayerId()
{
return playerId;
}
public int getPlayerColor()
{
return playerColor;
}
public String getPlayerTitle()
{
return playerTitle;
}
}
I figured as much ahaha! But keep in mind that this is purely for personal enjoyment and non profitable. I'm even considering getting a big boy PC just to run this!
Anyway, I kinda made progress. Created a "ApiServer.java" file to expose some classes and added it to the "ServerPackets.java" file. Sadly now it's gonna be a pain in the arse to study all the classes...
Our project is looking for new suppliers and partners!
— Snapchat accounts
— Reddit accounts with karma
— LinkedIn accounts with connections
Message us in DM / support — we’ll discuss the terms!
We are always open to other partnership offers as well.
Our online store assortment:
➡Accounts:
Telegram, Facebook, Reddit, Twitter (X), Instagram, YouTube, TikTok, Discord, VK, LinkedIn, GitHub, Snapchat, Gmail, email accounts (Outlook, Firstmail, Rambler, Onet, Gazeta, GMX, Yahoo, Proton, Web.de), Google Voice, Google Ads
➡Premium subscriptions:
Telegram Premium, Twitter Premium X, YouTube Premium, Spotify Premium, Netflix Premium, Discord Nitro, ChatGPT Plus/PRO, XBOX Game Pass
➡Additional services:
Telegram Stars, proxies (IPv4, IPv6, ISP, Mobile), VPN (Outline, WireGuard, others), VDS/RDP servers
10% - 20% Discount OR $1 BONUS for your registration
If you want to receive a $1 BONUS for your registration OR a 10% - 20% DISCOUNT on your first purchase, you can leave a comment:
"SEND ME BONUS,
MY USERNAME IS..."
You can also use a promo code for your first purchase in all our stores: "SOCNET" (15% discount!)
SMM Panel services:
Use our SMM Panel for boosting Facebook, Instagram, Telegram, Spotify, Soundcloud, YouTube, Reddit, Threads, Kick, Discord, LinkedIn, Likee, VK, Twitch, Kwai, Reddit, website traffic, TikTok, Trust Pilot, Apple Music, Tripadvisor, Snapchat, and other digital products.
Get $1 for your first SMM Panel trial launch:
Just create a ticket with the subject “Get Trial Bonus” on our website (Support)
➡Go to SMM Panel (clickable) or via support in the bot
Our key products:
➡Online Store: Click
➡Telegram Shop Bot: Click
➡SMM Panel: Click
Payment: bank cards · cryptocurrency · other popular methods
Regular customers receive additional discounts and promo codes!
Contacts and Support:
➡ Telegram: https://t.me/socnet_support
➡ Telegram Channel: https://t.me/accsforyou_shop
➡ WhatsApp: https://wa.me/79051904467
➡ WhatsApp Channel: https://whatsapp.com/channel/0029Vau0CMX002TGkD4uHa2n
➡ Discord: socnet_support
➡ Discord Server: https://discord.gg/y9AStFFsrh
➡ ✉ Email: solomonbog@socnet.store
Through these contacts you can also:
— consult about wholesale purchases
— establish a partnership (current partners: https://socnet.bgng.io/partners )
— become our supplier
SocNet — digital goods and premium subscriptions store
Question
addx20
Hello Folks! again one more small problem! I need just to adapt the 2 red lines to acis 398 Thanks!!!
package net.sf.l2j.gameserver.eola.eventengine;
import net.sf.l2j.gameserver.model.location.Location;
import net.sf.l2j.gameserver.enums.TeamType;
import net.sf.l2j.gameserver.model.actor.Player;
import net.sf.l2j.gameserver.model.memo.PlayerMemo;
/**
* @author Anarchy
*
* This class should hold all the information of a player
* before he entered an event. It is used to restore
* players' status after an event, or after disconnection.
*/
public class PlayerData
{
private int playerId;
private int playerColor;
private String playerTitle;
private Location playerLocation;
public PlayerData(Player player)
{
playerId = player.getObjectId();
playerColor = player.getAppearance().getNameColor();
playerTitle = player.getTitle();
playerLocation = new Location(player.getX(), player.getY(), player.getZ());
}
public void restore(Player player)
{
if (player.isDead())
player.doRevive();
player.getAppearance().setNameColor(playerColor);
player.setTitle(playerTitle);
player.setTeam(TeamType.NONE);
player.teleportTo(playerLocation, 0);
player.sendMessage("Your status has been restored after leaving an event.");
// Increase the participated in tasks
int participates = PlayerMemo.getVarInt(player, "participated_automatic_events");
PlayerMemo.setVar(player, "participated_automatic_events", participates+1, -1);
}
public int getPlayerId()
{
return playerId;
}
public int getPlayerColor()
{
return playerColor;
}
public String getPlayerTitle()
{
return playerTitle;
}
}
3 answers to this question
Recommended Posts