![]() |
Itemdrop Mod for Mys v1.3.2
1 Attachment(s)
Well I've decided to take a break from working on Mys v1.3.3's GUI system, and instead I ended up with this plugin. It is called Itemdrop, which allows your user to gain random items by clicking on pets. This way it motivates them to exchange clicks more than simply leveling up. This feature is only available for members, guests wont get items however they try.
You can assign either one or multiple items to an adoptables species, which will drop items based on their item drop-rate. For instance, if an adoptable has drop-rate of 30, your user will have 30% chance to get an item by clicking on this pet. If you assign two or three items to this species, each of them will have 15% or 10% chance to come out. Unfortunately there's no way to 'discriminate' among items for a given adoptable, a probability system is way too complicated for me to work with at this point. So if you have just completed a fresh installation of Mys v1.3.2, you may just download the compressed .rar file in this thread. Upload the files to their corresponding directories. Run the install_itemdrop.php script once and ONLY ONCE, and you are good to go. If you have modified your levelup.php and admincp/adopt.php, however, you will have to install this Mod manually. Its quite simple though, I will show you how to do this step by step: Step 1: Go to PHPMyadmin, in table prefix.adoptables, add the two following columns after cost: PHP Code:
Open admincp/adopt.php, find this section of code: PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
Hall of Famer |
This is completely what I have been looking for!
Thanks! :) |
Wow you were quick, I hadnt even finished uploading the files and you already posted a reply lol. Good luck using this Mod though, dont overdo it or you may end up killing the fun for your members.
|
Yea, when I saw you making this, I was like:
"omahgawd it's something i've always wanted on my site". I haven't even configured it yet. :ohnoes: |
Oh great, glad it actually could be of some help for certain people. I actually tried it on a beta site with fresh installation, it worked as nice as a charm. Not sure with Mys v1.3.1 upgraded site though, hopefully it will run smoothly.
|
I'm currently getting this error:
Fatal error: Uncaught exception 'Exception' with message 'Database error 1054 - Unknown column 'droprate' in 'field list'' in /home/mineedit/public_html/game/classes/class_database.php:161 Stack trace: #0 /home/mineedit/public_html/game/classes/class_database.php(81): Database->_query('adoptables', Array, 'select', 'type = 'Meowly'') #1 /home/mineedit/public_html/game/levelup.php(72): Database->select('adoptables', Array, 'type = 'Meowly'') #2 {main} thrown in /home/mineedit/public_html/game/classes/class_database.php on line 161 |
You need to add the column droprate to the table prefix.adoptables, it is the very last column after cost and dropitem.
|
How do I do that :C
|
Did you run the install_itemdrop.php script? If not, you may give a try. If that doesnt work, go to phpmyadmin and table prefix.adoptables. You can add new columns there.
|
I ran the script the first time, guess it didn't add it.
Well, I added it manually, and it works. Thank you.:veeee: |
great script. Thank you :)
is it possible, to show the image of the item ? I will give a rare item, which is not buyable, and it would be nice, if they see, what they get :) |
umm you mean the image of the item when the user receives it? Sure its doable and should be relatively simple to accomplish. If you have installed the script, find this line in levelup.php:
PHP Code:
PHP Code:
|
http://mitglied.multimania.de/draugie/smilies/yess.gif
ok, knowing how to embed this, it's easy. thanks, that's what I wish to have. |
Oh great, glad it helps out one more person. Good luck using it, but again do not overdo it or you can kill the fun with a high droprate of rare items.
|
What do I type in the drop rate in PHPMYADMIN if I want to give previous monsters the ability?
|
Well I think you can give a droprate to your adoptables in ACP by editing them? If you dont know how to do that, you sure can accomplish the same thing in PHPmyadmin. The droprate should be somewhere between 0 to 100.
|
Would it be possible to make a mod where users can randomly find items while exploring the pages of the site..? Of course, not on every page...but maybe every 10 minutes or so..? Or just at random..?
Of course this mod is very helpful...but not quiiiiiiitttteeeeee.... |
Well this is gonna be quite difficult, will require a complete redesign of the page system. Of course by Mys v1.4.x you can expect a much more advanced reward system, in which you can specify rewards for users clicking pets, visiting pages, purchasing certain goods, and maybe more. Not sure when I will be doing this though, it may be a feature for Mys v1.4.0, v1.4.1 or later.
|
Ah, I see. Sounds good :) Haha, I need to set aside some time some day to learn PHP (and by some time I mean years)!
|
Thanks, I'm telling you that learning PHP can be a fun experience, its easy to get started but to become a true expert it takes a huge amount of time.
|
Ehm, okay, so I installed the files...but when trying to access any of the edited pages this is what I get:
Quote:
|
umm this is weird, you should get an internal server error no matter how the script goes wrong. Are you sure this only happened after you installed the Mod?
|
Yep, and only on the pages that the mod altered. I'm going to revert the files back to the originals just to see if that clears the problem up...maybe I'll have to try a manual install...
|
I see, so does it clear the problem if you revert the script file back to the original? If not, there's probably something wrong with the CMD of the file you download.
|
I reverted the files back to the originals and it all is now working perfectly, so my guess is that there's something wrong with the files you have available for download.
|
Okay, Hofster, I'm getting an error when trying to add the column Code:
droprate EDIT: Okay, so I got it to work but I had to add each column individually. EDIT: Whoo! Went through and did it all manually and now it appears to be working! I'll be testing it out soon :) |
Quick question: how do you edit the drop rate through the ACP?
|
Looks like theres no way to edit the droprate in ACP once it is set, you need to use PHPmyadmin. The ACP for adoptables and adoptable levels aint good enough atm, it will be changed in future.
|
reading through I'm not certain if this mod is working alright or not? I really want to try this out, looks fantastic! :) I have the latest version of Mysid installed!
|
It works perfectly if you add it in manually, but for some reason just adding the files didn't work...so just do it manually and yep, it'll work! It is a lovely mod and it's very easy to customize it! I customized it to show a box under the adoptable saying "What's This?" and showing the image of the item and the text "It looks like you found a ITEMNAME!" which is pretty cool :)
|
All times are GMT -5. The time now is 05:21 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.