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.


Messages - Nascar

Pages: [1]
1
Items / Re: Level Up - SMF Pets item
« on: September 22, 2008, 01:16:13 am »
No comments this far. Something wrong?  :coolsmiley:

2
Modifications / Re: SMFPets Version 0.2
« on: September 15, 2008, 09:55:37 pm »
It's there

3
Modifications / Re: SMFPets Version 0.2
« on: September 13, 2008, 03:50:50 pm »
You can't upload php files to this site.

The file IS Profile.php, but changed to Profile.txt. Just change it back to php your self ;)

4
Modifications / Re: SMFPets Version 0.2
« on: September 11, 2008, 05:03:03 pm »
I installed this mod manually, so maybe I missed a edit that is cousing this error.


5
Modifications / Re: SMFPets Version 0.2
« on: September 07, 2008, 04:07:28 pm »
I get this error at the Show Pets function in the profile:

Fatal error: Call to undefined function showPets() in /home/simmarcu/public_html/Sources/Profile.php on line 403


Everything else works fine.

6
Items / Level Up - SMF Pets item
« on: September 07, 2008, 04:04:01 pm »
Hi everyone!

This is my first item
It's called Level Up.
What is does is increasing your pets level by xxx.
Also it makes your pet xxx happier.
You can set the amount of levels to rise, number to increase happines by and phrase to output upon use.

To use, copy the code below and save it as Level.php and then upload it to Sources/shop/items/, or download the attached file and rename it to Level.php.
Then upload it to Sources/shop/items/.

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_Level extends itemTemplate
{
function getItemDetails()
{
$this->authorName 'Nascar';
$this->authorWeb 'www.nascar.vlexo.net';
$this->authorEmail 'admin@nascar.vlexo.net';

$this->name 'Level Up';
$this->desc 'This item makes your pet xxx levels better!';
$this->price 1000;

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

function getAddInput()
{
global $item_info$db_prefix;
return 'Amount of levels to rise: <input type="text" name="info1" value="' $item_info[1]  . '" /><br />
    Amount to increase happiness by: <input type="text" name="info2" value="' 
$item_info[2]  . '" /><br />
    Phrase to output upon use: (use xNAMEx for pet name, xLEVELx for level and xHAPPYx for happiness level) <input type="text" name="info3" value="' 
$item_info[3]  . '" /> ';
}

function getUseInput()
{
global $db_prefix$ID_MEMBER;

$result db_query("SELECT numpets FROM {$db_prefix}members WHERE ID_MEMBER = {$ID_MEMBER}"__FILE____LINE__);
$row mysql_fetch_assoc($result);
if ($row['numpets'] == 0) {
return "You have no pets. If you use this item it will simply die and you loose money.";
}
$string "<select name = 'petid'>";
$result db_query("SELECT * FROM {$db_prefix}shop_pets WHERE ownerid = {$ID_MEMBER}"__FILE____LINE__);
while ($row mysql_fetch_assoc($result)) {
$string .= "<option value = '{$row['pet_id']}'>{$row['name']}</option>";
}
$string .= "</select>";
return "Select which animal that will be Leveled Up: ".$string;
}

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

if (!isset($_POST['petid'])) {
return "I told you it would die!";
}
else {
$result db_query("UPDATE {$db_prefix}shop_pets SET level = level + {$item_info[1]}, happy = happy + {$item_info[2]} WHERE pet_id = {$_POST['petid']} AND ownerid = {$ID_MEMBER}"__FILE____LINE__);
$result db_query("SELECT name, level, happy from {$db_prefix}shop_pets WHERE pet_id = {$_POST['petid']} AND ownerid = {$ID_MEMBER}"__FILE____LINE__);
$row mysql_fetch_assoc($result);
$banana = array();
$explode explode(' ' $item_info[3]);
foreach ($explode as $word) {
if ($word == 'xNAMEx') {
$banana[] = $row['name'];
}
elseif ($word == 'xLEVELx') {
$banana[] = $row['level'];
}
elseif ($word == 'xHAPPYx') {
$banana[] = $row['happy'];
}
else {
$banana[] = $word;
}
}
$return implode(' '$banana);
return $return;
}
}
}
?>


Hope you like this!  :coolsmiley:

7
Modifications / Re: SMFPets Version 0.2
« on: August 17, 2008, 04:51:40 pm »
I get this error at the Show Pets function in the profile:

Fatal error: Call to undefined function showPets() in /home/simmarcu/public_html/Sources/Profile.php on line 403


Everything else works fine.

8
Modifications / Re: SMF Lottery Mod
« on: August 04, 2008, 12:51:06 am »
Stupid question:

Where do I start the drawing?

Pages: [1]