Most visitors online was 8830 , on 6 Feb 2024
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!Which source are you using and I shall take a look into it.
here brother link:Is it publicly posted anywhere on RZ as I can't seem to find it?
Account account = AccountDaoService.getInstance().accountAuth(login, password); if (account == null) {
if (AuthServerProperty.getInstance().ACCOUNT_AUTO_CREATE && !AccountDaoService.getInstance().accountExist(login)) {
account = new Account();
account.setLogin(login);
account.setPassword(password);
account.setActive(true);
account.setEmail(login + "@nullmail.ru");
account.setMoney(10000000);
AccountDaoService.getInstance().create(account);
if (account.getId() != null) {
state = authAccount(client, account);
} else {
state = State.ERROR_AUTH;
}
} else {
state = State.ERROR_AUTH;
}
} else {
state = authAccount(client, account);
}
}
lock.unlock();
return state;
}
con = DatabaseFactory.getInstance().newConnection(); statement = con.prepareStatement(ACCOUNT_GET_BY_LOGIN_PASSWORD.getQuery());
statement.setString(1, login);
statement.setString(2, password);
rs = statement.executeQuery();
if (rs.next()) {
account = new Account();
account.setId(rs.getLong("id"));
account.setLogin(rs.getString("login"));
account.setPassword(rs.getString("password"));
account.setEmail(rs.getString("email"));
account.setMoney(rs.getInt("money"));
account.setActive(rs.getBoolean("active"));
}
account.setMoney(rs.getInt("money"));
Mind telling me what is the default starting cash?
Is it: 10000000 - 10,000,000
Code:Account account = AccountDaoService.getInstance().accountAuth(login, password); if (account == null) { if (AuthServerProperty.getInstance().ACCOUNT_AUTO_CREATE && !AccountDaoService.getInstance().accountExist(login)) { account = new Account(); account.setLogin(login); account.setPassword(password); account.setActive(true); account.setEmail(login + "@nullmail.ru"); account.setMoney(10000000); AccountDaoService.getInstance().create(account); if (account.getId() != null) { state = authAccount(client, account); } else { state = State.ERROR_AUTH; } } else { state = State.ERROR_AUTH; } } else { state = authAccount(client, account); } } lock.unlock(); return state; }
public PlayerCreateTemplate readStartTemplate() {
Connection con = null;
PreparedStatement statement = null;
ResultSet rs = null;
PlayerCreateTemplate template = null;
try {
con = DatabaseFactory.getInstance().newConnection();
statement = con.prepareStatement(TEMPLATE_SELECT_START_EQIPMENT.getQuery());
rs = statement.executeQuery();
int startmoney = 0;
int stargp = 0;
List<PlayerItem> list = new ArrayList<PlayerItem>();
while (rs.next()) {
if (rs.getInt("item_id") == 0) {
startmoney = rs.getInt("startmoney");
stargp = rs.getInt("startgp");
continue;
}
list.add(new PlayerItem(
rs.getBoolean("equipped") ? ItemLocation.valueOf(ItemLocation.EQUIPPED.name()) : ItemLocation.valueOf(ItemLocation.INVENTORY.name()),
ItemHolder.getInstance().getTemplate(rs.getInt("item_id")),
rs.getInt("count"), (ItemHolder.getInstance().getTemplate(rs.getInt("item_id")).getConsumeType() == ItemConsumeType.PERMANENT) ? 0 : 1,
false));
}
template = new PlayerCreateTemplate(startmoney, stargp);
for (PlayerItem item : list)
template.addPlayerItem(item);
} catch (SQLException e) {
e.printStackTrace();
} finally {
DatabaseUtils.closeDatabaseCSR(con, statement, rs);
}
return template;
}
int startmoney = 0;
int stargp = 0;
PlayerDaoImpl.java
I believe this is what you're looking for?
Code:public PlayerCreateTemplate readStartTemplate() { Connection con = null; PreparedStatement statement = null; ResultSet rs = null; PlayerCreateTemplate template = null; try { con = DatabaseFactory.getInstance().newConnection(); statement = con.prepareStatement(TEMPLATE_SELECT_START_EQIPMENT.getQuery()); rs = statement.executeQuery(); int startmoney = 0; int stargp = 0; List<PlayerItem> list = new ArrayList<PlayerItem>(); while (rs.next()) { if (rs.getInt("item_id") == 0) { startmoney = rs.getInt("startmoney"); stargp = rs.getInt("startgp"); continue; } list.add(new PlayerItem( rs.getBoolean("equipped") ? ItemLocation.valueOf(ItemLocation.EQUIPPED.name()) : ItemLocation.valueOf(ItemLocation.INVENTORY.name()), ItemHolder.getInstance().getTemplate(rs.getInt("item_id")), rs.getInt("count"), (ItemHolder.getInstance().getTemplate(rs.getInt("item_id")).getConsumeType() == ItemConsumeType.PERMANENT) ? 0 : 1, false)); } template = new PlayerCreateTemplate(startmoney, stargp); for (PlayerItem item : list) template.addPlayerItem(item); } catch (SQLException e) { e.printStackTrace(); } finally { DatabaseUtils.closeDatabaseCSR(con, statement, rs); } return template; }
Code:int startmoney = 0; int stargp = 0;
It's at this location below.
PB SERVER NANDO\pb-global\src\ru\pb\global\dao\impl
Lines 274, 275.
int startmoney = 0;
int stargp = 0;
List<PlayerItem> list = new ArrayList<PlayerItem>();
while (rs.next()) {
if (rs.getInt("item_id") == 0) {
startmoney = rs.getInt("startmoney");
stargp = rs.getInt("startgp");
continue;
PlayerDaoImpl.java
You edit this bit.
Code:int startmoney = 0; int stargp = 0; List<PlayerItem> list = new ArrayList<PlayerItem>(); while (rs.next()) { if (rs.getInt("item_id") == 0) { startmoney = rs.getInt("startmoney"); stargp = rs.getInt("startgp"); continue;
thank you so much!You change the value of 0 for both Startmoney and startgp to what you want, yes.
where I downloaded what you have is with some problems, if you want to download it to have a look ...Where did you download it from, as that place might have the database, I'll have a look around for you tho.
Sure, Send me the link.