16
Modifications / Re: SMF Lottery Mod
« on: March 29, 2013, 08:09:48 am »
Links broken. Anyone have a working link? That would help.
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.
You took the dog for a walk, when it met another dog and 'talked' to eachother.
<?php
// This is just to make sure that the item is used through SMF, and people aren't accessing it directly
// Additionally, this is used elsewhere in SMF (in almost all the files)
if (!defined('SMF'))
die('Hacking attempt...');
class item_fortune extends itemTemplate
{
// When this function is called, you should set all the item's
// variables (see inside this example)
function getItemDetails() {
// The author's name
$this->authorName = 'coolgem923';
// The author's email address
$this->authorEmail = 'private';
// --- Values changeable from within the SMFShop admin panel ---
// The name of the item
$this->name = "Fortune Cookie";
// The item's description
$this->desc = "What's your fortune?";
// The item's price
$this->price = 50;
// --- Unchangeable values ---
// These values can not be changed when adding the item, they are stuck on what you set them to here.
// Whether inputs are required by this item. In this case, we get no inputs.
$this->require_input = false;
$this->can_use_item = true;
}
function onUse()
{
$result = Rand (1,8);
if ($result ==1)
{
Return "You may be rich.";
}
if ($result ==2)
{
Return "Evil things are coming your way...";
}
if ($result ==3)
{
Return "You will find a little suprise from your friend.";
}
if ($result ==4)
{
Return "Your long-lost friend will see you again.";
}
if ($result ==5)
{
Return "Your favorite thing may fall off a cliff and you will never see it again.";
}
if ($result ==6)
{
Return "You will win the lottery.";
}
if ($result ==7)
{
Return "You will turn into a humble king.";
}
if ($result ==8)
{
Return "You will journey to a land far away of peace and quiet.";
}
}
}
?>
<?php
/**********************************************************************************
* SMFShop item *
***********************************************************************************
* SMFShop: Shop MOD for Simple Machines Forum *
* =============================================================================== *
* Software Version: SMFShop 3.1 (Build 14) *
* Software by: DanSoft Australia (http://www.dansoftaustralia.net/)*
* Copyright 2009 by: vbgamer45 (http://www.smfhacks.com) *
* 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_gameconsole extends itemTemplate
{
function getItemDetails()
{
$this->authorName = 'coolgem923';
$this->authorWeb = 'none';
$this->authorEmail = 'private';
$this->name = 'Game Console';
$this->desc = 'Game Console for users to use.';
$this->price = 50;
$this->require_input = false;
$this->can_use_item = true;
$this->addInput_editable = true;
}
function getAddInput()
{
global $item_info;
if ($item_info[1] == 0) $item_info[1] = '';
return '
Name of game console (you may use BBCode here):
<textarea name="info1" rows="1" style="width: 100%">' . $item_info[1] . '</textarea>';
}
function onUse()
{
global $item_info;
// What the site says when the game is 'played'.
return parse_bbc("You booted up your $item_info[1] and played a very fun game.");;
return parse_bbc($item_info[1]);
}
}
?>
<?php
/**********************************************************************************
* SMFShop item *
***********************************************************************************
* SMFShop: Shop MOD for Simple Machines Forum *
* =============================================================================== *
* Software Version: SMFShop 3.1 (Build 14) *
* Software by: DanSoft Australia (http://www.dansoftaustralia.net/)*
* Copyright 2009 by: vbgamer45 (http://www.smfhacks.com) *
* 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_fooditem extends itemTemplate
{
function getItemDetails()
{
$this->authorName = 'coolgem923';
$this->authorWeb = 'none';
$this->authorEmail = 'private';
$this->name = 'Food';
$this->desc = 'Food for users to eat.';
$this->price = 1;
$this->require_input = false;
$this->can_use_item = true;
$this->addInput_editable = true;
}
function getAddInput()
{
global $item_info;
if ($item_info[1] == 0) $item_info[1] = '';
return '
Name of food (you may use BBCode here):
<textarea name="info1" rows="1" style="width: 100%">' . $item_info[1] . '</textarea>';
}
function onUse()
{
global $item_info;
// What the site says when the food is eaten.
return parse_bbc("You ate a $item_info[1].");;
return parse_bbc($item_info[1]);
}
}
?>