Mysidia Adoptables Support Forum  

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

Notices

Reply
 
Thread Tools Display Modes
  #11  
Old 09-21-2016, 10:20 PM
Ittermat's Avatar
Ittermat Ittermat is offline
The awesomesauce
 
Join Date: Feb 2016
Location: in front of my laptop
Posts: 272
Gender: Female
Credits: 33,723
Ittermat is on a distinguished road
Default

Yea...your edited code works ... thank you!
Reply With Quote
  #12  
Old 09-21-2016, 10:20 PM
Dinocanid's Avatar
Dinocanid Dinocanid is offline
Member
 
Join Date: Aug 2016
Location: Maryland, USA
Posts: 516
Gender: Unknown/Other
Credits: 65,473
Dinocanid is on a distinguished road
Default

No problem!
Reply With Quote
  #13  
Old 09-21-2016, 10:41 PM
Ittermat's Avatar
Ittermat Ittermat is offline
The awesomesauce
 
Join Date: Feb 2016
Location: in front of my laptop
Posts: 272
Gender: Female
Credits: 33,723
Ittermat is on a distinguished road
Default

Sorry to bug you- but I ran into another issue- (no errors though) I cant seem to get the "game over" Message to show when they run out of the Item they need to play... instead it lets them keep playing.. I did get the message to show up at one point... but they could still play the game... x.x

Help please...

PHP Code:
 <?php

class ExploreeyresgameView extends View{
    
    public function 
index(){
        
$mysidia Registry::get("mysidia");
        
$document $this->document;
            
$document->setTitle("<center>Hanafuda with Eyre</center>");          
$item "Sherlock Holmes Book";
$hasitem $mysidia->db->select("inventory", array("quantity"), "itemname ='{$item}' and owner='{$mysidia->user->username}'")->fetchColumn();
if(
$hasitem){
    
$document->add(new Comment("You have $hasitem {$item}!"));
}                    
   
$item_name "Sherlock Holmes Book";
$qty 1;
$item = new PrivateItem($item$mysidia->user->username);
$item->remove($qty$mysidia->user->username); 
 
            
$document->add(new Comment("<center><a href='http://atrocity.mysidiahost.com/exploreeyresgame'>Play again?</a> Or <a href='http://atrocity.mysidiahost.com/pages/view/bakenekohalloween'> Go back to the event plaza</a></center>"FALSE));  
        
            
$random rand(1,115);
            
            if(
$random && $random 20){
$document->add(new Comment("<b><center>Eyres Hand</center></b>"FALSE));
                
$document->add(new Comment("<center><img src='http://atrocity.mysidiahost.com/picuploads/png/291a4c3f9d34e71b1a97ba1ea41a2476.png'>"));
$document->add(new Comment("<center><img src='http://pile.randimg.net/1/90/85238/Hanafuda%20winners.png'></center>"FALSE));
$document->add(new Comment("<b><center>Your Hand</center></b>"FALSE));
$document->add(new Comment("<center><img src='http://pile.randimg.net/1/90/85239/Hanafuda%20losers.png'></center>"FALSE));
                
$document->add(new Comment("<center>You lost!</center>"FALSE));
            }
            elseif(
$random >= 21 && $random <= 30){
                
$amount rand(5,20);
                
$mysidia->user->changecash($amount); 
$document->add(new Comment("<b><center>Eyres Hand.</center></b>"FALSE));
                
$document->add(new Comment("<center><img src='http://atrocity.mysidiahost.com/picuploads/png/8a513071bd47ab3361b61942118f8b87.png'>"));
$document->add(new Comment("center><img src='http://pile.randimg.net/1/90/85240/Hanafuda%20ties.png'></center>"FALSE));
$document->add(new Comment("<b><center>Your Hand</center></b>"FALSE));
$document->add(new Comment("<center><img src='http://pile.randimg.net/1/90/85240/Hanafuda%20ties.png'></center>"FALSE));
                
$document->add(new Comment("<center>Its a Tie...I guess I'll give you some beads...<i>You got $amount Beads!</center></i>"FALSE)); 
            }
            elseif(
$random >= 31 && $random <= 40){
                
$item "Red Pirahna Toy";
                
$qty 1;
                
$newitem = new StockItem($item);
                
$newitem->append($qty$mysidia->user->username);
$document->add(new Comment("<b><center>Eyres Hand.</center></b>"FALSE));
                
$document->add(new Comment("<center><img src='http://atrocity.mysidiahost.com/picuploads/png/8a513071bd47ab3361b61942118f8b87.png'>"));
  
$document->add(new Comment("<center><img src='http://pile.randimg.net/1/90/85239/Hanafuda%20losers.png'></center>"FALSE));
$document->add(new Comment("<b><center>Your Hand.</center></b>"FALSE));
$document->add(new Comment("<center><img src='http://pile.randimg.net/1/90/85238/Hanafuda%20winners.png'></center>"FALSE));
                
$document->add(new Comment("<center>Ugh! I cant lose... fine... take this <img src='http://atrocity.mysidiahost.com/picuploads/png/b5249b5da4564c210d83f7cd61de9d33.png'><b>$item</b>!</center>"FALSE));
            }
            elseif(
$random >= 41 && $random <= 60){
                
$item "Red Pirahna Toy";
                
$qty 1;
                
$newitem = new StockItem($item);
                
$newitem->append($qty$mysidia->user->username);
                           
$document->add(new Comment("<b><center>Eyre's Hand.</center></b>"FALSE));
                
$document->add(new Comment("<center><img src='http://atrocity.mysidiahost.com/picuploads/png/8a513071bd47ab3361b61942118f8b87.png'>"));
  
$document->add(new Comment("<center><img src='http://pile.randimg.net/1/90/85239/Hanafuda%20losers.png'></center>"FALSE));
$document->add(new Comment("<b><center>Your Hand.</center></b>"FALSE));
$document->add(new Comment("<center><img src='http://pile.randimg.net/1/90/85238/Hanafuda%20winners.png'></center>"FALSE));  
                
$document->add(new Comment("<center>Take it Human thing...The <img src='http://atrocity.mysidiahost.com/picuploads/png/69680cfc5d803f9170fe6549655f7f5b.png'><b>$item</b> is yours!</center>"FALSE));
            }
            elseif(
$random >= 101 && $random <= 110){
                
$item "Red Gummy eye";
                
$qty 1;
                
$newitem = new StockItem($item);
                
$newitem->append($qty$mysidia->user->username);
                 
$document->add(new Comment("<b><center>Eyres Hand.</center></b>"FALSE));
                
$document->add(new Comment("<center><img src='http://atrocity.mysidiahost.com/picuploads/png/8a513071bd47ab3361b61942118f8b87.png'>"));
  
$document->add(new Comment("<center><img src='http://pile.randimg.net/1/90/85239/Hanafuda%20losers.png'></center>"FALSE));
$document->add(new Comment("<b><center>Your Hand.</center></b>"FALSE));
$document->add(new Comment("<center><img src='http://pile.randimg.net/1/90/85238/Hanafuda%20winners.png'></center>"FALSE));  
                
$document->add(new Comment("Fine Human thing...take the treasure.. the <img src='http://atrocity.mysidiahost.com/picuploads/png/40618507daa6fe0dd5708d878139c1e4.png'><b>$item</b> belongs to you now.</center>"FALSE));
            }
            elseif(
$random >= 61 && $random <= 70){
                
$item "Halloween Kazoo";
                
$qty 1;
                
$newitem = new StockItem($item);
                
$newitem->append($qty$mysidia->user->username);
                 
$document->add(new Comment("<b><center>Eyres Hand.</center></b>"FALSE));
                
$document->add(new Comment("<center><img src='http://atrocity.mysidiahost.com/picuploads/png/8a513071bd47ab3361b61942118f8b87.png'>"));
  
$document->add(new Comment("<center><img src='http://pile.randimg.net/1/90/85239/Hanafuda%20losers.png'></center>"FALSE));
$document->add(new Comment("<b><center>Your Hand.</center></b>, FALSE"));
$document->add(new Comment("<center><img src='http://pile.randimg.net/1/90/85238/Hanafuda%20winners.png'></center>"FALSE));  
                
$document->add(new Comment("Alright Human thing... you can have my uncommon <img src='http://atrocity.mysidiahost.com/picuploads/png/6cd9c65227f0ae199cf399f294c1acb1.png'> <b>$item</b>!</center>"FALSE));
            }
            elseif(
$random >= 71 && $random <= 75){
                
$item "Jar of Halloween spirit";
                
$qty 1;
                
$newitem = new StockItem($item);
                
$newitem->append($qty$mysidia->user->username);
                 
$document->add(new Comment("<b><center>Eyres Hand.</center></b>"FALSE));
                
$document->add(new Comment("<center><img src='http://atrocity.mysidiahost.com/picuploads/png/8a513071bd47ab3361b61942118f8b87.png'>"));
  
$document->add(new Comment("<center><img src='http://pile.randimg.net/1/90/85239/Hanafuda%20losers.png'></center>"FALSE));
$document->add(new Comment("<b><center>Your Hand.</center></b>"FALSE));
$document->add(new Comment("<center><img src='http://pile.randimg.net/1/90/85238/Hanafuda%20winners.png'></center>"FALSE));  
                
$document->add(new Comment("No...not my rare <img src=http://atrocity.mysidiahost.com/picuploads/png/63388ceaa8e021597d9af37977138554.png'> <b>$item</b>!Human thing you are unfair!</center>"FALSE));
            }
            elseif(
$random >= 76 && $random <= 80){
                
$item "Mystery candy";
                
$qty 1;
                
$newitem = new StockItem($item);
                
$newitem->append($qty$mysidia->user->username);
                 
$document->add(new Comment("<b><center>Eyres Hand.</center></b>"FALSE));
                
$document->add(new Comment("<center><img src='http://atrocity.mysidiahost.com/picuploads/png/8a513071bd47ab3361b61942118f8b87.png'>"));
  
$document->add(new Comment("<center><img src='http://pile.randimg.net/1/90/85239/Hanafuda%20losers.png'></center>"FALSE));
$document->add(new Comment("<b><center>Your Hand.</center></b>"FALSE));
$document->add(new Comment("<center><img src='http://pile.randimg.net/1/90/85238/Hanafuda%20winners.png'></center>"FALSE));  
                
$document->add(new Comment("Fine human thing....take my <img src='http://atrocity.mysidiahost.com/picuploads/png/282ad92a5ac391066e7e1999809f39ab.png'> <b>$item</b>!</center>"FALSE));
            }
            elseif(
$random >= 81 && $random <= 90){
                
$item "Zombie arm";
                
$qty 1;
                
$newitem = new StockItem($item);
                
$newitem->append($qty$mysidia->user->username);
                 
$document->add(new Comment("<b><center>Eyre's Hand.</center></b>"FALSE));
                
$document->add(new Comment("<center><img src='http://atrocity.mysidiahost.com/picuploads/png/8a513071bd47ab3361b61942118f8b87.png'>"));
  
$document->add(new Comment("<center><img src='http://pile.randimg.net/1/90/85239/Hanafuda%20losers.png'></center>"FALSE));
$document->add(new Comment("<b><center>Your Hand.</center></b>"FALSE));
$document->add(new Comment("<center><img src='http://pile.randimg.net/1/90/85238/Hanafuda%20winners.png'></center>"FALSE));  
                
$document->add(new Comment("This is why I hate Human things... they always take my <img src='http://atrocity.mysidiahost.com/picuploads/png/856746dbbefc14049ea9d29bf86049a7.png'><b>$item</b>!</center>"FALSE));
            }
            elseif(
$random >= 111 && $random <= 115){
                
$item "Halloween Treat basket";
                
$qty 1;
                
$newitem = new StockItem($item);
                
$newitem->append($qty$mysidia->user->username);
                 
$document->add(new Comment("<b><center>Eyre's Hand.</center></b>"FALSE));
                
$document->add(new Comment("<center><img src='http://atrocity.mysidiahost.com/picuploads/png/8a513071bd47ab3361b61942118f8b87.png'>"));
  
$document->add(new Comment("<center><img src='http://pile.randimg.net/1/90/85239/Hanafuda%20losers.png'></center>"FALSE));
$document->add(new Comment("<b><center>Your Hand.</center></b>"FALSE));
$document->add(new Comment("<center><img src='http://pile.randimg.net/1/90/85238/Hanafuda%20winners.png'></center>"FALSE));  
                
$document->add(new Comment("Alright alright...the <img src='http://atrocity.mysidiahost.com/picuploads/png/6282ede37f0ccc934ea7336751740ccc.png'> <b>$item</b> is yours.</center>"FALSE));
            }
            elseif(
$random >= 91 && $random <= 99){
                 
$document->add(new Comment("<b><center>Eyre's Hand.</center></b>"FALSE));
                
$document->add(new Comment("<center><img src='http://atrocity.mysidiahost.com/picuploads/png/291a4c3f9d34e71b1a97ba1ea41a2476.png'>"));
  
$document->add(new Comment("<center><img src='http://pile.randimg.net/1/90/85238/Hanafuda%20winners.png'></center>"FALSE));
$document->add(new Comment("<b><center>Your Hand.</center></b>"FALSE));
$document->add(new Comment("<center><img src='http://pile.randimg.net/1/90/85239/Hanafuda%20losers.png'></center>"FALSE));  
                
$document->add(new Comment("You lose Human thing!</center>"FALSE));
            }
            elseif(
$random == 100){
                
$document->add(new Comment("<b><center>Eyre's Hand.</center></b>"FALSE));
                
$document->add(new Comment("<center><img src='http://atrocity.mysidiahost.com/picuploads/png/291a4c3f9d34e71b1a97ba1ea41a2476.png'>"));
  
$document->add(new Comment("<center><img src='http://pile.randimg.net/1/90/85238/Hanafuda%20winners.png'></center>"FALSE));
$document->add(new Comment("<b><center>Your Hand.</center></b>"FALSE));
$document->add(new Comment("<center><img src='http://pile.randimg.net/1/90/85239/Hanafuda%20losers.png'></center>"FALSE));  
                
$document->add(new Comment("You lose Human thing!</center>"FALSE));
            }
             else {
    
$document->add(new Comment("<center><img src='http://atrocity.mysidiahost.com/picuploads/png/b30c16d80645c40477b2143fae5f5eeb.png'></center>"FALSE));
    
$document->add(new Comment("<center>You are out of candy...come back when you have more!!</center>"FALSE));
}   
    }
   } 
?>
I cant get the "you ran out of candy" message to appear when they run out of the item they need to play...

Last edited by Ittermat; 09-22-2016 at 11:08 AM.
Reply With Quote
  #14  
Old 09-22-2016, 07:53 PM
Dinocanid's Avatar
Dinocanid Dinocanid is offline
Member
 
Join Date: Aug 2016
Location: Maryland, USA
Posts: 516
Gender: Unknown/Other
Credits: 65,473
Dinocanid is on a distinguished road
Default

Sorry for replying so late! It's not a bother, it was just really late last night. I was able to get the game to end by changing this line (line 11):
PHP Code:
if($hasitem
to:

PHP Code:
if($hasitem 0
That way, the game only plays if the user has more than 0 of that specific item.
Reply With Quote
  #15  
Old 09-22-2016, 08:05 PM
Ittermat's Avatar
Ittermat Ittermat is offline
The awesomesauce
 
Join Date: Feb 2016
Location: in front of my laptop
Posts: 272
Gender: Female
Credits: 33,723
Ittermat is on a distinguished road
Default

Thanks for the help but for some reason its not working for me... I did edit the Coding a little... and it was working. but its not giving me the game over still... (my edited code is in the post before this reply)
Reply With Quote
  #16  
Old 09-22-2016, 08:34 PM
Dinocanid's Avatar
Dinocanid Dinocanid is offline
Member
 
Join Date: Aug 2016
Location: Maryland, USA
Posts: 516
Gender: Unknown/Other
Credits: 65,473
Dinocanid is on a distinguished road
Default

Maybe changing the items around in the script might help somehow? This is the version with the fixes I mentioned in my previous posts:

PHP Code:
<?php

class ExploreArea2View extends View{
    
    public function 
index(){
        
$mysidia Registry::get("mysidia");
        
$document $this->document;
            
$document->setTitle("<center>Hanafuda with Eyre</center>");          
$item "asda";
$hasitem $mysidia->db->select("inventory", array("quantity"), "itemname ='{$item}' and owner='{$mysidia->user->username}'")->fetchColumn();
if(
$hasitem 0){
    
$document->add(new Comment("You have $hasitem {$item}!"));
}                    
   
$item_name "asda";
$qty 1;
$item = new PrivateItem($item$mysidia->user->username);
$item->remove($qty$mysidia->user->username); 
 
            
$document->add(new Comment("<center><a href='http://atrocity.mysidiahost.com/exploreeyresgame'>Play again?</a> Or <a href='http://atrocity.mysidiahost.com/pages/view/bakenekohalloween'> Go back to the event plaza</a></center>"FALSE));  
        
            
$random rand(1,115);
            
            if(
$random && $random 20){
$document->add(new Comment("<b><center>Eyres Hand</center></b>"FALSE));
                
$document->add(new Comment("<center><img src='http://atrocity.mysidiahost.com/picuploads/png/291a4c3f9d34e71b1a97ba1ea41a2476.png'>"));
$document->add(new Comment("<center><img src='http://pile.randimg.net/1/90/85238/Hanafuda%20winners.png'></center>"FALSE));
$document->add(new Comment("<b><center>Your Hand</center></b>"FALSE));
$document->add(new Comment("<center><img src='http://pile.randimg.net/1/90/85239/Hanafuda%20losers.png'></center>"FALSE));
                
$document->add(new Comment("<center>You lost!</center>"FALSE));
            }
            elseif(
$random >= 21 && $random <= 30){
                
$amount rand(5,20);
                
$mysidia->user->changecash($amount); 
$document->add(new Comment("<b><center>Eyres Hand.</center></b>"FALSE));
                
$document->add(new Comment("<center><img src='http://atrocity.mysidiahost.com/picuploads/png/8a513071bd47ab3361b61942118f8b87.png'>"));
$document->add(new Comment("center><img src='http://pile.randimg.net/1/90/85240/Hanafuda%20ties.png'></center>"FALSE));
$document->add(new Comment("<b><center>Your Hand</center></b>"FALSE));
$document->add(new Comment("<center><img src='http://pile.randimg.net/1/90/85240/Hanafuda%20ties.png'></center>"FALSE));
                
$document->add(new Comment("<center>Its a Tie...I guess I'll give you some beads...<i>You got $amount Beads!</center></i>"FALSE)); 
            }
            elseif(
$random >= 61 && $random <= 70){
                
$item "asda";
                
$qty 1;
                
$newitem = new StockItem($item);
                
$newitem->append($qty$mysidia->user->username);
                 
$document->add(new Comment("<b><center>Eyres Hand.</center></b>"FALSE));
                
$document->add(new Comment("<center><img src='http://atrocity.mysidiahost.com/picuploads/png/8a513071bd47ab3361b61942118f8b87.png'>"));
  
$document->add(new Comment("<center><img src='http://pile.randimg.net/1/90/85239/Hanafuda%20losers.png'></center>"FALSE));
$document->add(new Comment("<b><center>Your Hand.</center></b>, FALSE"));
$document->add(new Comment("<center><img src='http://pile.randimg.net/1/90/85238/Hanafuda%20winners.png'></center>"FALSE));  
                
$document->add(new Comment("Alright Human thing... you can have my uncommon <img src='http://atrocity.mysidiahost.com/picuploads/png/6cd9c65227f0ae199cf399f294c1acb1.png'> <b>$item</b>!</center>"FALSE));
            }
            elseif(
$random >= 71 && $random <= 75){
                
$item "asda";
                
$qty 1;
                
$newitem = new StockItem($item);
                
$newitem->append($qty$mysidia->user->username);
                 
$document->add(new Comment("<b><center>Eyres Hand.</center></b>"FALSE));
                
$document->add(new Comment("<center><img src='http://atrocity.mysidiahost.com/picuploads/png/8a513071bd47ab3361b61942118f8b87.png'>"));
  
$document->add(new Comment("<center><img src='http://pile.randimg.net/1/90/85239/Hanafuda%20losers.png'></center>"FALSE));
$document->add(new Comment("<b><center>Your Hand.</center></b>"FALSE));
$document->add(new Comment("<center><img src='http://pile.randimg.net/1/90/85238/Hanafuda%20winners.png'></center>"FALSE));  
                
$document->add(new Comment("No...not my rare <img src=http://atrocity.mysidiahost.com/picuploads/png/63388ceaa8e021597d9af37977138554.png'> <b>$item</b>!Human thing you are unfair!</center>"FALSE));
            }
            elseif(
$random >= 81 && $random <= 90){
                
$item "asda";
                
$qty 1;
                
$newitem = new StockItem($item);
                
$newitem->append($qty$mysidia->user->username);
                 
$document->add(new Comment("<b><center>Eyre's Hand.</center></b>"FALSE));
                
$document->add(new Comment("<center><img src='http://atrocity.mysidiahost.com/picuploads/png/8a513071bd47ab3361b61942118f8b87.png'>"));
  
$document->add(new Comment("<center><img src='http://pile.randimg.net/1/90/85239/Hanafuda%20losers.png'></center>"FALSE));
$document->add(new Comment("<b><center>Your Hand.</center></b>"FALSE));
$document->add(new Comment("<center><img src='http://pile.randimg.net/1/90/85238/Hanafuda%20winners.png'></center>"FALSE));  
                
$document->add(new Comment("This is why I hate Human things... they always take my <img src='http://atrocity.mysidiahost.com/picuploads/png/856746dbbefc14049ea9d29bf86049a7.png'><b>$item</b>!</center>"FALSE));
            }
            elseif(
$random >= 91 && $random <= 99){
                 
$document->add(new Comment("<b><center>Eyre's Hand.</center></b>"FALSE));
                
$document->add(new Comment("<center><img src='http://atrocity.mysidiahost.com/picuploads/png/291a4c3f9d34e71b1a97ba1ea41a2476.png'>"));
  
$document->add(new Comment("<center><img src='http://pile.randimg.net/1/90/85238/Hanafuda%20winners.png'></center>"FALSE));
$document->add(new Comment("<b><center>Your Hand.</center></b>"FALSE));
$document->add(new Comment("<center><img src='http://pile.randimg.net/1/90/85239/Hanafuda%20losers.png'></center>"FALSE));  
                
$document->add(new Comment("You lose Human thing!</center>"FALSE));
            }
            elseif(
$random == 100){
                
$document->add(new Comment("<b><center>Eyre's Hand.</center></b>"FALSE));
                
$document->add(new Comment("<center><img src='http://atrocity.mysidiahost.com/picuploads/png/291a4c3f9d34e71b1a97ba1ea41a2476.png'>"));
  
$document->add(new Comment("<center><img src='http://pile.randimg.net/1/90/85238/Hanafuda%20winners.png'></center>"FALSE));
$document->add(new Comment("<b><center>Your Hand.</center></b>"FALSE));
$document->add(new Comment("<center><img src='http://pile.randimg.net/1/90/85239/Hanafuda%20losers.png'></center>"FALSE));  
                
$document->add(new Comment("You lose Human thing!</center>"FALSE));
            }
             else {
    
$document->add(new Comment("<center><img src='http://atrocity.mysidiahost.com/picuploads/png/b30c16d80645c40477b2143fae5f5eeb.png'></center>"FALSE));
    
$document->add(new Comment("<center>You are out of candy...come back when you have more!!</center>"FALSE));
}   
    }
   } 
?>
Your site has specific items, so I had to change the one on mine to a test item (asda) so I wouldn't get errors on my end. Those are the only things I really changed besides the "extends view" line since that's what the .php I have it in is called. As a walkthrough of what I did to debug the problem and have the game run and end was:
1. Change the name of every item to the test item (asda) so I don't get any errors and it properly adds and removes the items from your inventory
2. I removed all but one of the lines that gave me an item so I would lose more often since I just kept winning over and over. This way, I can be sure the quantity is running out. You don't have to do that, I just did it because I was winning too much to see if a game over was possible.
3. I refreshed over and over until I had 0 "asda" and I got the game over message. If I happen to win another "asda", then it lets me play again. Obviously it wouldn't happen this way with yours since you wouldn't win back the item needed to play the game.

From my understanding, the game only runs if you have a "Sherlock Holmes book", did you change your inventory so you only have one of that item and test the game again? You should get a game over if you have 0 Sherlock Holmes books.
Reply With Quote
  #17  
Old 09-22-2016, 08:43 PM
Ittermat's Avatar
Ittermat Ittermat is offline
The awesomesauce
 
Join Date: Feb 2016
Location: in front of my laptop
Posts: 272
Gender: Female
Credits: 33,723
Ittermat is on a distinguished road
Default

I do not have any books in my inventory...And honestly all the items on the game currently are placeholders... so they dont matter at the moment. But Its still not working for me... It just keeps letting me play the game...

I am so confused... x.x
Reply With Quote
  #18  
Old 09-22-2016, 09:09 PM
Dinocanid's Avatar
Dinocanid Dinocanid is offline
Member
 
Join Date: Aug 2016
Location: Maryland, USA
Posts: 516
Gender: Unknown/Other
Credits: 65,473
Dinocanid is on a distinguished road
Default

I honestly have no idea why it's not working either since I'm using the exact same script I posted in my last reply and it runs and ends fine. Maybe try replacing the entire script with:
PHP Code:
<?php 

class ExploreeyresgameView extends View
     
    public function 
index(){ 
        
$mysidia Registry::get("mysidia"); 
        
$document $this->document
            
$document->setTitle("<center>Hanafuda with Eyre</center>");           
$item "Sherlock Holmes Book"
$hasitem $mysidia->db->select("inventory", array("quantity"), "itemname ='{$item}' and owner='{$mysidia->user->username}'")->fetchColumn(); 
if(
$hasitem 0){ 
    
$document->add(new Comment("You have $hasitem {$item}!")); 
}                     
   
$item_name "Sherlock Holmes Book"
$qty 1
$item = new PrivateItem($item$mysidia->user->username); 
$item->remove($qty$mysidia->user->username);  
  
            
$document->add(new Comment("<center><a href='http://atrocity.mysidiahost.com/exploreeyresgame'>Play again?</a> Or <a href='http://atrocity.mysidiahost.com/pages/view/bakenekohalloween'> Go back to the event plaza</a></center>"FALSE));   
         
            
$random rand(1,115); 
             
            if(
$random && $random 20){ 
$document->add(new Comment("<b><center>Eyres Hand</center></b>"FALSE)); 
                
$document->add(new Comment("<center><img src='http://atrocity.mysidiahost.com/picuploads/png/291a4c3f9d34e71b1a97ba1ea41a2476.png'>")); 
$document->add(new Comment("<center><img src='http://pile.randimg.net/1/90/85238/Hanafuda%20winners.png'></center>"FALSE)); 
$document->add(new Comment("<b><center>Your Hand</center></b>"FALSE)); 
$document->add(new Comment("<center><img src='http://pile.randimg.net/1/90/85239/Hanafuda%20losers.png'></center>"FALSE)); 
                
$document->add(new Comment("<center>You lost!</center>"FALSE)); 
            } 
            elseif(
$random >= 21 && $random <= 30){ 
                
$amount rand(5,20); 
                
$mysidia->user->changecash($amount);  
$document->add(new Comment("<b><center>Eyres Hand.</center></b>"FALSE)); 
                
$document->add(new Comment("<center><img src='http://atrocity.mysidiahost.com/picuploads/png/8a513071bd47ab3361b61942118f8b87.png'>")); 
$document->add(new Comment("center><img src='http://pile.randimg.net/1/90/85240/Hanafuda%20ties.png'></center>"FALSE)); 
$document->add(new Comment("<b><center>Your Hand</center></b>"FALSE)); 
$document->add(new Comment("<center><img src='http://pile.randimg.net/1/90/85240/Hanafuda%20ties.png'></center>"FALSE)); 
                
$document->add(new Comment("<center>Its a Tie...I guess I'll give you some beads...<i>You got $amount Beads!</center></i>"FALSE));  
            } 
            elseif(
$random >= 61 && $random <= 70){ 
                
$item "Sherlock Holmes Book"
                
$qty 1
                
$newitem = new StockItem($item); 
                
$newitem->append($qty$mysidia->user->username); 
                 
$document->add(new Comment("<b><center>Eyres Hand.</center></b>"FALSE)); 
                
$document->add(new Comment("<center><img src='http://atrocity.mysidiahost.com/picuploads/png/8a513071bd47ab3361b61942118f8b87.png'>")); 
  
$document->add(new Comment("<center><img src='http://pile.randimg.net/1/90/85239/Hanafuda%20losers.png'></center>"FALSE)); 
$document->add(new Comment("<b><center>Your Hand.</center></b>, FALSE")); 
$document->add(new Comment("<center><img src='http://pile.randimg.net/1/90/85238/Hanafuda%20winners.png'></center>"FALSE));   
                
$document->add(new Comment("Alright Human thing... you can have my uncommon <img src='http://atrocity.mysidiahost.com/picuploads/png/6cd9c65227f0ae199cf399f294c1acb1.png'> <b>$item</b>!</center>"FALSE)); 
            } 
            elseif(
$random >= 71 && $random <= 75){ 
                
$item "Sherlock Holmes Book"
                
$qty 1
                
$newitem = new StockItem($item); 
                
$newitem->append($qty$mysidia->user->username); 
                 
$document->add(new Comment("<b><center>Eyres Hand.</center></b>"FALSE)); 
                
$document->add(new Comment("<center><img src='http://atrocity.mysidiahost.com/picuploads/png/8a513071bd47ab3361b61942118f8b87.png'>")); 
  
$document->add(new Comment("<center><img src='http://pile.randimg.net/1/90/85239/Hanafuda%20losers.png'></center>"FALSE)); 
$document->add(new Comment("<b><center>Your Hand.</center></b>"FALSE)); 
$document->add(new Comment("<center><img src='http://pile.randimg.net/1/90/85238/Hanafuda%20winners.png'></center>"FALSE));   
                
$document->add(new Comment("No...not my rare <img src=http://atrocity.mysidiahost.com/picuploads/png/63388ceaa8e021597d9af37977138554.png'> <b>$item</b>!Human thing you are unfair!</center>"FALSE)); 
            } 
            elseif(
$random >= 81 && $random <= 90){ 
                
$item "Sherlock Holmes Book"
                
$qty 1
                
$newitem = new StockItem($item); 
                
$newitem->append($qty$mysidia->user->username); 
                 
$document->add(new Comment("<b><center>Eyre's Hand.</center></b>"FALSE)); 
                
$document->add(new Comment("<center><img src='http://atrocity.mysidiahost.com/picuploads/png/8a513071bd47ab3361b61942118f8b87.png'>")); 
  
$document->add(new Comment("<center><img src='http://pile.randimg.net/1/90/85239/Hanafuda%20losers.png'></center>"FALSE)); 
$document->add(new Comment("<b><center>Your Hand.</center></b>"FALSE)); 
$document->add(new Comment("<center><img src='http://pile.randimg.net/1/90/85238/Hanafuda%20winners.png'></center>"FALSE));   
                
$document->add(new Comment("This is why I hate Human things... they always take my <img src='http://atrocity.mysidiahost.com/picuploads/png/856746dbbefc14049ea9d29bf86049a7.png'><b>$item</b>!</center>"FALSE)); 
            } 
            elseif(
$random >= 91 && $random <= 99){ 
                 
$document->add(new Comment("<b><center>Eyre's Hand.</center></b>"FALSE)); 
                
$document->add(new Comment("<center><img src='http://atrocity.mysidiahost.com/picuploads/png/291a4c3f9d34e71b1a97ba1ea41a2476.png'>")); 
  
$document->add(new Comment("<center><img src='http://pile.randimg.net/1/90/85238/Hanafuda%20winners.png'></center>"FALSE)); 
$document->add(new Comment("<b><center>Your Hand.</center></b>"FALSE)); 
$document->add(new Comment("<center><img src='http://pile.randimg.net/1/90/85239/Hanafuda%20losers.png'></center>"FALSE));   
                
$document->add(new Comment("You lose Human thing!</center>"FALSE)); 
            } 
            elseif(
$random == 100){ 
                
$document->add(new Comment("<b><center>Eyre's Hand.</center></b>"FALSE)); 
                
$document->add(new Comment("<center><img src='http://atrocity.mysidiahost.com/picuploads/png/291a4c3f9d34e71b1a97ba1ea41a2476.png'>")); 
  
$document->add(new Comment("<center><img src='http://pile.randimg.net/1/90/85238/Hanafuda%20winners.png'></center>"FALSE)); 
$document->add(new Comment("<b><center>Your Hand.</center></b>"FALSE)); 
$document->add(new Comment("<center><img src='http://pile.randimg.net/1/90/85239/Hanafuda%20losers.png'></center>"FALSE));   
                
$document->add(new Comment("You lose Human thing!</center>"FALSE)); 
            } 
             else { 
    
$document->add(new Comment("<center><img src='http://atrocity.mysidiahost.com/picuploads/png/b30c16d80645c40477b2143fae5f5eeb.png'></center>"FALSE)); 
    
$document->add(new Comment("<center>You are out of candy...come back when you have more!!</center>"FALSE)); 
}    
    } 
   }  
?>
You would need at least 1 Sherlock Holmes Book in your inventory to play the game, but after that you should get the game over message. Try refreshing a few times to see if it happens. It's basically the same script I edited but you don't have an item called asda so I changed it. Are you sure the items you have are consumable? (You can check through the adminCP)
Reply With Quote
  #19  
Old 09-22-2016, 09:13 PM
Ittermat's Avatar
Ittermat Ittermat is offline
The awesomesauce
 
Join Date: Feb 2016
Location: in front of my laptop
Posts: 272
Gender: Female
Credits: 33,723
Ittermat is on a distinguished road
Default

That worked! thank you! I honestly have no idea why it wasnt working before...thank you very much!
Reply With Quote
  #20  
Old 09-22-2016, 09:14 PM
Dinocanid's Avatar
Dinocanid Dinocanid is offline
Member
 
Join Date: Aug 2016
Location: Maryland, USA
Posts: 516
Gender: Unknown/Other
Credits: 65,473
Dinocanid is on a distinguished road
Default

Yay! ^^ You're welcome.
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


All times are GMT -5. The time now is 05:16 PM.

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