SMF Shop

SMFShop => Items => Topic started by: xfollowthereaperx on February 19, 2007, 06:13:13 am

Title: Cookie
Post 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

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:: 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';
}

}
?>

Title: Re: Cookie item
Post by: HavoK XL on February 19, 2007, 04:52:26 pm
Lol, thanks I will use this to give to my members when I feel they should be *greatly* rewarded..
Title: Re: Cookie
Post by: perplexed on March 01, 2007, 12:38:47 am
do you need to add a cookie image to this ?
Title: Re: Cookie
Post by: xfollowthereaperx on March 01, 2007, 04:05:23 am
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.
Title: Re: Cookie
Post by: perplexed on March 01, 2007, 06:58:00 am
I think I have one somewhere,  I know I have a really big donut lol

*goes to browse files*
Title: Re: Cookie
Post by: perplexed on March 01, 2007, 11:52:32 pm
chocolate chip cookie image attached

Title: Re: Cookie
Post by: Daniel15 on March 02, 2007, 05:16:38 pm
Quote
You eatted the cookie
Ate! You ate the cookie! :D
Title: Re: Cookie
Post by: perplexed on March 05, 2007, 02:56:34 am
lol I changed it on my site :)
Title: Re: Cookie
Post by: xfollowthereaperx on March 05, 2007, 10:25:48 am
Quote
You eatted the cookie
Ate! You ate the cookie! :D
I did that on purpose ^_~
Title: Re: Cookie
Post by: Masterhand on March 06, 2007, 01:14:30 am
Cookies are sweet right? Adding a query to update points +1 for each cookie, would be easy. I'll try that out.
Title: Re: Cookie
Post by: swali on July 14, 2007, 12:28:03 am
Here a little cookie  :P
Thank you for this ITEM !!!

Title: Re: Cookie
Post by: mike dijital on October 17, 2008, 06:53:56 am
works great on 1.1.6 with other mods
Title: Re: Cookie
Post by: Argentin on November 13, 2008, 06:48:16 am
(http://newbornflash.0fees.net/Sources/shop/item_images/cookie.gif)