I get no error when I use my item, but I get this error if I go to it directly:
Fatal error: Class item_firescroll: Cannot inherit from undefined class itemtemplate in
Here it is:
<?php
/**********************************************\
| SMFSHOP (Shop MOD for Simple Machines Forum) |
| (c) 2005 DanSoft Australia |
| http://www.dansoftaustralia.com/ |
\**********************************************/
//File: testitem.php
// Test Item (requires NO input)
//VERSION: 1.1 (Build 4)
//DATE: 10th April 2005
// $Id: testitem.php 3 2006-07-08 10:01:21Z daniel15 $
//your class should always be called item_filename, eg. if your file is
//myCoolItem.php then the class should be called 'item_myCoolItem'. This
//class should always extend itemTemplate.
class item_FireScroll extends itemTemplate {
//when this function is called, you should set all the item's
//variables (see inside this example)
function getItemDetails() {
//VALUES CHANGABLE FROM WITHIN ADMIN PANEL:
//the name of the item
$this->name = "Firebending Scroll";
//the item's description
$this->desc = "Learn a new attack! Or an old one...!";
//the item's price
$this->price = 500;
//UNCHANGABLE VALUES:
//whether the item requires input or not. In this case, we don't need
//any input
$this->require_input = false;
//set this to 'false' if the item is unusable. This is good for display
//items.
$this->can_use_item = true;
}
//since this item requires no input, we don't need to have a getUseInput function
//here (see the testitem2.php file if you want to make an item that needs input.
//the is where all the fun begins. This function is called when
//the user actually uses the item. Return stuff, DON'T ECHO!
function onUse() {
$quotes = file('fireattacks.txt');
return ($quotes[rand(0, count($quotes) -1)]);
}
}
?>