Show Posts

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.


Topics - arcanine

Pages: [1]
1
General SMFShop Discussion / pet system
« on: July 14, 2008, 05:34:46 am »
hi there I have a lot of items in my shop that are "monsters"

I want to have three fields in my database: defense, attack, hp

an a option for a member to attack another monster

(both monster's attack values would be inflected on each other minus
the defense value cutting finally into the hp)

when a monster loses all hp I want the item to return to the shop so that
its in stock again


unfortunely I only have a breif understanding of mysql and php
has anyone got any tips on where to start etc

2
Items / destory inventory item
« on: May 06, 2008, 04:20:29 am »
Hello there I've been running your smf shop script over at http://dinogod.com
for a while now, I have a shop full of "pokemon" which are test items which then are on display in signatures but I figured as a user how would someone get rid of the pokemon so I decided to try and make an item that would "kill" them all without admin help

Now I claim no knowledge of php at all but I tried to merge two snippets together to get what I wanted before I go ahead and test it I wanted to know
if someone could just check that I wouldn't be deleting my database by using this item or if there are any obvious security problems with this item or if it would work at all lol

thanks  :P

Code: [Select]
#
<?php
#
/**********************************************\
#
| SMFSHOP (Shop MOD for Simple Machines Forum) |
#
| (c) 2007 DanSoft Australia |
#
| http://www.dansoftaustralia.net/ |
#
\**********************************************/
#
 
#
//File: DisplayMessage.php
#
// Item - Display a message when used
#
 
#
// VERSION: Not included in SMFShop yet
#
 
#
class item_DisplayMessage extends itemTemplate {
#
function getItemDetails() {
#
$this->authorName "Daniel15";
#
$this->authorWeb "http://www.dansoftaustralia.net/";
#
$this->authorEmail "dansoft@dansoftaustralia.net";
#
 
#
$this->name "Poison";
#
$this->desc "Destories all items and pokemon";
#
$this->price 20;
#
#
$this->require_input false;
#
$this->can_use_item true;
#
}
#

#
 
#
function onUse() {
$result db_query("DELETE FROM {$db_prefix}shop_inventory
WHERE ownerid = 
{$ID_MEMBER}",
__FILE____LINE__);
return 
"Inventory destroyed";
}
#
 
#
}
#
 
#
?>

Pages: [1]