Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - JusPlay77

Pages: [1]
1
Requested additions / Unlimited Pets (No Use of Cage)
« on: March 14, 2008, 02:40:20 pm »
I need my SMF Pets mod to allow unlimited amount of pets for my members, without the use of a cage.php item.  Basically I need the MAX-PERMITTED to be unlimited (or really high, like 100). 

Any ideas?

2
Bugs / 'Do' Action Bug?
« on: March 03, 2008, 09:48:15 am »
Quote
ERROR: The 'do' action you passed was not valid!

When I click on Hatchery, or Leadersboard, I get the above error

3
Bugs / [ SERIOUS ISSUES WITH pet_engine.php ]
« on: February 29, 2008, 05:36:49 pm »
SMF 1.1.4
SMF Shop Mod 3 (Build 12)
SMF Pets Version 0.2
SMFShop Inventory Post Mod  Version 0.2
SMFShop Stats Mod Version 0.1

\---------------------\

My shop all of a sudden stopped working over night.  I hadn't changed anything in the code prior (It was working, and when I came back to further train my pet I got the following error:

Quote
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 's the best! Built for Battle!',
hunger = 8,
age = 1,
' at line 7
File: /home/content/x/x/x/xxxxx/html/smf/Sources/shop/pet_engine.php
Line: 305

On top of that, my pet is somehow 21 days old and Very Depressed / Starving.  (I can still see my pet through my UserCP). My pet in actuality is only 2-3 days old.

I have attached the code of the pet_engine.php to this thread:

----

Furthermore, the section that it says it has a problem with is here:

Code: [Select]
290 //Store the values back into the database(very important)
291 function store_values() {
292 global $db_prefix;
293 $result = db_query("UPDATE {$db_prefix}shop_pets
294 SET name = '{$this->name}',
295     level = {$this->level},
296     curap = {$this->curap},
297     maxap = {$this->maxap},
298     happy = {$this->happy},
299     `desc` = '{$this->desc}',
300     hunger = {$this->hunger},
301     age = {$this->age},
302     training = {$this->training},
303     trainingend = '{$this->trainingend}',
304     ownerid = {$this->ownerid}
305     WHERE pet_id = {$this->id}", __FILE__, __LINE__);
306 }

Thanks in advance 

4
Bugs / How do I Increase Max Pets Permitted.
« on: February 29, 2008, 01:22:51 am »
SMF 1.1.4
SMF Shop 3.0 (Build 12)

Cage.php
Code: [Select]
<?php
/**********************************************************************************
* SMFShop item                                                                    *
***********************************************************************************
* SMFShop: Shop MOD for Simple Machines Forum                                     *
* =============================================================================== *
* Software Version:           SMFShop 3.0 (Build 12)                              *
* $Date:: 2007-01-18 19:26:55 +1100 (Thu, 18 Jan 2007)                          $ *
* $Id:: Steal.php 79 2007-01-18 08:26:55Z daniel15                              $ *
* Software by:                DanSoft Australia (http://www.dansoftaustralia.net/)*
* Copyright 2005-2007 by:     DanSoft Australia (http://www.dansoftaustralia.net/)*
* Support, News, Updates at:  http://www.dansoftaustralia.net/                    *
*                                                                                 *
* Forum software by:          Simple Machines (http://www.simplemachines.org)     *
* Copyright 2006-2007 by:     Simple Machines LLC (http://www.simplemachines.org) *
*           2001-2006 by:     Lewis Media (http://www.lewismedia.com)             *
***********************************************************************************
* This program is free software; you may redistribute it and/or modify it under   *
* the terms of the provided license as published by Simple Machines LLC.          *
*                                                                                 *
* This program is distributed in the hope that it is and will be useful, but      *
* WITHOUT ANY WARRANTIES; without even any implied warranty of MERCHANTABILITY    *
* or FITNESS FOR A PARTICULAR PURPOSE.                                            *
*                                                                                 *
* See the "license.txt" file for details of the Simple Machines license.          *
* The latest version of the license can always be found at                        *
* http://www.simplemachines.org.                                                  *
**********************************************************************************/

if (!defined('SMF'))
die('Hacking attempt...');

class 
item_Cage extends itemTemplate
{
function getItemDetails()
{
$this->authorName 'Basilbeard';
$this->authorWeb 'www.nomicville.com';
$this->authorEmail 'basilbeard@nomicville.com';

$this->name 'Pet Cage';
$this->desc 'Increase your max pets by one!';
$this->price 500;

$this->require_input true;
$this->can_use_item true;
}

function getAddInput()
{
global $item_info$db_prefix;
return 'Max number of max pets: <input type="text" name="info1" value="' $item_info[1]  . '" /><br />';
}

function getUseInput()
{
global $db_prefix$ID_MEMBER$item_info;

$result db_query("SELECT maxpets FROM {$db_prefix}members WHERE ID_MEMBER = {$ID_MEMBER}"__FILE____LINE__);
$row mysql_fetch_assoc($result);
if ($row['maxpets'] >= $item_info[1]) {
return "You already have too many pets to use this item. Using it will just result in item loss.";
}
else {
return "Are you sure you want to use this item?";
}
}

function onUse()
{
global $db_prefix$ID_MEMBER$item_info;

$result db_query("SELECT maxpets FROM {$db_prefix}members WHERE ID_MEMBER = {$ID_MEMBER}"__FILE____LINE__);
$row mysql_fetch_assoc($result);
if ($row['maxpets'] >= $item_info[1]) {
return "Told you so!";
}
else {
$maxpets $row['maxpets'] + 1;
$result db_query("UPDATE {$db_prefix}members SET maxpets = maxpets + 1 WHERE ID_MEMBER = {$ID_MEMBER}"__FILE____LINE__);
return "You can now own up to {$maxpets} pets";
}
}
}
?>


Yes, I searched and found 4 topics on the subject of cage.  I tried to change some variables around in the code several times now, and I am just completely baffled by how I am supposed to allow my members to have a maximum of 5 pets.

--

This is what happens when I try to use the item (I have 1 pet btw)...

Quote
This item requires further input. Please complete the fields below, and then press "Use Item"
You already have too many pets to use this item. Using it will just result in item loss.

And of course using the item results in it disappearing from inventory and not changing anything.

5
General SMFShop Discussion / Question about earning SMF Points
« on: February 07, 2008, 09:16:37 am »
I have a forum that does not add to post-count (Spam Tavern).. however, even though it does not add to the users post count, they are still getting SMF Points for posting there.

Is there a way to fix this?

6
Items / Send PM to a specific member
« on: January 22, 2008, 01:14:15 pm »
I want a mod that can allow my members to purchase a "Pie" and then "throw" it at another member.  (VIA PM).. ie:

Member_01 purchases Pie
Member_01 Uses Item: "Who do you want to throw it at?"
Member_01 inputs "Member_02's name" and clicks Submit
Member_01 Pie disappears from inventory
Member_02 gets a PM with "You've been hit with a PIE! [Graphic] by Member_01

Any ideas on how this can be done?

Pages: [1]