Рейтинг темы:
  • 0 Голос(ов) - 0 в среднем
  • 1
  • 2
  • 3
  • 4
  • 5
4 профа GoD
#1
Возникла проблема с переходом на 4 профу сборке INProjectrev.547 GoD.
Суть проблемы в том что професия меняется только до 3 хотя в java файле прописано 4 профы!
Вот собственно сам java файл помогите найти ошибку.
PHP код:
<?php 
package npc
.model;

import inproject.nuc.Config;
import inproject.nuc.cache.Msg;
import inproject.nuc.data.xml.holder.ItemHolder;
import inproject.nuc.model.Player;
import inproject.nuc.model.base.ClassId;
import inproject.nuc.model.instances.MerchantInstance;
import inproject.nuc.serverpackets.NpcHtmlMessage;
import inproject.nuc.serverpackets.components.SystemMsg;
import inproject.nuc.templates.item.ItemTemplate;
import inproject.nuc.templates.npc.NpcTemplate;
import inproject.nuc.utils.HtmlUtils;
import inproject.nuc.utils.Util;

import java.util.StringTokenizer;


public final class
ClassMasterInstance extends MerchantInstance {
public
ClassMasterInstance(int objectId, NpcTemplate template) {
super(objectId, template);
}

private
String makeMessage(Player player) {
ClassId classId = player.getClassId();

int jobLevel = classId.getLevel();
int level = player.getLevel();

StringBuilder html = new StringBuilder();
if (
Config.ALLOW_CLASS_MASTERS_LIST.isEmpty() || !Config.ALLOW_CLASS_MASTERS_LIST.contains(jobLevel ))
jobLevel = 5;
if ((
level >= 20 && jobLevel == 1 || level >= 40 && jobLevel == 2 || level >= 76 && jobLevel == 3 || level >= 85 && jobLevel == 4) && Config.ALLOW_CLASS_MASTERS_LIST.contains(jobLevel) ) {
ItemTemplate item = ItemHolder.getInstance().getTemplate(Config.CLASS_ MASTERS_PRICE_ITEM);
if (
Config.CLASS_MASTERS_PRICE_LIST[jobLevel] > 0)
html.append("Price: ").append(Util.formatAdena(Config.CLASS_MASTERS_PR ICE_LIST[jobLevel])).append(" ").append(item.getName()).append("<br1>");
for (
ClassId cid : ClassId.VALUES) {
// Инспектор является наследником trooper и warder, но сменить его как профессию нельзя,
// т.к. это сабкласс. Наследуется с целью получения скилов родителей.
if (cid == ClassId.inspector)
continue;
if (
cid.childOf(classId) && cid.getLevel() == classId.getLevel() + 1)
html.append("<a action=\"bypass -h npc_").append(getObjectId()).append("_change_class ").append(cid.getId()).append(" ").append(Config.CLASS_MASTERS_PRICE_LIST[jobLevel]).append("\">").append(HtmlUtils.htmlClassName(cid .getId())).append("</a><br>");
}
player.sendPacket(new NpcHtmlMessage(player, this).setHtml(html.toString()));
} else
switch (
jobLevel) {
case
1:
html.append("Come back here when you reached level 20 to change your class.");
break;
case
2:
html.append("Come back here when you reached level 40 to change your class.");
break;
case
3:
html.append("Come back here when you reached level 76 to change your class.");
break;
case
4:
html.append("Come back here when you reached level 85 to change your class.");
break;
case
5:
html.append("There is no class changes for you any more.");
break;
}
return
html.toString();
}

@
Override
public void showChatWindow(Player player, int val, Object... arg) {
NpcHtmlMessage msg = new NpcHtmlMessage(player, this);
msg.setFile("custom/31860.htm");
msg.replace("%classmaster%", makeMessage(player));
player.sendPacket(msg);
}

@
Override
public void onBypassFeedback(Player player, String command) {
if (!
canBypassCheck(player, this))
return;

StringTokenizer st = new StringTokenizer(command);
if (
st.nextToken().equals("change_class")) {
int val = Integer.parseInt(st.nextToken());
long price = Long.parseLong(st.nextToken());
if (
player.getInventory().destroyItemByItemId(Config. CLASS_MASTERS_PRICE_ITEM, price))
changeClass(player, val);
else if (
Config.CLASS_MASTERS_PRICE_ITEM == 57)
player.sendPacket(Msg.YOU_DO_NOT_HAVE_ENOUGH_ADENA );
else
player.sendPacket(SystemMsg.INCORRECT_ITEM_COUNT);
} else
super.onBypassFeedback(player, command);
}

private
void changeClass(Player player, int val) {
if (
player.getClassId().getLevel() == 4)
player.sendPacket(Msg.YOU_HAVE_COMPLETED_THE_QUEST _FOR_3RD_OCCUPATION_CHANGE_AND_MOVED_TO_ANOTHER_CL ASS_CONGRATULATIONS);
if (
player.getClassId().getLevel() == 3)
player.sendPacket(Msg.YOU_HAVE_COMPLETED_THE_QUEST _FOR_3RD_OCCUPATION_CHANGE_AND_MOVED_TO_ANOTHER_CL ASS_CONGRATULATIONS);
else
player.sendPacket(Msg.CONGRATULATIONS_YOU_HAVE_TRA NSFERRED_TO_A_NEW_CLASS);

player.setClassId(val, false, false);
player.broadcastCharInfo();
}
Ответ
#2
Конфиги на класс мастера тоже покажите нам.
Ответ
#3
Сделайте как у скриптов (если не выпилили), кнопочку "пробудится" с вызовом AwakenManager.
Ответ
#4
iqman Написал:Конфиги на класс мастера тоже покажите нам.
Вот конфиг на класс мастера
PHP код:
<?php 
# Enable / Disable cats (NPC ID 31 860) to change professions.
# To turn should put 1,2,3
AllowClassMasters = 1,2,3

# The cost of changing occupations.
# To disable set the value of 0,0,0.
ClassMastersPrice = 1,1,1

Item
# shall be charged as a fee, by default, Adena
ClassMastersPriceItem = 57

# If set to True, a town near kazhdnom CC will spawn EventGatekeeper
AllowEventGatekeeper = True

Service
# nick change
NickChangeEnabled = True
NickChangePrice
= 3
NickChangeItem
= 4037

# Service Display name pet
PetNameChangeEnabled = True
PetNameChangePrice
= 3
PetNameChangeItem
= 4037

# Service Improved baby pet exchange
BabyPetExchangeEnabled = True
BabyPetExchangePrice
= 1
BabyPetExchangeItem
= 4037

# Tools of sex change
SexChangeEnabled = True
SexChangePrice
= 3
SexChangeItem
= 4037

# Service change the base class
BaseChangeEnabled = True
BaseChangePrice
= 3
BaseChangeItem
= 4037

# Service department saba
SeparateSubEnabled = True
SeparateSubPrice
= 1
SeparateSubItem
= 57

# Change the color of nick Service
NickColorChangeEnabled = True

# The order is inverted colors - BBGGRR
NickColorChangeList = 00FFFF; 000000; 0000FF; FF00FF; 808080; 008000; 00FF00; 800000; 000080; 808000; 800080; FF0000; C0C0C0; 008080; FFFF00
NickColorChangePrice
= 3
NickColorChangeItem
= 4037

# Sales service of the nobility
NoblessSellEnabled = True
NoblessSellPrice
= 1
NoblessSellItem
= 57

# Extension service equipment
ExpandInventoryEnabled = True
ExpandInventoryPrice
= 100000000
ExpandInventoryItem
= 57
ExpandInventoryMax
= 250

# Expand the personal service warehouse
ExpandWarehouseEnabled = True
ExpandWarehousePrice
= 100000000
ExpandWarehouseItem
= 57

# Service clan warehouse expansion
ExpandCWHEnabled = True
ExpandCWHPrice
= 100000000
ExpandCWHItem
= 57

# Service clan name change
ClanNameChangeEnabled = True
ClanNameChangePrice
= 3
ClanNameChangeItem
= 4037

# Service increase rtg
# Allows for time to raise all the charms Rates on account
# 0 - service disabled
# 1 - used for one account, all the GS's are in the AC-and
# 2 - used for one akkauta, under the current GS-a
RateBonusType = 1

# All of the following values ​​can be specified in the list;
# Number of elements must be equal!
RateBonusPrice = 2, 1
RateBonusItem
= 4037, 4037

# This is a multiplier to the base rate, which will be applied to the rate value for EPC / sp / adena / items / Spoil
RateBonusValue = 2, 2

# Time steps in a day
RateBonusTime = 30, 15

# Sale at Pet collars Manager'ov, fully configurable, depending on the wishes of
# Example - selling Light Purple-Maned Horse Mounting Bracelet
# 7 days - 10COL, 30 - 30COL, always on - 100COL
# SellPets = 4037:10 -> 13 022; 4037:30 -> 20 030, 4037:100 -> 20 029
SellPets =

# Service "Quote pad you'll ever need" AKA bash.org.ru
# When the server boots download RSS feed bash organizations and places it in / data / bash.xml
# For fresh bashem go to taurine.
BashEnabled = False

# Do not download the RSS-feed from the Internet. In this case, it should be placed in / data / bash.xml external means.
# The tape must be in UTF-8.
BashSkipDownload = False

# Time automatic reloading data, in hours. 0 - disabled.
BashReloadTime = 1

# Service "is online commerce"
# Use the command. Offline for off-line trades
AllowOfflineTrade = False

# Offline trading is allowed only in areas of offshore.xml
AllowOfflineTradeOnlyOffshore = True

# The minimum level for the trade
OfflineMinLevel = 40

# Color name players offline
OfflineTradeNameColor = A0FFFF

# To charge a fee to offline trade
OfflineTradePrice = 0
OfflineTradePriceItem
= 57

# Offline trader is allowed to sit more days, the default is 14 days
OfflineTradeDaysToKick = 14

# Restore after restart
OfflineRestoreAfterRestart = True

# A ban on trade in the zone is valid only for offline traders
NoTradeOnlyOffline = False

# Tax on trade as a percentage
TradeTax = 0.0

# Tax on trading in offshore zones
OffshoreTradeTax = 0.0

# The tax can only be removed from the offline traders
TradeTaxOnlyOffline = False

# Allowed to sell only at a distance from other merchants
TradeOnlyFar = False

# Tradesmen search radius
TradeRadius = 30

# Offshore havens Giran
GiranHarborZone = False

# Offshore Parnassus
ParnassusZone = False
ParnassusNoTax
= False
ParnassusPrice
= 500000

# In the offshore tax is not payable Castle (aka zone belongs to Giran)
NoCastleTaxInOffshore = False

# The minimum level for the opening of trading stalls (craft \ buy \ scrap)
MinLevelForTrade = 0

# On \ Off Lottery Manager
AllowLottery = False

# The prize for winning
LotteryPrize = 50000

# Set the value of the lottery to turn white (default is 2000 adena).
AltLotteryPrice = 2000

# Tickets
LotteryTicketPrice = 2000

# Rtg on 5-match award for the numbers
Lottery5NumberRate = 0.6

# Rtg on the prize for the match 4 numbers
Lottery4NumberRate = 0.4

# Rate to match the prize for 3 numbers
Lottery3NumberRate = 0.2

# The prize for the coincidence of one or two rooms
Lottery2and1NumberPrize = 200

# Enable / disable tape
AllowRoulette = False

# The minimum bet.
RouletteMinBet = 1000

# The maximum rate and the difference with a minimum of 6 decimal orders of Martingale system restricts a series of 20 losses.
RouletteMaxBet = 1000000000

# Service activates in Item Broker'ov - search marketers on things.
UseItemBrokerItemSearch = False

# Leave a character in the game at break connections of
# Time in character stays in the game, the team set. Cfg
EnableNoCarrier = False

# The minimum allowable time (in seconds)
NoCarrierMinTime = 0

# The maximum time (in seconds)
NoCarrierMaxTime = 90

# How the default, if a player is not installed (in seconds)
NoCarrierDefaultTime = 60

Добавлено через 23 минуты
iqman Написал:Конфиги на класс мастера тоже покажите нам.

[STIGMATED];182376 Написал:Сделайте как у скриптов (если не выпилили), кнопочку "пробудится" с вызовом AwakenManager.
Если бы я знал как) ето зделать думаю тему не создавал)
Ответ
#5
# Enable / Disable cats (NPC ID 31 860) to change professions.
# To turn should put 1,2,3
AllowClassMasters = 1,2,3,4

# The cost of changing occupations.
# To disable set the value of 0,0,0.
ClassMastersPrice = 1,1,1,1

Как то так должно быть =))
У меня есть только два чувства, похмелье и изжога.
Ответ
#6
Sisi Написал:# Enable / Disable cats (NPC ID 31 860) to change professions.
# To turn should put 1,2,3
AllowClassMasters = 1,2,3,4

# The cost of changing occupations.
# To disable set the value of 0,0,0.
ClassMastersPrice = 1,1,1,1

Как то так должно быть =))
Щяс попробую)
Ответ
#7
Это так решалось? тю, не спортивно
Ответ
#8
[STIGMATED];182376 Написал:Сделайте как у скриптов (если не выпилили), кнопочку "пробудится" с вызовом AwakenManager.

100% Играл на оффе с Ц1-Ц3, с Ц3 перестали терять шмот от убийства НПЦ не находясь в


Мой старый друг, я сам писал этот ббс по ГОД (эту часть), по этому твои выводы не помогут ТСу.
Ответ
#9
iqman Написал:100% Играл на оффе с Ц1-Ц3, с Ц3 перестали терять шмот от убийства НПЦ не находясь в


Мой старый друг, я сам писал этот ббс по ГОД (эту часть), по этому твои выводы не помогут ТСу.

В смысле оно не работает?) Или как эту фразу понимать?)
Ответ
#10
trol mod off
Ответ


Возможно похожие темы ...
Тема Автор Ответы Просмотры Последний пост
  Смена Профа ИД Elais 1 2,674 01-05-2009, 01:09 AM
Последний пост: marvellously

Перейти к форуму:


Пользователи, просматривающие эту тему: 4 Гость(ей)