Copyright (C) Ho Man Chung

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.

RunUO Donation Store System

Author: Antony Ho
Copyright (C) Ho Man Chung
E-mail: [email protected]
Website: http://antonyho.net/

Changelog:
(18/03/2010)
- support parameters for class

Instructions:
This system is working and is tested over RunUO 2.0. You have to configure the scripts in order to make it work on your shard and website.

Create your PayPal account:
This system relays on PayPal payment system which can receive donation payment. PayPal accepts many different credit or debit cards for the payment. Of course, it accepts VISA, Master, and AE cards. If you do not have PayPal account, create it for free immediately to receive your donation. >>>Link to PayPal account registration<<<

Create MySQL database:
Create a MySQL database. Execute the schema.sql. If you do not want to add those donation gifts in the sample, remove the INSERT statements on the last step.

RunUO script:
Inside DonationStore.cs:
Edit DatabaseServer, DatabaseName, DatabaseUserID, DatabasePassword as your MySQL database connection information. Remember to grant [SELECT], [INSERT], [DELETE] rights to your user.
Caution: If you don't have ODBC driver installed on your RunUO host server, please follow the solution in FAQ Q1 to install it.

Web PHP script:
Edit everything except the PayPal URL in config.php according to your system environment.

adminpage.php is the web back-office page. You can add/remove gift, check received PayPal transactions, getting auto-generated PayPal donation buttons.

Usage:
The Class name is what you exactly type on RunUO command. For instance, "[add EtherealHorse". The "EtherealHorse" is the class name. Do not type it wrong or your player will fail to get the item.
Your can use "BankCheck 1000000" as class name using spaces to seperate the parameters for the class constructor. Player will get a 1,000,000gp bank cheque in the example. Becareful on using the parameter, you must check the constructor of your class to assure its have constructor to accept your parameters.

OK! The set up should have done. Time to have beer. Cheers to all shard operators!
If you have got some problem on setting up the system, try send me an email. I will try my best to answer you, if I have time left after my baby daughter. Look aftering a baby is not easy, once again consider making donation to my script. ;)

FAQ

Q1: I have below error code when I use Donation Store Stone:
System.Data.Odbc.OdbcException: ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified at System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, RetCode retcode)

A: Your server does not have MySQL ODBC driver installed. Please download it from MySQL official site. And change the DonationStore.cs file as below:
DatabaseDriver = "{MySQL ODBC 5.1 Driver}",
You may change the driver version according to your ODBC driver version.