Mysidia Adoptables Support Forum  

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

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #8  
Old 04-01-2016, 09:56 PM
tahbikat's Avatar
tahbikat tahbikat is offline
Member
 
Join Date: Feb 2014
Location: Louisiana
Posts: 408
Gender: Female
Credits: 69,298
tahbikat is on a distinguished road
Default

Try this? I haven't tested it so just let me know if it works or not. Replace the parts that need replacing, from the $item line to the remove item line.

PHP Code:
           
        $item 
"Fishing pole";
        
$item2 "Worm Bait";
        
$hasitem $mysidia->db->select("inventory", array("quantity"), "itemname ='{$item}' and owner='{$mysidia->user->username}'")->fetchColumn();
        
$hasitem2 $mysidia->db->select("inventory", array("quantity"), "itemname ='{$item2}' and owner='{$mysidia->user->username}'")->fetchColumn();
               if(
$hasitem && $hasitem2){ 
            
$today date("d"); // Day of the month
            
            // 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 <= 50 || $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
                
                
$mysidia->db->update("users", array("exploretimes" => ($updatedExploreTimes)), "username = '{$mysidia->user->username}'"); 
$item_name "Worm bait";
$qty 1;
$item_name = new PrivateItem($item_name$mysidia->user->username);
$item_name->remove($qty$mysidia->user->username); 
Reply With Quote
 

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


All times are GMT -5. The time now is 12:53 PM.

Currently Active Users: 2618 (0 members and 2618 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 - 2025, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636