Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Tutorials and Tips

Notices

Reply
 
Thread Tools Display Modes
  #31  
Old 11-30-2016, 04:42 AM
Corsair's Avatar
Corsair Corsair is offline
Member
 
Join Date: Jan 2012
Posts: 128
Gender: Female
Credits: 11,227
Corsair is on a distinguished road
Default

I keep getting this error when I try to make a explore page. The main explore page works but not any of the others. I then had to just move the items and pets to the main page because it would not work.

Quote:
Fatal error: Class 'AppController' not found in /home/monstari/public_html/explorearea1view.php on line 3
Reply With Quote
  #32  
Old 11-30-2016, 09:26 AM
Dinocanid's Avatar
Dinocanid Dinocanid is offline
Member
 
Join Date: Aug 2016
Location: Maryland, USA
Posts: 516
Gender: Unknown/Other
Credits: 63,624
Dinocanid is on a distinguished road
Default

What does your code look like on line 3?
__________________
Reply With Quote
  #33  
Old 01-26-2017, 08:05 PM
SilverDragonTears's Avatar
SilverDragonTears SilverDragonTears is offline
I am your Nemesis.
 
Join Date: Jun 2011
Posts: 1,113
Gender: Female
Credits: 81,210
SilverDragonTears is on a distinguished road
Default

Error
PHP Code:
 Fatal error: Class 'View' not found in /home/silvatal/public_html/view/explorearea1view.php on line 3 
__________________

Check out SilvaTales
Reply With Quote
  #34  
Old 01-26-2017, 08:11 PM
Dinocanid's Avatar
Dinocanid Dinocanid is offline
Member
 
Join Date: Aug 2016
Location: Maryland, USA
Posts: 516
Gender: Unknown/Other
Credits: 63,624
Dinocanid is on a distinguished road
Default

In your URL bar, do you go to explorearea1view.php? If so, get rid of the .php at the end since I get the same error when I do that. So instead of YOURSITE.com/explorearea1.php, it should be YOURSITE.com/explorearea1.
__________________
Reply With Quote
  #35  
Old 01-27-2017, 11:35 AM
SilverDragonTears's Avatar
SilverDragonTears SilverDragonTears is offline
I am your Nemesis.
 
Join Date: Jun 2011
Posts: 1,113
Gender: Female
Credits: 81,210
SilverDragonTears is on a distinguished road
Default

That just took me back to the index page :(
__________________

Check out SilvaTales
Reply With Quote
  #36  
Old 02-14-2017, 12:39 PM
NobodysHero's Avatar
NobodysHero NobodysHero is offline
Co-Owner of MystFell
 
Join Date: Nov 2013
Posts: 144
Gender: Female
Credits: 18,405
NobodysHero is on a distinguished road
Default

Is there a way to make it so users can click to get the item or pet that shows up, instead of them automatically getting them? This way they're not getting slammed with a pet they may not want or item that might not need.
__________________

Venture Into The Mist
Reply With Quote
  #37  
Old 02-14-2017, 12:55 PM
NobodysHero's Avatar
NobodysHero NobodysHero is offline
Co-Owner of MystFell
 
Join Date: Nov 2013
Posts: 144
Gender: Female
Credits: 18,405
NobodysHero is on a distinguished road
Default

Silver, what did you call your explore pages? Did you call them explorearea1, explorearea2, etc?
__________________

Venture Into The Mist
Reply With Quote
  #38  
Old 02-15-2017, 09:56 AM
Abronsyth's Avatar
Abronsyth Abronsyth is offline
A Headache Embodied
 
Join Date: Aug 2011
Location: NY
Posts: 1,011
Gender: Male
Credits: 111,669
Abronsyth is on a distinguished road
Default

NoBody's Hero, you'd need to create a hidden form and set the pet/item image as the button, and then use an if input statement to run the append action upon clicking. Then you could just add a refresh line so that it brings them back to the explore page after a few moments. Kyttias has a script similar like this with her explore script, but you could certainly apply the same concept to this explore script; http://mysidiaadoptables.com/forum/s...ead.php?t=4955

I hope that helps :D
__________________
My Mods Site (1.3.4, 2020 Mods)
Reply With Quote
  #39  
Old 02-20-2017, 11:48 AM
NobodysHero's Avatar
NobodysHero NobodysHero is offline
Co-Owner of MystFell
 
Join Date: Nov 2013
Posts: 144
Gender: Female
Credits: 18,405
NobodysHero is on a distinguished road
Default

Thanks, Abronsyth! <3 I posted there. You guys are great.
__________________

Venture Into The Mist
Reply With Quote
  #40  
Old 03-22-2017, 09:16 PM
Dinocanid's Avatar
Dinocanid Dinocanid is offline
Member
 
Join Date: Aug 2016
Location: Maryland, USA
Posts: 516
Gender: Unknown/Other
Credits: 63,624
Dinocanid is on a distinguished road
Default

I've run into a problem where clicking "explore?" makes you take 2 steps at a time. Or when the steps reset for the day, you might start out with 2 or 4 steps upon clicking the page. This is what I have (not including the css):
PHP Code:
class Explorearea1View extends View{
    
    public function 
index(){
        
$mysidia Registry::get("mysidia");
        
$document $this->document;
            
$document->setTitle("Forest Path");  
        
$today date("d"); //Day of the month
        
$profile $mysidia->user->getprofile();
                
$favpet = new OwnedAdoptable($profile->getFavpetID());
                
$name $favpet->getName();
                
$coatiChance rand(1,100);
                
$boarChance rand(1,100);
                
$stepstaken $mysidia->user->exploretimes;
        
// Reset explore counter if the last recorded exploration was on a different day than today: 
            
$reset $mysidia->user->lastday != $today;
        
        
// Allow user to explore if they are under the limit or if reset condition is true.  
            
if ($mysidia->user->exploretimes <= 40 || $reset) {   
                
// Update the last day that they explored to today 
                
$mysidia->db->update("users", array("lastday" => $today), "username = '{$mysidia->user->username}'"); 

                
// If $reset condition was true, reset the count to 1, otherwise increment the existing count.  
                
$updatedExploreTimes $reset $mysidia->user->exploretimes 1;  
                
//$ExploreTimesFix = $mysidia->user->exploretimes - 1;
                 
                
$mysidia->db->update("users", array("exploretimes" => ($updatedExploreTimes)), "username = '{$mysidia->user->username}'");
                
//$mysidia->db->update("users", array("exploretimes" => ($ExploreTimesFix)), "username = '{$mysidia->user->username}'");

          
$document->add(new Comment("<div class = 'scene'><img src='http://orig08.deviantart.net/ccf7/f/2017/038/9/8/forestexplore_by_hoafan-day972y.png' style='width:50%;height:50%;'></div>"));
          
$document->add(new Comment("<b>Steps: {$stepstaken} / 40</b>"));
          
          
// This part gives a coati swirl to the user!
          
if($mysidia->input->post("coati")){
        if(
$coatiChance >= 70) {
        
$species "Coati Swirl";
        
$document->add(new Comment("The Coati doesn't want to follow, but it gives {$name} an egg instead! It can be found in your pantry"));
        
$newadopt = new StockAdopt($species);
    
$newadopt->append($mysidia->user->username);}
    elseif(
$coatiChance 70) {$document->add(new Comment("The coati quickly scurries off; startled by {$name}. Better luck next time!"));}
        }
        
        
// This part gives a boarBQ to the user!
          
if($mysidia->input->post("boarBQ")){
        if(
$boarChance >= 80) {
        
$species "BoarBQ";
        
$document->add(new Comment("{$name} somehow finds a way to calm its temper, and it gives them an egg! It can be found in your pantry"));
        
$newadopt = new StockAdopt($species);
    
$newadopt->append($mysidia->user->username);
    }
    elseif(
$boarChance 80) {$document->add(new Comment("{$name} runs for their life as the boar charges with sharp tusks!"));}
        }
        
          
//This is where exploration starts!
        
if ($mysidia->user->exploretimes <= 40) {  
            
$random rand(1,100);

            if(
$random && $random 20){
                
$species "Coati Swirl";
                
                
                
//adopt's image!
                
$document->add(new Comment("<div class = 'adopt'><img src='http://orig07.deviantart.net/b589/f/2017/070/8/c/csadult_by_hoafan-db1zf6y.png'></div>"));
                
$document->add(new Comment("Woah there! Is that a {$species}? Maybe {$name} can convince it to follow?"));
                
$CoatiForm = new FormBuilder("coatiform""""post");
        
$CoatiForm->buildButton("Try your luck""coati""submit");
                
$document->add($CoatiForm);
            }
            if(
$random >= 21 && $random <= 30){
                 
                
                
$document->add(new Comment("{$name} finds absolutely nothing.")); 
            }

            if(
$random >= 41 && $random <= 60){
            
                
$document->add(new Comment("{$name} accidentally tripped over a rock, but they seem okay."));
            }
            if(
$random >= 61 && $random <= 70){
                
$species "Boar BQ";
                
$document->add(new Comment("<div class = 'adopt'><img src='http://orig02.deviantart.net/4e8b/f/2017/077/c/e/bbqadult_by_hoafan-db2qlpt.png'></div>"));
                
$document->add(new Comment("Look out, it's a {$species}! It doesn't look too friendly..."));
                
$BoarForm = new FormBuilder("boarform""""post");
        
$BoarForm->buildButton("Try your luck""boarBQ""submit");
                
$document->add($BoarForm);
                
            }
            if(
$random >= 71 && $random <= 75){
                
$species "Spaniel Flan";
                
//$newadopt = new StockAdopt($species);
                //$newadopt->append($mysidia->user->username);
                
                
$document->add(new Comment("{$name} can hear birds chirping."));
            }
            if(
$random >= 91 && $random <= 99){
            
$amount rand(1,5);
                
$mysidia->user->changecash($amount);
                
$document->add(new Comment("Oh look! {$name} found $ {$amount}!"));
                    }  
            if(
$random == 100){
                
$species "Spaniel Flan";
                
//$newadopt = new StockAdopt($species);
                //$newadopt->append($mysidia->user->username);
                
                
$document->add(new Comment("{$name} sees something dart past in the bushes. It was too fast to recognize."));
            }
            else{
            
                        
$document->add(new Comment("<a href='/explorearea1'>Explore?</a>"FALSE));
            }  
        }
        else{
        
$document->add(new Comment("It seems that {$name} explored too much today, why don't you let them rest?"FALSE));
        }   

    }
    }


"ExploreTimesFix" was a remedy I tried to use to counter the 2-steps thing by just removing 1 step, but it just ended up subtracting 2 steps instead of adding 2, which fixed nothing if not make it worse than it was, so I commented it out.

There's also the occasional moment where no dialogue will appear besides the "explore?" link; and running out of steps will show the user a blank page. (Not a white page, but just a blank page with no words or pictures)
__________________
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
Quest- Explore System (Open Source) squiggler Tutorials and Tips 4 07-23-2020 12:07 PM
How to create an image map collierox Tutorials and Tips 3 03-13-2018 04:11 AM
Explore Help? cailynmae Questions and Supports 7 03-29-2017 11:37 PM
Help Create This? Abronsyth Templates and Themes 16 10-24-2011 03:05 PM
How to create a a battle system ,shop and currency?? SieghartZeke Questions and Supports 9 11-02-2009 12:15 AM


All times are GMT -5. The time now is 09:14 AM.

Currently Active Users: 445 (0 members and 445 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