03-26-2010, 06:43 PM
Дополнения к серверам
|
03-27-2010, 10:36 AM
Просто. Я же написал. Эх... вот: Это мой файл.
http://depositfiles.com/files/0eu6h8pym бери как пример.
вот нарыл у уников постепенное увеличение рейтов с уровнем для облегчения кача
lvl 1-30 1x/1xq/1xqk/1xap lvl 31-50 3x/3xq/3xqk/3xap Progressive XP: Lvl 1-30: 1x/1x/1x Lvl 31-50: 3x/3x/1x Patch
Index: config/main/rates.properties
=================================================================== --- config/main/rates.properties (revision 2074) +++ config/main/rates.properties (working copy) @@ -92,3 +92,91 @@ gameserver.rate.premium.ap.npc = 2 # For PVP gameserver.rate.premium.ap.player = 2 + + +#--------------------------------------------------- +##########ALTERNATE SERVER EXP RATES +#--------------------------------------------------- +# Overrides the static EXP rate +# Enable alternate EXP evolution method +# if this config is set to true you can +# set an evolutive EXP rate for your players +gameserver.character.alternate.exp=false + +# Base EXP rate +gameserver.character.alternate.exp.min=1 +# Maximum EXP rate +gameserver.character.alternate.exp.max=3 + +# EXP lowest level cutoff +# Level at which the EXP rate starts to increase +gameserver.character.alternate.exp.lowcutoff=30 +# EXP highest level cutoff +# Level at which the EXP rate reaches the maximum +gameserver.character.alternate.exp.highcutoff=50 +#--------------------------------------------------- +##########ALTERNATE QUEST EXP RATES +#--------------------------------------------------- +# Enable alternate Quest EXP evolution method +# if this config is set to true you can +# set an evolutive Quest EXP rate for your players +gameserver.character.alternate.exp.quest=false + +# Base Quest EXP rate +gameserver.character.alternate.exp.quest.min=1 +# Maximum Quest EXP rate +gameserver.character.alternate.exp.quest.max=3 + +# EXP Quest lowest level cutoff +# Level at which the Quest EXP rate starts to increase +gameserver.character.alternate.exp.quest.lowcutoff=30 +# EXP Quest highest level cutoff +# Level at which the Quest EXP rate reaches the maximum +gameserver.character.alternate.exp.quest.highcutoff=50 + +#--------------------------------------------------- +##########ALTERNATE QUEST KINAH RATES +#--------------------------------------------------- +# Enable alternate Quest KINAH evolution method +# if this config is set to true you can +# set an evolutive Quest KINAH rate for your players +gameserver.character.alternate.kinah.quest=false + +# Base Quest KINAH rate +gameserver.character.alternate.kinah.quest.min=1 +# Maximum Quest KINAH rate +gameserver.character.alternate.kinah.quest.max=3 + +# KINAH Quest lowest level cutoff +# Level at which the Quest KINAH rate starts to increase +gameserver.character.alternate.kinah.quest.lowcutoff=30 +# KINAH Quest highest level cutoff +# Level at which the Quest KINAH rate reaches the maximum +gameserver.character.alternate.kinah.quest.highcutoff=50 + +#--------------------------------------------------- +##########ALTERNATE ABYSS POINT RATES +#--------------------------------------------------- +# Enable alternate Quest EXP evolution method +# if this config is set to true you can +# set an evolutive Quest EXP rate for your players +gameserver.character.alternate.abyss.point=false + +# Abyss Point PVE Min +gameserver.character.alternate.abyss.npc.min=1 +# Abyss Point PVE Max +gameserver.character.alternate.abyss.npc.max=3 + +# Abyss Point PVP Min +gameserver.character.alternate.abyss.player.min=1 +# Abyss Point PVP Max +gameserver.character.alternate.abyss.player.max=3 + +# Abyss Point lowest level cutoff +# Level at which the Abyss Point rate starts to increase +gameserver.character.alternate.abyss.lowcutoff=30 +# Abyss Point highest level cutoff +# Level at which the Abyss Point rate reaches the maximum +gameserver.character.alternate.abyss.highcutoff=50 + + Index: src/com/aionemu/gameserver/configs/main/RateConfig.java =================================================================== --- src/com/aionemu/gameserver/configs/main/RateConfig.java (revision 2074) +++ src/com/aionemu/gameserver/configs/main/RateConfig.java (working copy) @@ -116,4 +116,147 @@ @Property(key = "gameserver.rate.premium.ap.npc", defaultValue = "2") public static float PREMIUM_AP_NPC_RATE; + + /** + * Evolutive EXP mod config + */ + @Property(key = "gameserver.character.alternate.exp", defaultValue = "false") + public static boolean ALT_EXP_ALLOWED; + + /** + * Evolutive EXP mod config + */ + @Property(key = "gameserver.character.alternate.exp.min", defaultValue = "1") + public static int ALT_EXP_MIN_RATE; + + /** + * Evolutive EXP mod config + */ + @Property(key = "gameserver.character.alternate.exp.max", defaultValue = "1") + public static int ALT_EXP_MAX_RATE; + + /** + * Evolutive EXP mod config + */ + @Property(key = "gameserver.character.alternate.exp.lowcutoff", defaultValue = "1") + public static int ALT_EXP_MIN_LEVEL; + + /** + * Evolutive EXP mod config + */ + @Property(key = "gameserver.character.alternate.exp.highcutoff", defaultValue = "1") + public static int ALT_EXP_MAX_LEVEL; + + + + + /** + * Evolutive Quest EXP mod config + */ + @Property(key = "gameserver.character.alternate.exp.quest", defaultValue = "false") + public static boolean ALT_QUEST_EXP_ALLOWED; + + /** + * Evolutive Quest EXP mod config + */ + @Property(key = "gameserver.character.alternate.exp.quest.min", defaultValue = "1") + public static int ALT_QUEST_EXP_MIN_RATE; + + /** + * Evolutive Quest EXP mod config + */ + @Property(key = "gameserver.character.alternate.exp.quest.max", defaultValue = "1") + public static int ALT_QUEST_EXP_MAX_RATE; + + /** + * Evolutive Quest EXP mod config + */ + @Property(key = "gameserver.character.alternate.exp.quest.lowcutoff", defaultValue = "1") + public static int ALT_QUEST_EXP_MIN_LEVEL; + + /** + * Evolutive Quest EXP mod config + */ + @Property(key = "gameserver.character.alternate.exp.quest.highcutoff", defaultValue = "1") + public static int ALT_QUEST_EXP_MAX_LEVEL; + + + + + + /** + * Evolutive Quest KINAH mod config + */ + @Property(key = "gameserver.character.alternate.kinah.quest", defaultValue = "false") + public static boolean ALT_QUEST_KINAH_ALLOWED; + + /** + * Evolutive Quest KINAH mod config + */ + @Property(key = "gameserver.character.alternate.kinah.quest.min", defaultValue = "1") + public static int ALT_QUEST_KINAH_MIN_RATE; + + /** + * Evolutive Quest KINAH mod config + */ + @Property(key = "gameserver.character.alternate.kinah.quest.max", defaultValue = "1") + public static int ALT_QUEST_KINAH_MAX_RATE; + + /** + * Evolutive Quest EXP mod config + */ + @Property(key = "gameserver.character.alternate.kinah.quest.lowcutoff", defaultValue = "1") + public static int ALT_QUEST_KINAH_MIN_LEVEL; + + /** + * Evolutive Quest EXP mod config + */ + @Property(key = "gameserver.character.alternate.kinah.quest.highcutoff", defaultValue = "1") + public static int ALT_QUEST_KINAH_MAX_LEVEL; + + + + + /** + * Evolutive Abyss Point mod config + */ + @Property(key = "gameserver.character.alternate.abyss.point", defaultValue = "false") + public static boolean ALT_ABYSS_POINT_ALLOWED; + + /** + * Evolutive Abyss Point mod config + */ + @Property(key = "gameserver.character.alternate.abyss.npc.min", defaultValue = "1") + public static int ALT_ABYSS_NPC_MIN_RATE; + + /** + * Evolutive Abyss Point mod config + */ + @Property(key = "gameserver.character.alternate.abyss.npc.max", defaultValue = "1") + public static int ALT_ABYSS_NPC_MAX_RATE; + + /** + * Evolutive Abyss Point mod config + */ + @Property(key = "gameserver.character.alternate.abyss.player.min", defaultValue = "1") + public static int ALT_ABYSS_PLAYER_MIN_RATE; + + /** + * Evolutive Abyss Point mod config + */ + @Property(key = "gameserver.character.alternate.abyss.player.max", defaultValue = "1") + public static int ALT_ABYSS_PLAYER_MAX_RATE; + /** + * Evolutive Abyss Point mod config + */ + @Property(key = "gameserver.character.alternate.abyss.lowcutoff", defaultValue = "1") + public static int ALT_ABYSS_POINT_MIN_LEVEL; + + /** + * Evolutive Abyss Point mod config + */ + @Property(key = "gameserver.character.alternate.abyss.highcutoff", defaultValue = "1") + public static int ALT_ABYSS_POINT_MAX_LEVEL; + + } Index: src/com/aionemu/gameserver/controllers/MonsterController.java =================================================================== --- src/com/aionemu/gameserver/controllers/MonsterController.java (revision 2074) +++ src/com/aionemu/gameserver/controllers/MonsterController.java (working copy) @@ -24,6 +24,7 @@ import com.aionemu.gameserver.utils.PacketSendUtility; import com.aionemu.gameserver.utils.stats.StatFunctions; import com.aionemu.gameserver.world.WorldMapType; +import com.aionemu.gameserver.configs.main.RateConfig; /** * @author ATracer @@ -50,8 +51,24 @@ Player player = (Player) master; if(player.getPlayerGroup() == null) //solo { - long xpReward = StatFunctions.calculateSoloExperienceReward(player, getOwner()); + long xpReward = StatFunctions.calculateSoloExperienceReward(player, getOwner()); + if(RateConfig.ALT_EXP_ALLOWED) + { + if(player.getLevel() <= RateConfig.ALT_EXP_MIN_LEVEL) + { + xpReward *= RateConfig.ALT_EXP_MIN_RATE; + player.getCommonData().addExp(xpReward); + } + else if(player.getLevel() >= RateConfig.ALT_EXP_MAX_LEVEL) + { + xpReward *= RateConfig.ALT_EXP_MAX_RATE; + player.getCommonData().addExp(xpReward); + } + } + else + { player.getCommonData().addExp(xpReward); + } //DPreward int currentDp = player.getCommonData().getDp(); Index: src/com/aionemu/gameserver/services/AbyssService.java =================================================================== --- src/com/aionemu/gameserver/services/AbyssService.java (revision 2074) +++ src/com/aionemu/gameserver/services/AbyssService.java (working copy) @@ -17,6 +17,7 @@ package com.aionemu.gameserver.services; import com.aionemu.gameserver.model.gameobjects.Creature; +import com.aionemu.gameserver.configs.main.RateConfig; import com.aionemu.gameserver.model.gameobjects.player.Player; import com.aionemu.gameserver.network.aion.serverpackets.SM_ABYSS_RANK; import com.aionemu.gameserver.network.aion.serverpackets.SM_ABYSS_RANK_UPDATE; @@ -113,30 +114,19 @@ PacketSendUtility.sendPacket(winner, SM_SYSTEM_MESSAGE.EARNED_ABYSS_POINT(String.valueOf(pointsGained))); PacketSendUtility.sendPacket(defeated, new SM_SYSTEM_MESSAGE(1340002, winner.getName())); } - - /** - * - * @param victim - * @param winner - */ - public void doReward(Creature victim, Player winner) + + private void doPveReward(Player winner, int apReward) { - int apReward = StatFunctions.calculateSoloAPReward(winner, victim); - int oldWinnerAbyssRank = winner.getAbyssRank().getRank().getId(); - winner.getAbyssRank().addAp(apReward); if(winner.isLegionMember()) legionService.addContributionPoints(winner.getLegion(), apReward); - if(winner.getAbyssRank().getRank().getId() != oldWinnerAbyssRank) PacketSendUtility.broadcastPacket(winner, new SM_ABYSS_RANK_UPDATE(winner)); - PacketSendUtility.sendPacket(winner, new SM_ABYSS_RANK(winner.getAbyssRank())); PacketSendUtility.sendPacket(winner, SM_SYSTEM_MESSAGE.EARNED_ABYSS_POINT(String.valueOf(apReward))); } - - public void doReward(Player winner, int apReward) + private void doPvpReward(Player winner, int apReward) { winner.getAbyssRank().addAp(apReward); if(winner.isLegionMember()) @@ -146,4 +136,54 @@ PacketSendUtility.sendPacket(winner, new SM_ABYSS_RANK(winner.getAbyssRank())); PacketSendUtility.sendPacket(winner, SM_SYSTEM_MESSAGE.EARNED_ABYSS_POINT(String.valueOf(apReward))); } + /** + * + * @param victim + * @param winner + */ + public void doReward(Creature victim, Player winner) + { + int apReward = StatFunctions.calculateSoloAPReward(winner, victim); + if(RateConfig.ALT_ABYSS_POINT_ALLOWED) + { + int playerLevel = winner.getLevel(); + if(playerLevel <= RateConfig.ALT_ABYSS_POINT_MIN_LEVEL) + { + apReward *= RateConfig.ALT_ABYSS_PLAYER_MIN_RATE; + doPveReward(winner, apReward); + } + else if(playerLevel >= RateConfig.ALT_ABYSS_POINT_MAX_LEVEL) + { + apReward *= RateConfig.ALT_ABYSS_PLAYER_MAX_RATE; + doPveReward(winner, apReward); + } + } + else + { + doPveReward(winner, apReward); + } + } + + public void doReward(Player winner, int apReward) + { + if(RateConfig.ALT_ABYSS_POINT_ALLOWED) + { + int playerLevel = winner.getLevel(); + if(playerLevel <= RateConfig.ALT_ABYSS_POINT_MIN_LEVEL) + { + apReward *= RateConfig.ALT_ABYSS_PLAYER_MIN_RATE; + doPvpReward(winner, apReward); + } + else if(playerLevel >= RateConfig.ALT_ABYSS_POINT_MAX_LEVEL) + { + apReward *= RateConfig.ALT_ABYSS_PLAYER_MAX_RATE; + winner.getAbyssRank().addAp(apReward); + doPvpReward(winner, apReward); + } + } + else + { + doPveReward(winner, apReward); + } + } } Index: src/com/aionemu/gameserver/services/GroupService.java =================================================================== --- src/com/aionemu/gameserver/services/GroupService.java (revision 2074) +++ src/com/aionemu/gameserver/services/GroupService.java (working copy) @@ -24,6 +24,7 @@ import org.apache.log4j.Logger; +import com.aionemu.gameserver.configs.main.RateConfig; import com.aionemu.gameserver.configs.main.GroupConfig; import com.aionemu.gameserver.model.gameobjects.Creature; import com.aionemu.gameserver.model.gameobjects.Monster; @@ -279,14 +280,30 @@ for(Player member : players) { - long currentExp = member.getCommonData().getExp(); - long reward = (xpReward * member.getLevel())/partyLvlSum; - reward *= member.getRates().getGroupXpRate(); - member.getCommonData().setExp(currentExp + reward); + long currentExp = member.getCommonData().getExp(); + long reward = (xpReward * member.getLevel())/partyLvlSum; + if(RateConfig.ALT_EXP_ALLOWED) + { + if(member.getLevel() <= RateConfig.ALT_EXP_MIN_LEVEL) + { + reward *= RateConfig.ALT_EXP_MIN_RATE; + member.getCommonData().setExp(currentExp + reward); + } + else if(member.getLevel() >= RateConfig.ALT_EXP_MAX_LEVEL) + { + reward *= RateConfig.ALT_EXP_MAX_RATE; + member.getCommonData().setExp(currentExp + reward); + } + } + else + { + reward *= member.getRates().getGroupXpRate(); + member.getCommonData().setExp(currentExp + reward); + } PacketSendUtility.sendPacket(member, SM_SYSTEM_MESSAGE.EXP(Long.toString(reward))); - // DPreward + // DPreward int currentDp = member.getCommonData().getDp(); int dpReward = StatFunctions.calculateGroupDPReward(member, owner); member.getCommonData().setDp(dpReward + currentDp); Index: src/com/aionemu/gameserver/services/QuestService.java =================================================================== --- src/com/aionemu/gameserver/services/QuestService.java (revision 2074) +++ src/com/aionemu/gameserver/services/QuestService.java (working copy) @@ -22,6 +22,7 @@ import com.aionemu.commons.utils.Rnd; import com.aionemu.gameserver.configs.main.GroupConfig; +import com.aionemu.gameserver.configs.main.RateConfig; import com.aionemu.gameserver.dataholders.QuestsData; import com.aionemu.gameserver.model.PlayerClass; import com.aionemu.gameserver.model.drop.DropItem; @@ -134,12 +135,57 @@ { if(rewards.getGold() != null) { - inventory.increaseKinah((player.getRates().getQuestKinahRate() * rewards.getGold())); + int kinahReward = (player.getRates().getQuestKinahRate() * rewards.getGold()); + if(RateConfig.ALT_QUEST_KINAH_ALLOWED) + { + int playerLevel = player.getLevel(); + if(playerLevel <= RateConfig.ALT_QUEST_KINAH_MIN_LEVEL) + { + kinahReward *= RateConfig.ALT_QUEST_KINAH_MIN_RATE; + inventory.increaseKinah(kinahReward); + } + else if(playerLevel >= RateConfig.ALT_QUEST_KINAH_MAX_LEVEL) + { + kinahReward *= RateConfig.ALT_QUEST_KINAH_MAX_RATE; + inventory.increaseKinah(kinahReward); + } + } + else + { + inventory.increaseKinah(kinahReward); + } } if(rewards.getExp() != null) { - int rewardExp = (player.getRates().getQuestXpRate() * rewards.getExp()); - player.getCommonData().addExp(rewardExp); + if(RateConfig.ALT_QUEST_EXP_ALLOWED) + { + int rewardExp = (rewards.getExp() * player.getRates().getQuestXpRate()); + int playerLevel = player.getLevel(); + if(playerLevel <= RateConfig.ALT_QUEST_EXP_MIN_LEVEL) + { + rewardExp *= RateConfig.ALT_QUEST_EXP_MIN_RATE; + player.getCommonData().addExp(rewardExp); + } + else if(playerLevel >= RateConfig.ALT_QUEST_EXP_MAX_LEVEL) + { + rewardExp *= RateConfig.ALT_QUEST_EXP_MAX_RATE; + player.getCommonData().addExp(rewardExp); + } + else + { + int rateDif = RateConfig.ALT_QUEST_EXP_MAX_RATE - RateConfig.ALT_QUEST_EXP_MIN_RATE; + int levelDif = RateConfig.ALT_QUEST_EXP_MAX_LEVEL - RateConfig.ALT_QUEST_EXP_MIN_LEVEL; + int curRateModifier = (int)Math.round(rateDif/levelDif); + int curRate = RateConfig.ALT_QUEST_EXP_MIN_RATE + ((playerLevel - RateConfig.ALT_QUEST_EXP_MIN_LEVEL)*curRateModifier); + rewardExp *= curRate; + player.getCommonData().addExp(rewardExp); + } + } + else + { + int rewardExp = (player.getRates().getQuestXpRate() * rewards.getExp()); + player.getCommonData().addExp(rewardExp); + } } if(rewards.getTitle() != null) Добавлено через 4 минуты вот еще патч для ENTER_WORLD ( для тех кто в танке) ето надпись в чате когда заходите в игру Patch
Index: config/main/custom.properties
=================================================================== --- config/main/custom.properties (revision 2074) +++ config/main/custom.properties (working copy) @@ -60,4 +60,21 @@ # Default Fly Time # Default: 60 (60 seconds) -gameserver.base.flytime = 60 \ No newline at end of file +gameserver.base.flytime = 60 + +# ---------------------------- +# Announcements +# Leave blank if you only want it to announce certain lines +#----------------------------- + +#Announcements activated +#Default: true +gameserver.news.activated=true + +#set up to 5 announcements here +#Blank lines will not be shown/scrolled upon entering the game +gameserver.news.value1=Thanks for playing! +gameserver.news.value2= +gameserver.news.value3= +gameserver.news.value4= +gameserver.news.value5= \ No newline at end of file Index: src/com/aionemu/gameserver/configs/main/CustomConfig.java =================================================================== --- src/com/aionemu/gameserver/configs/main/CustomConfig.java (revision 2074) +++ src/com/aionemu/gameserver/configs/main/CustomConfig.java (working copy) @@ -67,4 +67,29 @@ */ @Property(key = "gameserver.base.flytime", defaultValue = "60") public static int BASE_FLYTIME; + + /* + *Allows to use the server's news not showed by default + */ + @Property(key = "gameserver.news.activated", defaultValue = "false") + public static boolean ENABLE_SERVER_NEWS; + + /** + * Server news + */ + @Property(key = "gameserver.news.value1", defaultValue = "none.") + public static String SERVER_NEWS1; + + @Property(key = "gameserver.news.value2", defaultValue = "none.") + public static String SERVER_NEWS2; + + @Property(key = "gameserver.news.value3", defaultValue = "none.") + public static String SERVER_NEWS3; + + @Property(key = "gameserver.news.value4", defaultValue = "none.") + public static String SERVER_NEWS4; + + @Property(key = "gameserver.news.value5", defaultValue = "none.") + public static String SERVER_NEWS5; + } Index: src/com/aionemu/gameserver/network/aion/clientpackets/CM_ENTER_WORLD.java =================================================================== --- src/com/aionemu/gameserver/network/aion/clientpackets/CM_ENTER_WORLD.java (revision 2074) +++ src/com/aionemu/gameserver/network/aion/clientpackets/CM_ENTER_WORLD.java (working copy) @@ -19,6 +19,7 @@ import java.util.List; import com.aionemu.gameserver.configs.main.GSConfig; +import com.aionemu.gameserver.configs.main.CustomConfig; import com.aionemu.gameserver.model.ChatType; import com.aionemu.gameserver.model.account.Account; import com.aionemu.gameserver.model.account.PlayerAccountData; @@ -217,6 +218,35 @@ + " server\nPowered by aion-unique software\ndeveloped by http://www.aion-unique.org team.\nCopyright 2010", ChatType.ANNOUNCEMENTS)); + if (CustomConfig.ENABLE_SERVER_NEWS == true) + { + if( !CustomConfig.SERVER_NEWS1.equals("") ) + { + sendPacket(new SM_MESSAGE(0, null, CustomConfig.SERVER_NEWS1, ChatType.ANNOUNCEMENTS)); + } + + if( !CustomConfig.SERVER_NEWS2.equals("") ) + { + sendPacket(new SM_MESSAGE(0, null, CustomConfig.SERVER_NEWS2, ChatType.ANNOUNCEMENTS)); + } + + if( !CustomConfig.SERVER_NEWS3.equals("") ) + { + sendPacket(new SM_MESSAGE(0, null, CustomConfig.SERVER_NEWS3, ChatType.ANNOUNCEMENTS)); + } + + if( !CustomConfig.SERVER_NEWS4.equals("") ) + { + sendPacket(new SM_MESSAGE(0, null, CustomConfig.SERVER_NEWS4, ChatType.ANNOUNCEMENTS)); + } + + if( !CustomConfig.SERVER_NEWS5.equals("") ) + { + sendPacket(new SM_MESSAGE(0, null, CustomConfig.SERVER_NEWS5, ChatType.ANNOUNCEMENTS)); + } + } + + if(player.isInPrison()) punishmentService.updatePrisonStatus(player);
MiR @ Aion Emu
Продам сборки v2.7 v3.9 v4.7 v4.8 v4.9 v5.1 , сборки мастер сервера v1.9 и v2.7 ,пишу скрипты и квесты на заказ , правки ядра , правки даты , писать в ПМ
05-31-2010, 03:29 PM
Простите за оффтоп.
Если работа чья-то, думаю обязательна ссылка на источник(Конкретная, а не просто на сайт)
06-02-2010, 12:31 PM
Патч включает/отключает возможность поиска игроков другой расы в игре(по оффу, возможно находить только игроков своей расы, сейчас - игроков обеих рас).
После того как поставите - в custom.properties ставим нужное значение: Цитата:# Searching players of opposite factionСкачать © ViAl
06-02-2010, 10:40 PM
ViAl в файле CustomConfig.java добавь строку
import com.aionemu.gameserver.configs.main.CustomConfig; А то у народа ошибка при компиле)))
06-02-2010, 11:47 PM
Поправочка...
...\AE-go_GameServer\src\com\aionemu\gameserver\network\aion\clientpackets\CM_PLAYER_SEARCH.java в этот файл в 25 строчку нужно добавить import com.aionemu.gameserver.configs.main.CustomConfig;
[SIGPIC][/SIGPIC]
|
« Предыдущая | Следующая »
|
Пользователи, просматривающие эту тему: 2 Гость(ей)