MyBB Hacks

Full Version: [module idea] random effect item
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
This is just one of those "random" thoughts I had that got pushed a bit further after looking at the demo function.

I have an idea for an item that would produce a random effect, such as decreasing or increasing the consumer's post count, decreasing or increasing a target user's post count or money, or removing all of the consumer's money (rare case, but this would also include the bank if enabled)

and also while it's fresh on my mind, ZiNgA, I think you left a trivial typo in your "simple demo module" comments:

Code:
// add your items in the _activate() function
function simpledemo_activate() {
	myplaza_add_item(array(
		"name"			=> 'Add 1000 to post count',
		"description"	=> 'Adds 1000 to your post count.',
		"cost"			=> 10.00,
	));
}

// remove all items we added earlier in the _deactivate() function <--shouldn't that be "_activate()", or am I completely misreading it? ~Zeta
function simpledemo_deactivate() {
	myplaza_remove_module_items();
}


(personally, I would rephrase the line in question as "remove all items we added using _activate() with the _deactivate() function")

^ Yeah, you're right about that Tongue

As for a random effect item, well, it's probably best if you made one yourself, because there's simply too many possible things to include...
And things such as post count would be reset anyway if you reset the configuration thingamajig.
ZiNgA BuRgA Wrote:As for a random effect item, well, it's probably best if you made one yourself, because there's simply too many possible things to include...

I don't have that much PHP experience, sadly, so unless someone gives me a crash course in PHP as it partains to MyBB and MyPlaza (and a small bit on where MySQL falls into this), I'm not gonna be able to [reliably] do this one myself. however, I do have some scripting language and programming language experience (built a few programs/games in VB6 all by myself and attempted (with some success) to debug some parts of a C++ program [StepMania, anyone?]), so if I can get the basics of what functions do what, I can probably get to the point of making the module myself. (read: I need more demo modules)

@blueparukia>>um, yeah, the only two people on my forum that have access to THAT part of the MyBB ACP is me and the domain owner himself.
Having programming experience will help you greatly learn PHP (if you ask me, PHP is probably one of the easiest languages - much easier than Visual Basic IMO).
I've got a quick tutorial on MyBB plugins if you want, here: http://mybbhacks.zingaburga.com/showthread.php?tid=74
Reference URL's