SMF Shop
SMFShop => Items => Topic started by: xfollowthereaperx on February 19, 2007, 06:13:13 am
-
It's pretty much a rock, it doesn't do anything but instead you can use it, when you use it, it just says "You eatted the cookie" and it disappears without any advantages
Why would you want this? You could tell someone "Congratulations, have a cookie O0 "
Then give them this item
(http://www.daniel15.com/forum/index.php?action=dlattach;topic=617.0;attach=92;image)
Cookie.php
<?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:: Cookie.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) *
**********************************************************************************/
if (!defined('SMF'))
die('Hacking attempt...');
class item_Cookie extends itemTemplate
{
// When this function is called, you should set all the item's
function getItemDetails()
{
// The author of the item
$this->authorName = 'xfollowthereaperx';
// The author's website
$this->authorWeb = '';
// And their email address
$this->authorEmail = 'xfollowthereaperx@hotmail.com';
// VALUES CHANGEABLE FROM WITHIN ADMIN PANEL:
// The name of the item
$this->name = 'Cookie';
// The item's description
$this->desc = 'Here, have a Cookie';
// The item's price
$this->price = 10;
//UNCHANGEABLE VALUES:
// Whether the item requires input or not.
$this->require_input = false;
// Useable?
$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)
function onUse()
{
return 'You eatted the cookie';
}
}
?>
-
Lol, thanks I will use this to give to my members when I feel they should be *greatly* rewarded..
-
do you need to add a cookie image to this ?
-
do you need to add a cookie image to this ?
You mean as an Icon? That would be nice, I've been looking for one.
-
I think I have one somewhere, I know I have a really big donut lol
*goes to browse files*
-
chocolate chip cookie image attached
-
You eatted the cookie
Ate! You ate the cookie! :D
-
lol I changed it on my site :)
-
You eatted the cookie
Ate! You ate the cookie! :D
I did that on purpose ^_~
-
Cookies are sweet right? Adding a query to update points +1 for each cookie, would be easy. I'll try that out.
-
Here a little cookie :P
Thank you for this ITEM !!!
-
works great on 1.1.6 with other mods
-
(http://newbornflash.0fees.net/Sources/shop/item_images/cookie.gif)