Mysidia Adoptables Support Forum  

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

Notices

Reply
 
Thread Tools Display Modes
  #11  
Old 06-29-2014, 10:26 AM
Missy Master's Avatar
Missy Master Missy Master is offline
Pet-Sim.Online
 
Join Date: Jan 2010
Posts: 475
Gender: Unknown/Other
Credits: 44,541
Missy Master is an unknown quantity at this point
Default

using 1.3.4 ! And it should, but yes using the latest :)

I will see if your levelup works okay on my live site ... and if it does that parts a go!
Reply With Quote
  #12  
Old 06-29-2014, 10:54 AM
Hwona's Avatar
Hwona Hwona is offline
Member
 
Join Date: Mar 2013
Posts: 620
Gender: Female
Credits: 48,182
Hwona is on a distinguished road
Default

^In that case, that MIGHT be the problem since this was made to work with v.1.3.3.
__________________
Reply With Quote
  #13  
Old 06-29-2014, 11:37 AM
Hwona's Avatar
Hwona Hwona is offline
Member
 
Join Date: Mar 2013
Posts: 620
Gender: Female
Credits: 48,182
Hwona is on a distinguished road
Default

^Nevermind! It was probably a mistake on my part- I caught a lot of miswording and issues. But, the first post works right? COuld you check your database for me?
__________________
Reply With Quote
  #14  
Old 06-29-2014, 11:51 AM
Hwona's Avatar
Hwona Hwona is offline
Member
 
Join Date: Mar 2013
Posts: 620
Gender: Female
Credits: 48,182
Hwona is on a distinguished road
Default

Great! I have the level up page ready for download. :3
__________________
Reply With Quote
  #15  
Old 06-29-2014, 12:12 PM
Missy Master's Avatar
Missy Master Missy Master is offline
Pet-Sim.Online
 
Join Date: Jan 2010
Posts: 475
Gender: Unknown/Other
Credits: 44,541
Missy Master is an unknown quantity at this point
Default

Okay altering adopt and breeding both in the first section cause the dreaded white! page ... I did everything very slowly and carefully and then backtracked. As soon as I inserted '$statname = rand(minimum value,maximum value);' I lost adopt and breeding both!

Even with the table inserted correctly something isn't jibing for the code changes for the first random stats stuff.
Reply With Quote
  #16  
Old 06-29-2014, 12:32 PM
Hwona's Avatar
Hwona Hwona is offline
Member
 
Join Date: Mar 2013
Posts: 620
Gender: Female
Credits: 48,182
Hwona is on a distinguished road
Default

^Does it work for shop? Let me try and work this with my own files...
__________________
Reply With Quote
  #17  
Old 06-29-2014, 12:44 PM
Hwona's Avatar
Hwona Hwona is offline
Member
 
Join Date: Mar 2013
Posts: 620
Gender: Female
Credits: 48,182
Hwona is on a distinguished road
Default

Umm, would you mind showing me your files... there may be another way to do this... anyways, how does the database look?
__________________
Reply With Quote
  #18  
Old 06-29-2014, 12:52 PM
Missy Master's Avatar
Missy Master Missy Master is offline
Pet-Sim.Online
 
Join Date: Jan 2010
Posts: 475
Gender: Unknown/Other
Credits: 44,541
Missy Master is an unknown quantity at this point
Default

here's my two files, if you can get this all worked out that will be wonderful ! :)

The Database is fine, it just has the added table --



15 statname int(4) No 0 Change Change Drop Drop
Attached Files
File Type: php adopt.php (2.6 KB, 3 views)
File Type: php breeding.php (3.1 KB, 1 views)
Reply With Quote
  #19  
Old 06-29-2014, 01:01 PM
Hwona's Avatar
Hwona Hwona is offline
Member
 
Join Date: Mar 2013
Posts: 620
Gender: Female
Credits: 48,182
Hwona is on a distinguished road
Default

^I don't know why, but your file popped up with no changes? Try this for adopt.php:
PHP Code:
<?php

use Resource\Native\Integer;
use 
Resource\Native\String;
use 
Resource\Native\Arrays;
use 
Resource\Native\Null;

class 
AdoptController extends AppController{

    public function 
__construct(){
        
parent::__construct("member");
        
$mysidia Registry::get("mysidia");
        if(
$mysidia->usergroup->getpermission("canadopt") != "yes"){
            throw new 
NoPermissionException("permission");
        }    
    }
    
    public function 
index(){
        
$mysidia Registry::get("mysidia");        
        if(
$mysidia->input->post("submit")){
            
$this->access "member";
            
$this->handleAccess();
            
$id $mysidia->input->post("id");
            if(
$mysidia->session->fetch("adopt") != or !$id) throw new InvalidIDException("global_id");            
            
            
$adopt = new Adoptable($id);                
            
$conditions $adopt->getConditions();
            if(!
$conditions->checkConditions()) throw new NoPermissionException("condition");
            
            
$name = (!$mysidia->input->post("name"))?$adopt->getType():$mysidia->input->post("name");
            
$alts $adopt->getAltStatus();
            
$code $adopt->getCode();
            
$gender $adopt->getGender();
            
$statname rand(0,100);
            
            
            
            
            
$mysidia->db->insert("owned_adoptables", array("aid" => NULL"type" => $adopt->getType(), "name" => $name"owner" => $mysidia->user->username"statname" => $statname"currentlevel" => 0"totalclicks" => 0"code" => $code
                                                           
"imageurl" => NULL"usealternates" => $alts"tradestatus" => 'notfortrade'"isfrozen" => 'no'"gender" => $gender"offsprings" => 0"lastbred" => 0));
                        
            
$aid $mysidia->db->select("owned_adoptables", array("aid"), "code='{$code}' and owner='{$mysidia->user->username}'")->fetchColumn();
            
$this->setField("aid", new Integer($aid));
            
$this->setField("name", new String($name));            
            
$this->setField("eggImage", new String($adopt->getEggImage()));
            return;
        }
        
        
$mysidia->session->assign("adopt"1TRUE);
        
$ids $mysidia->db->select("adoptables", array("id"), "shop='none'")->fetchAll(PDO::FETCH_COLUMN);
        
$total = ($ids)?count($ids):0;
        
        if(
$total == 0$adopts = new Null;
        else{        
            
$adopts = new Arrays($total);
            
$available 0;
            
            foreach(
$ids as $id){
                
$adopt = new Adoptable($id);
                
$conditions $adopt->getConditions();    
                  if(
$conditions->checkConditions()) $adopts[$available++] = $adopt;    
            }
            
            if(
$available == 0$adopts = new Null;
            else 
$adopts->setSize($available);            
        }        
        if(
$adopts instanceof Null) throw new InvalidActionException("adopt_none");
        
$this->setField("adopts"$adopts);
    }
}
?>
__________________
Reply With Quote
  #20  
Old 06-29-2014, 01:20 PM
Missy Master's Avatar
Missy Master Missy Master is offline
Pet-Sim.Online
 
Join Date: Jan 2010
Posts: 475
Gender: Unknown/Other
Credits: 44,541
Missy Master is an unknown quantity at this point
Default

I wanted to mention that the new levelup code is giving me a white page :(

the adopt code IS working, though!
Reply With Quote
Reply

Thread Tools
Display Modes

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
Trade System Kyttias Questions and Supports 4 05-29-2016 12:29 AM
Making v.1.3.3 Stat Mod Compatible with V.1.3.4 Hwona Questions and Supports 0 07-08-2014 01:37 PM
Stat Inheritance Mod * thanks to Wallie! * Missy Master Mys v1.3.x Mods 0 06-30-2014 02:23 PM
Anyone Want to Have a Stat System Hwona Feedback and Suggestions 12 06-30-2014 09:30 AM
Basic Stat System Hedgen Questions and Supports 3 03-10-2013 02:47 PM


All times are GMT -5. The time now is 02:58 AM.

Currently Active Users: 721 (0 members and 721 guests)
Threads: 4,080, Posts: 32,024, 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