I am having some trouble with the alchemy mod.Well I've had the idea of working on an alchemy system since the initial Mys v1.3.0 release, but did not carry out for numerous reasons. Now I finally decided to give it a try and it took me only about 4-5 hours.
The idea of Alchemy is to mix two or more old items(called ingredients) to create a new item, which is normally rarer and more valuable(otherwise it does not justify the economics lol). The Alchemy Mod allows you to achieve just that, you can create some items that are rare or even impossible to obtain without performing alchemy. This will make your site considerably more interesting to a good number of your users, it also offers incentives for the act of item collection.
Below is a screenshot of the basic alchemy page, which allows you to choose two items to produce a new one. Note at this time being only two items can be used to produce a new item, there is no way to mix more than two:
This mod also comes with ACP integration, in which the admins can create alchemy practices that allow users to create new items from the old ones. Admins can also manipulate the settings for Alchemy System on their sites. The entire system can be turned on/off at will, while admins can specify whether alchemy success chance is 100% always or less. Other settings such as cost of action, recipe/license requirement for performing alchemy are also configurable.
To install the mod, simply run the installer script located at yoursite.com/install/alchemy.php. If your site is in a subdirectory, just change the example url accordingly. I assume you all know what I mean by this so I wont explain further.
If you have a brand new site or have never ever modified any part of the script, you may simply download the .rar file I provided and uploading them to your server through ftp. If the only changes you made are the mods I've offered lately(gender ratio and item drop), you may give a try just uploading the files as well as good chance my mods are compatible with each other.
However, for advanced users who have heavily modified sites, you will need to make some changes manually. I will post a brief description on how to do that in the next post.
At last, I hope you enjoy the new mod I've made for Mys v1.3.4, unlike the old ones like gender ratio which were simply revised to be compatible with the new version. You can edit the alchemy system to as you wish, maybe altering its user interface or adding more functionality(such as multiple item mix rather than just two), its all up to you.
Hall of Famer
$lang['alchemy_title'] = "Welcome to the Alchemy Service";
$lang['alchemy'] = "Here you can use the powerful alchemy system to merge two of your items to produce a new item, whether brand new or not.
Fill in the form below to start using this service we offer, you may find plenty of surprises!";
$lang['alchemy_choose'] = "To begin with, select the first ingredient item from the list: ";
$lang['alchemy_choose2'] = "Now select the second ingredient item from the list: ";
$lang['alchemy_disabled'] = "Unfortunately the admin has disabled the Alchemy System for this site, you may send him/her a message for more information.";
$lang['alchemy_success'] = "Congratulations!";
$lang['alchemy_newitem'] = "You have successfully produced a new item ";
$lang['alchemy_newitem2'] = " by using Alchemy, sweet isnt it? You may now manage it in your inventory, or continue to use the alchemy system.";
$lang['alchemy_invalid'] = "The specified item combination is invalid, it does not produce a new item...";
$lang['alchemy_empty'] = "You have not entered two valid items for doing alchemy.";
$lang['alchemy_insufficient'] = "You do not have the necessary items for producing a new item through alchemy.";
$lang['alchemy_chance'] = "The alchemy fails! How unfortunate, maybe you wanna try again with better effort?";
$lang['alchemy_cost'] = "Apparently you do not have enough money to afford the alchemy service, please come back later.";
$lang['alchemy_license'] = "You appear to lack the license required to perform alchemy, please make sure you have the license in your inventory first.";
$lang['alchemy_recipe'] = "It seems that you do not have the recipe to produce an item from the two selected items.";
$lang['alchemy_usergroup'] = "Unfortunately, the admin has specified that only certain users can perform alchemy, you may consult him/her by sending a message.";
$whereClause = "(item = {$mysidia->input->post("item")} and item2 = {$mysidia->input->post("item2")}) OR (item = {$mysidia->input->post("item2")} and item2 = {$mysidia->input->post("item")})";
$whereClause = "(item = {$mysidia->input->post("item")} and item2 = {$mysidia->input->post("item2")} and item3 = {$mysidia->input->post("item3")}) OR (item = {$mysidia->input->post("item")} and item3 = {$mysidia->input->post("item3")} and item2 = {$mysidia->input->post("item2")}) OR (item2 = {$mysidia->input->post("item2")} and item = {$mysidia->input->post("item")} and item3 = {$mysidia->input->post("item3")}) OR (item2 = {$mysidia->input->post("item2")} and item3 = {$mysidia->input->post("item3")} and item = {$mysidia->input->post("item")}) OR (item3 = {$mysidia->input->post("item3")} and item2 = {$mysidia->input->post("item2")} and item = {$mysidia->input->post("item")}) OR (item3 = {$mysidia->input->post("item3")} and item = {$mysidia->input->post("item")} and item2 = {$mysidia->input->post("item2")})";
$whereClause = "(item = {$this->item->id} and item2 = {$this->item2->id}) OR (item = {$this->item2->id} and item2 = {$this->item->id})";
$whereClause = "(item = {$this->item->id} and item2 = {$this->item2->id} and item3 = {$this->item3->id}) OR (item = {$this->item->id} and item3 = {$this->item3->id} and item2 = {$this->item2->id}) OR (item2 = {$this->item2->id} and item = {$this->item->id} and item3 = {$this->item3->id}) OR (item2 = {$this->item2->id} and item3 = {$this->item3->id} and item = {$this->item->id}) OR (item3 = {$this->item3->id} and item2 = {$this->item2->id} and item = {$this->item->id}) OR (item3 = {$this->item3->id} and item = {$this->item->id} and item2 = {$this->item2->id})";
[COLOR=#000000][COLOR=#DD0000]item = [/COLOR][COLOR=#007700]{[/COLOR][COLOR=#0000BB]$mysidia[/COLOR][COLOR=#007700]->[/COLOR][COLOR=#0000BB]input[/COLOR][COLOR=#007700]->[/COLOR][COLOR=#0000BB]post[/COLOR][COLOR=#007700]([/COLOR][COLOR=#DD0000]"item"[/COLOR][COLOR=#007700])}[/COLOR][COLOR=#DD0000] and item2 = [/COLOR][COLOR=#007700]{[/COLOR][COLOR=#0000BB]$mysidia[/COLOR][COLOR=#007700]->[/COLOR][COLOR=#0000BB]input[/COLOR][COLOR=#007700]->[/COLOR][COLOR=#0000BB]post[/COLOR][COLOR=#007700]([/COLOR][COLOR=#DD0000]"item2"[/COLOR][COLOR=#007700])}[/COLOR][COLOR=#DD0000] and item3 = [/COLOR][COLOR=#007700]{[/COLOR][COLOR=#0000BB]$mysidia[/COLOR][COLOR=#007700]->[/COLOR][COLOR=#0000BB]input[/COLOR][COLOR=#007700]->[/COLOR][COLOR=#0000BB]post[/COLOR][COLOR=#007700]([/COLOR][COLOR=#DD0000]"item3"[/COLOR][COLOR=#007700])}[/COLOR][/COLOR]
[COLOR=#000000][COLOR=#DD0000]item2 = [/COLOR][COLOR=#007700]{[/COLOR][COLOR=#0000BB]$mysidia[/COLOR][COLOR=#007700]->[/COLOR][COLOR=#0000BB]input[/COLOR][COLOR=#007700]->[/COLOR][COLOR=#0000BB]post[/COLOR][COLOR=#007700]([/COLOR][COLOR=#DD0000]"item2"[/COLOR][COLOR=#007700])}[/COLOR][COLOR=#DD0000] and item = [/COLOR][COLOR=#007700]{[/COLOR][COLOR=#0000BB]$mysidia[/COLOR][COLOR=#007700]->[/COLOR][COLOR=#0000BB]input[/COLOR][COLOR=#007700]->[/COLOR][COLOR=#0000BB]post[/COLOR][COLOR=#007700]([/COLOR][COLOR=#DD0000]"item"[/COLOR][COLOR=#007700])}[/COLOR][COLOR=#DD0000] and item3 = [/COLOR][COLOR=#007700]{[/COLOR][COLOR=#0000BB]$mysidia[/COLOR][COLOR=#007700]->[/COLOR][COLOR=#0000BB]input[/COLOR][COLOR=#007700]->[/COLOR][COLOR=#0000BB]post[/COLOR][COLOR=#007700]([/COLOR][COLOR=#DD0000]"item3"[/COLOR][COLOR=#007700])}[/COLOR][/COLOR]
$items = "([COLOR=#000000][COLOR=#007700]{[/COLOR][COLOR=#0000BB]$mysidia[/COLOR][COLOR=#007700]->[/COLOR][COLOR=#0000BB]input[/COLOR][COLOR=#007700]->[/COLOR][COLOR=#0000BB]post[/COLOR][COLOR=#007700]([/COLOR][COLOR=#DD0000]'item'[/COLOR][COLOR=#007700])}[/COLOR][/COLOR], [COLOR=#000000][COLOR=#007700]{[/COLOR][COLOR=#0000BB]$mysidia[/COLOR][COLOR=#007700]->[/COLOR][COLOR=#0000BB]input[/COLOR][COLOR=#007700]->[/COLOR][COLOR=#0000BB]post[/COLOR][COLOR=#007700]([/COLOR][COLOR=#DD0000]'item2'[/COLOR][COLOR=#007700])}[/COLOR][/COLOR])";
[COLOR=#000000][COLOR=#0000BB]$whereClause [/COLOR][COLOR=#007700]= [/COLOR][COLOR=#DD0000]"(item IN {$items}[/COLOR][COLOR=#DD0000] and item2 IN [/COLOR][COLOR=#DD0000]$items)[/COLOR][COLOR=#DD0000]"[/COLOR][COLOR=#007700]; [/COLOR][/COLOR]