So a little bit of digging into some files I've found a few things that could help you all ..
(itemshop free purchase)
(Mentor system)
Territory wars (Guild dominion)
Upgrading version notes
Custom database in shard
Billing API (send crystals to all-PHP parameters etc)
GM tool and logserve uses
visual studio 2010 (242572)
(itemshop free purchase)
ItemShop server now has options to adjust free purchase in Item Shop. Billing server now has not these options. In item shop it set up the following way: ,where HH:mm - hour and minute, when free purchase counter is reseted (03:00 by default). max-allowed - maximum free purchases per day (10 by default), it is reseted when server is restarted.
In order to make mentor system available you need to add /System/ContentKeys/Mentor.xdb content key. When it is on, server checks all active players level 6-30 and >=30 and total active players. if it equals to SocailRool number then activation time is stored and system is fired. Once it is turned on, it cannot be turned off
Territory wars (Guild dominion)
Territory Wars now can be switched on/off in shard.xml by setting twarMode to Disabled, Old and New value. Element twarNode can be found in shard.xml in gameMechanics section. This feature is turned off by default.
Upgrade Notes Before launch of any version be sure if system can open required amount of connections for all fronts. Console command "ulimit -n" should display 8192 or more. It is better to set more available connections right away. In order to do this, add the following line to /etc/security/limits.conf file: old records can be removed: Then restart the current session. After restart you can check applied setting by executing comman ulimit -n under user who start FrontEnds. Return value should be 65536. The LocalShardAstral role has been changed, now it should be the LocalShard role. Please pay your attention on this item if you are going to start the 3.0.0.0 branch on the standalone server. It is now possible to send operator currency to all billing accounts by Billing API. In order to enable this, check the following lines: Make sure that user of logserver on the both master and slave part have CREATEROLE privileges.
Also, if custom database setup is used in shard.xml (custom file ... ... ), it is needed to copy this file to server_bin/gametoolEAR/db folder. If nival.ships.wait parameter is set, then data is transmitted at custom intervals, otherwise strictly once per day. "nival.ships.wait" and "nival.ships.start" are incompatible parameters.
Billing API (send crystals to all-PHP parameters etc)
Interface BillingServerAPI Configuration In order to start billing server with Billing Server API, set the billingapi.port parameter (and billingapi.host if you wish) in configuration file (config/billingSrvLaunch.cfg by default). This parameters stand for which port (host) will be used for launching API. Billing Server API is a servlet which processes hessian requests. PHP classes of this API is located in billingApi.inc.php. Commands
There is a single interface (billingserver.billingserverapi.BillingServerAPI) using as API:
Host and port can be customized in the billing costomization file (localBillingServer.api[], localBillingServer.api[]). All methods return a result as derivative from Result. That is why it has the following fields: status (type ResultStatus) - result of operation: Ok / Error / other specific operation failure (see below) message - error message if status != Error and status != Ok. Is not used to display to user. CurrencyValue has 2 fields: ItemMallCurrency (currency) and value (amount of currency). PHP class Result has isOk() method which checks a status. Interface has the following methods: getAccount - returns account currency amount. If account is not found then a new account will created with 0 currency. Returns AccountInfoResult with the following fields: account - account name money - amount of main currency (MAIN currency). Keeps for compatibility, will be deleted soon. moneys - currency amount array. Array element has CurrencyValue type (see above). accountStatus - status of account (AccountStatus, Normal types or Locked if the account is locked). Parameters:
addMoney - Method deprecated. Use addMoneyWithTranType from 2nd version of api. Parameters:
example :
addMoneyWithTranType- Add the summ to the account, marks an transaction operation. Operator may use a value tranType form 0 to 3 (for exmple, 0 - for SMS payments, 2 - by credit card, etc.). The final transaction number gets by moving transactionId on 3 bits to the left and filling the lowest 3 bits by the value of tranType. It is not allowed to specify one transaction number twice. Parameters: accountName: String money: int tranType: int transactionId: long result: AddMoneyResult For example:
addMoneyToAll - adds money to all accounts. If money was added with the same transactionId, then accounts are not modified. Result AddMoneyResult takes status: Ok, Error, TransactionExists - money was already added with the same (tranType,transactionId).
There is a single interface (billingserver.billingserverapi.BillingServerAPI) using as API:
Code:
http://<host>:<port>/billingapi
Host and port can be customized in the billing costomization file (localBillingServer.api[], localBillingServer.api[]). All methods return a result as derivative from Result. That is why it has the following fields: status (type ResultStatus) - result of operation: Ok / Error / other specific operation failure (see below) message - error message if status != Error and status != Ok. Is not used to display to user. CurrencyValue has 2 fields: ItemMallCurrency (currency) and value (amount of currency). PHP class Result has isOk() method which checks a status. Interface has the following methods: getAccount - returns account currency amount. If account is not found then a new account will created with 0 currency. Returns AccountInfoResult with the following fields: account - account name money - amount of main currency (MAIN currency). Keeps for compatibility, will be deleted soon. moneys - currency amount array. Array element has CurrencyValue type (see above). accountStatus - status of account (AccountStatus, Normal types or Locked if the account is locked). Parameters:
Code:
accountName: String
result: AccountInfoResult
Code:
accountName: String
money: int
transactionId: long
result: AddMoneyResult
example :
Code:
$result = $proxy->getAccount('someAccount');
var_export($result);
echo "\nAdding money\n. \n\n";
addMoneyWithTranType- Add the summ to the account, marks an transaction operation. Operator may use a value tranType form 0 to 3 (for exmple, 0 - for SMS payments, 2 - by credit card, etc.). The final transaction number gets by moving transactionId on 3 bits to the left and filling the lowest 3 bits by the value of tranType. It is not allowed to specify one transaction number twice. Parameters: accountName: String money: int tranType: int transactionId: long result: AddMoneyResult For example:
Code:
$result = $proxy->addMoneyWithTranType('someAccount', 110, 1, 7);
var_export($result);
, you can use HAPPY() instead of MAIN() for premium crystals.
Code:
$result = $proxy->subMoneyWithCurrency('someAccount',
CurrencyValue::valueOf(ItemMallCurrency::MAIN(), 100));
var_export($result);
echo "\nRemoving money again\n===\n\n";
$result = $proxy->subMoneyWithCurrency('someAccount',
CurrencyValue::valueOf(ItemMallCurrency::MAIN(), 100));
if ($result->isOk()) {
echo "Ok!\n";
} else {
echo "Failure!!! " . $result->toString() . "\n";
}
echo "\nDEBUG\n";
var_export($result);
visual studio 2010 (242572)
Last edited:
- 5
- Show all