|
This is a tutorial on how to setup my bmtmicro auto donation system.
A thank and rep++ is appreciated!
Download Post: http://www.rune-server.org/runescape...ml#post4845064
On to the tutorial!
What will i need?
A web host
Basic knowledge in java
Logic?
Once you've downloaded the files, you will need to setup a database and save the information in a notepad for future reference.
Open up phpmyadmin, and select the database which you've just created.
Find the import button on the page
Hit browse, and locate your SQL file
Scroll down then hit Go.
Once this is done, upload the website files to your web host.
Then you will need to go into ./bin/settings.php and configure it.
Now in order to add products to this system, you will need the url to the product, and a name for your product.
You will need to setup products on bmtmicro.
Go to bmtmicro and login. Once you've done that, follow these pictures.
Fill this form out
Then scroll to the bottom
IPN URL: http://website.com/path/to/files/bin/ipn.php
Example: http://runescape.com/donate/bin/ipn.php
Assuming my website is runescape.com and the files are uploaded in the ./donate folder.
Save the product.
Now we need the product url, and the product id.
Scroll down to find the url
The product id:
Now go back to settings.php and fill out the details in the file using the example
format:
[spoiler]array(
'pid' => "ID HERE",
'url' => "URL HERE",
'name' => "NAME HERE"
),[/spoiler]
That's it for the website side!
Server side is a bit more complicated as it may vary depending on the revision of your server
Basic Implementation:
Put the DonationManager.java class in your server files.
To access it, you will need to use this code:
new DonationManager(player).start();
To distribute the items server side, find the switch statement and follow the format:
[spoiler]/* Example:
* case <productId>:
* giveitems
* break;
*/
Example:
case 89901:
p.addItems(995, 200000000);
break;[/spoiler]
You will need to enter the database details in the DonationManager class as well. If your database is on a different host than your server is being hosted on, you will need to add your servers ip address to the remote sql of your website.
You might need to change:
The package
The client/player import
The username variable
The parameters for DonationManager
Example: public DonationManager(Client p)
The player variable
Credits for the tutorial:
Me
Wonder why theree's no replies,
Thanks alot Shaq
atleast raw envy can't sell it anymore now.
Hey, do you mind just posting a reply with some type of page that shows when the items are added and what they look like on the page.
Could we get a demo page? Thanks though.
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |