Anyone know in which part of my server I modify, for the player to receive 10000000 cash and 1000000 gold when creating their account on the server?
sorry for english
Anyone know in which part of my server I modify, for the player to receive 10000000 cash and 1000000 gold when creating their account on the server?
sorry for english
Which source are you using and I shall take a look into it.
Is it publicly posted anywhere on RZ as I can't seem to find it?
here brother link: PB cross v37
I just need you to help me, please.
Mind telling me what is the default starting cash?
Is it: 10000000 - 10,000,000
I'm checking all over there doesn't seem to be anything about GP, GOLD, As well as it's not called cash it's classed as Money.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; }
Every area it would be in seems to only have the code belowCode: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")); }
Code:account.setMoney(rs.getInt("money"));
Last edited by Bradley; 09-01-18 at 10:13 PM.
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.PlayerDaoImpl.java
Last edited by Bradley; 09-01-18 at 10:21 PM.
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;PlayerDaoImpl.java
You change the value of 0 for both Startmoney and startgp to what you want, yes.
Where did you download it from, as that place might have the database, I'll have a look around for you tho.