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 09-13-2016, 12:21 PM
NobodysHero's Avatar
NobodysHero NobodysHero is offline
Co-Owner of MystFell
 
Join Date: Nov 2013
Posts: 144
Gender: Female
Credits: 21,815
NobodysHero is on a distinguished road
Default

Good news is, I partly found the answer to my question. For whatever reason, it can't pull from "currentlevel". Changing it to "AdoptLevel", "Level", and "CurrentLevel" allows the page to load, but doesn't allow me to battle, nor does it show my "favpet", insisting that my pet isn't level 1 or higher.

Looking at the error log after each save, seems like it keeps bumping on how to call the level of the pet. x.x So, now what?

Last edited by NobodysHero; 09-13-2016 at 12:37 PM.
Reply With Quote
  #12  
Old 09-17-2016, 10:38 AM
Dinocanid's Avatar
Dinocanid Dinocanid is offline
Member
 
Join Date: Aug 2016
Location: Maryland, USA
Posts: 516
Gender: Unknown/Other
Credits: 79,243
Dinocanid is on a distinguished road
Default

I can't get this to work either. I can get to the page just fine, but it keeps insisting that my favpet isn't level 3.
Reply With Quote
  #13  
Old 09-20-2016, 08:58 PM
Abronsyth's Avatar
Abronsyth Abronsyth is offline
A Headache Embodied
 
Join Date: Aug 2011
Location: NY
Posts: 1,011
Gender: Male
Credits: 133,557
Abronsyth is on a distinguished road
Default

Quote:
Originally Posted by NobodysHero View Post
Good news is, I partly found the answer to my question. For whatever reason, it can't pull from "currentlevel". Changing it to "AdoptLevel", "Level", and "CurrentLevel" allows the page to load, but doesn't allow me to battle, nor does it show my "favpet", insisting that my pet isn't level 1 or higher.

Looking at the error log after each save, seems like it keeps bumping on how to call the level of the pet. x.x So, now what?

I responded via PM but I'll paste this here for other's sakes:
Try going into class_ownedadoptable.php and changing the line here:
PHP Code:
    protected $currentlevel
to this:
PHP Code:
    public $currentlevel
Save, upload, and let me know if that fixes your issue :)

Everyone having the issue please make sure this has been done and then, once done, get back to me on it.
__________________
My Mods Site (1.3.4, 2020 Mods)
Reply With Quote
  #14  
Old 09-21-2016, 01:15 AM
NobodysHero's Avatar
NobodysHero NobodysHero is offline
Co-Owner of MystFell
 
Join Date: Nov 2013
Posts: 144
Gender: Female
Credits: 21,815
NobodysHero is on a distinguished road
Default

THANK YOU! <3 Okay, so it didn't like that both the "currentlevel" and "name" were protected, instead of public. Changing that made it work for me!
Reply With Quote
  #15  
Old 09-23-2016, 06:53 PM
NobodysHero's Avatar
NobodysHero NobodysHero is offline
Co-Owner of MystFell
 
Join Date: Nov 2013
Posts: 144
Gender: Female
Credits: 21,815
NobodysHero is on a distinguished road
Default

Now that I have this working, I'd like to add some graphics and such to make it more fun to look at and give their opponent a "face". So, my question here is, how would I go about perhaps using random images above the "random opponent side? I know how to post the image of the pet, but a random image code would be awesome. 8D Would be neat to also use this to make it seem like the "battleground" as changed. Just a thought!
Reply With Quote
  #16  
Old 09-25-2016, 01:32 PM
Abronsyth's Avatar
Abronsyth Abronsyth is offline
A Headache Embodied
 
Join Date: Aug 2011
Location: NY
Posts: 1,011
Gender: Male
Credits: 133,557
Abronsyth is on a distinguished road
Default

Oh yeah, that is totally doable! I actually originally had it set up that way but was having issues with aligning it in a way that looked really good...but the random opponent image isn't too difficult. You just need the images...so, where you add opponent stats add in this:
PHP Code:
$images rand(1,3); 
Change the 3 to suit whatever number of images you want possible. Then, below the stats add this:
PHP Code:
if($images 1) {
$opimage "<img src='IMAGE URL'/>";
}
elseif(
$images 2) {
$opimage "<img src='IMAGE URL'/>";
}
elseif(
$images 3) {
$opimage "<img src='IMAGE URL'/>";

Where it says IMAGE URL just change it to the image's url for the different opponent images. Then where you display the opponent's stats just add in {$opimage}. So, for example:
PHP Code:
<td width='40%' style='text-align:right;vertical-align:bottom'
{
$opimage}<br>                    
<
i>Opponent</i><br
                    <
b>Sense:</b> {$opsense}<br
                    <
b>Speed:</b> {$opspeed}<br
                    <
b>Strength:</b> {$opstrength}<br
                    <
b>Stamina:</b> {$opstamina}<br
                    </
td

Now I will note that I just wrote this without testing it at all, so I don't guarantee it'll work as is, but it should give you the general idea!
__________________
My Mods Site (1.3.4, 2020 Mods)
Reply With Quote
  #17  
Old 10-13-2016, 03:17 PM
Abronsyth's Avatar
Abronsyth Abronsyth is offline
A Headache Embodied
 
Join Date: Aug 2011
Location: NY
Posts: 1,011
Gender: Male
Credits: 133,557
Abronsyth is on a distinguished road
Default

Hey all! I updated the main post so that it now includes the training section! My method of training is very lazy at the moment, just spend some money, click a button, raise the stats.

I hope you all enjoy it <3
__________________
My Mods Site (1.3.4, 2020 Mods)
Reply With Quote
  #18  
Old 11-26-2016, 09:29 AM
Abronsyth's Avatar
Abronsyth Abronsyth is offline
A Headache Embodied
 
Join Date: Aug 2011
Location: NY
Posts: 1,011
Gender: Male
Credits: 133,557
Abronsyth is on a distinguished road
Default

Finally updated!

Now includes a Trophies section, and a little extras section :)
__________________
My Mods Site (1.3.4, 2020 Mods)
Reply With Quote
  #19  
Old 12-09-2016, 10:33 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: 38,596
Ittermat is on a distinguished road
Default

couple questions- I tried adding in the OP image coding but it keeps giving me errors... WHERE exactly do I put those? CAn you explain a little better please?

Also the trophies- where exactly and on which file do I put the calling code?

As well as How would I get my fave pets image for battling as well? {$Favepet} does not seem to work lol (And how would I flip the images so they're actually facing each other?)

EDIT: one more question- how would I make it so that they actually recieve items for winning? whether random or not so random lol...

(Apologies as I am a super noob at this)

Last edited by Ittermat; 12-09-2016 at 11:43 PM.
Reply With Quote
  #20  
Old 12-10-2016, 09:10 AM
Abronsyth's Avatar
Abronsyth Abronsyth is offline
A Headache Embodied
 
Join Date: Aug 2011
Location: NY
Posts: 1,011
Gender: Male
Credits: 133,557
Abronsyth is on a distinguished road
Default

1. In the battleview.php file find this:
PHP Code:
 /*Random Opponent Stats*/ 
        
$opsense rand(1,100); 
        
$opstamina rand(1,100); 
        
$opstrength rand(1,100); 
        
$opspeed rand(1,100); 
Insert the image code right below that, so it looks like this:
PHP Code:
 /*Random Opponent Stats*/ 
$opsense rand(1,100); 
$opstamina rand(1,100); 
$opstrength rand(1,100); 
$opspeed rand(1,100); 
$images rand(1,3);  
if(
$images 1) {
$opimage "<img src='IMAGE URL'/>";
}
elseif(
$images 2) {
$opimage "<img src='IMAGE URL'/>";
}
elseif(
$images 3) {
$opimage "<img src='IMAGE URL'/>";

The image url needs to start with http:// and end in .jpg, .jpeg, .png, or .gif

2. You put the calling code wherever you want to display the trophies. So if you want to display it for the owner of a pet when they go to manage it, you can go to myadoptsview.php and add it within the manage function. This works best if you already have "profiles" set up. But for a quick example, here is the manage function with it added in:
PHP Code:
    public function manage(){
        
$mysidia Registry::get("mysidia");
        
$aid $this->getField("aid")->getValue();
        
$name $this->getField("name")->getValue();
        
$image $this->getField("image");

        
$trophies $mysidia->db->select("owned_adoptables", array("trophies"), "aid = '{$adopt->getAdoptID()}'")->fetchColumn();

        
$document $this->document;        
        
$document->setTitle("Managing {$name}");
        
$document->add($image);
        
$document->add(new Comment("<br><br>This page allows you to manage {$name}.  Click on an option below to change settings.<br>
<center>
{$name} has {$trophies} trophies!</center><br>"));
        
        
$document->add(new Image("templates/icons/add.gif"));
        
$document->add(new Link("levelup/click/{$aid}"" Level Up {$name}"TRUE));
        
$document->add(new Image("templates/icons/stats.gif"));
        
$document->add(new Link("myadopts/stats/{$aid}"" Get Stats for {$name}"TRUE));
        
$document->add(new Image("templates/icons/bbcodes.gif"));
        
$document->add(new Link("myadopts/bbcode/{$aid}"" Get BBCodes / HTML Codes for {$name}"TRUE));
           
$document->add(new Image("templates/icons/title.gif"));
        
$document->add(new Link("myadopts/rename/{$aid}"" Rename {$name}"TRUE)); 
        
$document->add(new Image("templates/icons/trade.gif"));
        
$document->add(new Link("myadopts/trade/{$aid}"" Change Trade status for {$name}"TRUE)); 
        
$document->add(new Image("templates/icons/freeze.gif"));
        
$document->add(new Link("myadopts/freeze/{$aid}"" Freeze or Unfreeze {$name}"TRUE)); 
        
$document->add(new Image("templates/icons/delete.gif"));
        
$document->add(new Link("pound/pound/{$aid}"" Pound {$name}"TRUE)); 
    } 
3. The base code for displaying it is this:
PHP Code:
<img src='{$favpet->getImage()}'/> 
But you also need to include this information to make it callable:
PHP Code:
$profile $mysidia->user->getprofile();
$favpet = new OwnedAdoptable($profile->getFavpetID()); 
As for flipping, not sure, I googled it and apparently this works (I have not tested it):
PHP Code:
$opimage "<img src='IMAGE URL' style='-moz-transform: scale(-1, 1);-webkit-transform: scale(-1, 1);-o-transform: scale(-1, 1);transform: scale(-1, 1);filter: FlipH;' />"
4. To directly insert an item into a user's inventory you use this string:
PHP Code:
$item "ItemName"
PHP Code:
$newitem = new StockItem($item);  
$newitem->append(1$mysidia->user->username); 
__________________
My Mods Site (1.3.4, 2020 Mods)
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 09:00 AM.

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