SMF Shop
SMFShop => Items => Topic started by: chadk on September 27, 2006, 03:53:39 am
-
<?php
/**********************************************\
| SMFSHOP (Shop MOD for Simple Machines Forum) |
| (c) 2005 DanSoft Australia |
| http://www.dansoftaustralia.com/ |
\**********************************************/
//File: Karmageddon.php
// RESETS all user's karma to ZERO
//VERSION: 1.0 (Build 1)
//DATE: Sep 26th, 2006
// $Id: Karmageddon.php chadk $
class item_Karmageddon extends itemTemplate {
function getItemDetails() {
$this->authorName = "Chad";
$this->authorWeb = "http://www.aviary.info/";
$this->authorEmail = "generalchad@gmail.com";
$this->name = "KARMAGEDDON!";
$this->desc = "This will reduce EVERYONES KARMA BACK TO ZERO!!";
$this->price = 5000;
$this->require_input = false;
$this->can_use_item = true;
}
function onUse() {
global $db_prefix, $ID_MEMBER, $item_info;
$pmfrom = array(
'id' => 1,
'name' => 'Chad',
'username' => 'Chad'
);
$pmto = array(
'to' => array(1),
'bcc' => array()
);
$result = db_query("UPDATE {$db_prefix}members
SET karmaBad = 0, karmaGood = 0", __FILE__, __LINE__);
$result = db_query("DELETE FROM smf_log_karma");
sendpm($pmto, 'KARMAGEDDON!', "{$ID_MEMBER} reset everyones karma.", 0, $pmfrom);
return "Everyone has a clean slate.";
}
}
?>
-
I know of a few members that would like to use this Item!
-
This one is popular after a couple bank robbery failures... -100 karma each time they fail, then a nice Karmageddon.
-
well, I have a mod that randomly puts a floating creature on the screen (mine is a dragon) and it not only randomly gives you money or items, but it also randomly give positive or negative karma!
I have a few members that have over 100 negative because of it!
-
hahahahahah Why don't you post that one?
-
Mainly because it is not an item, but just the LLama mod posted over at SMF but extremely modified...the original mod only affected karma...but with the help of an admin at another site I was able to make it also give money and items from the shop!
-
This looks great, can we lay our hands on it?
-
I could make the zip available...but you will have to add a few things manually...first a new field in the items database and then categorize each item...
EDIT: ok I cannot attach zip files to the posts...I'll have to figure out another way!
EDIT EDIT: Ok...here is the complete package I used to install it on my forum...with all the edits. if it does not work let me know...though it may be easier to install manully.
for the Database, if you install it through packlage manager the database fields should be created for you...if not open up the create_Gdragon_db.php file to see what needs to be made where.
The key is in the part of the modification that adds this code to the Karma.php file:
// muhahahahahahahahaha, the Gdragon's have been set FREE!
function magicGdragon()
{
There i a lot of code after that but it is all to tell the mod how to choose whether to give an item and which one or money and whether it should be in the bank or in hand....any other questions just reply and I will do my best to help you guys out!
-
EDIT: ok I cannot attach zip files to the posts...I'll have to figure out another way!
Try it now :)
-
Ok...thanks to Daniel I have attached the package that I had created to install this on my forum...read my post above for some basic instructions and let me know of any issues!
-
Thanks... cool item, works perfect n_n
-
I was trying to install the dragon on SMF 1.1 RC3 today. but
2. Execute Modification ./Sources/Load.php Test failed
3. Execute Modification ./Sources/Karma.php Test successful
4. Execute Modification ./Sources/ModSettings.php Test successful
5. Execute Modification ./Sources/Subs.php Test successful
6. Execute Modification ./Themes/default/index.template.php Test failed
with these mods installed:
SMF 1.0.9 and 1.1 RC3-1 Security Patch 1.0.8/1.1 RC3
SMFShop 2.3
SMF Arcade 1.3.1-MOD-E1.5.1
Custom Action Mod 2.04
Googlebot & Spiders Mod 2.0.2
Location Mod 1.2
SMF Staff Page 1.3
Avatars at Index Mod 1.2
Media Center 1.0
Member Awards 1.0
MessagePreviewOnHover 1.4
Frequency Bar 1.0
Location Mod - Additional Maps 1.2
Karma Description Mod 2.2
Reg Bar 1.0
Signature Settings Mod 1.0
Any chance of a little help (embarrassed to ask)
-
Mainly because it is not an item, but just the LLama mod posted over at SMF but extremely modified...the original mod only affected karma...but with the help of an admin at another site I was able to make it also give money and items from the shop!
Hi TechnoDragon
I have the llama mod installed in my forum, Can you please share the code that gives money and item from the shop., Thanks !
-
For money it's very simple
on Karma.php
replace :
$field1 = ($Llamainfo['Type'] == 1) ? 'karmaGood' : 'karmaBad';
by
$field1 = ($Llamainfo['Type'] == 1) ? 'money' : 'money';
and go to Admin => Features and Options => Karma
set a negative amount for Minimum points for Evil Llama and Maximum points for Evil Llama
-
For money it's very simple
on Karma.php
replace :
$field1 = ($Llamainfo['Type'] == 1) ? 'karmaGood' : 'karmaBad';
by
$field1 = ($Llamainfo['Type'] == 1) ? 'money' : 'money';
and go to Admin => Features and Options => Karma
set a negative amount for Minimum points for Evil Llama and Maximum points for Evil Llama
Thanks alot Sakuragi O0
-
you are welcom :)
Ps: your bbk chat look good, what script it is?
-
you are welcom :)
Ps: your bbk chat look good, what script it is?
The chat script name is BlaB, Check the link below !
http://hot-things.net/
-
Thanks
-
You're a very welcome. :)