Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Addons and Modifications > Mys v1.2.x Mods

Notices

Reply
 
Thread Tools Display Modes
  #11  
Old 04-21-2011, 06:15 PM
Irion's Avatar
Irion Irion is offline
>D:
 
Join Date: Apr 2011
Location: England
Posts: 12
Gender: Male
Credits: 2,112
Irion is on a distinguished road
Default

Okay, so I tried this out since it was exactly what I was looking for.

First of all, I get "templates/icons/delete.gif" as the adopt image on level up and on myadopts.php?act=manage/stats but they show up on myadopts.php
I'm guessing this is due to the modification in the getcurrentimage function. I'll be having a look over it to learn how it's done.

I've had a go at adding an adoptable and read the instructions|FAQ but it's a little confusing and doesn't seem to be working, so I'm humbly asking for some clarification.
Here's what I done and perhaps you can tell me where I'm going wrong:

1. I created a new adoptable through admin.php, enabled the alternate images and filled in [Start using the alternate outcome at level number:] as 0 while the alternate outcome chance I put as 2. Though these number don't really matter and are just satisfying checks, right?

2. I added another level to the adopt I just made (Which was an egg by the way) through admin.php. This was level 1 and I added (one of) the alt image(s) for this level while I was at it; I also input 1 as the required number of clicks- for the sake of testing.

3. Next, it was my understanding that I then go to maiadmin.php and select "Add Alternate Image". I filled out the form as follows:

- Uploaded Image: I selected the same alt image as I used in the creation of level 1.
- Select Adopt: Selected the adopt I'd made, of course (I only have one in the database).
- Entry Level: This was a tad confusing despite your best efforts at explaining. My understanding at first was that it was supposed to be an integer that relates to the level (or stage) that the non-alt is at if it's the first in the alt line. So I input 1 as my value (I then tried again later with "yes" and got no different results)
- Replace Level: I thought this was self explanatory and was asking which level this alt will relate to in the level table. So I input 1.
- Path: I believe I understand this... I input 2 because it would be the 2nd path that that can start at.
- Subpath: I left this blank for the time being
- Select Adopt: Well I believe this was supposed to be called "Method" - and I chose "Random Method" from the drop down.
- Data: I input 2 to represent a 1 in 2 chance.

I then adopted 20 of my adoptable and proceeded to level them into the next stage. None of them returned as the alt.
I then created another alt image with maiadmin.php and used my 3rd alt (I want the egg to hatch into 3 different things- with one of them being significantly rarer). I input 3 for Path while keeping all the other variables the same.
I adopted another 20 and proceeded to level them but I still got the standard one.

Am I misunderstanding something? I also tried selecting as the alt image nothing when creating level 1 in admin.php

Last note: The "return" link on maiadmin.php?do=addnew takes you to www.$domain/'maiadmin.php/'
Reply With Quote
  #12  
Old 04-29-2011, 04:44 PM
Beaux Beaux is offline
Member
 
Join Date: Apr 2011
Posts: 13
Gender: Female
Credits: 2,308
Beaux is on a distinguished road
Default

I'm having the same issue with everything turning out standard, but I also get this error:

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /inc/functions.php on line 460

when I adopt or level a creature.

Not sure what to make of it since I'm still a newb to PHP. I've looked at both the original and modified codes and they're the same aside from the rows underneath...

Great script, though. I'll be in heaven once I can get it to work. :D
Reply With Quote
  #13  
Old 04-30-2011, 02:07 AM
Kaeliah's Avatar
Kaeliah Kaeliah is offline
Premium Member
 
Join Date: Sep 2010
Location: Pennsylvania, United States
Posts: 485
Gender: Female
Credits: 38,640
Kaeliah will become famous soon enough
Send a message via AIM to Kaeliah Send a message via MSN to Kaeliah
Default

Quote:
Originally Posted by Irion View Post
Okay, so I tried this out since it was exactly what I was looking for.

First of all, I get "templates/icons/delete.gif" as the adopt image on level up and on myadopts.php?act=manage/stats but they show up on myadopts.php
I'm guessing this is due to the modification in the getcurrentimage function. I'll be having a look over it to learn how it's done.

I've had a go at adding an adoptable and read the instructions|FAQ but it's a little confusing and doesn't seem to be working, so I'm humbly asking for some clarification.
Here's what I done and perhaps you can tell me where I'm going wrong:

1. I created a new adoptable through admin.php, enabled the alternate images and filled in [Start using the alternate outcome at level number:] as 0 while the alternate outcome chance I put as 2. Though these number don't really matter and are just satisfying checks, right?

2. I added another level to the adopt I just made (Which was an egg by the way) through admin.php. This was level 1 and I added (one of) the alt image(s) for this level while I was at it; I also input 1 as the required number of clicks- for the sake of testing.

3. Next, it was my understanding that I then go to maiadmin.php and select "Add Alternate Image". I filled out the form as follows:

- Uploaded Image: I selected the same alt image as I used in the creation of level 1.
- Select Adopt: Selected the adopt I'd made, of course (I only have one in the database).
- Entry Level: This was a tad confusing despite your best efforts at explaining. My understanding at first was that it was supposed to be an integer that relates to the level (or stage) that the non-alt is at if it's the first in the alt line. So I input 1 as my value (I then tried again later with "yes" and got no different results)
- Replace Level: I thought this was self explanatory and was asking which level this alt will relate to in the level table. So I input 1.
- Path: I believe I understand this... I input 2 because it would be the 2nd path that that can start at.
- Subpath: I left this blank for the time being
- Select Adopt: Well I believe this was supposed to be called "Method" - and I chose "Random Method" from the drop down.
- Data: I input 2 to represent a 1 in 2 chance.

I then adopted 20 of my adoptable and proceeded to level them into the next stage. None of them returned as the alt.
I then created another alt image with maiadmin.php and used my 3rd alt (I want the egg to hatch into 3 different things- with one of them being significantly rarer). I input 3 for Path while keeping all the other variables the same.
I adopted another 20 and proceeded to level them but I still got the standard one.

Am I misunderstanding something? I also tried selecting as the alt image nothing when creating level 1 in admin.php

Last note: The "return" link on maiadmin.php?do=addnew takes you to www.$domain/'maiadmin.php/'
Nothing that you've explained seems to be an issue, but if you could please check out your database, and even take screenshots of the tables related to the adoptables and the alternates to see if there is any information missing or weird there. That's where I usually tend to start when attempting a troubleshoot.

Quote:
Originally Posted by Beaux View Post
I'm having the same issue with everything turning out standard, but I also get this error:

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /inc/functions.php on line 460

when I adopt or level a creature.

Not sure what to make of it since I'm still a newb to PHP. I've looked at both the original and modified codes and they're the same aside from the rows underneath...

Great script, though. I'll be in heaven once I can get it to work. :D
Would you mind posting lines 400-500 in your functions.php or just the whole thing. The problem may also be the lack of compatibility with the mysql_num_rows thing.

It's a big script which is why there are so many bugs and glitches in it. I will be working on an updated version soon that will simplify things quite a bit and also hopefully work more reliably.
__________________
[My Shop] ♥ [My Blog] ♥ [Subscribe] ♥ [My Mods] ♥ [Mod TOS]
Reply With Quote
  #14  
Old 04-30-2011, 02:27 PM
Beaux Beaux is offline
Member
 
Join Date: Apr 2011
Posts: 13
Gender: Female
Credits: 2,308
Beaux is on a distinguished road
Default

PHP Code:
// Now we check those three conditions we have in the Admin CP
    
if($row['whenisavail'] == "conditions") {
        
// If we have a restriction on the number of times this can be adopted...
        
if($row['freqcond'] == "enabled") {
            
// Select from the database and determine how many times this adoptable type has been adopted
            
$num 0;

            
$query "SELECT * FROM ".$GLOBALS['prefix']."owned_adoptables WHERE type='$type'"// QUERYPROBLEM
            
$result runquery($query);
            
$num mysql_numrows($result);

            if(
$num $number) {
                return 
"no";
            }
        }

        
// Begin the date restriction check
        
$today date('Y-m-d');

        if(
$row['datecond'] == "enabled" and $row['date'] != $today) {
            return 
"no";
        }

        
// We are checking to see how many of this adoptable a user owns
        // If they own more than the specifed number, they cannot adopt...
        
if($row['moreless'] == "enabled") {
            
$num 0;

            
$query "SELECT * FROM ".$GLOBALS['prefix']."owned_adoptables WHERE owner='$loggedinname' and type='$type'";
            
$result runquery($query);
            
$num mysql_numrows($result);

            if(
$num $row['morelessnum']) {
                return 
"no";
            }
        }


        
// Check if the user is of a specified usergroup...
        
if($row['levelgrle'] == "enabled") {
            
$ourgid getgroup();

            
// If the two numbers do not match, do not allow the adoption...
            
if($ourgid != $row['grlelevel']) {
                return 
"no";
            }    
        }
    } 
// end conditions
    
return "yes";
}

// MESSY
function getaltstatus($parentid$childid$childlevel) {

    
// This function determines if we will use alternate images...
    
$alt "Cannot find adopt with given parent id.";

    
// First we need to see if this adoptable type has alternate images enabled...
    
$query "SELECT * FROM ".$prefix."adoptables WHERE id='".$parentid."'";
    
$result mysql_query($query);
    
$num mysql_num_rows($result);
    
$alternates=@mysql_result($result$i,"alternates");
    
    
// Let's see if the level we are on is the level that requires alternates
    
if($alternates == "enabled") {
        
// Alternates for adoptable type are enabled, next check to see if this adopt is already using an alternate.
        
$query "SELECT * FROM ".$prefix."owned_adoptables WHERE aid='".$childid."'";
        
$result mysql_query($query);
        
$num mysql_num_rows($result);
        
$usealt=@mysql_result($result$i,"usealternates");
        
$currentimage=@mysql_result($result$i,"altimage");
        if(
$usealt == "no"){
        
// Alternates are not currently being used, next check for alternate image w/ specified entry level.
        
$query "SELECT * FROM ".$prefix."alternates WHERE entry='".$childlevel."' AND adoptid='".$parentid."'";
        
$result runquery($query);
        
        while(
$row mysql_fetch_array($result)){
        
$method=$row['method'];
        
$data=$row['data'];
        
$newurl=$row['alturl'];
        
// check what kind of method we're using to choose an alternate.
        
if($method == "random"){
        
$chance rand(1$data);
        if(
$chance == 1){
            
$alt $newurl;
        }
        else{
            
$alt "The random finder did not pick 1.";
        }
        
        }
        else{
            
$alt "Not finding method random...";
        }
        
        
$i++;
        }
        
        
        }
        else if(
$usealt == "yes"){ 
Lines 400-500.
I'll bet anything I pasted it in wrong.

Last edited by Kaeliah; 04-30-2011 at 08:04 PM.
Reply With Quote
  #15  
Old 04-30-2011, 08:07 PM
Kaeliah's Avatar
Kaeliah Kaeliah is offline
Premium Member
 
Join Date: Sep 2010
Location: Pennsylvania, United States
Posts: 485
Gender: Female
Credits: 38,640
Kaeliah will become famous soon enough
Send a message via AIM to Kaeliah Send a message via MSN to Kaeliah
Default

I don't see why it wouldn't be working unless the query is failing for some reason. =/
__________________
[My Shop] ♥ [My Blog] ♥ [Subscribe] ♥ [My Mods] ♥ [Mod TOS]
Reply With Quote
  #16  
Old 05-01-2011, 06:42 AM
Beaux Beaux is offline
Member
 
Join Date: Apr 2011
Posts: 13
Gender: Female
Credits: 2,308
Beaux is on a distinguished road
Default

I keep trying multiple things but nothing's worked yet. Maybe I'll get it eventually.
Reply With Quote
  #17  
Old 05-01-2011, 11:20 AM
Nemesis's Avatar
Nemesis Nemesis is offline
Member
 
Join Date: Mar 2011
Location: Ohio, United States
Posts: 641
Gender: Male
Credits: 57,493
Nemesis is on a distinguished road
Default

haha how i used to do things, just ram the code in there lol, great way to learn. just try and understand what its doing and look up things you don't know. good luck with your site, and i can't remember if you were like some of us trying to learn php through this project or just want your site working
Reply With Quote
  #18  
Old 05-01-2011, 11:57 AM
Beaux Beaux is offline
Member
 
Join Date: Apr 2011
Posts: 13
Gender: Female
Credits: 2,308
Beaux is on a distinguished road
Default

Quote:
Originally Posted by Nemesis View Post
haha how i used to do things, just ram the code in there lol, great way to learn. just try and understand what its doing and look up things you don't know. good luck with your site, and i can't remember if you were like some of us trying to learn php through this project or just want your site working
That's how I learn. c: I just stick in the code I want and compare it to the original if something goes wrong to see where it's different.

I taught myself CSS and HTML by doing that exactly, haha.

And I'm new to the forum so you probably haven't heard anything of me, but I do hope to learn a lot from it. I'm a pretty self-sufficient person and like doing absolutely everything on my own. I try to avoid asking for help unless I really really need to.

But I still can't fix this error... I've even tried deleting everything and reuploading the site with the scripts already modded. Same error.

I also noticed the original script has mysql_numrows and the modded version has mysql_num_rows, but changing the latter to the former still did nothing.

I'm honestly stumped. Watch it turn out to be some huge problem caused just because I misplaced one thing on accident. (It happens often)

Is nobody else getting the error I'm getting?
Reply With Quote
  #19  
Old 05-01-2011, 02:51 PM
Kaeliah's Avatar
Kaeliah Kaeliah is offline
Premium Member
 
Join Date: Sep 2010
Location: Pennsylvania, United States
Posts: 485
Gender: Female
Credits: 38,640
Kaeliah will become famous soon enough
Send a message via AIM to Kaeliah Send a message via MSN to Kaeliah
Default

What version of the script are you using?
__________________
[My Shop] ♥ [My Blog] ♥ [Subscribe] ♥ [My Mods] ♥ [Mod TOS]
Reply With Quote
  #20  
Old 05-01-2011, 03:10 PM
Beaux Beaux is offline
Member
 
Join Date: Apr 2011
Posts: 13
Gender: Female
Credits: 2,308
Beaux is on a distinguished road
Default

The newest one. I think I might re-download it and try from a fresh download, though.

I've been looking for anything that might be wrong but so far I've seen nothing that looks out of place.

I've even looked the error up on Google but none of others' solutions have been able to fix it.

Definitely gonna keep trying until I figure it out, though. This script is worth it.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
alternate outcomes Nemesis Questions and Supports 3 07-03-2012 02:36 PM
EpicStats Plugin [by Kae] Kaeliah Mys v1.2.x Mods 9 04-10-2011 08:46 PM
View Active Promocodes Plugin HIddenPanda Mys v1.1.x Mods 11 01-25-2011 06:10 PM
Alternate adopt RipJawWolfFang Questions and Supports 10 02-03-2010 10:41 PM
Multiple multiple outcomes..? Quillink Suggestions and Feature Requests 5 05-31-2009 08:14 AM


All times are GMT -5. The time now is 01:25 AM.

Currently Active Users: 1137 (0 members and 1137 guests)
Threads: 4,081, Posts: 32,032, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636