![]() |
Itemdrop Mod for Mys v1.3.4
1 Attachment(s)
Another Mod I decided to revise for Mys v1.3.4 is this Itemdrop Mod, which should be perfectly compatible with the new version. With this plugin, users have a chance to get a specific item by clicking on a certain species of adoptable. It may help with users exchange clicks, but do not abuse this feature so users get way too many important items.
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. Assuming you have a fresh installation of Mys v1.3.4, you can simply download the .rar files I upload myself, then go to /install/genderratio.php to execute the file to install the Mod. If your site is heavily customized, you'd have to install manually, which should not be difficult anyway. The manual installation steps are explained as below: To begin with, insert two columns in table prefix.adoptables: PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
|
This is beautiful! I love it! Question, though- do they need to be the pre-set usable items, or can they be collectibles (no function, just pretty)? If the former, is there an easy way to modify this? Thanks in advance for your time.
|
Well of course you need to create these items in ACP first, but they can be something like key items or valuable items that do not serve any purpose other than collectibles.
|
Thank you! I shall try it out and let you know if anything goes wrong how it goes! XD
Edit: What are those table prefixes you mention? Quote:
Quote:
|
table prefix is the prefix applied to your table, lol I know I am not good at explaining this thing. One example is adopt_, which is the default table prefix is you do not specify any.
|
Where would I find it? In the file manager? Or...phpMyAdmin? If I go to that, it won't let me add simple text. This is what it looks like: http://i44.tinypic.com/123kxi1.png
I added what options the menu gives me to the side. I have absolutely no idea how to add columns with this system. It's very unfriendly. |
Did you notice that all your database tables start with the same sequence of characters? From the look of your database, the prefix is adopts_
|
I'm getting an error:
Fatal error: Call to a member function getValue() on a non-object in /home/lucasa33/public_html/ranch/view/levelupview.php on line 24 This is my code: Code:
p Code:
$dropstatus = $this->getField("dropstatus")->getValue(); Code:
$newClicks = $this->adopt->getTotalClicks() + 1; |
Maybe the first setField in levelup.php is supposed to be dropstatus and not reward?
$this->setField("reward"(here), ($dropstatus)?$dropstatus:new Integer(0)); $reward = $mysidia->user->clickreward($this->settings->reward); $mysidia->user->changecash($reward); $this->setField("adopt", $this->adopt); $this->setField("reward", new Integer($reward)); |
Quote:
http://i.imgur.com/8grEFWu.png I get this in the ACP: http://i.imgur.com/jx9dDbH.png |
Quote:
|
Still can't seem to get it working. :mii:
|
umm are you using Mys v1.3.4? And have you modified your script heavily before installing this mod? If it turns out to be a glitch in the mod I will make sure to take good care of it.
|
So now after a fresh project site, and installation of Alchemy and Item Drops, the adoptable creation screen forms appear twice. I'm trying to locate why it is doing this but no luck so far.
http://i.imgur.com/dBG8Kde.png |
Whats the contents of your /admincp/view/adoptview.php? You might have a duplicate document->add(adoptform)
|
Quote:
|
But I did a automatic install, not a manual.
Secondly, feeding an adopt with the script makes a blank page, much like when I did it manually before. |
I see, alright I will look into it and see where the bug may be. The mod does work well with Mys v1.3.3, I thought there would be a simple way to port it to Mys v1.3.4 but maybe I underestimated the difficulty. Thanks for reporting it, btw.
|
So, I'm pretty sure I followed the guide correctly with the manual install. It seems to work just fine until you go to your inventory. The items just don't appear. Thank you for your help.
|
It's weird we are getting different results.. I still get the blank page.. Can you please open phpmyadmin and tell me if the items exist there?
|
Okay, went to adopts_inventory and it only said my cherries were there. In adopts_items, it has all 3 items listed. These are the values:
Full texts id category itemname description imageurl function target value shop price chance cap tradable consumable 2 valuable Raw Sapphire A beautiful blue stone. URL Valuable all 0 Toris Trinkets 100 100 99 yes NULL 3 valuable Ring A ring. URL Valuable all 0 Toris Trinkets 10 100 99 yes NULL 4 click Cherry A delicious cherry. Gives 25 clicks to your adopta... URL Click1 all 25 Toris Trinkets 25 100 99 yes yes |
Yeah, that is strange. Maybe HoF can help you out further
|
So you are saying that the items are in your inventory when you go to phpmyadmin database but just somehow aint showing up on the site? Or did I misunderstand? I think posting the entries in your adopts_inventory table will be more helpful than adopts_items.
|
They never get added to the inventory, it seems.
iid category itemname owner quantity status 3 click Cherry ToriandLori 97 Available In fact, I just tried to click 2 adoptables, and it said I shoulda gotten them, but I didn't. |
Whatever happened with this? Is it working for most people? I am launching four Pet sites on the 4th, and would love to include this but I don't want to mess up what I have ...
it looks like a lot of fun to use!! Is this working ok now ? |
It seems that some people are having trouble with it, as the items aint added to their inventory. I dunno why it happens though, but I can give a try troubleshooting it for the next 2-4 days.
|
Thank you for working on it. If you need access to my files to do it, just ask!
|
Great!! Thanks HOF :)
|
Quote:
|
I've fixed Squiggler's problem, it seems that there is a minor error I made for manual installation. This line:
PHP Code:
PHP Code:
PHP Code:
|
Thank you so much! This really helps me out! I just tried it and if gave me 3 Rings (total)!
|
Did the Install ( not manual ) and now it white pages when I go to levelup ...
it never created the tables so I did that on my own. |
Hi! I thought I had gone through the manual install correctly, but I seem to be having an issue. I created an adoptable who will drop some items, so I went to test it out and when I click to level up the adoptable, I get this error.
Quote:
Quote:
|
Quote:
|
Line 25 is just:
Quote:
Quote:
|
Is there a way to add some code to make you able to change the items dropped by pets without having to remake the entire pet/levels in the edit pet area?
also a way to make it so clicking on pets from before this mod dont get errors? Everytime I click on a pet I created before adding itemdrop I get this- on a blank page. Fatal error: Call to a member function getValue() on null in /home/atrocity/public_html/view/levelupview.php on line 12 |
There is a glitch in the .rar file I uploaded in the first post, in the file levelup.php. It results in a fatal error when you click an adoptable that you havent clicked before, showing that a value is null when it cannot be null.
I've reuploaded a new version of the .rar file, it should fix the problem. Note this only affects users who choose automatic installation(directly download the .rar file to replace their original files fully). If you follow the guideline for manual installation(copy/paste code from first post), you should be unaffected by this glitch. |
Works perfectly! Thank you for directing me to the correct thread.
|
You are very welcome, all mods made by myself are ported into each different versions for Mys v1.3.x. So if you see a mod for Mys v1.3.3 made by Hall of Famer, you can be sure a similar version for Mys v1.3.4 exists.
|
For someone rather foreign to coding, can someone please explain how to install this mod? I have the latest script, do I need to go into phpMyAdmin? Can someone explain what to do from there?
|
All times are GMT -5. The time now is 08:10 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.