Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

AL 3.9 - First-Level-Support

Newbie Spellweaver
Joined
Jul 1, 2011
Messages
92
Reaction score
21
If you have problems with install the gameserver and to make it runs, feel free to post your issues here.
 
Newbie Spellweaver
Joined
Apr 22, 2005
Messages
19
Reaction score
0
thanks sam and dwarf,
i have changed to 10 and restarted the server. but i my stigma is still lock unless i do quest. any idea why?

Thanks again for the help.

sam, regarding PlayerEnterWorldService, i am using pre-built AL, i cant find PlayerEnterWorldService in any of the folder.
 
Upvote 0
Blender Fan|Kinenbi Owner
Loyal Member
Joined
Mar 27, 2006
Messages
800
Reaction score
355
for the welcome thing you need the source files:

.\trunk\AL-Game\src\com\aionemu\gameserver\services\player\PlayerEnterWorldService.java

public final class PlayerEnterWorldService {

private static final Logger log = LoggerFactory.getLogger("GAMECONNECTION_LOG");
private static final String serverName = "Welcome to " + GSConfig.SERVER_NAME + "!";
private static final String serverIntro = "Please remember:";
private static final String serverInfo;
private static final String alInfo;
private static final Set<Integer> pendingEnterWorld = new HashSet<Integer>();

static {
String infoBuffer;
String alBuffer;

infoBuffer = "Announcement : " + GSConfig.SERVER_NAME + " Staff will never ask for your password.\n";
infoBuffer += "Announcement : Advertising for another server is prohibited.";

alBuffer = "=============================\n";
alBuffer += "Developed by Aion-Lightning\nhttp://www.aion-lightning.org\n";
alBuffer += "Copyright 2012\n";

if (GSConfig.SERVER_MOTD_DISPLAYREV) {
alBuffer += "-----------------------------\n";
alBuffer += "Server Revision: " + String.format("%-6s", new Version(GameServer.class).getRevision()) + "\n";
}
alBuffer += "=============================\n";
alBuffer += "Please enjoy your stay on our server.";

serverInfo = infoBuffer;
alInfo = alBuffer;

infoBuffer = null;
alBuffer = null;
}

there you can change that - but then you need to compile your gameserver by yourself.

and the Stigma problem I cant tell unless I see all your files, it could be anything. Or you use one of my 1-Click servers, in there AutoStigma learn work!

you can write me an skype: kajuby
and I can check your files via teamviewer if you wish.
 
Last edited:
Upvote 0
Newbie Spellweaver
Joined
Mar 24, 2009
Messages
25
Reaction score
0
Hi all,
i make some modifications on PlayerEnterWorldService.java file and compile it after but after, what must i do for see modification on live client?
I just take all libs files and replace it on server files , clean cache and restart my server but allways the originals announcement :/
Maybe it have other files i must replace ?

Thank you.
 
Upvote 0
Newbie Spellweaver
Joined
Mar 24, 2009
Messages
25
Reaction score
0
can you show me your PlayerEnterWorldService.java?

Hey,
here is my file :

Code:
/*
 * This file is part of aion-lightning <aion-lightning.com>.
 *
 *  aion-lightning 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.
 *
 *  aion-lightning 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 aion-lightning.  If not, see <http://www.gnu.org/licenses/>.
 */
package com.aionemu.gameserver.services.player;

import com.aionemu.gameserver.services.SerialKillerService;
import com.aionemu.commons.database.dao.DAOManager;
import com.aionemu.commons.versionning.Version;
import com.aionemu.gameserver.GameServer;
import com.aionemu.gameserver.cache.HTMLCache;
import com.aionemu.gameserver.configs.administration.AdminConfig;
import com.aionemu.gameserver.configs.main.*;
import com.aionemu.gameserver.dao.*;
import com.aionemu.gameserver.model.ChatType;
import com.aionemu.gameserver.model.TaskId;
import com.aionemu.gameserver.model.account.Account;
import com.aionemu.gameserver.model.account.CharacterBanInfo;
import com.aionemu.gameserver.model.account.CharacterPasskey.ConnectType;
import com.aionemu.gameserver.model.account.PlayerAccountData;
import com.aionemu.gameserver.model.gameobjects.HouseObject;
import com.aionemu.gameserver.model.gameobjects.Item;
import com.aionemu.gameserver.model.gameobjects.PersistentState;
import com.aionemu.gameserver.model.gameobjects.player.Player;
import com.aionemu.gameserver.model.gameobjects.player.PlayerCommonData;
import com.aionemu.gameserver.model.gameobjects.player.emotion.Emotion;
import com.aionemu.gameserver.model.gameobjects.player.motion.Motion;
import com.aionemu.gameserver.model.gameobjects.player.title.Title;
import com.aionemu.gameserver.model.gameobjects.state.CreatureSeeState;
import com.aionemu.gameserver.model.gameobjects.state.CreatureVisualState;
import com.aionemu.gameserver.model.house.House;
import com.aionemu.gameserver.model.items.storage.IStorage;
import com.aionemu.gameserver.model.items.storage.Storage;
import com.aionemu.gameserver.model.items.storage.StorageType;
import com.aionemu.gameserver.model.skill.PlayerSkillEntry;
import com.aionemu.gameserver.model.team2.alliance.PlayerAllianceService;
import com.aionemu.gameserver.model.team2.group.PlayerGroupService;
import com.aionemu.gameserver.network.aion.AionConnection;
import com.aionemu.gameserver.network.aion.serverpackets.*;
import com.aionemu.gameserver.questEngine.model.QuestState;
import com.aionemu.gameserver.questEngine.model.QuestStatus;
import com.aionemu.gameserver.services.craft.RelinquishCraftStatus;
import com.aionemu.gameserver.services.PunishmentService.PunishmentType;
import com.aionemu.gameserver.services.*;
import com.aionemu.gameserver.services.abyss.AbyssSkillService;
import com.aionemu.gameserver.services.instance.InstanceService;
import com.aionemu.gameserver.services.mail.MailService;
import com.aionemu.gameserver.services.teleport.TeleportService2;
import com.aionemu.gameserver.services.toypet.PetService;
import com.aionemu.gameserver.services.transfers.PlayerTransferService;
import com.aionemu.gameserver.skillengine.effect.AbnormalState;
import com.aionemu.gameserver.taskmanager.tasks.ExpireTimerTask;
import com.aionemu.gameserver.utils.PacketSendUtility;
import com.aionemu.gameserver.utils.ThreadPoolManager;
import com.aionemu.gameserver.utils.audit.AuditLogger;
import com.aionemu.gameserver.utils.audit.GMService;
import com.aionemu.gameserver.utils.collections.ListSplitter;
import com.aionemu.gameserver.utils.rates.Rates;
import com.aionemu.gameserver.world.World;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import javolution.util.FastList;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @author ATracer
 */
public final class PlayerEnterWorldService {

	private static final Logger log = LoggerFactory.getLogger("GAMECONNECTION_LOG");
	private static final String serverName = "Bienvenue sur le serveur " + GSConfig.SERVER_NAME + "!";
	private static final String serverIntro = "N'oubliez pas de voter pour le serveur!";
	private static final String serverInfo;
	private static final String alInfo;
	private static final Set<Integer> pendingEnterWorld = new HashSet<Integer>();

	static {
		String infoBuffer;
		String alBuffer;

		infoBuffer = "Announcement : Serveur prive Aion 3.9.\n";
		infoBuffer += "Announcement : Visitez notre site web pour etre informe des nouveautees ou avancees..";

		alBuffer = "=============================\n";
		alBuffer += "Serveur Prive Aion 3.9";
		alBuffer += "www.aiontemporia.com\n";

		if (GSConfig.SERVER_MOTD_DISPLAYREV) {
			alBuffer += "-----------------------------\n";
			alBuffer += "Server Revision: " + String.format("%-6s", new Version(GameServer.class).getRevision()) + "\n";
		}
		alBuffer += "=============================\n";
		alBuffer += "Nous vous souhaitons de passer un agreable moment sur notre serveur.";

		serverInfo = infoBuffer;
		alInfo = alBuffer;

		infoBuffer = null;
		alBuffer = null;
	}
	
	/**
	 * @param objectId
	 * @param client
	 */
	public static final void startEnterWorld(final int objectId, final AionConnection client) {
		// check if char is banned
		PlayerAccountData playerAccData = client.getAccount().getPlayerAccountData(objectId);
		Timestamp lastOnline = playerAccData.getPlayerCommonData().getLastOnline();
		if (lastOnline != null && client.getAccount().getAccessLevel() < AdminConfig.GM_LEVEL) {
			if (System.currentTimeMillis() - lastOnline.getTime() < (GSConfig.CHARACTER_REENTRY_TIME * 1000)) {
				client.sendPacket(new SM_ENTER_WORLD_CHECK((byte) 6)); // 20 sec time
				return;
			}
		}
		CharacterBanInfo cbi = client.getAccount().getPlayerAccountData(objectId).getCharBanInfo();
		if (cbi != null) {
			if (cbi.getEnd() > System.currentTimeMillis() / 1000) {
				client.close(new SM_QUIT_RESPONSE(), false);
				return;
			}
			else {
				DAOManager.getDAO(PlayerPunishmentsDAO.class).unpunishPlayer(objectId, PunishmentType.CHARBAN);
			}
		}
		// passkey check
		if (SecurityConfig.PASSKEY_ENABLE && !client.getAccount().getCharacterPasskey().isPass()) {
			showPasskey(objectId, client);
		}
		else {
			validateAndEnterWorld(objectId, client);
		}
	}

	/**
	 * @param objectId
	 * @param client
	 */
	private static final void showPasskey(final int objectId, final AionConnection client) {
		client.getAccount().getCharacterPasskey().setConnectType(ConnectType.ENTER);
		client.getAccount().getCharacterPasskey().setObjectId(objectId);
		boolean isExistPasskey = DAOManager.getDAO(PlayerPasskeyDAO.class).existCheckPlayerPasskey(client.getAccount().getId());

		if (!isExistPasskey)
			client.sendPacket(new SM_CHARACTER_SELECT(0));
		else
			client.sendPacket(new SM_CHARACTER_SELECT(1));
	}

	/**
	 * @param objectId
	 * @param client
	 */
	private static final void validateAndEnterWorld(final int objectId, final AionConnection client) {
		synchronized (pendingEnterWorld) {
			if (pendingEnterWorld.contains(objectId)) {
				log.warn("Skipping enter world " + objectId);
				return;
			}
			pendingEnterWorld.add(objectId);
		}
		int delay = 0;
		// double checked enter world
		if (World.getInstance().findPlayer(objectId) != null) {
			delay = 15000;
			log.warn("Postponed enter world " + objectId);
		}
		ThreadPoolManager.getInstance().schedule(new Runnable() {
			@Override
			public void run() {
				try {
					Player player = World.getInstance().findPlayer(objectId);
					if (player != null) {
						AuditLogger.info(player, "Duplicate player in world");
						client.close(new SM_QUIT_RESPONSE(), false);
						return;
					}
					enterWorld(client, objectId);
				}
				catch (Throwable ex) {
					log.error("Error during enter world " + objectId, ex);
				}
				finally {
					synchronized (pendingEnterWorld) {
						pendingEnterWorld.remove(objectId);
					}
				}
			}

		}, delay);
	}

	/**
	 * @param client
	 * @param objectId
	 */
	public static final void enterWorld(AionConnection client, int objectId) {
		Account account = client.getAccount();
		PlayerAccountData playerAccData = client.getAccount().getPlayerAccountData(objectId);

		if (playerAccData == null) {
			// Somebody wanted to login on character that is not at his account
			return;
		}
		Player player = PlayerService.getPlayer(objectId, account);

		if (player != null && client.setActivePlayer(player)) {
			player.setClientConnection(client);

			log.info("[MAC_AUDIT] Player " + player.getName() + " (account " + account.getName() + ") has entered world with "
					+ client.getMacAddress() + " MAC.");
			World.getInstance().storeObject(player);

			StigmaService.onPlayerLogin(player);

			/**
			 * Energy of Repose must be calculated before sending SM_STATS_INFO
			 */
			if (playerAccData.getPlayerCommonData().getLastOnline() != null) {
				long lastOnline = playerAccData.getPlayerCommonData().getLastOnline().getTime();
				PlayerCommonData pcd = player.getCommonData();
				long secondsOffline = (System.currentTimeMillis() / 1000) - lastOnline / 1000;
				if (pcd.isReadyForSalvationPoints()) {
					// 10 mins offline = 0 salvation points.
					if (secondsOffline > 10 * 60) {
						player.getCommonData().resetSalvationPoints();
					}
				}
				if (pcd.isReadyForReposteEnergy()) {
					pcd.updateMaxReposte();
					// more than 4 hours offline = start counting Reposte Energy addition.
					if (secondsOffline > 4 * 3600) {
						double hours = secondsOffline / 3600d;
						long maxRespose = player.getCommonData().getMaxReposteEnergy();
						if (hours > 24)
							hours = 24;
						// 24 hours offline = 100% Reposte Energy
						long addResposeEnergy = (long) ((hours / 24) * maxRespose);

						// Additional Energy of Repose bonus
						// TODO: use player house zones
						if (player.getHouseOwnerId() / 10000 * 10000 == player.getWorldId()) {
							switch (player.getActiveHouse().getHouseType()) {
								case STUDIO:
									addResposeEnergy *= 1.05f;
									break;
								default:
									addResposeEnergy *= 1.10f;
									break;
							}
						}

						pcd.addReposteEnergy(addResposeEnergy > maxRespose ? maxRespose : addResposeEnergy);
					}
				}
				if (((System.currentTimeMillis() / 1000) - lastOnline) > 300)
					player.getCommonData().setDp(0);
			}
			InstanceService.onPlayerLogin(player);
			client.sendPacket(new SM_UNK_3_5_1());
			if (!player.getSkillList().isSkillPresent(3512)) {
				player.getSkillList().addSkill(player, 3512, 129);
			}
			// Update player skills first!!!
			AbyssSkillService.onEnterWorld(player);
			// TODO: check the split size
			client.sendPacket(new SM_SKILL_LIST(player, player.getSkillList().getBasicSkills()));
			for (PlayerSkillEntry stigmaSkill : player.getSkillList().getStigmaSkills())
				client.sendPacket(new SM_SKILL_LIST(player, stigmaSkill));

			if (player.getSkillCoolDowns() != null)
				client.sendPacket(new SM_SKILL_COOLDOWN(player.getSkillCoolDowns()));

			if (player.getItemCoolDowns() != null)
				client.sendPacket(new SM_ITEM_COOLDOWN(player.getItemCoolDowns()));

			FastList<QuestState> questList = FastList.newInstance();
			FastList<QuestState> completeQuestList = FastList.newInstance();
			for (QuestState qs : player.getQuestStateList().getAllQuestState()) {
				if (qs.getStatus() == QuestStatus.NONE && qs.getCompleteCount() == 0)
					continue;
				if (qs.getStatus() != QuestStatus.COMPLETE && qs.getStatus() != QuestStatus.NONE)
					questList.add(qs);
				if (qs.getCompleteCount() > 0)
					completeQuestList.add(qs);
			}
			client.sendPacket(new SM_QUEST_COMPLETED_LIST(completeQuestList));
			client.sendPacket(new SM_QUEST_LIST(questList));
			client.sendPacket(new SM_TITLE_INFO(player.getCommonData().getTitleId()));
			client.sendPacket(new SM_MOTION(player.getMotions().getMotions().values()));
			client.sendPacket(new SM_ENTER_WORLD_CHECK());

			byte[] uiSettings = player.getPlayerSettings().getUiSettings();
			byte[] shortcuts = player.getPlayerSettings().getShortcuts();
			byte[] houseBuddies = player.getPlayerSettings().getHouseBuddies();

			if (uiSettings != null)
				client.sendPacket(new SM_UI_SETTINGS(uiSettings, 0));

			if (shortcuts != null)
				client.sendPacket(new SM_UI_SETTINGS(shortcuts, 1));

			if (houseBuddies != null)
				client.sendPacket(new SM_UI_SETTINGS(houseBuddies, 2));

			sendItemInfos(client, player);
			playerLoggedIn(player);

			client.sendPacket(new SM_INSTANCE_INFO(player, false, player.getCurrentTeam()));

			client.sendPacket(new SM_CHANNEL_INFO(player.getPosition()));

			KiskService.getInstance().onLogin(player);
			TeleportService2.sendSetBindPoint(player);

			// Without player spawn initialization can't access to his mapRegion for chk below
			World.getInstance().preSpawn(player);
			player.getController().validateLoginZone();
			VortexService.getInstance().validateLoginZone(player);

			client.sendPacket(new SM_PLAYER_SPAWN(player));

			// SM_WEATHER miss on login (but he 'live' in CM_LEVEL_READY.. need invistigate)
			client.sendPacket(new SM_GAME_TIME());

			SerialKillerService.getInstance().onLogin(player);

			if (player.isLegionMember())
				LegionService.getInstance().onLogin(player);

			client.sendPacket(new SM_TITLE_INFO(player));
			client.sendPacket(new SM_EMOTION_LIST((byte) 0, player.getEmotions().getEmotions()));

			// SM_INFLUENCE_RATIO, SM_SIEGE_LOCATION_INFO, SM_RIFT_ANNOUNCE (Balaurea), SM_RIFT_ANNOUNCE (Tiamaranta)
			SiegeService.getInstance().onPlayerLogin(player);

			client.sendPacket(new SM_PRICES());
			DisputeLandService.getInstance().onLogin(player);
			client.sendPacket(new SM_ABYSS_RANK(player.getAbyssRank()));

			// Intro message
			PacketSendUtility.sendWhiteMessage(player, serverName);
			PacketSendUtility.sendYellowMessage(player, serverIntro);
			PacketSendUtility.sendBrightYellowMessage(player, serverInfo);
			PacketSendUtility.sendWhiteMessage(player, alInfo);

			player.setRates(Rates.getRatesFor(client.getAccount().getMembership()));
			if (CustomConfig.PREMIUM_NOTIFY) {
				showPremiumAccountInfo(client, account);
			}

			if (player.isGM()) {
				if (AdminConfig.INVULNERABLE_GM_CONNECTION || AdminConfig.INVISIBLE_GM_CONNECTION
						|| AdminConfig.ENEMITY_MODE_GM_CONNECTION.equalsIgnoreCase("Neutral")
						|| AdminConfig.ENEMITY_MODE_GM_CONNECTION.equalsIgnoreCase("Enemy") || AdminConfig.VISION_GM_CONNECTION
						|| AdminConfig.WHISPER_GM_CONNECTION) {
					PacketSendUtility.sendMessage(player, "=============================");
					if (AdminConfig.INVULNERABLE_GM_CONNECTION) {
						player.setInvul(true);
						PacketSendUtility.sendMessage(player, ">> Connection in Invulnerable mode <<");
					}
					if (AdminConfig.INVISIBLE_GM_CONNECTION) {
						player.getEffectController().setAbnormal(AbnormalState.HIDE.getId());
						player.setVisualState(CreatureVisualState.HIDE20);
						PacketSendUtility.broadcastPacket(player, new SM_PLAYER_STATE(player), true);
						PacketSendUtility.sendMessage(player, ">> Connection in Invisible mode <<");
					}
					if (AdminConfig.ENEMITY_MODE_GM_CONNECTION.equalsIgnoreCase("Neutral")) {
						player.setAdminNeutral(3);
						player.setAdminEnmity(0);
						PacketSendUtility.sendMessage(player, ">> Connection in Neutral mode <<");
					}
					if (AdminConfig.ENEMITY_MODE_GM_CONNECTION.equalsIgnoreCase("Enemy")) {
						player.setAdminNeutral(0);
						player.setAdminEnmity(3);
						PacketSendUtility.sendMessage(player, ">> Connection in Enemy mode <<");
					}
					if (AdminConfig.VISION_GM_CONNECTION) {
						player.setSeeState(CreatureSeeState.SEARCH10);
						PacketSendUtility.broadcastPacket(player, new SM_PLAYER_STATE(player), true);
						PacketSendUtility.sendMessage(player, ">> Connection in Vision mode <<");
					}
					if (AdminConfig.WHISPER_GM_CONNECTION) {
						player.setUnWispable();
						PacketSendUtility.sendMessage(player, ">> Accepting Whisper : OFF <<");
					}
					PacketSendUtility.sendMessage(player, "=============================");
				}
			}

			// Alliance Packet after SetBindPoint
			PlayerAllianceService.onPlayerLogin(player);

			if (player.isInPrison())
				PunishmentService.updatePrisonStatus(player);

			if (player.isNotGatherable())
				PunishmentService.updateGatherableStatus(player);

			PlayerGroupService.onPlayerLogin(player);
			PetService.getInstance().onPlayerLogin(player);

			// ----------------------------- Retail sequence -----------------------------
			MailService.getInstance().onPlayerLogin(player);
			HousingService.getInstance().onPlayerLogin(player);
			BrokerService.getInstance().onPlayerLogin(player);
			sendMacroList(client, player);
			client.sendPacket(new SM_RECIPE_LIST(player.getRecipeList().getRecipeList()));
			// ----------------------------- Retail sequence -----------------------------

			PetitionService.getInstance().onPlayerLogin(player);
			if (AutoGroupConfig.AUTO_GROUP_ENABLE) {
				AutoGroupService.getInstance().onPlayerLogin(player);
			}
			ClassChangeService.showClassChangeDialog(player);

			GMService.getInstance().onPlayerLogin(player);
			/**
			 * Trigger restore services on login.
			 */
			player.getLifeStats().updateCurrentStats();

			if (HTMLConfig.ENABLE_HTML_WELCOME)
				HTMLService.showHTML(player, HTMLCache.getInstance().getHTML("welcome.xhtml"));

			player.getNpcFactions().sendDailyQuest();

			if (HTMLConfig.ENABLE_GUIDES)
				HTMLService.onPlayerLogin(player);

			for (StorageType st : StorageType.values()) {
				if (st == StorageType.LEGION_WAREHOUSE)
					continue;
				IStorage storage = player.getStorage(st.getId());
				if (storage != null) {
					for (Item item : storage.getItemsWithKinah())
						if (item.getExpireTime() > 0)
							ExpireTimerTask.getInstance().addTask(item, player);
				}
			}

			for (Item item : player.getEquipment().getEquippedItems())
				if (item.getExpireTime() > 0)
					ExpireTimerTask.getInstance().addTask(item, player);

			player.getEquipment().checkRankLimitItems(); // Remove items after offline changed rank

			for (Motion motion : player.getMotions().getMotions().values()) {
				if (motion.getExpireTime() != 0) {
					ExpireTimerTask.getInstance().addTask(motion, player);
				}
			}

			for (Emotion emotion : player.getEmotions().getEmotions()) {
				if (emotion.getExpireTime() != 0) {
					ExpireTimerTask.getInstance().addTask(emotion, player);
				}
			}

			for (Title title : player.getTitleList().getTitles()) {
				if (title.getExpireTime() != 0) {
					ExpireTimerTask.getInstance().addTask(title, player);
				}
			}

			if (player.getHouseRegistry() != null) {
				for (HouseObject<?> obj : player.getHouseRegistry().getObjects()) {
					if (obj.getPersistentState() == PersistentState.DELETED)
						continue;
					if (obj.getObjectTemplate().getUseDays() > 0)
						ExpireTimerTask.getInstance().addTask(obj, player);
				}
			}
			// scheduler periodic update
			player.getController().addTask(
					TaskId.PLAYER_UPDATE,
					ThreadPoolManager.getInstance().scheduleAtFixedRate(new GeneralUpdateTask(player.getObjectId()),
					PeriodicSaveConfig.PLAYER_GENERAL * 1000, PeriodicSaveConfig.PLAYER_GENERAL * 1000));
			player.getController().addTask(
					TaskId.INVENTORY_UPDATE,
					ThreadPoolManager.getInstance().scheduleAtFixedRate(new ItemUpdateTask(player.getObjectId()),
					PeriodicSaveConfig.PLAYER_ITEMS * 1000, PeriodicSaveConfig.PLAYER_ITEMS * 1000));

			SurveyService.getInstance().showAvailable(player);

			if (EventsConfig.ENABLE_EVENT_SERVICE)
				EventService.getInstance().onPlayerLogin(player);

			if (CraftConfig.DELETE_EXCESS_CRAFT_ENABLE)
				RelinquishCraftStatus.removeExcessCraftStatus(player, false);

			PlayerTransferService.getInstance().onEnterWorld(player);
			player.setPartnerId(DAOManager.getDAO(WeddingDAO.class).loadPartnerId(player));
		}
		else {
			log.info("[DEBUG] enter world" + objectId + ", Player: " + player);
		}
	}

	/**
	 * @param client
	 * @param player
	 */
	// TODO! this method code is really odd [Nemesiss]
	private static void sendItemInfos(AionConnection client, Player player) {
		// Cubesize limit set in inventory.
		int questExpands = player.getQuestExpands();
		int npcExpands = player.getNpcExpands();
		player.getInventory().setLimit(StorageType.CUBE.getLimit() + (questExpands + npcExpands) * 9);
		player.getWarehouse().setLimit(StorageType.REGULAR_WAREHOUSE.getLimit() + player.getWarehouseSize() * 8);

		// items
		Storage inventory = player.getInventory();
		List<Item> allItems = new ArrayList<Item>();
		if (inventory.getKinah() == 0) {
			inventory.increaseKinah(0); // create an empty object with value 0
		}
		allItems.add(inventory.getKinahItem()); // always included even with 0 count, and first in the packet !
		allItems.addAll(player.getEquipment().getEquippedItems());
		allItems.addAll(inventory.getItems());

		ListSplitter<Item> splitter = new ListSplitter<Item>(allItems, 10);
		while (!splitter.isLast()) {
			client.sendPacket(new SM_INVENTORY_INFO(splitter.isFirst(), splitter.getNext(), npcExpands, questExpands, player));
		}

		client.sendPacket(new SM_INVENTORY_INFO(false, new ArrayList<Item>(0), npcExpands, questExpands, player));
		client.sendPacket(new SM_STATS_INFO(player));
		client.sendPacket(SM_CUBE_UPDATE.stigmaSlots(player.getCommonData().getAdvencedStigmaSlotSize()));
	}

	private static void sendMacroList(AionConnection client, Player player) {
		client.sendPacket(new SM_MACRO_LIST(player, false));
		if (player.getMacroList().getSize() > 7)
			client.sendPacket(new SM_MACRO_LIST(player, true));
	}

	/**
	 * @param player
	 */
	private static void playerLoggedIn(Player player) {
		log.info("Player logged in: " + player.getName() + " Account: " + player.getClientConnection().getAccount().getName());
		player.getCommonData().setOnline(true);
		DAOManager.getDAO(PlayerDAO.class).onlinePlayer(player, true);
		player.onLoggedIn();
		player.setOnlineTime();
	}

	private static void showPremiumAccountInfo(AionConnection client, Account account) {
		byte membership = account.getMembership();
		if (membership > 0) {
			String accountType = "";
			switch (account.getMembership()) {
				case 1:
					accountType = "premium";
					break;
				case 2:
					accountType = "VIP";
					break;
			}
			client.sendPacket(new SM_MESSAGE(0, null, "Your account is " + accountType, ChatType.GOLDEN_YELLOW));
		}
	}

}

class GeneralUpdateTask implements Runnable {

	private static final Logger log = LoggerFactory.getLogger(GeneralUpdateTask.class);
	private final int playerId;

	GeneralUpdateTask(int playerId) {
		this.playerId = playerId;
	}

	@Override
	public void run() {
		Player player = World.getInstance().findPlayer(playerId);
		if (player != null) {
			try {
				DAOManager.getDAO(AbyssRankDAO.class).storeAbyssRank(player);
				DAOManager.getDAO(PlayerSkillListDAO.class).storeSkills(player);
				DAOManager.getDAO(PlayerQuestListDAO.class).store(player);
				DAOManager.getDAO(PlayerDAO.class).storePlayer(player);
				for (House house : player.getHouses())
					house.save();
			}
			catch (Exception ex) {
				log.error("Exception during periodic saving of player " + player.getName(), ex);
			}
		}

	}

}

class ItemUpdateTask implements Runnable {

	private static final Logger log = LoggerFactory.getLogger(ItemUpdateTask.class);
	private final int playerId;

	ItemUpdateTask(int playerId) {
		this.playerId = playerId;
	}

	@Override
	public void run() {
		Player player = World.getInstance().findPlayer(playerId);
		if (player != null) {
			try {
				DAOManager.getDAO(InventoryDAO.class).store(player);
				DAOManager.getDAO(ItemStoneListDAO.class).save(player);
			}
			catch (Exception ex) {
				log.error("Exception during periodic saving of player items " + player.getName(), ex);
			}
		}
	}

}

Maybe i need to replace some other files or just JAR on libs folder?
Actually i just replace all jar files on libs folder that's all.

Thank you.
 
Upvote 0
Blender Fan|Kinenbi Owner
Loyal Member
Joined
Mar 27, 2006
Messages
800
Reaction score
355
this file seems legit - did you check -> .\AIONEmulator\game\data\static_data\HTML\welcome.xhtml
 
Upvote 0
Newbie Spellweaver
Joined
Mar 24, 2009
Messages
25
Reaction score
0
Yes sure :)
This is really strange to see again the lightning message with this PlayerEnterWorldService.java... I try to understand how the server can show Lightning's original message with my modificated file...
 
Upvote 0
Blender Fan|Kinenbi Owner
Loyal Member
Joined
Mar 27, 2006
Messages
800
Reaction score
355
all I can think of is delete all build files and check everything again and compile the server to a fresh folder.
 
Upvote 0
Newbie Spellweaver
Joined
Mar 24, 2009
Messages
25
Reaction score
0
all I can think of is delete all build files and check everything again and compile the server to a fresh folder.

Ok so i just make a fresh server and lightning message stay active oO !!! It's really sick!!! Any idea please?
Thank you
 
Upvote 0
Blender Fan|Kinenbi Owner
Loyal Member
Joined
Mar 27, 2006
Messages
800
Reaction score
355
I got it working - took me 30 min to figure out ^^

Proof:
Hunor - AL 3.9 - First-Level-Support - RaGEZONE Forums


1. I did use ant not maven to compile the gameserver
2. After compiling the new gameserver.jar is called .\trunk\AL-Game\build\dist\gameserver\libs\NG-Game.jar
3. Rename this into AL-Game.jar
4. Copy all files into your existing .\AIONEmulator\game\libs Folder

and booom it works!

*edited* you need to copy all lib files *edited*
 
Last edited:
Upvote 0
Newbie Spellweaver
Joined
Mar 24, 2009
Messages
25
Reaction score
0
got an Idea try out:


Put infoBuffer instead of alBuffer

-------------------------------------------------------------------------------

I got it working - took me 30 min to figure out ^^

Proof:
Hunor - AL 3.9 - First-Level-Support - RaGEZONE Forums


1. I did use ant not maven to compile the gameserver
2. After compiling the new gameserver.jar is called .\trunk\AL-Game\build\dist\gameserver\libs\NG-Game.jar
3. Rename this into AL-Game.jar
4. Copy this file into your existing .\AIONEmulator\game\libs Folder

and booom it works!

Hi,

thank for your help but it's not working for me...
Here is my code :

Code:
static {
		String infoBuffer;
		String alBuffer;

		infoBuffer = "Announcement : Serveur prive Aion 3.9.\n";
		infoBuffer += "Announcement : Visitez notre site web pour etre informe des nouveautees ou avancees..";

		infoBuffer = "=============================\n";
		infoBuffer += "Serveur Prive Aion 3.9";
		infoBuffer += "www.aiontemporia.com\n";

		if (GSConfig.SERVER_MOTD_DISPLAYREV) {
			infoBuffer += "-----------------------------\n";
			infoBuffer += "Server Revision: " + String.format("%-6s", new Version(GameServer.class).getRevision()) + "\n";
		}
		infoBuffer += "=============================\n";
		infoBuffer += "Nous vous souhaitons de passer un agreable moment sur notre serveur.";

		serverInfo = infoBuffer;
		alInfo = alBuffer;

		infoBuffer = null;
		alBuffer = null;
	}

And here is the result of build :

Code:
compile:
    [javac] Compiling 2122 source files to F:\Aion emu\Aion Emu\trunk\AL-Game\bu
ild\classes
    [javac] warning: [options] bootstrap class path not set in conjunction with
-source 1.6
    [javac] F:\Aion emu\Aion Emu\trunk\AL-Game\src\com\aionemu\gameserver\geoEng
ine\GeoWorldLoader.java:37: warning: Cleaner is internal proprietary API and may
 be removed in a future release
    [javac] import sun.misc.Cleaner;
    [javac]                ^
    [javac] F:\Aion emu\Aion Emu\trunk\AL-Game\src\com\aionemu\gameserver\geoEng
ine\GeoWorldLoader.java:38: warning: DirectBuffer is internal proprietary API an
d may be removed in a future release
    [javac] import sun.nio.ch.DirectBuffer;
    [javac]                  ^
    [javac] F:\Aion emu\Aion Emu\trunk\AL-Game\src\com\aionemu\gameserver\dataho
lders\DataManager.java:50: warning: OutputFormat is internal proprietary API and
 may be removed in a future release
    [javac]     public static TradeListData TRADE_LIST_DATA;
    [javac]       ^
    [javac] F:\Aion emu\Aion Emu\trunk\AL-Game\src\com\aionemu\gameserver\dataho
lders\DataManager.java:52: warning: XMLSerializer is internal proprietary API an
d may be removed in a future release
    [javac]     public static PlayerExperienceTable PLAYER_EXPERIENCE_TABLE;
    [javac]                      ^
    [javac] F:\Aion emu\Aion Emu\trunk\AL-Game\src\com\aionemu\gameserver\dataho
lders\HouseScriptData.java:111: warning: OutputFormat is internal proprietary AP
I and may be removed in a future release
    [javac]                             OutputFormat format = new OutputFormat(d
ocument);
    [javac]                             ^
    [javac] F:\Aion emu\Aion Emu\trunk\AL-Game\src\com\aionemu\gameserver\dataho
lders\HouseScriptData.java:111: warning: OutputFormat is internal proprietary AP
I and may be removed in a future release
    [javac]                             OutputFormat format = new OutputFormat(d
ocument);
    [javac]                                                       ^
    [javac] F:\Aion emu\Aion Emu\trunk\AL-Game\src\com\aionemu\gameserver\dataho
lders\HouseScriptData.java:116: warning: XMLSerializer is internal proprietary A
PI and may be removed in a future release
    [javac]                             XMLSerializer serializer = new XMLSerial
izer(out, format);
    [javac]                             ^
    [javac] F:\Aion emu\Aion Emu\trunk\AL-Game\src\com\aionemu\gameserver\dataho
lders\HouseScriptData.java:116: warning: XMLSerializer is internal proprietary A
PI and may be removed in a future release
    [javac]                             XMLSerializer serializer = new XMLSerial
izer(out, format);
    [javac]                                                            ^
    [javac] F:\Aion emu\Aion Emu\trunk\AL-Game\src\com\aionemu\gameserver\geoEng
ine\GeoWorldLoader.java:277: warning: Cleaner is internal proprietary API and ma
y be removed in a future release
    [javac]             Cleaner cleaner = ((DirectBuffer) toBeDestroyed).cleaner
();
    [javac]             ^
    [javac] F:\Aion emu\Aion Emu\trunk\AL-Game\src\com\aionemu\gameserver\geoEng
ine\GeoWorldLoader.java:277: warning: DirectBuffer is internal proprietary API a
nd may be removed in a future release
    [javac]             Cleaner cleaner = ((DirectBuffer) toBeDestroyed).cleaner
();
    [javac]                                 ^
    [javac] F:\Aion emu\Aion Emu\trunk\AL-Game\src\com\aionemu\gameserver\servic
es\player\PlayerEnterWorldService.java:112: error: variable alBuffer might not h
ave been initialized
    [javac]             alInfo = alBuffer;
    [javac]                      ^
    [javac] Note: Some input files use or override a deprecated API.
    [javac] Note: Recompile with -Xlint:deprecation for details.
    [javac] Note: F:\Aion emu\Aion Emu\trunk\AL-Game\src\com\aionemu\gameserver\
geoEngine\scene\Mesh.java uses unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.
    [javac] 1 error
    [javac] 11 warnings

BUILD FAILED
F:\Aion emu\Aion Emu\trunk\AL-Game\build.xml:45: Compile failed; see the compile
r error output for details.

Total time: 11 seconds

I'll check if i make all right...

//EDIT :

It's my fault.. i don't see the value : alInfo = alBuffer;
This value must be alInfo = infoBuffer; too..

It's ok now :p Just the message is show 2 times i don't know why , one time in orange colour and just after in Yellow.. Really strange !

But that's working now . Thank you :)
 
Last edited:
Upvote 0
Blender Fan|Kinenbi Owner
Loyal Member
Joined
Mar 27, 2006
Messages
800
Reaction score
355
since you got error I did it for you with your text.

You can Download here ->

*edit* To fast ^^ - good you got it *edit*
 
Upvote 0
Initiate Mage
Joined
Aug 23, 2013
Messages
2
Reaction score
0
Hello, this is my first post.
I have a server NextGen 3.9 running thanks to this web site but I have some problems. First, the game server don't find the templates for several NPC when staic data are loaded. I have looked for this npcs in the XML files and it is true, does not exist. Here you can see a part of the console while is loading:
03:44:47.357 ERROR[main]: - No template for NPC 83114503:44:47.357 ERROR[main]: - No template for NPC 701572
03:44:47.357 ERROR[main]: - No template for NPC 701572
03:44:47.357 ERROR[main]: - No template for NPC 701572
03:44:47.373 INFO [main]: - Spawned 301190000 [1] : 156
03:44:47.373 INFO [main]: - Spawned 301200000 [1] : 0
03:44:47.373 INFO [main]: - Spawned 320060000 [1] : 0
03:44:47.373 INFO [main]: - Spawned 330010010 [1] : 0
03:44:52.489 INFO [main]: - Spawned 400010000 [1] : 10245
03:44:58.651 INFO [main]: - Spawned 510010000 [1] : 0
03:44:58.667 INFO [main]: - Spawned 520010000 [1] : 0
03:44:58.698 INFO [main]: - Spawned 600010000 [1] : 396
03:44:58.714 INFO [main]: - Spawned static doors: 600020000 [1] : 3
03:44:58.885 INFO [main]: - Spawned 600020000 [1] : 4961
03:44:58.901 INFO [main]: - Spawned static doors: 600030000 [1] : 1
03:44:59.119 INFO [main]: - MoveTaskManager: Initialized.
03:44:59.291 INFO [main]: - Spawned 600030000 [1] : 8117
03:44:59.322 INFO [main]: - Spawned 600040000 [1] : 723
03:44:59.338 INFO [main]: - Spawned 600050000 [1] : 0
03:44:59.338 INFO [main]: - Spawned 600060000 [1] : 0
03:44:59.338 INFO [main]: - Spawned 600070000 [1] : 0
03:44:59.338 ERROR[main]: - No template for NPC 831634
03:44:59.338 ERROR[main]: - No template for NPC 831641
03:44:59.353 ERROR[main]: - No template for NPC 831656
03:44:59.353 ERROR[main]: - No template for NPC 831647

Second, the teleporter does not work, I can travel to another zone flying but not using the teleporter. The dialogs are right but when I should go to the city I stay in the same location.

Thank you.
 
Last edited:
Upvote 0
Blender Fan|Kinenbi Owner
Loyal Member
Joined
Mar 27, 2006
Messages
800
Reaction score
355
thats why NG is moe buggy than AL, I already tried adding missing NPCs but its alot of work, cuz you cant just use AL NPC xml.

With the teleport its easy to fix.

You need to do the Ascention Quest manually, so you get access to the teleporters ^^, just an issue as GM Char ^^
 
Upvote 0
Initiate Mage
Joined
Aug 23, 2013
Messages
2
Reaction score
0
I can't believe that the problem with the teleport was to do a quest ^_^, I am so sorry.
The rest I have probed works rightly; it is really a great work done by all of you.
Thank you very much.
 
Upvote 0
Blender Fan|Kinenbi Owner
Loyal Member
Joined
Mar 27, 2006
Messages
800
Reaction score
355
.\AIONEmulator\game\config\main\rates.properties

# Gathering XP Rates
# Crafting XP Rates
 
Upvote 0
Back
Top