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.


Messages - Daisuke_aurora

Pages: [1]
1
Items / Re: Role-Play item?
« on: September 06, 2009, 05:33:46 pm »
Basically I just made a bunch of fields in the SMF database to track the stats and then made ites that upon use would adjust the stat. It was easier once I actually learned PHP haha.

2
Items / Re: Insurance (Still needs work!)
« on: September 09, 2008, 11:29:00 pm »
Unfortunately, it's now often at all...

3
Requested additions / Re: download
« on: September 09, 2008, 11:24:32 pm »
Edit the attached file by adding the link where it says LINK HERE, Rename it download.php, and then put it into your sources/shop/items folder. You can make several Items like this for different downloads, just make sure to name it something different and put in the right link.

4
Items / Re: Role-Play item?
« on: September 02, 2008, 11:38:09 pm »
NVM, I got it myself. But I need some help with PHP and coding, if you'd liek to join my site as a coding admin?

5
Items / Role Play stats Item (needs work)
« on: August 19, 2008, 03:58:17 am »
Ok. I run a forun where members can RP using a stat system (the custom profile field mod). Basically, members have a set atk power, def power, etc, displayed by the CP field mod. I recently took the Add to post count item and tweaked it to add to the CP fields, and got this:

Quote
<?php
/**********************************************************************************
* SMFShop item                                                                    *
***********************************************************************************
* SMFShop: Shop MOD for Simple Machines Forum                                     *
* =============================================================================== *
* Software Version:           SMFShop 3.0 (Build 12)                              *
* $Date:: 2008-08-18 14:30:00 +1100 (Mon, 18 Aug 2008)                          $ *
* $Id:: IncreaseHP.php 79 2008-08-18 12:30:00Z Daisuke_aurora                   $ *
* Software by:                Daisuke (http://www.daisukesdojo.heliohost.org/)    *
* Copyright 2005-2007 by:     Daisuke (http://www.daisukesdojo.heliohost.org/)    *
* Support, News, Updates at:  http://www.daisukesdojop.heliohost.org/             *
*                                                                                 *
* 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_IncreaseHP extends itemTemplate
{
   function getItemDetails()
   {
      $this->authorName = 'Daisuke';
      $this->authorWeb = 'http://www.daisukesdojo.heliohost.org/';
      $this->authorEmail = 'Daisuke_aurora@hotmail.com';

      $this->name = 'Increase HP by xxx';
      $this->desc = 'Increase your HP by xxx';
      $this->price = 1000;

      $this->require_input = false;
      $this->can_use_item = true;
      $this->addInput_editable = true;
   }
   
   // See 'AddToPostCount.php' for info on how this works
   function getAddInput()
   {
      global $user_info;
      if ($item_info[1] == 0) $item_info[1] = 10;
      return 'Amount to increase HP by: <input type="text" name="info1" value="' . $item_info[1] . '" />';
   }

   function onUse()
   {
      global $db_prefix, $ID_MEMBER, $item_info;

      db_query("
         UPDATE {$db_prefix}themes
         SET value = value + {$item_info[1]}
         WHERE ID_MEMBER = {$ID_MEMBER}", __FILE__, __LINE__);
      return 'Successfully increased your HP by ' . $item_info[1] . '!';
   }

}

?>

However, there is one problem: The item cannot tell the difference between the 8 CP fields, so it increases ALL of them by 10, not just one. Can anyone tell me how to make it target only one of these fields?

6
Items / Re: Role-Play item?
« on: August 04, 2008, 10:21:28 pm »
Anybody want to help me with this?

7
Items / Role-Play item?
« on: July 15, 2008, 09:42:17 pm »
Can someone help me make an item? I just want it to be an item that when it is used, will increase a number in a custom profile field. I run an SMF RP site, and we use a stat system, so as members RP more and get better, they can increase their stats to become better fighters. But, I want to make it automated (I.e. Admin don't have to go and change their CP fields to show increases) by making an SMF Shop item that will bascially set the proper CP field to it's value + the item's increase value. Any way an item like this could be made?

8
Installation Problems / SMF Shop 3.0 Install problem
« on: April 16, 2008, 01:50:45 am »
The shop tab shows up, but clicking it tells me this:

Quote
Parse error: syntax error, unexpected T_DO in /www/99k.org/d/a/i/daisukesdojo/htdocs/Forum/Sources/shop/Shop.php on line 263

Any advice?

Pages: [1]